:root,[data-theme=light]{color-scheme:light;--page-bg: #f4f6f8;--text: #1b2430;--text-muted: #667085;--text-subtle: #98a2b3;--link: #d46a2e;--accent: #e36b2c;--accent-strong: #c2410c;--accent-soft: #fff4ed;--accent-softer: #fffaf7;--accent-ring: rgb(227 107 44 / 18%);--sidebar-bg: #162033;--sidebar-text: #fff;--sidebar-muted: #9aa6b8;--nav-text: #c5d0de;--nav-active-bg: #24324a;--nav-hover-bg: rgb(255 255 255 / 8%);--panel-bg: #fff;--panel-shadow: 0 1px 2px rgb(16 24 40 / 6%);--border: #e8edf3;--border-row: #eef2f6;--border-strong: #d0d7e2;--surface-muted: #f8fafc;--surface-soft: #fcfcfd;--input-bg: #fff;--input-readonly: #f4f6f8;--mono: #475467;--status-active-bg: #ecfdf3;--status-active-fg: #027a48;--status-inactive-bg: #f2f4f7;--status-inactive-fg: #667085;--error: #b42318;--select-shadow: 0 12px 32px rgb(16 24 40 / 12%);--login-bg: #162033}[data-theme=dark]{color-scheme:dark;--page-bg: #09090b;--text: #f4f4f5;--text-muted: #a1a1aa;--text-subtle: #71717a;--link: #fb923c;--accent: #e36b2c;--accent-strong: #fb923c;--accent-soft: #3b1c0d;--accent-softer: #27140c;--accent-ring: rgb(227 107 44 / 28%);--sidebar-bg: #000;--sidebar-text: #fafafa;--sidebar-muted: #a1a1aa;--nav-text: #d4d4d8;--nav-active-bg: #18181b;--nav-hover-bg: rgb(255 255 255 / 6%);--panel-bg: #141416;--panel-shadow: 0 1px 2px rgb(0 0 0 / 45%);--border: #27272a;--border-row: #27272a;--border-strong: #3f3f46;--surface-muted: #18181b;--surface-soft: #111113;--input-bg: #18181b;--input-readonly: #111113;--mono: #a1a1aa;--status-active-bg: #052e16;--status-active-fg: #4ade80;--status-inactive-bg: #27272a;--status-inactive-fg: #a1a1aa;--error: #f87171;--select-shadow: 0 12px 32px rgb(0 0 0 / 55%);--login-bg: #000}:root{font-family:Inter,system-ui,sans-serif;color:var(--text);background:var(--page-bg)}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%;background:var(--page-bg)}a{color:var(--link)}.shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{background:var(--sidebar-bg);color:var(--sidebar-text);padding:24px 20px;display:flex;flex-direction:column;gap:32px}.sidebar-nav{display:flex;flex-direction:column;gap:6px;flex:1}.shell-main{display:flex;flex-direction:column;min-width:0;min-height:100vh}.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:0 40px;background:var(--panel-bg);border-bottom:1px solid var(--border)}.brand{margin:0;font-size:18px;font-weight:700;letter-spacing:.08em}.brand-sub{margin:4px 0 0;color:var(--sidebar-muted);font-size:12px}.nav-link{color:var(--nav-text);text-decoration:none;display:block;padding:8px 10px;border-radius:6px}.nav-link:hover{background:var(--nav-hover-bg);color:var(--sidebar-text)}.nav-link.active{background:var(--nav-active-bg);color:var(--sidebar-text)}.theme-toggle{display:inline-flex;padding:3px;border:1px solid var(--border);border-radius:8px;background:var(--surface-muted)}.theme-toggle-option{min-width:68px;border:0;border-radius:6px;padding:6px 10px;background:transparent;color:var(--text-muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer}.theme-toggle-option.is-active{background:var(--accent);color:#fff}.user-menu{position:relative}.user-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:50%;background:var(--accent-soft);color:var(--accent-strong);font:inherit;font-size:12px;font-weight:700;letter-spacing:.04em;cursor:pointer}.user-avatar.is-open,.user-avatar:focus-visible{outline:2px solid var(--accent-ring)}.user-menu-dropdown{position:absolute;z-index:40;top:calc(100% + 8px);right:0;min-width:180px;padding:6px;background:var(--panel-bg);border:1px solid var(--border);border-radius:10px;box-shadow:var(--select-shadow)}.user-menu-item{display:block;width:100%;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;font-weight:400;text-align:left;text-decoration:none;padding:8px 10px;cursor:pointer}.user-menu-item:hover,.user-menu-item:focus-visible{background:var(--accent-soft);color:var(--accent-strong);outline:none}.content{padding:32px 40px}h1{margin:0 0 12px;font-size:28px}h2{margin:0 0 16px;font-size:18px}.page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px}.page-header p{margin:0;color:var(--text-muted)}.panel{background:var(--panel-bg);border-radius:12px;padding:24px;box-shadow:var(--panel-shadow);margin-bottom:24px;border:1px solid var(--border)}.table-scroll{overflow-x:auto}.table-card{padding:0;overflow:hidden}.table-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid var(--border)}.table-search-wrap{position:relative;display:block;width:min(320px,100%);font-weight:400}.table-search-icon{position:absolute;top:50%;left:12px;color:var(--text-subtle);transform:translateY(-50%);pointer-events:none}.table-search{width:100%;padding-left:36px;background:var(--surface-muted)}.table-search:focus{outline:2px solid var(--accent-ring);border-color:var(--accent);background:var(--input-bg)}.table-toolbar-filters{display:flex;justify-content:flex-end;gap:12px;margin-left:auto}.table-toolbar-filters .select-field{width:220px}.table-card .form-error{margin:12px 20px 0}.data-table tr.is-selected td{background:color-mix(in srgb,var(--accent) 10%,transparent)}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--border-row);font-size:14px;vertical-align:middle}.data-table thead th{background:var(--surface-muted);color:var(--text-muted);font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.data-table tbody tr:hover{background:var(--surface-muted)}.data-table tbody tr:last-child td{border-bottom:0}.data-table td.empty-state{text-align:center;color:var(--text-muted);padding:48px 16px;border-bottom:0;font-weight:400}.data-table .cell-id,.data-table .cell-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--mono)}.data-table .cell-actions{text-align:right;white-space:nowrap}.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600}.status-pill.is-active{background:var(--status-active-bg);color:var(--status-active-fg)}.status-pill.is-inactive{background:var(--status-inactive-bg);color:var(--status-inactive-fg)}.pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;border-top:1px solid var(--border);background:var(--surface-soft)}.pagination-meta,.pagination-page{margin:0;color:var(--text-muted);font-size:13px}.pagination-controls{display:flex;align-items:center;gap:8px}.table-loading{margin:0;padding:24px 20px;color:var(--text-muted)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid h2,.form-grid .form-error,.form-grid .form-actions,.form-grid .form-success,.form-grid .config-copy,.form-grid .check-row,.form-grid .form-section-block,.form-grid .panel-heading{grid-column:1 / -1}.form-stack{display:flex;flex-direction:column;gap:28px}.form-section{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-section h2{grid-column:1 / -1;margin:0;padding-bottom:10px;border-bottom:1px solid var(--border);font-size:16px}.form-section-heading{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:10px;border-bottom:1px solid var(--border)}.form-section-heading h2{padding-bottom:0;border-bottom:none}.product-lines{grid-column:1 / -1;display:flex;flex-direction:column;gap:16px}.product-line{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--surface-muted)}.product-line-header{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px}.product-line-title{margin:0;color:var(--text-muted);font-size:13px;font-weight:600}.product-line-remove{padding:0;color:var(--error)}.form-section .span-2,.form-section .activity-type-field,.form-section .follow-up-fields,.form-section .check-row,.form-section-intro,.detail-grid .span-2{grid-column:1 / -1}.form-section-intro{margin:-4px 0 0;color:var(--text-muted);font-size:13px;line-height:1.45}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;margin:16px 0 0}.detail-grid dt{margin:0 0 4px;color:var(--text-muted);font-size:12px;font-weight:600}.detail-grid dd{margin:0;font-weight:400;word-break:break-word}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.field-label-row,.select-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}.field-label-text{display:inline-flex;align-items:baseline;gap:4px}.field-mark{flex-shrink:0}.field-mark-required{color:var(--error);font-size:16px;font-weight:700;line-height:1;text-decoration:none;cursor:help}.field-mark-optional{color:var(--text-muted);font-size:11px;font-weight:600;letter-spacing:.02em}.field-legend{display:flex;flex-wrap:wrap;gap:16px;margin:0 0 4px;color:var(--text-muted);font-size:12px;font-weight:500}.field-legend-item{display:inline-flex;align-items:center;gap:6px}input,select,textarea{font:inherit;padding:10px 12px;border:1px solid var(--border-strong);border-radius:8px;font-weight:400;color:var(--text);background:var(--input-bg)}textarea{min-height:88px;resize:vertical}input:read-only{background:var(--input-readonly);color:var(--text-muted)}.input-with-button{display:flex;gap:8px}.input-with-button input{flex:1;min-width:0}.input-with-button button{flex-shrink:0}.select-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px;font-weight:600}.select{position:relative}.select-required{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--border-strong);border-radius:8px;background:var(--input-bg);color:var(--text);font:inherit;font-weight:400;text-align:left;cursor:pointer}.select-trigger.is-placeholder{color:var(--text-subtle)}.select-trigger.is-open,.select-trigger:focus-visible{border-color:var(--accent);outline:2px solid var(--accent-ring)}.select-trigger:disabled{cursor:default;opacity:.7}.select-chevron{flex-shrink:0;color:var(--text-muted)}.select-trigger.is-open .select-chevron{transform:rotate(180deg)}.select-menu{position:absolute;z-index:20;top:calc(100% + 6px);right:0;left:0;background:var(--panel-bg);border:1px solid var(--border);border-radius:10px;box-shadow:var(--select-shadow);overflow:hidden}.select-search{width:100%;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:10px 12px}.select-search:focus{outline:none;background:var(--accent-softer)}.select-options{padding:6px}.select-option{display:block;width:100%;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;font-weight:400;text-align:left;padding:8px 10px;cursor:pointer}.select-option.is-active{background:var(--accent-soft)}.select-option.is-selected{color:var(--accent-strong);font-weight:600}.select-empty{margin:0;padding:16px 10px;text-align:center;color:var(--text-muted);font-weight:400}.primary-button,.secondary-button,.btn{display:inline-flex;align-items:center;justify-content:center;width:auto;border:0;border-radius:8px;padding:10px 16px;font:inherit;text-decoration:none;cursor:pointer}.btn-sm{padding:7px 12px;font-size:13px}.btn-primary,.primary-button{background:var(--accent);color:#fff}.btn-primary:disabled,.primary-button:disabled{opacity:.7;cursor:default}.btn-secondary,.secondary-button{background:var(--panel-bg);color:var(--text);border:1px solid var(--border-strong)}.btn-link,.link-button{background:none;border:0;color:var(--accent-strong);padding:0;cursor:pointer;font:inherit;font-weight:600}.data-table a{font-weight:600;text-decoration:none}.data-table a:hover{text-decoration:underline}.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;grid-column:1 / -1}.form-error{color:var(--error);margin:0}.login-page{position:relative;min-height:100vh;display:grid;place-items:center;background:var(--login-bg)}.login-theme{position:absolute;top:24px;right:24px;width:180px}.login-theme .theme-toggle{display:flex;width:100%;border:1px solid rgb(255 255 255 / 12%);background:#ffffff14}.login-theme .theme-toggle-option{flex:1;min-width:0;color:var(--sidebar-muted)}.login-card{width:100%;max-width:420px;background:var(--panel-bg);color:var(--text);padding:32px;border-radius:16px;display:flex;flex-direction:column;gap:14px;border:1px solid var(--border)}.login-card .btn,.login-card .primary-button{width:100%}.login-card .brand{color:var(--accent)}.login-copy,.muted{color:var(--text-muted);margin:0 0 8px}.badge-row{display:flex;gap:8px}.badge{background:var(--accent-soft);color:var(--accent-strong);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600}.service-grid{display:grid;grid-template-columns:minmax(0,320px);gap:12px;margin-bottom:24px}.service-card{display:flex;flex-direction:column;gap:8px;text-align:left;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--panel-bg);color:inherit;font:inherit;cursor:pointer;box-shadow:var(--panel-shadow)}.service-card:disabled{cursor:default;opacity:.7}.service-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.service-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.service-card p{margin:0;color:var(--text-muted);font-size:13px;font-weight:400}.config-copy{margin:0;color:var(--text-muted);font-weight:400}.form-success{margin:0;color:var(--status-active-fg)}.check-row{display:flex;flex-direction:row;align-items:center;gap:10px;font-weight:500}.check-row input{width:auto;margin:0;accent-color:var(--accent)}.form-section-block{display:flex;flex-direction:column;gap:12px;padding-top:8px;border-top:1px solid var(--border)}.form-section-block h2{margin:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.panel-heading h2{margin:0}.toggle{display:flex;flex-direction:row;align-items:center;gap:10px;margin:0;font-size:13px;font-weight:600}.toggle.is-disabled{color:var(--text-muted)}.toggle-switch{position:relative;width:44px;height:24px;padding:0;border:0;border-radius:999px;background:var(--border-strong);cursor:pointer}.toggle-switch.is-on{background:var(--accent)}.toggle-switch:disabled{cursor:not-allowed;opacity:.45}.toggle-switch:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s ease}.toggle-switch.is-on:after{transform:translate(20px)}.smtp-test-row{display:flex;align-items:flex-end;gap:12px}.smtp-test-row label{flex:1;min-width:0}.smtp-test-send{flex:0 0 auto;width:auto;white-space:nowrap}.page-header-actions{display:flex;flex-direction:column;align-items:flex-end;gap:12px}.header-actions-row{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:24px;background:#0f172a7a}.modal{width:min(560px,100%);max-height:min(90vh,760px);overflow:auto;background:var(--panel-bg);color:var(--text);border:1px solid var(--border);border-radius:16px;box-shadow:var(--select-shadow)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px 0}.modal-header h2{margin:0;font-size:18px}.modal-close{width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-muted);font-size:24px;line-height:1;cursor:pointer}.modal-close:hover{background:var(--surface-muted);color:var(--text)}.modal-body{display:flex;flex-direction:column;gap:16px;padding:16px 20px 20px}.activity-type-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.activity-types{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.activity-type{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:72px;padding:10px 8px;border:1px solid var(--border-strong);border-radius:10px;background:var(--input-bg);color:var(--text);font:inherit;font-size:13px;font-weight:600;cursor:pointer}.activity-type.is-active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong);outline:2px solid var(--accent-ring)}.follow-up-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:14px 14px 14px 16px;border-left:3px solid var(--accent);border-radius:8px;background:var(--surface-muted)}.history-stack{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.history-stack>.panel{margin-bottom:0}.history-split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px}.timeline-panel{padding:22px 22px 20px}.timeline-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.timeline-header h2{margin:0 0 6px}.timeline-header p{margin:0;max-width:46ch;color:var(--text-muted);font-size:13px;line-height:1.45}.timeline-eyebrow{margin:0 0 4px!important;color:var(--accent-strong)!important;font-size:11px!important;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.timeline-count{flex-shrink:0;border:1px solid var(--border-strong);border-radius:999px;padding:4px 10px;color:var(--text-muted);font-size:12px;font-weight:600;background:var(--surface-muted)}.timeline{list-style:none;margin:0;padding:0}.timeline-event{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:14px;padding-bottom:18px}.timeline-event:last-child{padding-bottom:0}.timeline-event:before{content:"";position:absolute;top:28px;bottom:0;left:13px;width:2px;background:var(--border-strong)}.timeline-event:last-child:before{display:none}.timeline-dot{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;color:var(--accent-strong);background:var(--accent-soft)}.timeline-event.is-email .timeline-dot{color:#2563eb;background:#eff6ff}.timeline-event.is-meeting .timeline-dot{color:#0f766e;background:#f0fdfa}.timeline-event.is-note .timeline-dot{color:var(--text-muted);background:var(--surface-muted)}.timeline-event.is-created .timeline-dot{color:#6d28d9;background:#f5f3ff}.timeline-event.is-overdue .timeline-dot{color:var(--error);background:#fef2f2}.timeline-event.is-today .timeline-dot{color:var(--accent-strong);background:var(--accent-soft)}.timeline-event.is-upcoming .timeline-dot{color:#027a48;background:#ecfdf3}.timeline-card{min-width:0;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}.timeline-card-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:10px}.timeline-card-top time{color:var(--text-muted);font-size:13px}.timeline-card h3{margin:0 0 10px;font-size:16px;line-height:1.35}.timeline-facts{display:grid;gap:10px;margin:0}.timeline-facts dt{margin:0 0 2px;color:var(--text-subtle);font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.timeline-facts dd{margin:0;color:var(--text);font-size:14px;line-height:1.5}.type-chip{display:inline-flex;align-items:center;border-radius:999px;padding:3px 9px;font-size:12px;font-weight:700;background:var(--accent-soft);color:var(--accent-strong)}.type-chip.is-email{background:#eff6ff;color:#1d4ed8}.type-chip.is-meeting{background:#f0fdfa;color:#0f766e}.type-chip.is-note{background:var(--surface-muted);color:var(--text-muted)}.type-chip.is-created{background:#f5f3ff;color:#6d28d9}.status-pill.is-overdue{background:#fef2f2;color:var(--error)}.status-pill.is-today{background:var(--accent-soft);color:var(--accent-strong)}.status-pill.is-upcoming{background:#ecfdf3;color:#027a48}.timeline-empty{margin:0;padding:16px 18px;border:1px dashed var(--border-strong);border-radius:12px;background:var(--surface-muted);color:var(--text-muted);font-size:14px;line-height:1.5}.panel>.muted{margin-top:12px}[data-theme=dark] .timeline-event.is-email .timeline-dot,[data-theme=dark] .type-chip.is-email{color:#93c5fd;background:#172554}[data-theme=dark] .timeline-event.is-meeting .timeline-dot,[data-theme=dark] .type-chip.is-meeting{color:#5eead4;background:#042f2e}[data-theme=dark] .timeline-event.is-created .timeline-dot,[data-theme=dark] .type-chip.is-created{color:#c4b5fd;background:#2e1065}[data-theme=dark] .timeline-event.is-overdue .timeline-dot,[data-theme=dark] .status-pill.is-overdue{color:#fca5a5;background:#450a0a}[data-theme=dark] .timeline-event.is-upcoming .timeline-dot,[data-theme=dark] .status-pill.is-upcoming{color:#86efac;background:#052e16}@media(max-width:980px){.history-split{grid-template-columns:1fr}}@media(max-width:720px){.table-toolbar{flex-direction:column;align-items:stretch}.table-search-wrap,.table-toolbar-filters,.table-toolbar-filters .select-field{width:100%}.table-toolbar-filters{margin-left:0}.pagination{flex-direction:column;align-items:flex-start}.service-grid{grid-template-columns:1fr}.activity-types,.follow-up-fields{grid-template-columns:1fr 1fr}}
