body.as-lock { overflow: hidden; }
#automation-status-card { width: min(390px, 100%); }
.as-card { padding: 10px 12px; border: 1px solid #bae6fd; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(15,23,42,.08); }
.as-card.as-failed { border-color: #fecaca; background: #fffafa; }
.as-card.as-success { border-color: #a7f3d0; }
.as-card-top { display: flex; align-items: flex-start; gap: 6px; }
.as-card-main { min-width: 0; flex: 1; display: flex; align-items: flex-start; gap: 8px; padding: 0; border: 0; text-align: left; background: transparent; cursor: pointer; }
.as-card-main:hover strong { text-decoration: underline; text-underline-offset: 2px; }
.as-status-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #0ea5e9; }
.as-failed .as-status-dot, .as-failed .as-progress span { background: #ef4444; }
.as-success .as-status-dot, .as-success .as-progress span { background: #10b981; }
.as-pulse { animation: as-pulse 1.2s infinite; }
@keyframes as-pulse { 50% { opacity: .35; transform: scale(.75); } }
.as-card-text { min-width: 0; display: block; }
.as-card-text strong, .as-card-text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-card-text strong { color: #334155; font-size: 12px; line-height: 1.3; }
.as-card-text small { margin-top: 3px; color: #64748b; font-size: 10px; }
.as-dismiss { flex: 0 0 auto; width: 25px; height: 25px; border: 0; border-radius: 7px; color: #94a3b8; background: transparent; cursor: pointer; }
.as-dismiss:hover { color: #dc2626; background: #fee2e2; }
.as-progress { height: 3px; margin: 8px 0 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.as-progress span { display: block; height: 100%; border-radius: inherit; background: #0ea5e9; }
.as-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.as-detail-button { padding: 2px 7px; border: 1px solid #cbd5e1; border-radius: 6px; color: #475569; background: #fff; font-size: 10px; cursor: pointer; }
.as-detail-button:hover { border-color: #64748b; color: #0f172a; }
.as-card-actions time { overflow: hidden; color: #94a3b8; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
#automation-detail-modal { position: fixed; inset: 0; z-index: 11000; display: flex; align-items: center; justify-content: center; padding: 20px; }
#automation-detail-modal.as-hidden { display: none; }
.as-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15,23,42,.52); backdrop-filter: blur(3px); }
.as-modal-panel { position: relative; width: min(760px, 100%); max-height: min(82vh, 820px); overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(15,23,42,.28); }
.as-modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 18px; color: #fff; background: #0f172a; }
.as-modal-header p { margin: 0 0 5px; color: #67e8f9; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.as-modal-header h2 { margin: 0; font-size: 20px; }
.as-close { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }
.as-detail-body { max-height: calc(82vh - 85px); overflow-y: auto; padding: 22px 24px 24px; }
.as-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.as-summary-grid div { padding: 11px 12px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.as-summary-grid span, .as-summary-grid strong { display: block; }
.as-summary-grid span { margin-bottom: 4px; color: #94a3b8; font-size: 10px; }
.as-summary-grid strong { overflow-wrap: anywhere; color: #334155; font-size: 12px; }
.as-error-box, .as-result-box, .as-log-box { margin-top: 16px; }
.as-error-box { padding: 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; }
.as-result-box { padding: 14px; border: 1px solid #a7f3d0; border-radius: 12px; background: #ecfdf5; }
.as-error-box h3, .as-result-box h3, .as-log-box h3 { margin: 0 0 9px; color: #334155; font-size: 13px; }
.as-error-box pre, .as-result-box pre { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #7f1d1d; font: 11px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; }
.as-result-box pre { color: #065f46; }
.as-log-box ol { margin: 0; padding: 0; list-style: none; }
.as-log-box li { display: grid; grid-template-columns: 135px 56px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; color: #475569; font-size: 11px; }
.as-log-box li time { color: #94a3b8; }
.as-log-box li span { font-weight: 700; color: #0284c7; }
.as-log-box li.as-log-error span { color: #dc2626; }
.as-log-box li p { margin: 0; overflow-wrap: anywhere; }
.as-no-log { padding: 18px; border-radius: 10px; color: #94a3b8; text-align: center; background: #f8fafc; font-size: 11px; }
.as-bottom-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.as-bottom-actions button { padding: 8px 13px; border: 1px solid #cbd5e1; border-radius: 9px; color: #475569; background: #fff; font-size: 12px; cursor: pointer; }
#as-dismiss-from-detail { color: #dc2626; border-color: #fecaca; }
@media (max-width: 640px) { .as-summary-grid { grid-template-columns: 1fr; } .as-log-box li { grid-template-columns: 1fr; gap: 3px; } .as-detail-body { padding: 16px; } }
