/* Sunstar — selected A / 深空指挥台.
   Load after styles.css and feedback.css. Uses existing application DOM.
   The floating assistant is styled separately by its own integration. */
:root[data-theme="dark"]{
  color-scheme: dark;
  --bg: #091321;
  --paper: #101e30;
  --ink: #e8eff9;
  --muted: #a3b3c7;
  --line: #2a3c52;
  --green: #6ae4d7;
  --sage: #153a40;
  --orange: #f1bc78;
  --orange-light: #332b20;
  --red: #ffafa9;
  --navy: #0b1728;
  --champagne: #6ae4d7;
  --soft-champagne: #132f3b;
  --shadow: 0 16px 48px #0000002e;
  --ai-surface-raised: #14253a;
  --ai-input: #0c192a;
  --ai-accent-ink: #082d30;
  --ai-success: #a0e0b9;
  --ai-success-bg: #17372e;
  --ai-warning: #f6d098;
  --ai-warning-bg: #352d21;
  --ai-danger-bg: #3a232c;
  --ai-focus: #91f4e7;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[data-theme="dark"] body{ background: var(--bg); color: var(--ink); font-family: var(--font-ui); }
html[data-theme="dark"] ::selection{ background: #376866; color: #fff; }
html[data-theme="dark"] .skip-link{ background: var(--green); color: var(--ai-accent-ink); border-radius: 8px; }
html[data-theme="dark"] .main-wrap{
  background: radial-gradient(ellipse at 75% 0, #17344738, transparent 44%), var(--bg);
}
html[data-theme="dark"] h1, html[data-theme="dark"] .hero h2, html[data-theme="dark"] .dialog-header h2, html[data-theme="dark"] .auth-card h2, html[data-theme="dark"] .catalog-intro h2, html[data-theme="dark"] .appointment-card h3{ font-family: var(--font-ui); font-weight: 600; }
html[data-theme="dark"] h1{ font-size: 32px; letter-spacing: -.9px; }
html[data-theme="dark"] .page-heading{ margin-bottom: 26px; }
html[data-theme="dark"] .eyebrow{ color: var(--green); letter-spacing: 1.6px; }
html[data-theme="dark"] .subtitle, html[data-theme="dark"] .hint, html[data-theme="dark"] .form-note, html[data-theme="dark"] .timezone-note, html[data-theme="dark"] .expiry-note, html[data-theme="dark"] .branch-label{ color: var(--muted); }/* Persistent navigation and the shared four-role shell. */
html[data-theme="dark"] .sidebar{
  background: #0b1728; color: var(--ink); border-right: 1px solid var(--line);
  scrollbar-color: #446278 transparent;
}
html[data-theme="dark"] .sidebar .brand{ color: #f0f6ff; letter-spacing: -1px; }
html[data-theme="dark"] .sidebar .brand small, html[data-theme="dark"] .sidebar .workspace small, html[data-theme="dark"] .sidebar .profile small{ color: #9fb2c9; }
html[data-theme="dark"] .brand img{ border: 1px solid #365367; border-radius: 10px; }
html[data-theme="dark"] .sidebar .workspace{ background: #101f32; border-color: #2b4158; border-radius: 11px; }
html[data-theme="dark"] .sidebar .avatar, html[data-theme="dark"] .avatar{ background: #20424c; color: #b5f3e8; }
html[data-theme="dark"] .sidebar .nav-label{ color: #91a7c1; }
html[data-theme="dark"] .sidebar .nav button{ color: #adbed3; border: 1px solid transparent; border-radius: 9px; min-height: 44px; }
html[data-theme="dark"] .sidebar .nav button:hover{ background: #14263b; color: #eef8ff; }
html[data-theme="dark"] .sidebar .nav button.active{
  color: #98f0e2; background: #163940; border-color: #2a555d;
  box-shadow: inset 3px 0 0 #6ae4d7;
}
html[data-theme="dark"] .sidebar .nav .count{ color: #b6f2e7; background: #23505a; }
html[data-theme="dark"] .sidebar .private-note{ color: #aabbd0; background: #112337; border-color: #294358; border-radius: 11px; }
html[data-theme="dark"] .sidebar .private-note strong{ color: #8fe6da; }
html[data-theme="dark"] .sidebar .profile{ border-color: var(--line); }
html[data-theme="dark"] .topbar{ background: #0f1c2e; border-color: var(--line); }
html[data-theme="dark"] .breadcrumb, html[data-theme="dark"] .breadcrumb span{ color: #91a7c1; }
html[data-theme="dark"] .breadcrumb strong{ color: var(--ink); }
html[data-theme="dark"] .lang-button{ background: #14273a; color: #cef5ee; border-color: #395367; border-radius: 8px; }
html[data-theme="dark"] .lang-button:hover{ background: #1b3a49; }
html[data-theme="dark"] .role-switch{ background: #0a1727; border: 1px solid var(--line); }
html[data-theme="dark"] .role-switch button{ color: var(--muted); }
html[data-theme="dark"] .role-switch button.selected{ background: #1a3d45; color: #adf3e7; box-shadow: none; }
html[data-theme="dark"] .provider-selector, html[data-theme="dark"] .provider-selector select{ color: var(--ink); background: var(--ai-surface-raised); border-color: var(--line); }
html[data-theme="dark"] .demo-banner{ background: var(--ai-warning-bg); border-color: #6d5433; color: var(--ai-warning); }
html[data-theme="dark"] .demo-banner.live-banner{ background: #142f30; border-color: #2c4f4e; color: #addbcf; }
html[data-theme="dark"] .dot{ background: #85dcc0; }
html[data-theme="dark"] .offline .dot{ background: var(--red); }/* Hierarchy: one quiet feature panel, readable cards, crisp ledger rows. */
html[data-theme="dark"] .hero{
  background: radial-gradient(ellipse at 88% 12%, #25717b26, transparent 57%), linear-gradient(120deg, #163344, #112239 75%);
  border-color: #315565; border-radius: 16px; box-shadow: inset 0 1px #80d8e012;
}
html[data-theme="dark"] .hero h2{ color: #f0f7ff; font-size: 26px; line-height: 1.35; }
html[data-theme="dark"] .hero .eyebrow, html[data-theme="dark"] .hero .hero-link{ color: #99ecde; }
html[data-theme="dark"] .hero p{ color: #b9d0df; }
html[data-theme="dark"] .house-art{ color: #7dc5c7; opacity: .68; }
html[data-theme="dark"] .stat, html[data-theme="dark"] .panel, html[data-theme="dark"] .vendor-card, html[data-theme="dark"] .catalog-card, html[data-theme="dark"] .inbox{
  background: var(--paper); border-color: var(--line); border-radius: 14px;
  box-shadow: 0 6px 24px #00000013, inset 0 1px #ffffff04;
}
html[data-theme="dark"] .stat{ padding: 20px 21px; }
html[data-theme="dark"] .stat-top{ color: #a7bace; }
html[data-theme="dark"] .stat-top .icon{ color: #78b9c4; }
html[data-theme="dark"] .stat-value{ color: #edf5ff; font-family: var(--font-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .stat-foot{ color: var(--muted); }
html[data-theme="dark"] .panel-head{ border-color: var(--line); }
html[data-theme="dark"] .panel-head h2{ letter-spacing: -.2px; }
html[data-theme="dark"] .panel-foot{ color: #a6b8cc; background: #0d1b2c; border-color: var(--line); }
html[data-theme="dark"] .request-row{ background: var(--paper); color: var(--ink); border-bottom-color: #25374d; }
html[data-theme="dark"] .request-row:hover{ background: #152a40; }
html[data-theme="dark"] .request-title{ color: #eaf2fb; }
html[data-theme="dark"] .request-meta{ color: #a6b8cc; }
html[data-theme="dark"] .request-price{ color: #b0e8e1; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .category-icon{ background: #1c344a; color: #a3c8e3; border: 1px solid #29485f; }
html[data-theme="dark"] .category-icon.plumbing{ background: #173b45; color: #86e1de; border-color: #2a5862; }
html[data-theme="dark"] .category-icon.hvac{ background: #352f27; color: #edc994; border-color: #65523b; }
html[data-theme="dark"] .chip{ color: #b3c2d5; background: #101f31; border-color: #3a5067; border-radius: 7px; }
html[data-theme="dark"] .chip:hover{ background: #1b3348; color: #edf6ff; }
html[data-theme="dark"] .chip.active{ background: #193e43; color: #a8f1e4; border-color: #426e71; }
html[data-theme="dark"] .badge{ background: #24374b; color: #c5d4e6; border: 1px solid #3b536b; border-radius: 5px; }
html[data-theme="dark"] .badge.awaiting_approval, html[data-theme="dark"] .badge.proposed, html[data-theme="dark"] .badge.estimate-required{
  background: #3b3020; color: #f6d098; border-color: #765934;
}
html[data-theme="dark"] .badge.approved, html[data-theme="dark"] .badge.completed, html[data-theme="dark"] .badge.fixed-price{
  background: #173a30; color: #aae8bf; border-color: #3d6b52;
}
html[data-theme="dark"] .badge.scheduled{ background: #223858; color: #bad5ff; border-color: #446890; }
html[data-theme="dark"] .badge.awaiting_estimate, html[data-theme="dark"] .badge.estimate_received{ background: #302d4b; color: #d5c9ff; border-color: #5c537d; }
html[data-theme="dark"] .badge.urgent, html[data-theme="dark"] .badge.emergency{ background: var(--ai-danger-bg); color: #ffc3b3; border-color: #895246; }
html[data-theme="dark"] .badge.cancelled{ background: #30343e; color: #c1c9d6; border-color: #4a5260; }
html[data-theme="dark"] .small-info{ background: #102135; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .small-info .icon{ color: #81bac8; }
html[data-theme="dark"] .assistant-panel{ background: #122e3a; border-color: #305765; border-radius: 14px; }
html[data-theme="dark"] .assistant-label .spark{ background: #255059; color: #b4f7eb; }
html[data-theme="dark"] .assistant-label small, html[data-theme="dark"] .assistant-panel p, html[data-theme="dark"] .assistant-summary{ color: #bdd0da; }
html[data-theme="dark"] .assistant-summary{ border-color: #335565; }
html[data-theme="dark"] .event-dot{ background: #7fc6bb; }
html[data-theme="dark"] .event p, html[data-theme="dark"] .event time{ color: var(--muted); }
html[data-theme="dark"] .ledger th{ background: #0d1a2b; color: #a7bed3; }
html[data-theme="dark"] .ledger td{ color: #e0ebf7; }
html[data-theme="dark"] .ledger tbody tr:hover{ background: #14283b; }
html[data-theme="dark"] .ledger td, html[data-theme="dark"] .ledger th{ border-color: var(--line); }
html[data-theme="dark"] .ledger .numeric{ font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .catalog-price{ color: #b1eee1; font-family: var(--font-ui); font-weight: 600; }
html[data-theme="dark"] .catalog-intro h2{ font-size: 22px; }
html[data-theme="dark"] .property-card{ background: var(--paper); border-color: var(--line); }
html[data-theme="dark"] .member-row{ border-color: var(--line); }/* Inputs and actions retain their native behavior and existing validation. */
html[data-theme="dark"] .btn{
  color: #cfebe9; background: #172c41; border-color: #38546b; border-radius: 9px;
  min-height: 42px; transition: background .16s ease, border-color .16s ease, transform .14s ease;
}
html[data-theme="dark"] .btn:hover:not(:disabled){ background: #204153; border-color: #669da9; filter: none; }
html[data-theme="dark"] .btn.primary{ background: #6ae4d7; color: var(--ai-accent-ink); border-color: #6ae4d7; box-shadow: 0 3px 14px #4ed8c712; }
html[data-theme="dark"] .btn.primary:hover:not(:disabled){ color: #052a2d; background: #9af1e5; border-color: #9af1e5; }
html[data-theme="dark"] .btn.soft{ background: #193b43; color: #b0eee4; border-color: #37616a; }
html[data-theme="dark"] .btn.danger{ background: #342631; color: #ffb8af; border-color: #84515a; }
html[data-theme="dark"] .btn.danger:hover:not(:disabled){ background: #4b303a; border-color: #b97178; }
html[data-theme="dark"] .btn:active:not(:disabled), html[data-theme="dark"] .fb-button:active:not(:disabled){ transform: translateY(1px); }
html[data-theme="dark"] .btn:disabled, html[data-theme="dark"] .fb-button:disabled{ opacity: .58; cursor: not-allowed; transform: none; box-shadow: none; }
html[data-theme="dark"] .text-btn{ color: #8be7da; }
html[data-theme="dark"] .text-btn:hover:not(:disabled){ color: #c0fff4; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .field label, html[data-theme="dark"] .field-legend{ color: #d4e1ee; }
html[data-theme="dark"] .field input, html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea{
  color: var(--ink); background: var(--ai-input); border: 1px solid #456078;
  border-radius: 8px; caret-color: #93f0e2; color-scheme: dark;
}
html[data-theme="dark"] .field input::placeholder, html[data-theme="dark"] .field textarea::placeholder{ color: #96a9be; opacity: 1; }
html[data-theme="dark"] .field input:hover:not(:disabled), html[data-theme="dark"] .field select:hover:not(:disabled), html[data-theme="dark"] .field textarea:hover:not(:disabled){ border-color: #6b8b9f; }
html[data-theme="dark"] .field input:disabled, html[data-theme="dark"] .field select:disabled, html[data-theme="dark"] .field textarea:disabled{ background: #152132; color: #a1b0c2; opacity: .7; cursor: not-allowed; }
html[data-theme="dark"] .field input[readonly], html[data-theme="dark"] .field textarea[readonly]{ background: #172a3c; }
html[data-theme="dark"] .field input:-webkit-autofill{ -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px #0c192a inset; caret-color: #93f0e2; }
html[data-theme="dark"] .field input::file-selector-button{ color: #c8f3eb; background: #1e414b; border: 1px solid #47717a; border-radius: 5px; padding: 6px 10px; margin-right: 10px; }
html[data-theme="dark"] .check-row input, html[data-theme="dark"] .check-inline input, html[data-theme="dark"] .availability-option input{ accent-color: #6ae4d7; }
html[data-theme="dark"] .questionnaire th{ background: #14273a; color: #c6d9e9; }
html[data-theme="dark"] .questionnaire td{ background: #101e30; }
html[data-theme="dark"] .questionnaire th, html[data-theme="dark"] .questionnaire td{ border-color: var(--line); }
html[data-theme="dark"] .section-number{ background: #1a4047; color: #b3f4e6; }/* Dialogs are scoped to the business modal; the assistant owns its dialog. */
html[data-theme="dark"] #dialog{ background: var(--paper); color: var(--ink); border: 1px solid #3c536c; border-radius: 17px; box-shadow: 0 28px 100px #0009; }
html[data-theme="dark"] #dialog::backdrop{ background: #030a15b8; backdrop-filter: blur(5px); }
html[data-theme="dark"] #dialog[open]{ animation: sunstar-panel-enter .18s ease-out; }
html[data-theme="dark"] .dialog-header{ background: #13263a; border-color: var(--line); }
html[data-theme="dark"] .dialog-header h2{ color: #f0f6ff; }
html[data-theme="dark"] .dialog-header .eyebrow{ color: #98c8d1; }
html[data-theme="dark"] .dialog-body{ background: #101e30; }
html[data-theme="dark"] .dialog-header .close-btn{ color: #c3e7e5; background: #224052; border: 1px solid #3a6170; }
html[data-theme="dark"] .dialog-header .close-btn:hover{ background: #2d5262; }
html[data-theme="dark"] .detail-item{ background: #152b3e; border: 1px solid #2c455c; }
html[data-theme="dark"] .bill{ background: #102235; border-color: #345166; border-radius: 11px; }
html[data-theme="dark"] .bill-line.total{ color: #a2efdf; border-color: #37556a; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .action-area, html[data-theme="dark"] .request-history, html[data-theme="dark"] .cancellation-section{ border-color: #345067; }
html[data-theme="dark"] .steps span{ background: #2c4258; }
html[data-theme="dark"] .steps span.done{ background: #69caba; }
html[data-theme="dark"] .secondary-action{ background: #122539; border-color: #344b60; }
html[data-theme="dark"] .secondary-action>summary{ color: #a1eadf; }
html[data-theme="dark"] .secondary-action-body{ background: #101e30; }
html[data-theme="dark"] .snapshot{ background: #122d34; border-color: #365b60; }
html[data-theme="dark"] .appointment-card{ background: #17313e; border-color: #3a606a; border-radius: 12px; }
html[data-theme="dark"] .appointment-card h3{ color: #d6f1ec; }
html[data-theme="dark"] .appointment-status{ border-color: #3a5a65; }
html[data-theme="dark"] .mode-callout, html[data-theme="dark"] .assistant-suggestion{ background: #142e3e; color: #c1d5e5; border-color: #35596b; }
html[data-theme="dark"] .mode-callout strong{ color: #95e5da; }
html[data-theme="dark"] .info-note, html[data-theme="dark"] .danger-note, html[data-theme="dark"] .fb-note, html[data-theme="dark"] .fb-error, html[data-theme="dark"] .fb-success{ overflow-wrap: anywhere; }
html[data-theme="dark"] .info-note{ color: var(--ai-warning); background: var(--ai-warning-bg); border-color: #775d38; }
html[data-theme="dark"] .purpose-note{ color: #ecd099; border-color: #bda064; }
html[data-theme="dark"] .danger-note{ background: var(--ai-danger-bg); color: #ffc0b0; border: 1px solid #7d4c4d; }
html[data-theme="dark"] .inline-error, html[data-theme="dark"] .availability-error, html[data-theme="dark"] .expiry-note.danger-note{ color: #ffb4aa; }
html[data-theme="dark"] .cancellation-section{ color: #ffb8af; }
html[data-theme="dark"] #toast{ background: #164148; border: 1px solid #5eafa7; color: #dbfff4; box-shadow: 0 12px 38px #0005; }/* Multi-date calendar: today, selected, disabled and per-date overrides differ. */
html[data-theme="dark"] .availability-picker{ background: #101f31; border-color: #345067; border-radius: 14px; }
html[data-theme="dark"] .calendar-weekdays{ color: #adbed1; }
html[data-theme="dark"] .calendar-nav{ background: #183046; color: #b7f4e8; border-color: #405e72; }
html[data-theme="dark"] .calendar-nav:hover:not(:disabled){ background: #214655; border-color: #6d9aa3; }
html[data-theme="dark"] .calendar-day{ background: #172c40; color: #e1edf9; border-color: #314b61; }
html[data-theme="dark"] .calendar-day:hover:not(:disabled){ background: #234859; border-color: #7db6b8; }
html[data-theme="dark"] .calendar-day.today:not(.selected){ border: 2px solid #86d3cc; color: #c8fff2; }
html[data-theme="dark"] .calendar-day.selected{ color: #082d30; background: #6ae4d7; border-color: #8ef4e5; font-weight: 700; }
html[data-theme="dark"] .calendar-day.selected:hover:not(:disabled){ color: #082d30; background: #a1f3e7; border-color: #a1f3e7; }
html[data-theme="dark"] .calendar-day:disabled{ background: #101b2a; color: #8797ac; border-color: #213146; opacity: .7; cursor: not-allowed; }
html[data-theme="dark"] .calendar-nav:disabled{ opacity: .45; cursor: not-allowed; }
html[data-theme="dark"] .availability-common{ border-color: #345067; }
html[data-theme="dark"] .availability-option{ background: #14293c; border-color: #3a5268; }
html[data-theme="dark"] .availability-option:has(input:checked){ background: #173d43; border-color: #6bafa8; }
html[data-theme="dark"] .date-window, html[data-theme="dark"] .selected-date{ background: #14293c; border-color: #345269; }
html[data-theme="dark"] .date-time-kind.custom{ background: #403321; color: #f7d19a; }
html[data-theme="dark"] .selected-date-actions .date-remove{ color: #ffb6af; }
html[data-theme="dark"] .calendar-empty{ background: #14273a; color: var(--muted); }/* Sign-in and invitation activation use the same visual language. */
html[data-theme="dark"] .auth-story{
  background: radial-gradient(ellipse at 85% 18%, #20667542, transparent 49%), linear-gradient(155deg, #102d40, #0a1628 72%);
  border-right: 1px solid #2c495d;
}
html[data-theme="dark"] .auth-story .brand{ color: #f1f7ff; }
html[data-theme="dark"] .auth-story .brand small, html[data-theme="dark"] .auth-story p{ color: #b4ccdd; }
html[data-theme="dark"] .auth-story h1{ color: #eff9ff; font-weight: 600; }
html[data-theme="dark"] .auth-story-copy .eyebrow, html[data-theme="dark"] .auth-principles{ color: #a5e9db; }
html[data-theme="dark"] .auth-story .house-art{ color: #7ec4c9; }
html[data-theme="dark"] .auth-foot{ border-color: #345164; }
html[data-theme="dark"] .auth-panel{ background: #101c2e; }
html[data-theme="dark"] .auth-card h2{ color: #edf5ff; }
html[data-theme="dark"] .auth-support{ border-color: #345067; }
html[data-theme="dark"] .otp-details summary{ color: #aec7d8; }
html[data-theme="dark"] .otp-details summary:hover{ color: #bcf8e9; }
html[data-theme="dark"] .mfa-page{ background: var(--bg); }/* Feedback modules: assets, leases, receipt review and immutable reports. */
html[data-theme="dark"] .sunstar-feedback{
  --fb-accent: #87eadd;
  --fb-ink: #e8eff9;
  --fb-muted: #a3b3c7;
  --fb-line: #2a3c52;
  --fb-soft: #142a3f;
  color: var(--fb-ink);
}
html[data-theme="dark"] .fb-heading h1, html[data-theme="dark"] .fb-section>h2, html[data-theme="dark"] .fb-workorder .fb-heading h2, html[data-theme="dark"] .fb-public-listings .fb-card>h2{ color: #edf5ff; font-family: var(--font-ui); }
html[data-theme="dark"] .fb-eyebrow{ color: #83c9c7; }
html[data-theme="dark"] .fb-metrics>div, html[data-theme="dark"] .fb-card, html[data-theme="dark"] .fb-editor, html[data-theme="dark"] .fb-history, html[data-theme="dark"] .fb-attachment{
  background: var(--paper); border-color: var(--fb-line); box-shadow: 0 5px 22px #00000013;
}
html[data-theme="dark"] .fb-metrics strong, html[data-theme="dark"] .fb-amount{ color: #d8f5f0; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .fb-card, html[data-theme="dark"] .fb-metrics>div, html[data-theme="dark"] .fb-editor{ border-radius: 14px; }
html[data-theme="dark"] .fb-button{ color: #ceeae7; background: #172c41; border-color: #405b72; border-radius: 9px; transition: background .16s ease, border-color .16s ease, transform .14s ease; }
html[data-theme="dark"] .fb-button:hover:not(:disabled){ background: #234153; border-color: #6699a5; }
html[data-theme="dark"] .fb-button.fb-primary{ background: #6ae4d7; color: #082d30; border-color: #6ae4d7; }
html[data-theme="dark"] .fb-button.fb-primary:hover:not(:disabled){ background: #9af1e5; color: #082d30; border-color: #9af1e5; filter: none; }
html[data-theme="dark"] .fb-editor>summary{ color: #a6ede0; }
html[data-theme="dark"] .fb-editor>summary:hover, html[data-theme="dark"] .fb-editor[open]>summary{ background: #173044; border-color: #345167; }
html[data-theme="dark"] .fb-field label, html[data-theme="dark"] .sunstar-feedback .fb-field>span{ color: #d4e1ee; }
html[data-theme="dark"] .fb-field input, html[data-theme="dark"] .fb-field select, html[data-theme="dark"] .fb-field textarea{ background: #0c192a; border-color: #456078; color: #e8eff9; caret-color: #93f0e2; color-scheme: dark; }
html[data-theme="dark"] .fb-field input::placeholder, html[data-theme="dark"] .fb-field textarea::placeholder{ color: #96a9be; opacity: 1; }
html[data-theme="dark"] .fb-field input:hover:not(:disabled), html[data-theme="dark"] .fb-field select:hover:not(:disabled), html[data-theme="dark"] .fb-field textarea:hover:not(:disabled){ border-color: #6b8b9f; }
html[data-theme="dark"] .fb-field input:-webkit-autofill{ -webkit-text-fill-color: #e8eff9; box-shadow: 0 0 0 1000px #0c192a inset; }
html[data-theme="dark"] .fb-field input::file-selector-button{ background: #1e414b; color: #c8f3eb; border: 1px solid #47717a; border-radius: 5px; padding: 6px 10px; margin-right: 10px; }
html[data-theme="dark"] .sunstar-feedback button:disabled, html[data-theme="dark"] .sunstar-feedback input:disabled, html[data-theme="dark"] .sunstar-feedback select:disabled, html[data-theme="dark"] .sunstar-feedback textarea:disabled{ cursor: not-allowed; }
html[data-theme="dark"] .fb-field input:disabled, html[data-theme="dark"] .fb-field select:disabled, html[data-theme="dark"] .fb-field textarea:disabled{ background: #152132; color: #a1b0c2; }
html[data-theme="dark"] .fb-field input[readonly], html[data-theme="dark"] .fb-field textarea[readonly]{ background: #172a3c; }
html[data-theme="dark"] .fb-check input{ accent-color: #6ae4d7; }
html[data-theme="dark"] .fb-facts>div{ background: #152b3e; border: 1px solid #2b4359; }
html[data-theme="dark"] .fb-chip{ background: #22394d; border-color: #405a70; color: #c2d7e9; }
html[data-theme="dark"] .fb-chip.good{ background: #173a30; border-color: #416e54; color: #ace9c1; }
html[data-theme="dark"] .fb-note, html[data-theme="dark"] .fb-reminders{ color: var(--ai-warning); background: var(--ai-warning-bg); border-color: #775d38; }
html[data-theme="dark"] .fb-reminders p{ color: #edd0a3; }
html[data-theme="dark"] .fb-error{ color: #ffc0b0; background: #3a232c; border-color: #865254; }
html[data-theme="dark"] .fb-success, html[data-theme="dark"] .fb-submitted{ color: #afe9c2; background: #16392f; border-color: #427054; }
html[data-theme="dark"] .fb-empty{ color: #adbed0; background: #102236; border-color: #3b5b71; }
html[data-theme="dark"] .fb-analysis-result{ background: #14313b; border-color: #375d65; color: #dceef2; }
html[data-theme="dark"] .fb-analysis-result h4{ color: #a6eee0; }
html[data-theme="dark"] .fb-analysis-result .fb-hint, html[data-theme="dark"] .sunstar-feedback .fb-hint{ color: #adc2d2; }
html[data-theme="dark"] .fb-attachment:hover{ background: #193246; }
html[data-theme="dark"] .fb-attachment>span:first-child{ color: #95d9d2; }
html[data-theme="dark"] .sunstar-feedback .fb-attachment-held{ background: #192a3c; border-color: #425669; }
html[data-theme="dark"] .sunstar-feedback .fb-entered{ background: #11263a; border-color: #345168; }
html[data-theme="dark"] .sunstar-feedback .fb-table-scroll th, html[data-theme="dark"] .sunstar-feedback .fb-table-scroll td{ border-color: #345067; }
html[data-theme="dark"] .sunstar-feedback .fb-table-scroll th{ color: #bad1e5; background: #102338; }
html[data-theme="dark"] .sunstar-feedback .fb-table-scroll tbody tr:hover{ background: #152c40; }
html[data-theme="dark"] .fb-public-brand>a:first-child{ color: #b1f0e3; }/* Keep focus and semantic errors visible against every surface. */
html[data-theme="dark"] .btn:focus-visible, html[data-theme="dark"] .text-btn:focus-visible, html[data-theme="dark"] .chip:focus-visible, html[data-theme="dark"] .lang-button:focus-visible, html[data-theme="dark"] .nav button:focus-visible, html[data-theme="dark"] .request-row:focus-visible, html[data-theme="dark"] .field input:focus-visible, html[data-theme="dark"] .field select:focus-visible, html[data-theme="dark"] .field textarea:focus-visible, html[data-theme="dark"] .secondary-action>summary:focus-visible, html[data-theme="dark"] .otp-details>summary:focus-visible, html[data-theme="dark"] .cancellation-section>summary:focus-visible, html[data-theme="dark"] .dialog-header .close-btn:focus-visible, html[data-theme="dark"] .calendar-day:focus-visible, html[data-theme="dark"] .calendar-nav:focus-visible, html[data-theme="dark"] .availability-picker button:focus-visible, html[data-theme="dark"] .sunstar-feedback :is(a, button, input, select, textarea, summary):focus-visible{
  outline: 3px solid var(--ai-focus); outline-offset: 3px;
}
html[data-theme="dark"] .inline-error:focus, html[data-theme="dark"] .availability-error:focus, html[data-theme="dark"] .fb-error:focus{ outline-color: #ffc1ae; }
html[data-theme="dark"] .table-wrap, html[data-theme="dark"] .sunstar-feedback .fb-table-scroll, html[data-theme="dark"] #selected-dates{ scrollbar-width: thin; scrollbar-color: #506d85 #112236; }

@keyframes sunstar-panel-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1151px) {
html[data-theme="dark"] .app-shell{ grid-template-columns: 236px minmax(0, 1fr); }
html[data-theme="dark"] #main{ padding-top: 31px; }
}
@media (max-width: 950px) {
html[data-theme="dark"] .stat{ padding: 16px; }
html[data-theme="dark"] .hero h2{ font-size: 24px; }
html[data-theme="dark"] .panel-head{ flex-wrap: wrap; }
}
@media (max-width: 680px) {
html[data-theme="dark"] .sidebar{ background: #0b1728; border-bottom: 1px solid #263d54; }
html[data-theme="dark"] .sidebar .nav{ border-top-color: #2b435b; padding-bottom: 3px; }
html[data-theme="dark"] .sidebar .nav button{ border-radius: 7px; padding: 10px 11px; min-height: 44px; }
html[data-theme="dark"] .sidebar .nav button.active{ background: #173a42; color: #aff3e5; border: 1px solid #38606a; border-bottom: 2px solid #6ae4d7; box-shadow: none; }
html[data-theme="dark"] .topbar{ background: #0f1f32; }
html[data-theme="dark"] .top-controls .lang-button{ min-height: 44px; }
html[data-theme="dark"] h1{ font-size: 26px; }
html[data-theme="dark"] .page-heading{ flex-wrap: wrap; align-items: flex-start; gap: 14px; }
html[data-theme="dark"] .page-heading .btn{ min-height: 44px; font-size: 12px; }
html[data-theme="dark"] .hero{ padding: 22px; border-radius: 14px; }
html[data-theme="dark"] .hero h2{ font-size: 23px; }
html[data-theme="dark"] .hero .house-art{ opacity: .2; }
html[data-theme="dark"] .stat{ padding: 16px; }
html[data-theme="dark"] .stat-value{ font-size: 28px; }
html[data-theme="dark"] .btn, html[data-theme="dark"] .fb-button, html[data-theme="dark"] .btn.small, html[data-theme="dark"] .fb-button.fb-small{ min-height: 44px; }
html[data-theme="dark"] .field input, html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea, html[data-theme="dark"] .fb-field input, html[data-theme="dark"] .fb-field select, html[data-theme="dark"] .fb-field textarea{ font-size: 16px; min-height: 44px; }
html[data-theme="dark"] .field input[type=file], html[data-theme="dark"] .fb-field input[type=file]{ font-size: 12px; }
html[data-theme="dark"] .calendar-day{ min-height: 44px; }
html[data-theme="dark"] .calendar-days, html[data-theme="dark"] .calendar-weekdays{ gap: 3px; }
html[data-theme="dark"] .dialog-header{ padding: 18px; }
html[data-theme="dark"] .dialog-header-tools{ flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
html[data-theme="dark"] .dialog-header .close-btn{ width: 36px; height: 36px; }
html[data-theme="dark"] .dialog-body{ padding: 18px; }
html[data-theme="dark"] .auth-story{ border-right: 0; border-bottom: 1px solid #2c495d; }
html[data-theme="dark"] .auth-panel{ padding-top: 20px; }
html[data-theme="dark"] .auth-card .field input{ font-size: 16px; }
html[data-theme="dark"] .fb-heading{ flex-wrap: wrap; gap: 14px; }
html[data-theme="dark"] .fb-heading>.fb-button{ margin-top: 0; }
html[data-theme="dark"] .fb-card, html[data-theme="dark"] .fb-editor, html[data-theme="dark"] .fb-metrics>div{ border-radius: 12px; }
html[data-theme="dark"] .fb-history{ flex-wrap: wrap; }
html[data-theme="dark"] .notification{ flex-wrap: wrap; }
html[data-theme="dark"] .member-row{ flex-wrap: wrap; }
html[data-theme="dark"] .member-row>div{ min-width: 0; }
html[data-theme="dark"] .fb-attachment{ flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
html[data-theme="dark"] #dialog[open]{ animation: none; }
html[data-theme="dark"] .btn, html[data-theme="dark"] .fb-button{ transition: none; }
html[data-theme="dark"] .btn:active:not(:disabled), html[data-theme="dark"] .fb-button:active:not(:disabled){ transform: none; }
}
@media (forced-colors: active) {
html[data-theme="dark"] .sidebar .nav button.active, html[data-theme="dark"] .calendar-day.selected, html[data-theme="dark"] .chip.active{ outline: 2px solid Highlight; outline-offset: -3px; }
html[data-theme="dark"] .btn, html[data-theme="dark"] .fb-button, html[data-theme="dark"] .badge, html[data-theme="dark"] .fb-chip{ border: 1px solid ButtonText; }
html[data-theme="dark"] .btn:focus-visible, html[data-theme="dark"] .fb-button:focus-visible{ outline-color: Highlight; }
}
