:root {
  --navy: #102a43; --navy-2: #183b56; --ink: #172b4d; --muted: #718096; --soft: #f5f8fb;
  --line: #e6edf3; --white: #fff; --blue: #2878f0; --blue-soft: #eaf2ff; --green: #149b72;
  --green-soft: #e7f7f1; --orange: #e28b26; --orange-soft: #fff4e2; --red: #dd5a62; --red-soft: #fff0f1;
  --shadow: 0 12px 35px rgba(16, 42, 67, .08); --radius: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--soft); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .6; cursor: wait; }
body.modal-open { overflow: hidden; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #40536c; }
.form-error { color: #a32e39; background: var(--red-soft); border: 1px solid #f2c0c6; border-radius: 9px; padding: 11px 13px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; }
[aria-invalid="true"], .check-option input[aria-invalid="true"] + span { border-color: var(--red); }
.check-option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.customer-name { background: transparent; padding: 0; color: var(--ink); font-size: 13px; font-weight: 750; text-align: left; }
.customer-name:hover { color: var(--blue); text-decoration: underline; }
.toast-root { pointer-events: none; }
body.modal-open .toast-root { top: auto; bottom: 22px; }
.modal .modal-head { position: sticky; top: 0; z-index: 1; background: #fff; }
.scope-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.scope-toolbar strong { font-size: 14px; }
.scope-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.scope-toolbar label { display: flex; align-items: center; gap: 10px; }
.scope-toolbar select { width: 190px; max-width: 100%; }
.user-actions { flex-wrap: wrap; }
.users-table td { overflow-wrap: anywhere; }
.overdue-count { color: var(--red); font-weight: 750; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 11px; letter-spacing: .15em; font-weight: 800; text-transform: uppercase; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; background: #74d8bd; color: var(--navy); border-radius: 14px; font-size: 25px; font-weight: 900; box-shadow: 0 8px 22px rgba(116,216,189,.25); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; background: var(--white); }
.login-art { padding: 58px 9vw 50px; background: linear-gradient(145deg, #0d273e 0%, #163f58 58%, #1e6073 100%); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.login-art:after, .login-art:before { content: ""; position: absolute; border: 1px solid rgba(148, 236, 210, .18); border-radius: 50%; width: 510px; height: 510px; right: -230px; bottom: -150px; }
.login-art:before { width: 350px; height: 350px; right: -90px; bottom: 42px; }
.login-art .eyebrow { color: #76dfc1; margin-top: 68px; }
.login-art h1 { font-size: clamp(42px, 5vw, 70px); line-height: 1.08; letter-spacing: -.05em; margin: 0; position: relative; z-index: 1; }
.login-copy { color: rgba(255,255,255,.68); max-width: 350px; line-height: 1.8; font-size: 16px; position: relative; z-index: 1; }
.art-note { margin-top: auto; color: rgba(255,255,255,.75); font-size: 13px; display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.pulse-dot, .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #73dcbf; box-shadow: 0 0 0 5px rgba(115,220,191,.15); }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-box { width: min(390px, 100%); }
.login-box h2 { font-size: 32px; margin: 0 0 8px; letter-spacing: -.04em; }
.login-box .muted { margin: 0 0 34px; }
.form-stack { display: grid; gap: 19px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: #40536c; }
input, select, textarea { width: 100%; border: 1px solid #dbe5ed; border-radius: 10px; background: #fff; color: var(--ink); padding: 12px 13px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #78aef9; box-shadow: 0 0 0 3px rgba(40,120,240,.12); }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.password-input { position: relative; }.password-input input { padding-right: 44px; }.password-input .icon-button { position: absolute; right: 6px; top: 5px; height: 34px; color: var(--muted); background: transparent; }
.primary-button, .secondary-button { border-radius: 10px; padding: 11px 16px; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.primary-button { background: var(--blue); color: #fff; box-shadow: 0 8px 17px rgba(40,120,240,.2); }.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(40,120,240,.28); }.primary-button span { margin-left: 7px; font-size: 17px; }.primary-button.wide { width: 100%; margin-top: 8px; padding: 14px; }
.secondary-button { color: var(--ink); background: #fff; border: 1px solid var(--line); }.secondary-button:hover { background: var(--soft); }
.login-hint { margin-top: 25px; font-size: 12px; color: #9aabba; }
.app-page { display: flex; min-height: 100vh; }.sidebar { width: 235px; background: var(--navy); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; padding: 24px 16px 15px; }.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 38px; }.sidebar-brand strong { display: block; font-size: 18px; letter-spacing: -.04em; }.sidebar-brand span { display: block; color: rgba(255,255,255,.45); font-size: 10px; margin-top: 2px; }.main-nav { display: grid; gap: 7px; }.nav-item { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 12px 13px; background: transparent; color: rgba(255,255,255,.58); text-align: left; font-weight: 650; }.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.12); color: #fff; }.nav-icon { width: 18px; text-align: center; font-size: 18px; }.sidebar-bottom { margin-top: auto; position: relative; }.side-tip { display: flex; gap: 8px; padding: 14px 8px; color: #84dec2; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 16px; }.side-tip > span { font-size: 20px; }.side-tip strong, .side-tip small { display: block; }.side-tip strong { font-size: 11px; color: #d9fff2; }.side-tip small { font-size: 10px; color: rgba(255,255,255,.47); line-height: 1.5; margin-top: 3px; }.user-chip { display: flex; align-items: center; gap: 9px; padding: 8px; color: white; background: transparent; width: 100%; text-align: left; }.avatar { width: 31px; height: 31px; display: grid; place-items: center; background: #e4f5ef; color: var(--navy); border-radius: 50%; font-weight: 800; font-size: 13px; }.user-meta { flex: 1; min-width: 0; }.user-meta strong, .user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.user-meta strong { font-size: 12px; }.user-meta small { color: rgba(255,255,255,.45); font-size: 10px; margin-top: 2px; }.chevron { color: rgba(255,255,255,.5); }.logout-button { position: absolute; left: 8px; bottom: 48px; width: calc(100% - 16px); padding: 10px; border-radius: 8px; color: #fff; background: #25435b; font-size: 12px; text-align: left; }
.main-content { min-width: 0; flex: 1; }.topbar { min-height: 92px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px clamp(22px, 4vw, 56px); }.topbar-kicker { color: var(--muted); font-size: 12px; margin: 0 0 4px; }.topbar h1 { margin: 0; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.04em; }.topbar-actions { display: flex; align-items: center; gap: 10px; }.sync-status { color: #9aaabd; font-size: 11px; display: flex; align-items: center; gap: 8px; margin-right: 8px; }.mobile-menu { display: none; font-size: 20px; background: transparent; color: var(--ink); }.page-content { padding: 30px clamp(22px, 4vw, 56px) 50px; max-width: 1600px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }.stat-card { text-align: left; padding: 17px 16px; min-height: 118px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: transform .15s, box-shadow .15s, border .15s; }.stat-card:hover, .stat-card.active { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c4dafa; }.stat-label { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 12px; }.stat-card h3 { margin: 14px 0 3px; font-size: 28px; letter-spacing: -.05em; }.stat-card small { color: #a4b2c0; font-size: 11px; }.stat-card.red h3 { color: var(--red); }.stat-card.orange h3 { color: var(--orange); }.stat-card.green h3 { color: var(--green); }.stat-card.blue h3 { color: var(--blue); }.stat-icon { float: right; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); font-size: 13px; }.stat-card.red .stat-icon { background: var(--red-soft); color: var(--red); }.stat-card.orange .stat-icon { background: var(--orange-soft); color: var(--orange); }.stat-card.green .stat-icon { background: var(--green-soft); color: var(--green); }.stat-card.blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 22px; }.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }.panel-head { padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }.panel-head h2 { font-size: 16px; margin: 0; letter-spacing: -.025em; }.panel-head p { font-size: 11px; color: var(--muted); margin: 4px 0 0; }.panel-body { padding: 0; }.tabs { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 9px; }.tab { padding: 7px 10px; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }.tab.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(16,42,67,.07); }.todo-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(95px, 1fr) minmax(110px, 1.1fr) minmax(90px, .75fr) auto; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #f0f3f6; }.todo-row:last-child { border: 0; }.customer-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }.customer-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #edf4ff; color: var(--blue); font-weight: 800; font-size: 12px; flex-shrink: 0; }.customer-cell strong, .customer-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.customer-cell strong { font-size: 13px; }.customer-cell small { color: var(--muted); font-size: 10px; margin-top: 3px; }.cell-main { font-size: 12px; color: #425773; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.cell-sub { font-size: 10px; color: #9baabd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }.status-tag, .stage-tag { display: inline-flex; align-items: center; width: fit-content; border-radius: 5px; padding: 4px 7px; font-size: 10px; font-weight: 750; background: var(--soft); color: var(--muted); white-space: nowrap; }.status-tag.overdue { background: var(--red-soft); color: var(--red); }.status-tag.today { background: var(--blue-soft); color: var(--blue); }.status-tag.unscheduled, .status-tag.never { background: var(--orange-soft); color: #bd7518; }.stage-tag { background: #eef8f5; color: var(--green); }.quick-action { color: var(--blue); font-size: 11px; background: transparent; font-weight: 750; white-space: nowrap; }.empty-state { text-align: center; padding: 38px 20px; color: var(--muted); }.empty-state .empty-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; margin: 0 auto 10px; background: var(--soft); color: #9aacbd; font-size: 20px; }.empty-state p { margin: 0 0 13px; font-size: 13px; }
.activity-list { padding: 0 22px; }.activity-item { display: flex; gap: 13px; padding: 17px 0; border-bottom: 1px solid #f0f3f6; }.activity-item:last-child { border: 0; }.activity-line { position: relative; width: 8px; flex-shrink: 0; }.activity-line:before { content: ""; position: absolute; left: 1px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #8db6fa; box-shadow: 0 0 0 4px #eef5ff; }.activity-item:not(:last-child) .activity-line:after { content: ""; position: absolute; left: 4px; top: 17px; bottom: -17px; width: 1px; background: #e7edf4; }.activity-copy { min-width: 0; flex: 1; }.activity-copy p { margin: 0; font-size: 12px; line-height: 1.55; }.activity-copy p strong { color: var(--ink); }.activity-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }.range-switch { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; }
.list-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }.search-field { flex: 1 1 220px; position: relative; }.search-field input { padding-left: 35px; }.search-field span { position: absolute; left: 13px; top: 10px; color: var(--muted); }.filter-select { min-width: 130px; width: auto; padding-top: 10px; padding-bottom: 10px; }.list-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }.list-table { width: 100%; border-collapse: collapse; }.list-table th { text-align: left; padding: 13px 17px; color: #93a2b4; font-size: 11px; font-weight: 700; background: #fbfcfe; border-bottom: 1px solid var(--line); }.list-table td { padding: 13px 17px; font-size: 12px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; }.list-table tr:last-child td { border-bottom: 0; }.list-table tr:hover td { background: #fcfdff; }.contact-lines small { display: block; color: var(--muted); margin-top: 4px; }.product-pills { display: flex; gap: 4px; flex-wrap: wrap; }.product-pill { background: var(--soft); padding: 3px 6px; border-radius: 4px; font-size: 10px; color: #62768d; }.row-actions { display: flex; gap: 5px; }.text-button { background: transparent; color: var(--blue); font-size: 11px; font-weight: 700; padding: 4px 5px; }.text-button.danger { color: var(--red); }.pagination { padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }.pagination-buttons { display: flex; gap: 5px; }.page-button { background: var(--soft); border-radius: 6px; padding: 6px 9px; color: var(--ink); font-size: 11px; }.page-button:disabled { opacity: .4; cursor: default; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }.config-list { padding: 4px 20px 18px; }.config-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f0f3f6; font-size: 13px; }.config-row:last-child { border: 0; }.config-row small { color: var(--muted); }.add-config { display: flex; gap: 8px; margin-top: 13px; }.add-config input { flex: 1; }.disabled-label { color: #adb8c4; text-decoration: line-through; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8,25,40,.52); z-index: 10; padding: 20px; }.modal { width: min(650px, 100%); max-height: min(900px, calc(100vh - 40px)); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 25px 70px rgba(4,20,35,.22); }.modal.large { width: min(900px, 100%); }.modal-head { padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--line); }.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }.close-button { width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: 18px; }.modal-body { padding: 21px 24px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-grid .full { grid-column: 1 / -1; }.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 18px; }.ghost-button { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 10px 15px; border-radius: 9px; font-weight: 700; }.required:after { content: " *"; color: var(--red); }.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }.check-option { position: relative; }.check-option input { position: absolute; opacity: 0; }.check-option span { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--muted); font-size: 12px; cursor: pointer; }.check-option input:checked + span { border-color: #8cb6fa; color: var(--blue); background: var(--blue-soft); }.hint-box { background: var(--soft); border-radius: 9px; padding: 10px 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }.checkbox-line input { width: auto; }.detail-summary { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 20px; }.detail-card { padding: 17px; background: var(--soft); border-radius: 12px; }.detail-card h3 { margin: 0 0 12px; font-size: 12px; color: var(--muted); }.detail-name { font-size: 23px; font-weight: 800; letter-spacing: -.04em; }.detail-contact { color: #4e6680; font-size: 12px; margin-top: 8px; line-height: 1.8; }.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }.timeline { border-top: 1px solid var(--line); }.timeline-item { padding: 16px 0 16px 20px; border-bottom: 1px solid #f0f3f6; position: relative; }.timeline-item:before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 4px var(--blue-soft); }.timeline-item h4 { margin: 0; font-size: 13px; }.timeline-item p { color: #50677e; font-size: 12px; line-height: 1.6; margin: 7px 0 0; white-space: pre-wrap; }.timeline-item small { color: var(--muted); font-size: 10px; }.toast-root { position: fixed; z-index: 30; right: 22px; top: 22px; display: grid; gap: 9px; }.toast { min-width: 250px; max-width: 360px; padding: 12px 15px; color: #fff; background: var(--navy); box-shadow: var(--shadow); border-radius: 10px; font-size: 12px; animation: slide-in .2s ease-out; }.toast.error { background: #a83d48; }.toast.success { background: #107b5c; }@keyframes slide-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 1220px) { .stats-grid { grid-template-columns: repeat(3, 1fr); }.dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 780px) { .login-page { grid-template-columns: 1fr; }.login-art { min-height: 260px; padding: 30px 28px; }.login-art .eyebrow { margin-top: 30px; }.login-art h1 { font-size: 40px; }.art-note { margin-top: 28px; }.login-panel { padding: 38px 24px; }.sidebar { position: fixed; z-index: 8; left: -245px; top: 0; bottom: 0; transition: left .2s; box-shadow: 15px 0 40px rgba(0,0,0,.15); }.sidebar.open { left: 0; }.main-content { width: 100%; }.topbar { padding: 18px 18px; align-items: flex-start; }.mobile-menu { display: block; margin-top: 5px; }.topbar h1 { font-size: 18px; }.topbar-actions { margin-left: auto; }.topbar-actions .sync-status, .topbar-actions .secondary-button span { display: none; }.topbar-actions .secondary-button { padding: 10px 12px; font-size: 0; }.topbar-actions .secondary-button:first-letter { font-size: 18px; }.page-content { padding: 20px 16px 40px; }.stats-grid { gap: 8px; margin-bottom: 16px; }.stat-card { min-height: 95px; padding: 12px 10px; }.stat-card h3 { font-size: 23px; margin-top: 10px; }.stat-label { font-size: 10px; }.stat-card small { font-size: 9px; }.stat-icon { display: none; }.panel-head { padding: 15px; }.todo-row { grid-template-columns: 1fr auto; padding: 14px 15px; gap: 7px 12px; }.todo-row > div:nth-child(2), .todo-row > div:nth-child(3), .todo-row > div:nth-child(4) { grid-column: 1; }.todo-row > div:nth-child(2), .todo-row > div:nth-child(3), .todo-row > div:nth-child(4) { display: inline-block; margin-right: 8px; }.todo-row > .quick-action { grid-column: 2; grid-row: 1 / span 2; align-self: center; }.activity-list { padding: 0 15px; }.list-table, .list-table tbody, .list-table tr, .list-table td { display: block; }.list-table thead { display: none; }.list-table tr { padding: 14px 15px; border-bottom: 1px solid var(--line); }.list-table td { border: 0; padding: 4px 0; }.list-table td:first-child { padding-bottom: 8px; }.list-table td[data-label]:before { content: attr(data-label); display: inline-block; min-width: 62px; color: #9aa9b8; font-size: 10px; }.list-table td:first-child:before { display: none; }.list-table .row-actions { padding-top: 7px; }.pagination { padding: 12px 15px; }.settings-grid { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.detail-summary { grid-template-columns: 1fr; }.modal-body, .modal-head { padding-left: 18px; padding-right: 18px; } }
@media (max-width: 420px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.topbar-actions .primary-button { padding: 10px; font-size: 0; }.topbar-actions .primary-button:first-letter { font-size: 20px; }.tabs { max-width: 100%; overflow: auto; }.tab { white-space: nowrap; }.panel-head { align-items: flex-start; flex-direction: column; }.panel-head .tabs { align-self: stretch; } }
