:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #090b14; color: #f7f8ff; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.automation-shell { min-height: 100dvh; display: grid; grid-template-columns: 340px minmax(0, 1fr); background: radial-gradient(720px 500px at 70% -10%, rgba(100, 76, 220, .14), transparent 65%), #090b14; }
.automation-sidebar { min-height: 100dvh; border-right: 1px solid #273043; background: rgba(13, 17, 29, .96); }
.automation-main { width: min(1540px, 100%); margin: 0 auto; padding: 44px clamp(24px, 5vw, 80px) 76px; }
.automation-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 38px; border-bottom: 1px solid #262e40; }
.automation-head-copy { max-width: 840px; }
.automation-head-copy p, .section-heading p, .runs-head p, .dialog-head p { margin: 0 0 10px; color: #b5a0ff; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.automation-head-copy h1 { max-width: 760px; margin: 0; letter-spacing: -.045em; font-size: clamp(32px, 4vw, 58px); line-height: 1.03; }
.automation-head-copy > span { display: block; max-width: 700px; margin-top: 16px; color: #a8b1c7; font-size: 16px; line-height: 1.65; }
.automation-primary, .automation-secondary { min-height: 44px; border-radius: 12px; padding: 0 17px; border: 1px solid transparent; font-weight: 750; white-space: nowrap; }
.automation-primary { color: #fff; background: linear-gradient(135deg, #8063ff, #4da8ff); box-shadow: 0 10px 26px rgba(96, 77, 224, .2); }
.automation-primary:hover { filter: brightness(1.07); }
.automation-primary.compact { min-height: 38px; padding: 0 13px; font-size: 13px; }
.automation-primary:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(1); }
.automation-secondary { color: #dde3f4; background: #151a27; border-color: #333e54; }
.automation-secondary:hover { background: #1d2434; }
.mobile-menu-button { display: none; }
.automation-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0 48px; }
.automation-overview article, .template-card, .automation-detail, .automation-runs { border: 1px solid #2a3449; border-radius: 18px; background: linear-gradient(150deg, rgba(26, 31, 46, .92), rgba(15, 19, 29, .98)); }
.automation-overview article { min-height: 106px; padding: 20px 22px; display: grid; align-content: center; gap: 6px; }
.automation-overview b { font-size: 23px; letter-spacing: -.03em; }
.automation-overview span { color: #929db4; font-size: 13px; }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 18px; }
.section-heading h2, .runs-head h2 { margin: 0; font-size: 21px; letter-spacing: -.026em; }
.section-heading > span { max-width: 360px; color: #939db3; font-size: 14px; line-height: 1.5; text-align: right; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.template-card { min-height: 214px; padding: 21px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; color: inherit; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.template-card:hover { transform: translateY(-2px); border-color: #725de2; background: linear-gradient(145deg, #212541, #151a28); }
.template-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #cfc4ff; border: 1px solid #6752cf; background: #292348; font-size: 18px; }
.template-card b { font-size: 17px; }
.template-card span { color: #a7b0c4; font-size: 14px; line-height: 1.5; }
.template-card small { margin-top: auto; color: #ad9bff; font-size: 12px; font-weight: 750; }
.automation-connections { margin-top: 48px; }
.section-heading-action { display: flex; max-width: 500px; align-items: center; justify-content: flex-end; gap: 13px; }
.section-heading-action > span { color: #939db3; font-size: 14px; line-height: 1.5; text-align: right; }
.connection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.connection-card { min-height: 184px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; color: inherit; border: 1px solid #2a3449; border-radius: 16px; background: linear-gradient(150deg, rgba(26, 31, 46, .92), rgba(15, 19, 29, .98)); text-align: left; transition: border-color .18s ease, transform .18s ease; }
.connection-card:hover { border-color: #6b58cc; transform: translateY(-2px); }
.connection-card-top { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.connection-card-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #5545a5; border-radius: 10px; color: #d2c6ff; background: #24203e; font-size: 15px; }
.connection-card b { font-size: 15px; }
.connection-card p { min-height: 38px; margin: 0; color: #9ca7bc; font-size: 12px; line-height: 1.5; }
.connection-card small { margin-top: auto; color: #ac9bff; font-weight: 750; font-size: 11px; }
.connection-card .connection-status { padding: 4px 6px; border-radius: 999px; color: #aab5cb; background: #222a3a; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.connection-card.configured .connection-status { color: #91ecbd; background: #183d30; }
.connection-safety { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border: 1px solid #2c3750; border-radius: 13px; color: #a9b4c8; background: rgba(24, 31, 45, .72); font-size: 13px; line-height: 1.55; }
.connection-safety b { flex: 0 0 auto; color: #d8dfff; }
.automation-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 16px; margin-top: 40px; align-items: start; }
.automation-detail, .automation-runs { min-height: 410px; padding: 26px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 21px; border-bottom: 1px solid #293348; }
.detail-top p { color: #a596ee; font-size: 11px; letter-spacing: .14em; font-weight: 800; margin: 0 0 7px; }
.detail-top h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.detail-top span { display: block; margin-top: 8px; color: #8e9ab2; font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 999px; color: #8af0bd; background: rgba(37, 160, 98, .13); border: 1px solid rgba(64, 199, 124, .22); font-size: 12px; font-weight: 750; }
.status-pill.paused { color: #d6b66a; background: rgba(183, 133, 40, .12); border-color: rgba(216, 162, 64, .2); }
.automation-flow { margin-top: 26px; display: grid; gap: 0; }
.flow-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; position: relative; padding: 0 0 22px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 37px; width: 1px; height: calc(100% - 15px); background: #3a4560; }
.flow-number { width: 35px; height: 35px; position: relative; z-index: 1; border-radius: 50%; display: grid; place-items: center; color: #cabfff; background: #24233c; border: 1px solid #6959c5; font-size: 12px; font-weight: 800; }
.flow-step b { display: block; font-size: 14px; }
.flow-step span { display: block; margin-top: 5px; color: #a3adc1; font-size: 13px; line-height: 1.48; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 25px; margin-top: 25px; border-top: 1px solid #293348; }
.detail-danger { color: #ed9d9f; background: transparent; border: 0; padding: 0 4px; font-size: 13px; }
.runs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid #293348; }
.run-list { display: grid; gap: 0; }
.run-row { padding: 17px 0; border-bottom: 1px solid #242d40; }
.run-row:last-child { border-bottom: 0; }
.run-row-top { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.run-row b { font-size: 13px; }
.run-row time, .run-row p { color: #929db2; font-size: 12px; line-height: 1.5; }
.run-row time { white-space: nowrap; }
.run-row p { margin: 10px 0 0; white-space: pre-wrap; }
.run-state { border-radius: 999px; padding: 5px 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.run-state.queued, .run-state.running { color: #afcaff; background: #1d3154; }
.run-state.completed { color: #91ecbd; background: #173d30; }
.run-state.failed { color: #ffabab; background: #48282d; }
.runs-empty { color: #8d98ae; font-size: 14px; line-height: 1.6; }
.markdown-output { color: #c3cbdb; font-size: 13px; line-height: 1.58; }
.markdown-output > :first-child { margin-top: 11px; }
.markdown-output p { margin: 10px 0; }
.markdown-output h3, .markdown-output h4 { margin: 17px 0 7px; color: #f2f4fb; font-size: 14px; line-height: 1.35; }
.markdown-output h4 { font-size: 13px; }
.markdown-output ul { margin: 9px 0; padding-left: 19px; }
.markdown-output li { margin: 5px 0; }
.markdown-output hr { height: 1px; margin: 16px 0; border: 0; background: #334057; }
.markdown-output blockquote { margin: 12px 0; padding: 9px 11px; border-left: 3px solid #8e76ff; border-radius: 0 8px 8px 0; background: rgba(112, 88, 220, .1); color: #d3cafa; }
.markdown-output code { padding: 1px 5px; border-radius: 5px; background: #242b3b; color: #dcd3ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.markdown-table-wrap { width: 100%; margin: 12px 0; overflow-x: auto; border: 1px solid #313c53; border-radius: 9px; }
.markdown-output table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 12px; }
.markdown-output th, .markdown-output td { padding: 8px 9px; border-bottom: 1px solid #2d374d; text-align: left; vertical-align: top; }
.markdown-output th { color: #e7ebf6; background: #1d2535; font-weight: 750; }
.markdown-output tr:last-child td { border-bottom: 0; }
.empty-state { min-height: 355px; display: grid; place-content: center; justify-items: start; gap: 12px; max-width: 430px; }
.empty-state b { font-size: 22px; }
.empty-state span { color: #a0abc0; line-height: 1.6; }
.automation-history .automation-history-row { width: 100%; text-align: left; border: 0; border-left: 2px solid transparent; background: transparent; color: #dbe1ef; padding: 11px 13px; border-radius: 8px; display: grid; gap: 4px; }
.automation-history .automation-history-row:hover { background: #181e2c; }
.automation-history .automation-history-row.selected { border-left-color: #917dff; background: #252040; }
.automation-history-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.automation-history-row span { color: #8f9ab0; font-size: 11px; }
.automation-history-row small { color: #a99aff; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.automation-dialog { width: min(660px, calc(100vw - 30px)); max-height: min(880px, calc(100dvh - 30px)); overflow: auto; color: #f5f6fc; border: 1px solid #394561; border-radius: 20px; background: #131824; box-shadow: 0 28px 90px rgba(0, 0, 0, .55); padding: 0; }
.automation-dialog::backdrop { background: rgba(3, 5, 10, .72); backdrop-filter: blur(4px); }
.automation-dialog form { padding: 26px; display: grid; gap: 17px; }
.dialog-head { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.dialog-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.dialog-close { width: 34px; height: 34px; border: 1px solid #374157; color: #c7d0e1; background: #1a2030; border-radius: 10px; font-size: 23px; line-height: 1; }
.automation-dialog label { display: grid; gap: 8px; color: #cbd3e2; font-size: 13px; font-weight: 700; }
.automation-dialog input:not([type="checkbox"]), .automation-dialog select, .automation-dialog textarea { width: 100%; border: 1px solid #354057; border-radius: 11px; color: #f5f6fb; background: #0e131e; outline: none; padding: 11px 12px; font-weight: 500; }
.automation-dialog textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.automation-dialog input:focus, .automation-dialog select:focus, .automation-dialog textarea:focus { border-color: #7f6bea; box-shadow: 0 0 0 3px rgba(126, 107, 234, .14); }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.approval-option { grid-template-columns: 18px 1fr; align-items: start; padding: 13px; border-radius: 12px; border: 1px solid #303a50; background: #171d2a; }
.approval-option input { margin: 3px 0 0; accent-color: #8063ff; }
.approval-option span { display: grid; gap: 4px; }
.approval-option small { color: #96a1b7; line-height: 1.45; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.run-notice { padding: 12px; margin: 0; color: #aeb9ce; border-radius: 11px; font-size: 13px; line-height: 1.5; background: #1a2130; border-left: 3px solid #8063ff; }
.run-file-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.automation-file-upload { display: inline-flex !important; width: auto !important; align-items: center; min-height: 42px; padding: 0 13px; border: 1px solid #3a465e; border-radius: 11px; color: #cdd7e8 !important; background: #171e2c; cursor: pointer; font-size: 13px !important; }
.automation-file-upload:hover { border-color: #7563dc; background: #202940; }
.automation-file-upload input { display: none; }
.run-attachment-strip { display: flex; min-height: 0; flex-wrap: wrap; gap: 8px; }
.run-attachment-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #465373; border-radius: 9px; background: #20263a; color: #dbe2f1; font-size: 12px; }
.run-attachment-chip span { max-width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-attachment-chip button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; color: #abb7cd; background: transparent; line-height: 1; }
.run-attachment-chip button:hover { color: #ffd3d6; background: #5a2e39; }
.run-document-note { display: block; margin-top: 10px; color: #a7b2c7; font-size: 11px; }
.automation-dialog label small { color: #929eb5; font-size: 11px; font-weight: 500; }
.automation-library-dialog { width: min(720px, calc(100vw - 30px)); }
.library-dialog-inner { padding: 26px; display: grid; gap: 16px; }
.library-search { display: flex !important; width: 100%; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid #354057; border-radius: 11px; color: #9ba7bc; background: #0e131e; }
.library-search input { width: 100%; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.automation-library-list { display: grid; min-height: 220px; max-height: min(50dvh, 440px); gap: 7px; overflow: auto; }
.automation-library-row { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid #2f3a50; border-radius: 11px; background: #161c29; color: #e5eaf5; cursor: pointer; }
.automation-library-row:hover { border-color: #6352bf; background: #1c2332; }
.automation-library-row input { accent-color: #8063ff; }
.automation-library-file-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #d6ceff; background: #292343; font-size: 12px; font-weight: 800; }
.automation-library-copy { min-width: 0; display: grid; gap: 3px; }
.automation-library-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.automation-library-copy span { color: #929db3; font-size: 11px; }
.library-empty { color: #94a0b6; font-size: 13px; line-height: 1.5; }
.automation-roadmap { margin-top: 48px; }
.roadmap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.roadmap-grid article { min-height: 177px; padding: 20px; border: 1px solid #2c374d; border-radius: 16px; background: linear-gradient(145deg, rgba(24, 29, 43, .88), rgba(13, 17, 26, .96)); }
.roadmap-grid span { color: #b6a1ff; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.roadmap-grid h3 { margin: 14px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.roadmap-grid p { margin: 0; color: #a1acc1; font-size: 13px; line-height: 1.55; }
.automation-toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(410px, calc(100vw - 44px)); padding: 13px 16px; border-radius: 12px; background: #1d2738; border: 1px solid #3a4a65; color: #e8edfb; box-shadow: 0 16px 40px rgba(0, 0, 0, .34); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.automation-toast.show { opacity: 1; transform: translateY(0); }
.automation-toast.error { border-color: #9a454d; color: #ffd5d7; }
@media (max-width: 1080px) { .automation-main { padding-inline: 34px; } .automation-workspace { grid-template-columns: 1fr; } .automation-runs { min-height: 230px; } .template-grid { grid-template-columns: 1fr; } .connection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .template-card { min-height: 172px; } }
@media (max-width: 900px) { .automation-shell { display: block; } .automation-sidebar { position: fixed !important; z-index: 90; top: 0; bottom: 0; left: 0; width: min(320px, calc(100vw - 52px)) !important; min-width: 0; height: 100dvh !important; padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-110%); transition: transform .2s ease; } .automation-sidebar.is-open { transform: translateX(0); } .automation-main { padding: 20px 20px 52px; } .automation-top { gap: 17px; padding: 2px 0 28px; } .mobile-menu-button { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border: 1px solid #354057; border-radius: 12px; background: #161c29; color: #eff2fa; font-size: 20px; } .automation-head-copy h1 { font-size: clamp(30px, 9vw, 46px); } .automation-head-copy > span { font-size: 14px; } .automation-top > .automation-primary { display: none; } .automation-overview { grid-template-columns: 1fr; margin-bottom: 38px; } .automation-overview article { min-height: 84px; } }
@media (max-width: 560px) { .automation-main { padding-inline: 16px; } .automation-top { align-items: flex-start; } .automation-head-copy p { font-size: 10px; } .automation-head-copy h1 { letter-spacing: -.04em; } .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; } .section-heading > span, .section-heading-action > span { text-align: left; } .section-heading-action { align-items: flex-start; flex-direction: column; } .connection-grid, .roadmap-grid { grid-template-columns: 1fr; } .automation-detail, .automation-runs { border-radius: 15px; padding: 19px; } .detail-top { flex-direction: column; } .dialog-grid { grid-template-columns: 1fr; } .automation-dialog form, .library-dialog-inner { padding: 20px; } .run-file-actions { display: grid; grid-template-columns: 1fr; } .run-file-actions > * { justify-content: center; } .dialog-actions { justify-content: stretch; } .dialog-actions button { flex: 1; padding-inline: 8px; } }
