:root {
  --primary: #173b67;
  --accent: #f28c28;
  --bg: #f3f6fa;
  --surface: #fff;
  --text: var(--light-text-color, #172033);
  --muted: #667085;
  --line: #e3e8ef;
  --danger: #c62828;
  --success: #16834b;
  --warning: #a86108;
  --shadow: 0 8px 28px rgba(26, 43, 69, .08);
  --radius: 16px;
  --app-bg-color: var(--user-bg-color, #eef3f8);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }
button { color: inherit; }
img { max-width: 100%; }

.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px 16px; color: #fff; background: linear-gradient(175deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #06172e)); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.brand-mark, .login-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; color: var(--primary); background: #fff; font-weight: 900; }
.brand strong { display: block; font-size: 15px; line-height: 1.2; }
.brand small, .sidebar-user small { display: block; margin-top: 3px; color: rgba(255,255,255,.68); font-size: 12px; }
.main-nav { display: grid; gap: 5px; }
.main-nav > a { display: flex; gap: 12px; align-items: center; min-height: 45px; padding: 10px 12px; border-radius: 11px; color: rgba(255,255,255,.8); font-weight: 650; font-size: 14px; }
.main-nav > a:hover, .main-nav > a.active { color: #fff; background: rgba(255,255,255,.13); }
.main-nav > a span { width: 22px; font-size: 20px; text-align: center; }
.main-nav > a.new-order { margin: 5px 0 10px; color: #18263a; background: var(--accent); }
.nav-section { margin: 20px 12px 7px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 8px 2px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-user .icon-button { color: #fff; }

.main-content { min-width: 0; }
.desktop-topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); backdrop-filter: blur(12px); }
.mobile-header, .bottom-nav { display: none; }
.notification-link { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; font-size: 14px; font-weight: 650; }
.notification-link:hover { background: var(--bg); }
.notification-link b, .bottom-nav b { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; color: #fff; background: #d62525; font-size: 10px; }
.page-wrap { width: min(1380px, 100%); margin: 0 auto; padding: 32px 34px 70px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading.compact { align-items: flex-start; }
.page-heading h1, .detail-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.025em; }
.page-heading p, .detail-heading p { margin: 7px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 5px !important; color: var(--primary) !important; font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--primary); font-size: 13px; font-weight: 750; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #fff; cursor: pointer; font-weight: 750; font-size: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.button:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); transform: translateY(-1px); }
.button.primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.button.ghost { background: transparent; }
.button.wide { width: 100%; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 20px; }
.icon-button:hover { background: rgba(0,0,0,.07); }
.icon-button.danger { color: var(--danger); }
.link-button { width: 100%; padding: 14px; color: var(--danger); border: 0; background: transparent; text-align: left; font-weight: 700; }

.panel, .form-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.panel h2, .form-section h2 { margin: 0 0 15px; font-size: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.panel-heading h2 { margin-bottom: 2px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }

.flash-stack { position: fixed; z-index: 50; top: 72px; right: 22px; display: grid; gap: 8px; width: min(420px, calc(100vw - 30px)); }
.flash { padding: 12px 15px; border: 1px solid #bad1ec; border-radius: 11px; color: #174d80; background: #eaf4ff; box-shadow: var(--shadow); font-size: 14px; }
.flash.success { color: #12643b; border-color: #b9dfc9; background: #eaf8f0; }
.flash.error { color: #8b2020; border-color: #efc0c0; background: #fff0f0; }
.flash.warning { color: #825006; border-color: #efd39d; background: #fff8e7; }
.offline-banner { position: fixed; z-index: 100; inset: 0 0 auto; padding: 8px; color: #fff; background: #a94300; text-align: center; font-size: 13px; font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 30px; }
.stat-card { display: flex; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(25,42,68,.05); }
.stat-card strong { color: var(--primary); font-size: 28px; line-height: 1; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card.blue { border-left-color: #2774c8; }.stat-card.blue strong { color: #2774c8; }
.stat-card.amber { border-left-color: #d08213; }.stat-card.amber strong { color: #b76c05; }
.stat-card.green { border-left-color: #218a50; }.stat-card.green strong { color: #218a50; }
.two-stats { max-width: 620px; grid-template-columns: repeat(2, 1fr); }

.work-section { margin-top: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; padding-left: 13px; border-left: 4px solid #8190a5; }
.section-heading h2 { margin: 0; font-size: 19px; }.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.section-heading > span { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 8px; border-radius: 16px; background: #e8edf4; font-weight: 850; }
.section-heading.danger { border-color: #c62828; }.section-heading.urgent { border-color: #e05252; }.section-heading.today { border-color: #2774c8; }.section-heading.future { border-color: #5c6bc0; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.order-card { position: relative; display: flex; flex-direction: column; min-height: 190px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-left: 5px solid #8290a5; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(25,42,68,.05); transition: transform .15s, box-shadow .15s; }
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.order-card.priority-urgent { border-left-color: #d62d2d; }.order-card.priority-high { border-left-color: #e78419; }.order-card.priority-normal { border-left-color: #2c77c4; }.order-card.priority-low { border-left-color: #8491a2; }
.order-card-top, .order-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-number { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .05em; }
.order-card h3 { margin: 14px 0 11px; font-size: 18px; line-height: 1.3; }
.order-meta { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.order-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card-bottom { margin-top: auto; padding-top: 15px; }
.assignees { max-width: 67%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.date-chip.late { color: var(--danger); font-weight: 750; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .02em; }
.status-pending { color: #4a5869; background: #edf0f4; }.status-scheduled { color: #1e5998; background: #e5f0fc; }.status-in_progress { color: #0f638a; background: #dff5fc; }.status-waiting { color: #8a5708; background: #fff0cf; }.status-completed { color: #17683d; background: #dff4e8; }.status-cancelled { color: #8b2a2a; background: #fbe5e5; }
.priority-badge.priority-urgent { color: #a51717; background: #ffe5e5; }.priority-badge.priority-high { color: #9a5303; background: #ffefd8; }.priority-badge.priority-normal { color: #235b98; background: #e8f1fc; }.priority-badge.priority-low { color: #596678; background: #edf0f4; }

.filter-panel { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.filter-panel label { min-width: 150px; }.filter-panel label.grow { flex: 1; min-width: 240px; }
.all-orders { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 43px; padding: 9px 11px; color: var(--text); border: 1px solid #ccd4df; border-radius: 9px; outline: none; background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
input[type="color"] { height: 48px; padding: 4px; }
.stack-form { display: grid; gap: 15px; }
.form-card { max-width: 980px; padding: 0; overflow: hidden; }
.form-card.narrow { max-width: 620px; padding: 24px; display: grid; gap: 17px; }
.form-section { padding: 24px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > .full + .full { margin-top: 16px; }
.field-grid { display: grid; gap: 16px; }.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 24px; background: #f8fafc; }
.assignee-field { margin: 20px 0 0; padding: 0; border: 0; }.assignee-field legend { font-size: 13px; font-weight: 750; }.assignee-field > p { margin: 3px 0 10px; color: var(--muted); font-size: 12px; }
.assignee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 9px; }
.check-card { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }.check-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }.check-card input { width: 18px; min-height: 18px; accent-color: var(--primary); }
.switch-row { display: flex; align-items: center; gap: 10px; }.switch-row input { width: 19px; min-height: 19px; accent-color: var(--primary); }

.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.detail-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 2px 0 8px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.detail-main { display: grid; gap: 18px; }.detail-side { display: grid; gap: 18px; position: sticky; top: 82px; }
.status-panel h2 { font-size: 14px; }.status-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.status-button { min-height: 38px; padding: 7px 12px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 800; }
.description-text { padding: 14px; border-radius: 10px; background: #f7f9fc; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 20px 0 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.detail-grid > div { padding: 12px 14px; border-bottom: 1px solid var(--line); }.detail-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }.detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; } dd { margin: 4px 0 0; font-size: 14px; font-weight: 650; }
.side-list { display: grid; gap: 12px; margin: 0; }.side-list > div { padding-bottom: 10px; border-bottom: 1px solid var(--line); }.side-list > div:last-child { padding-bottom: 0; border: 0; }
.compact-panel { padding: 18px; }.compact-panel h2 { font-size: 15px; }

.timeline { display: grid; gap: 17px; margin: 0 0 20px; }
.comment { display: flex; gap: 10px; }.comment-body { min-width: 0; flex: 1; padding: 12px 14px; border-radius: 4px 13px 13px; background: #f3f6fa; }.comment-meta { display: flex; justify-content: space-between; gap: 10px; }.comment-meta time { color: var(--muted); font-size: 11px; }.comment-body p { margin: 8px 0 0; font-size: 14px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--primary); font-size: 13px; font-weight: 850; }.avatar.small { width: 30px; height: 30px; font-size: 11px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; margin-top: 10px; }.photo-grid a { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 9px; background: #dde3ea; }.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.comment-form { display: grid; gap: 10px; padding-top: 17px; border-top: 1px solid var(--line); }.comment-form .button { justify-self: end; }
.photo-picker { display: inline-flex; grid-template-columns: auto; align-items: center; justify-self: start; min-height: 41px; padding: 8px 12px; border: 1px dashed #99a7b8; border-radius: 9px; cursor: pointer; }.photo-picker input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }.photo-preview { display: flex; flex-wrap: wrap; gap: 7px; }.photo-preview img { width: 76px; height: 58px; object-fit: cover; border-radius: 7px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px; margin-top: 16px; }.inline-form label { min-width: 100px; }.inline-form .grow { min-width: 180px; flex: 1; }.materials-form input { min-height: 40px; }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; } th { color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; } td small { display: block; margin-top: 2px; color: var(--muted); }
.history-list { display: grid; }.history-list article { position: relative; display: flex; gap: 10px; padding: 0 0 17px 17px; border-left: 1px solid #d6dde7; }.history-list article:last-child { padding-bottom: 0; border-left-color: transparent; }.history-dot { position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }.history-list strong { display: block; font-size: 12px; }.history-list small { color: var(--muted); font-size: 10px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 18px; align-items: start; }.sticky-panel { position: sticky; top: 82px; }
.client-list, .activity-list { display: grid; }.client-row, .activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 5px; border-bottom: 1px solid var(--line); }.client-row:last-child, .activity-row:last-child { border-bottom: 0; }.client-row:hover, .activity-row:hover { background: #f8fafc; }.client-row.inactive { opacity: .55; }.client-row small, .activity-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }.client-row > span:last-child { color: var(--muted); font-size: 12px; }.grow { min-width: 0; flex: 1; }.search-inline { display: flex; gap: 7px; }.search-inline input { min-width: 160px; }
.activity-row time { color: var(--muted); font-size: 11px; white-space: nowrap; }

.notification-list { padding: 4px 18px; }.notification-list form + form { border-top: 1px solid var(--line); }.notification-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 4px; border: 0; background: transparent; cursor: pointer; text-align: left; }.notification-row.unread { background: color-mix(in srgb, var(--primary) 5%, #fff); }.notification-row strong { display: block; }.notification-row small { color: var(--muted); }.notification-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--primary); background: #e9f0f8; font-weight: 850; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.bar-list { display: grid; gap: 4px; }.bar-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }.bar-list > div:last-child { border: 0; }.bar-list strong { color: var(--primary); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }.info-box { margin: 22px 0; padding: 13px; border-radius: 10px; background: #f3f6fa; }.info-box p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.empty-state { padding: 65px 20px; border: 1px dashed #bdc7d4; border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.55); text-align: center; }.empty-state > div { font-size: 40px; }.empty-state h2 { margin: 8px 0 3px; color: var(--text); }.empty-state p { margin: 0; }.empty-state.small { padding: 38px; border: 0; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 65%, #071426)); }
.login-card { width: min(420px, 100%); padding: 35px; border-radius: 22px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.28); }.login-card h1 { margin: 15px 0 2px; font-size: 27px; }.login-card > p { margin: 0 0 25px; color: var(--muted); }.login-mark { width: 58px; height: 58px; color: #fff; background: var(--primary); }.login-logo { max-width: 150px; max-height: 70px; object-fit: contain; }
.mobile-menu { display: none; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }.sidebar { padding-inline: 13px; }.detail-layout { grid-template-columns: 1fr; }.detail-side { position: static; grid-template-columns: repeat(2, 1fr); }.report-grid { grid-template-columns: repeat(2, 1fr); }.stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: auto; }.sidebar, .desktop-topbar { display: none; }
  .mobile-header { position: sticky; z-index: 20; top: 0; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
  .mobile-brand { max-width: 75%; overflow: hidden; color: var(--primary); text-overflow: ellipsis; white-space: nowrap; font-weight: 850; }
  .page-wrap { padding: 20px 14px 35px; }.page-heading { align-items: flex-start; margin-bottom: 18px; }.page-heading h1, .detail-heading h1 { font-size: 27px; }.page-heading > .button { display: none; }
  .bottom-nav { position: fixed; z-index: 30; inset: auto 0 0; height: calc(66px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); padding: 4px 6px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); box-shadow: 0 -7px 24px rgba(20,36,59,.09); }
  .bottom-nav a, .bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; color: #6a7789; border: 0; background: transparent; font-size: 20px; }.bottom-nav small { font-size: 9px; font-weight: 750; }.bottom-nav .active { color: var(--primary); }.bottom-nav .bottom-new span { display: grid; place-items: center; width: 38px; height: 38px; margin-top: -17px; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 5px 14px rgba(0,0,0,.2); font-size: 29px; }.bottom-nav b { position: absolute; top: 3px; right: 18%; }
  .mobile-menu { position: fixed; z-index: 45; inset: auto 10px calc(73px + env(safe-area-inset-bottom)); display: grid; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 16px 45px rgba(12,25,45,.25); }.mobile-menu[hidden] { display: none; }.mobile-menu a { padding: 12px; border-bottom: 1px solid var(--line); font-weight: 700; }.close-menu { position: absolute; top: 6px; right: 8px; width: 35px; height: 35px; border: 0; background: transparent; font-size: 26px; }
  .flash-stack { top: 64px; right: 15px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }.stat-card { display: grid; gap: 5px; padding: 13px; }.stat-card strong { font-size: 25px; }
  .order-grid, .all-orders { grid-template-columns: 1fr; }.order-card { min-height: 175px; }.work-section { margin-top: 25px; }
  .filter-panel { display: grid; grid-template-columns: repeat(2,1fr); }.filter-panel label, .filter-panel label.grow { min-width: 0; }.filter-panel label.grow { grid-column: 1/-1; }.filter-panel .button { width: 100%; }
  .field-grid.two { grid-template-columns: 1fr; }.form-section { padding: 18px 15px; }.form-actions { padding: 14px 15px; }.form-actions .button { flex: 1; }
  .detail-heading { display: block; }.detail-heading > .button { margin-top: 12px; }.detail-side { grid-template-columns: 1fr; }.detail-grid { grid-template-columns: 1fr; }.detail-grid > div, .detail-grid > div:nth-child(odd), .detail-grid > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }.detail-grid > div:last-child { border-bottom: 0; }.panel { padding: 17px 14px; }.status-actions { display: grid; grid-template-columns: repeat(2,1fr); }.status-button { width: 100%; }.comment-meta { display: grid; gap: 0; }.photo-grid { grid-template-columns: repeat(2,1fr); }.comment-form .button { width: 100%; }.materials-form { display: grid; grid-template-columns: repeat(2,1fr); }.materials-form .grow, .materials-form label { min-width: 0; }.materials-form .grow:first-of-type { grid-column: 1/-1; }.materials-form .button { grid-column: 1/-1; }
  .split-layout, .settings-grid, .report-grid { grid-template-columns: 1fr; }.sticky-panel { position: static; }.panel-heading { align-items: flex-start; }.search-inline { width: 100%; }.search-inline input { min-width: 0; }.activity-row { align-items: flex-start; }.activity-row time { display: none; }
  .report-filter { grid-template-columns: repeat(2,1fr); }.report-filter .button { grid-column: 1/-1; }
  .login-card { padding: 27px 22px; }
}

@media (max-width: 390px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }.stat-card span { font-size: 11px; }.filter-panel { grid-template-columns: 1fr; }.filter-panel label.grow { grid-column: auto; }.status-actions { grid-template-columns: 1fr; }
}

.nav-count { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 10px; color: #fff; background: #d62525; font-size: 10px; text-align: center; }
.integration-state { padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 850; }.integration-state.on { color: #12643b; background: #dff5e9; }.integration-state.off { color: #6d7785; background: #e8edf3; }
.whatsapp-format { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(300px,1.2fr); gap: 10px 24px; align-items: center; margin-bottom: 18px; }.whatsapp-format h2 { margin-bottom: 5px; }.whatsapp-format p { margin: 0; color: var(--muted); }.whatsapp-format pre, .message-card pre { margin: 0; padding: 14px; border-radius: 11px; background: #112239; color: #eef6ff; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }.whatsapp-format > small { grid-column: 2; color: var(--muted); }
.whatsapp-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.65fr); gap: 18px; align-items: start; }.whatsapp-settings { min-width: 0; }.setup-guide { position: sticky; top: 82px; }.setup-guide ol, .steps { margin: 0; padding-left: 22px; }.setup-guide li, .steps li { margin: 0 0 12px; }.setup-guide a { color: var(--primary); text-decoration: underline; font-weight: 750; }
.copy-field { display: flex; gap: 7px; }.copy-field input { min-width: 0; }.copy-field .button { flex: 0 0 auto; }.field-warning { display: block; margin-top: 5px; color: var(--warning); font-weight: 700; }.secret-saved { display: block; margin-top: 5px; color: var(--success); font-weight: 700; }.mini-check { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 12px; }.mini-check input, .compact-fieldset input, .classification-form input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--primary); }
.form-field { display: grid; gap: 6px; }.field-label { color: #344054; font-size: 13px; font-weight: 700; }
.field-help { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: 12px; }
.settings-wide { grid-column: 1/-1; }.mobile-config-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }.firebase-upload { margin-top: 17px; }.device-list { margin-bottom: 17px; }
.compact-fieldset { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }.compact-fieldset legend { padding: 0 4px; font-size: 13px; font-weight: 750; }.compact-fieldset label { display: inline-flex; align-items: center; gap: 5px; margin: 3px 12px 3px 0; font-size: 13px; }.compact-fieldset small { display: block; margin-top: 5px; color: var(--muted); }
.whatsapp-secondary { margin-top: 18px; }.compact-form { padding: 14px; border-radius: 12px; background: #f7f9fc; }.simple-list { display: grid; margin-top: 14px; }.simple-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }.simple-row:last-child { border-bottom: 0; }.simple-row.inactive { opacity: .5; }.simple-row small { display: block; color: var(--muted); }.row-actions { display: flex; align-items: center; gap: 4px; }.row-actions .button { min-height: 34px; padding: 5px 9px; font-size: 11px; }
.whatsapp-test, .whatsapp-inbox { margin-top: 18px; }.inbox-counts { display: flex; flex-wrap: wrap; gap: 7px; }.inbox-counts span { padding: 5px 8px; border-radius: 8px; background: #eef3f8; font-size: 11px; font-weight: 750; }.inbox-counts .warning-count { color: #825006; background: #fff2ce; }
.test-message-form { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(180px,.8fr) minmax(260px,1.4fr); gap: 10px; align-items: end; }.test-message-form .wide-field { grid-column: span 2; }.test-message-form .button { align-self: end; }.test-help { display: block; margin-top: 12px; color: var(--muted); }
.message-list { display: grid; gap: 12px; }.message-card { padding: 15px; border: 1px solid var(--line); border-left: 4px solid #98a2b3; border-radius: 12px; background: #fff; }.message-card.status-processed { border-left-color: var(--success); }.message-card.status-unclassified, .message-card.status-error { border-left-color: #d08213; }.message-card.status-rejected { border-left-color: var(--danger); }.message-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }.message-card header small { display: block; color: var(--muted); }.message-status { padding: 4px 8px; border-radius: 8px; background: #eef3f8; font-size: 10px; font-weight: 850; text-transform: uppercase; }.message-card pre { color: var(--text); background: #f4f7fa; }.message-error { margin: 9px 0; color: #8a5608; font-size: 12px; }.classification-form { display: grid; grid-template-columns: minmax(180px,1.2fr) minmax(130px,.7fr) minmax(180px,1fr); gap: 9px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }.classification-form fieldset { min-width: 0; grid-column: span 2; margin: 0; padding: 5px 9px; border: 1px solid var(--line); border-radius: 9px; }.classification-form legend { font-size: 11px; font-weight: 750; }.classification-form fieldset label { display: inline-flex; align-items: center; gap: 4px; margin-right: 7px; font-size: 11px; }
.install-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }.install-hero { grid-column: 1/-1; display: flex; align-items: center; gap: 22px; }.install-hero img { width: 112px; height: 112px; border-radius: 25px; box-shadow: var(--shadow); }.install-hero h2 { margin-bottom: 4px; }.install-hero p { margin: 4px 0 14px; color: var(--muted); }.install-state { font-size: 12px; }.install-note { max-width: 900px; margin-top: 18px; }
.offline-page { display: grid; place-items: center; min-height: 100vh; padding: 22px; background: linear-gradient(145deg, #173b67, #08172a); }.offline-card { width: min(430px,100%); padding: 34px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 24px 65px rgba(0,0,0,.3); }.offline-card img { width: 90px; border-radius: 20px; }.offline-card h1 { margin: 16px 0 5px; }.offline-card p { margin: 0 0 20px; color: var(--muted); }
.security-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }.security-summary .stat-card small { color: var(--muted); }.security-blocks { margin-bottom: 18px; }.security-table-wrap { overflow-x: auto; }.security-table { width: 100%; border-collapse: collapse; font-size: 13px; }.security-table th, .security-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }.security-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }.security-table tr:last-child td { border-bottom: 0; }.security-table code { color: var(--primary); font-size: 12px; }.security-event { display: inline-block; padding: 4px 7px; border-radius: 7px; background: #edf1f5; font-size: 10px; font-weight: 850; white-space: nowrap; }.security-event.login_failed { color: #8a5608; background: #fff2ce; }.security-event.login_locked, .security-event.login_blocked { color: #a61b1b; background: #ffe2e2; }.security-event.login_recovered, .security-event.blocks_cleared { color: #12643b; background: #dff5e9; }

@media (max-width: 1100px) {
  .classification-form { grid-template-columns: repeat(2,minmax(0,1fr)); }.classification-form fieldset { grid-column: auto; }.classification-form .button { align-self: stretch; }.security-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .whatsapp-format, .whatsapp-layout, .mobile-config-grid { grid-template-columns: 1fr; }.whatsapp-format > small { grid-column: 1; }.setup-guide { position: static; }.copy-field { display: grid; grid-template-columns: minmax(0,1fr) auto; }.whatsapp-secondary { grid-template-columns: 1fr; }.test-message-form { grid-template-columns: 1fr; }.test-message-form .wide-field { grid-column: auto; }.classification-form { grid-template-columns: 1fr; }.classification-form fieldset { grid-column: auto; }.message-card header { display: grid; }.message-status { justify-self: start; }.install-grid { grid-template-columns: 1fr; }.install-hero { grid-column: auto; align-items: flex-start; }.install-hero img { width: 76px; height: 76px; border-radius: 18px; }.security-summary { grid-template-columns: 1fr 1fr; }.security-table { min-width: 700px; }
}

.ai-stats { margin-bottom: 18px; }
.ai-stats .stat-card strong { font-size: 23px; }
.ai-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.65fr); gap: 18px; align-items: start; }
.ai-settings a { color: var(--primary); text-decoration: underline; font-weight: 750; }
.ai-guide { position: sticky; top: 82px; }
.advanced-settings { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.advanced-settings summary { cursor: pointer; color: var(--primary); font-weight: 800; }
.advanced-settings p { color: var(--muted); font-size: 12px; }
.field-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.ai-usage-panel { margin-top: 18px; }
.usage-ok { color: var(--success); font-weight: 800; }
.usage-error { color: var(--danger); font-weight: 800; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.audio-label, .ai-label { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 4px 8px; border-radius: 8px; background: #eaf1f8; color: var(--primary); font-size: 11px; font-weight: 800; }
.ai-label { margin-left: 5px; color: #654b00; background: #fff2c7; }

@media (max-width: 1050px) {
  .ai-layout { grid-template-columns: 1fr; }
  .ai-guide { position: static; }
}

@media (max-width: 760px) {
  .ai-stats { grid-template-columns: repeat(2,1fr); }
  .field-grid.three { grid-template-columns: 1fr; }
  .ai-usage-panel .panel-heading { display: block; }
}

/* Visual refresh 0.4.1 */
body {
  position: relative;
  isolation: isolate;
  background: var(--app-bg-color, var(--bg));
  letter-spacing: -.005em;
}
.app-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--accent) 13%, transparent) 0, transparent 30%),
    radial-gradient(circle at 18% 86%, color-mix(in srgb, var(--primary) 12%, transparent) 0, transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--app-bg-color) 92%, #fff), var(--app-bg-color));
}
body.has-custom-background .app-background {
  background-image: var(--app-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--app-bg-opacity, .28);
  filter: saturate(.88) contrast(.94);
}
.app-shell, .login-page { position: relative; z-index: 1; }
.main-content { min-height: 100vh; background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.08)); }

.sidebar {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -5%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 28%),
    linear-gradient(175deg, color-mix(in srgb, var(--primary) 94%, #fff), color-mix(in srgb, var(--primary) 68%, #06172e));
  box-shadow: 12px 0 38px rgba(11,29,51,.12);
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: 9%;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 58px rgba(255,255,255,.018);
  pointer-events: none;
}
.brand, .main-nav, .sidebar-user { position: relative; z-index: 1; }
.brand { gap: 14px; padding-top: 4px; }
.brand img, .brand img.brand-logo {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.2));
}
.brand strong { font-size: 16px; letter-spacing: -.015em; }
.main-nav > a { border: 1px solid transparent; transition: color .18s, background .18s, border-color .18s, transform .18s; }
.main-nav > a:hover { transform: translateX(2px); }
.main-nav > a.active { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.15); box-shadow: inset 3px 0 0 var(--accent); }
.main-nav > a.new-order { border-color: color-mix(in srgb, var(--accent) 70%, #fff); box-shadow: 0 8px 22px rgba(0,0,0,.14); }

.desktop-topbar, .mobile-header {
  border-color: rgba(255,255,255,.58);
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 25px rgba(31,50,75,.045);
  backdrop-filter: blur(18px) saturate(1.2);
}
.page-wrap { position: relative; }
.page-heading { padding: 4px 2px 0; }
.page-heading h1, .detail-heading h1 { color: color-mix(in srgb, var(--text) 90%, var(--primary)); font-weight: 850; }
.page-heading p, .detail-heading p { font-size: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }

.panel, .form-card, .filter-panel, .stat-card, .order-card, .message-card {
  border-color: rgba(216,225,235,.88);
  background: rgba(255,255,255,.93);
  box-shadow: 0 10px 32px rgba(24,43,69,.075), 0 1px 2px rgba(24,43,69,.04);
  backdrop-filter: blur(12px);
}
.panel, .form-card { border-radius: 19px; }
.stat-card, .order-card { border-radius: 16px; }
.order-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.order-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); box-shadow: 0 16px 36px rgba(24,43,69,.12); }
.button { border-radius: 12px; transition: transform .16s, box-shadow .16s, border-color .16s, background .16s; }
.button.primary { box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 24%, transparent); }
.button.primary:hover { box-shadow: 0 11px 24px color-mix(in srgb, var(--primary) 30%, transparent); }
input, select, textarea { border-radius: 11px; transition: border-color .15s, box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--primary) 62%, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 11%, transparent); }

.login-page { background: transparent; }
.login-card { border: 1px solid rgba(255,255,255,.72); background: rgba(255,255,255,.92); backdrop-filter: blur(22px); }
.login-logo { max-width: 180px; max-height: 86px; padding: 0; background: transparent; filter: drop-shadow(0 7px 12px rgba(0,0,0,.14)); }

.appearance-grid { display: grid; grid-template-columns: minmax(300px,.85fr) minmax(430px,1.15fr); gap: 28px; align-items: start; }
.appearance-fields { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(247,250,253,.86); }
.appearance-colors input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }
.range-field { display: grid; grid-template-columns: minmax(0,1fr) 52px; gap: 12px; align-items: center; }
.range-field input { min-height: auto; padding: 0; accent-color: var(--primary); }
.range-field output { padding: 6px 8px; border-radius: 9px; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, #fff); text-align: center; font-size: 12px; font-weight: 850; }
.branding-assets { display: grid; gap: 14px; }
.asset-card { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 18px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.72); }
.asset-card h3 { margin: 0 0 3px; font-size: 15px; }
.asset-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.asset-preview { display: grid; place-items: center; width: 150px; height: 105px; overflow: hidden; border: 1px dashed #bdc8d6; border-radius: 13px; color: var(--muted); background: linear-gradient(145deg, #eef3f8, #fff); font-size: 12px; font-weight: 750; }
.asset-preview.logo-preview { background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 92%, #fff), color-mix(in srgb, var(--primary) 70%, #07172a)); }
.asset-preview.logo-preview span { color: #fff; font-size: 30px; }
.asset-preview img { width: 100%; height: 100%; object-fit: contain; }
.asset-preview.background-preview img { object-fit: cover; }
.file-button { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 12px; }
.file-button:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.file-button input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.appearance-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 4px; }
.appearance-actions span { margin-right: auto; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .appearance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-content { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.04)); }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.12)); }
  .mobile-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.91); backdrop-filter: blur(18px) saturate(1.2); }
  .appearance-fields { padding: 14px; }
  .asset-card { grid-template-columns: 105px minmax(0,1fr); gap: 12px; }
  .asset-preview { width: 105px; height: 92px; }
  .appearance-actions { align-items: stretch; flex-direction: column; }
  .appearance-actions .button { width: 100%; }
}

/* Dark appearance; the selected mode is resolved on each device. */
html:is([data-theme="dark"], [data-effective-theme="dark"]) {
  color-scheme: dark;
  --bg: #0d1623;
  --surface: #19283a;
  --text: var(--dark-text-color, #edf3fa);
  --muted: #b1c0d2;
  --line: #35475c;
  --app-bg-color: #0d1623;
  --danger: #ff9999;
  --success: #77dfaa;
  --warning: #ffd17b;
  --shadow: 0 12px 34px rgba(0,0,0,.24);
}
html:is([data-theme="dark"], [data-effective-theme="dark"]) .app-background { background: radial-gradient(circle at 80% 10%, #20354a, transparent 37%), linear-gradient(145deg, #111e2e, #0d1623); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) body.has-custom-background .app-background { background-image: var(--app-bg-image); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .main-content { background: linear-gradient(180deg, rgba(17,32,49,.48), rgba(7,15,26,.25)); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .sidebar { background: linear-gradient(175deg, #162c46, #091a2b); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .desktop-topbar,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .mobile-header,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .bottom-nav,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .mobile-menu { color: var(--text); border-color: var(--line); background: rgba(19,33,49,.95); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .panel,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .form-card,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .filter-panel,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .stat-card,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .order-card,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .message-card,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .login-card { border-color: var(--line); background: rgba(25,40,58,.96); box-shadow: var(--shadow); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .appearance-fields,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .asset-card,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .description-text,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .comment-body,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .compact-form,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .advanced-settings,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .info-box,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .message-card pre,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .form-actions { border-color: var(--line); color: var(--text); background: #203247; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .asset-preview { border-color: var(--line); background: #263a50; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) input,
html:is([data-theme="dark"], [data-effective-theme="dark"]) select,
html:is([data-theme="dark"], [data-effective-theme="dark"]) textarea,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .button:not(.primary),
html:is([data-theme="dark"], [data-effective-theme="dark"]) .file-button { color: var(--text); border-color: #4a6078; background: #17283c; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) input::placeholder,
html:is([data-theme="dark"], [data-effective-theme="dark"]) textarea::placeholder { color: #a9b9cb; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) label,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .field-label { color: var(--text); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .check-card { border-color: var(--line); background: #203247; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .check-card:has(input:checked) { border-color: #81b9ee; background: #254363; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .button.primary { color: #fff; background: #245d9b; border-color: #3677ba; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .stat-card strong,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .stat-card.blue strong,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .order-number,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .eyebrow,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .back-link,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .bar-list strong,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .setup-guide a,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .ai-settings a,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .advanced-settings summary,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .security-table code,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .audio-label,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .range-field output { color: #9bd0ff !important; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .stat-card.amber strong { color: #ffc879; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .stat-card.green strong { color: #86e3b0; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .page-heading h1,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .detail-heading h1 { color: var(--text); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .section-heading > span,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .inbox-counts span,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .message-status,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .security-event,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .audio-label,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .range-field output { background: #263b53; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .notification-row.unread { background: #243e59; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .notification-icon { color: #a3d3ff; background: #294362; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .empty-state { border-color: var(--line); background: rgba(25,40,58,.78); }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .client-row:hover,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .activity-row:hover,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .notification-link:hover { background: #29405a; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .history-dot { border-color: #19283a; background: #8ecaff; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-pending,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .priority-low,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .integration-state.off { color: #c6d3e2; background: #35465a; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-scheduled,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .priority-normal { color: #b6dcff; background: #254663; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-in_progress { color: #a9e8f4; background: #215167; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-waiting,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .priority-high,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .ai-label { color: #ffdb9a; background: #5a4125; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-completed,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .integration-state.on { color: #a3ebc1; background: #22523b; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .status-cancelled,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .priority-badge.priority-urgent { color: #ffc4c4; background: #633337; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .flash { color: #b8dbff; border-color: #3b638b; background: #193856; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .flash.success { color: #b5ecca; border-color: #3e7557; background: #1c4432; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .flash.error { color: #ffd0d0; border-color: #915057; background: #512a32; }
html:is([data-theme="dark"], [data-effective-theme="dark"]) .flash.warning { color: #ffe0a3; border-color: #8a6a37; background: #544025; }

html:is([data-theme="dark"], [data-effective-theme="dark"]) .mobile-brand,
html:is([data-theme="dark"], [data-effective-theme="dark"]) .bottom-nav .active { color: var(--text); }
