

:root {
  /* Original OneDigital forest and mint palette. */
  --ink: #192c28;
  --ink-soft: #4b5e59;
  --muted: #85918d;
  --line: #e7ece9;
  --canvas: #f6f8f6;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f8fbf9;
  --surface-soft: #f4f8f5;
  --surface-inset: #edf3ef;
  --accent: #42a77f;
  --accent-hover: #358c69;
  --accent-soft: #e9f7ee;
  --green: #bfe9d5;
  --green-strong: #42a77f;
  --green-dark: #173c31;
  --amber: #db9d52;
  --menu-link: #aab9b2;
  --menu-hover-bg: rgba(255, 255, 255, .075);
  --menu-hover-fg: #f4f8f6;
  --menu-active-bg: #c4ead7;
  --menu-active-fg: #17382d;
  --menu-count-bg: #31493e;
  --menu-count-fg: #b7ccc1;
  --menu-count-active-bg: #a3d6ba;
  --menu-count-active-fg: #244b3d;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-frame { display: flex; width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--canvas); }
.sidebar { width: 254px; min-width: 254px; height: 100vh; height: 100dvh; display: flex; flex: 0 0 254px; flex-direction: column; overflow: hidden; padding: 22px 15px 14px; background: #14251f; color: #f1f8f4; }
.brand-lockup { display: flex; align-items: center; gap: 11px; margin: 1px 8px 29px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; background: #bce9d3; color: #173c31; }
.brand-lockup strong { display: block; max-width: 160px; overflow: hidden; font-size: 19px; letter-spacing: -.8px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.brand-lockup small { display: block; margin-top: 4px; color: #91a59c; font-size: 8px; letter-spacing: 1.5px; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px; border: 1px solid #34483f; border-radius: 12px; background: #1a2d26; }
.workspace-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #415d4f; color: #e3f4eb; font-size: 13px; font-weight: 650; }
.workspace-name, .profile-text { min-width: 0; flex: 1; }
.workspace-name strong, .profile-text strong { display: block; overflow: hidden; color: #f2f7f4; font-size: 12px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.workspace-name small, .profile-text small { display: block; margin-top: 4px; overflow: hidden; color: #93a69e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-chevron { color: #8ca097; font-size: 17px; }
.side-nav { min-height: 0; flex: 1; overflow-y: auto; padding-top: 26px; scrollbar-width: none; -ms-overflow-style: none; }
.side-nav::-webkit-scrollbar, .admin-nav::-webkit-scrollbar { display: none; }
.side-nav-container { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.mobile-menu-trigger { display: none; }
.nav-group { margin-bottom: 25px; }
.nav-heading { padding: 0 10px 9px; color: #83968e; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; height: 38px; margin: 2px 0; padding: 0 10px; border-radius: 9px; color: var(--menu-link); font-size: 12px; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.nav-link:hover, .admin-nav-link:hover { background: var(--menu-hover-bg); color: var(--menu-hover-fg); }
.nav-link.active, .admin-nav-link.active { background: var(--menu-active-bg); color: var(--menu-active-fg); font-weight: 650; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 20px; background: var(--menu-count-bg); color: var(--menu-count-fg); font-size: 10px; }
.nav-link.active .nav-count { background: var(--menu-count-active-bg); color: var(--menu-count-active-fg); }
.sidebar-bottom { margin-top: auto; }
.help-card { position: relative; margin: 0 2px 13px; padding: 15px 13px 13px; border: 1px solid #33483e; border-radius: 12px; background: #1b3028; }
.help-card-close { position: absolute; top: 6px; right: 6px; display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #aebac1; cursor: pointer; transition: background .15s ease, color .15s ease; }
.help-card-close:hover { background: rgba(255,255,255,.09); color: #f1f8f4; }
.help-card-close:focus-visible { outline: 2px solid #bce9d3; outline-offset: 2px; }
.help-sparkle { display: grid; width: 24px; height: 24px; margin-bottom: 10px; place-items: center; border-radius: 8px; background: #35584a; color: #c3ead5; }
.help-card strong { display: block; color: #e9edef; font-size: 11px; }
.help-card p { margin: 6px 0 10px; color: #aebac1; font-size: 10px; line-height: 1.55; }
.help-card a { display: flex; align-items: center; gap: 5px; color: #c2ebd6; font-size: 10px; font-weight: 650; }
.profile-row { display: flex; align-items: center; gap: 9px; padding: 12px 5px 3px; border-top: 1px solid #34483f; }
.profile-account-link { display: flex; min-width: 0; flex: 1; align-items: center; gap: 9px; padding: 3px 4px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; transition: background .15s ease; }
.profile-account-link:hover { background: rgba(255,255,255,.07); }
.profile-account-link:focus-visible, .top-profile-link:focus-visible { outline: 2px solid #bce9d3; outline-offset: 2px; }
.profile-menu-root { position: relative; min-width: 0; flex: 1; }
.profile-menu-compact { flex: 0 0 auto; }
.profile-menu-trigger { width: 100%; cursor: pointer; }
.profile-menu-trigger-compact { width: 30px; height: 30px; justify-content: center; padding: 0; border-radius: 50%; }
.profile-menu-chevron { flex: 0 0 auto; color: #93a69e; transform: rotate(-90deg); transition: transform .15s ease; }
.profile-menu-trigger[aria-expanded="true"] .profile-menu-chevron { transform: rotate(90deg); }
.profile-menu-popover { position: absolute; z-index: 50; bottom: calc(100% + 10px); left: -3px; width: min(264px, calc(100% + 18px)); padding: 8px; border: 1px solid #34483f; border-radius: 12px; background: #1a2d26; box-shadow: 0 14px 36px rgba(0,0,0,.32); color: #f2f7f4; animation: profile-menu-in .14s ease-out; }
.profile-menu-compact .profile-menu-popover { top: calc(100% + 8px); right: 0; bottom: auto; left: auto; width: min(264px, calc(100vw - 32px)); }
.profile-menu-identity { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 7px 8px 9px; }
.profile-menu-divider { height: 1px; margin: 2px 0 6px; background: #34483f; }
.profile-menu-popover form { margin: 0; }
.profile-menu-item { display: flex; width: 100%; min-height: 38px; align-items: center; gap: 10px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #d7e2dc; font-size: 11px; text-align: left; }
.profile-menu-item:hover, .profile-menu-item:focus-visible { outline: none; background: rgba(255,255,255,.08); color: #fff; }
.profile-menu-item svg { color: #a7b9b0; }
.profile-menu-signout { cursor: pointer; }
@keyframes profile-menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.profile-logout-form { display: flex; }
.profile-avatar, .top-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d7c2aa; color: #503f31; font-size: 10px; font-weight: 700; }
.icon-button { position: relative; display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.icon-button:hover { background: rgba(116, 145, 130, .1); }
.sign-out { color: #96aaa0; }
.main-area { width: 0; height: 100vh; height: 100dvh; min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.topbar { height: 60px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #87948f; font-size: 11px; }
.breadcrumb strong { color: #40534c; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; color: #667872; }
.search-box { display: flex; align-items: center; gap: 8px; width: 208px; padding: 8px 9px; border: 1px solid #e6ebe8; border-radius: 9px; color: #9aa59f; font-size: 11px; }
.search-box kbd { margin-left: auto; padding: 2px 5px; border: 1px solid #e6ebe8; border-radius: 4px; color: #a1aaa6; font: inherit; font-size: 9px; }
.top-bell { color: #647770; }
.top-bell i { position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border: 1px solid white; border-radius: 50%; background: #e7a266; }
.notification-count { position: absolute; top: -2px; right: -2px; display: grid; min-width: 14px; height: 14px; place-items: center; padding: 0 3px; border: 1.5px solid white; border-radius: 9px; background: #d97c65; color: white; font-size: 7px; font-weight: 700; }
.page-content { width: min(100%, 1420px); flex: 1; margin: 0 auto; padding: 33px 38px 26px; }
.app-footer { display: flex; justify-content: space-between; padding: 13px 38px 17px; color: #9aa49f; font-size: 10px; }
.app-footer > span:last-child { display: flex; align-items: center; gap: 6px; }
.footer-dot { padding: 0 3px; color: #c1cbc6; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { margin-bottom: 9px; color: #69927e; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.page-heading h1, .welcome h1 { margin: 0; color: #20332d; font-size: clamp(25px, 2.3vw, 32px); font-weight: 630; letter-spacing: -1.05px; }
.page-heading p { margin: 5px 0 0; color: #81908a; font-size: 12px; line-height: 1.5; }
.date-chip { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #e4eae7; border-radius: 9px; background: #fff; color: #687b73; font-size: 10px; }
.button-primary, .button-secondary, .button-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 650; transition: transform .15s ease, background .15s ease; }
.button-primary { background: #20483a; color: #fff; }
.button-primary:hover { background: #173c31; transform: translateY(-1px); }
.button-primary:disabled { opacity: .55; cursor: wait; }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink-soft); }
.button-secondary:hover { border-color: #dfe7e2; background: #f4f8f5; color: #173c31; }
.button-danger { border-color: #e8cfc9; background: #fff6f3; color: #a34e3d; }
.button-danger:hover { background: #fbe9e4; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: #49876b; font-size: 10px; font-weight: 650; }

.welcome { position: relative; min-height: 154px; margin-bottom: 20px; padding: 24px 27px 22px 31px; overflow: hidden; border: 1px solid #dbe9e0; border-radius: 14px; background: linear-gradient(112deg, #e5f2e9 0%, #edf5ef 64%, #d9eee3 100%); }
.welcome::before { position: absolute; top: 22px; bottom: 22px; left: 0; width: 4px; border-radius: 0 4px 4px 0; background: #42a77f; content: ""; }
.welcome-copy { position: relative; z-index: 1; max-width: 760px; }
.welcome h2 { margin: 0; color: #20332d; font-size: 19px; font-weight: 650; letter-spacing: -.35px; }
.welcome p { max-width: 620px; margin: 8px 0 0; color: #687d72; font-size: 11px; line-height: 1.65; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.welcome-actions :is(.button-primary, .button-secondary) { min-height: 34px; padding: 0 12px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric-card { position: relative; display: flex; min-height: 132px; flex-direction: column; overflow: hidden; padding: 19px 18px 15px; border: 1px solid #e1e8e3; border-radius: 13px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(32, 72, 58, .055); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.metric-card::before { position: absolute; top: 0; right: 18px; left: 18px; height: 2px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #42a77f, #8bc9ad); content: ""; opacity: .78; }
.metric-card > :not(.metric-ambient) { position: relative; z-index: 1; }
.metric-ambient { position: absolute; z-index: 0; inset: 0; overflow: hidden; color: #438a6c; opacity: .1; pointer-events: none; transition: opacity .22s ease; }
.metric-ambient > span { position: absolute; display: grid; place-items: center; animation: metric-ambient-float 9s ease-in-out infinite; }
.metric-ambient > span:nth-child(1) { top: 14px; right: 13px; transform: rotate(-9deg); }
.metric-ambient > span:nth-child(2) { top: 62px; right: 72px; animation-delay: -3.2s; animation-duration: 11s; transform: rotate(13deg); }
.metric-ambient > span:nth-child(3) { top: 18px; right: 92px; animation-delay: -6.1s; animation-duration: 8s; transform: rotate(-18deg); }
.metric-card:hover { border-color: #c8ddd1; box-shadow: 0 12px 30px rgba(32, 72, 58, .09); transform: translateY(-2px); }
.metric-card:hover .metric-ambient { opacity: .15; }
.metric-label { color: #64786e; font-size: 10px; font-weight: 600; letter-spacing: .1px; }
.metric-number { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; color: #263a33; font-size: 31px; font-weight: 650; letter-spacing: -1.2px; line-height: 1; }
.metric-number small { color: #8f9b95; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid #edf1ee; color: #8b9992; font-size: 9px; transition: color .18s ease; }
.metric-foot > span { color: #5f8d76; font-size: 13px; line-height: 1; transition: transform .18s ease; }
.metric-card:hover .metric-foot { color: #526b5e; }
.metric-card:hover .metric-foot > span { transform: translateX(2px); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-top: 1px solid #edf1ee; }
.pagination-summary { color: #84938b; font-size: 9px; }
.pagination-links { display: flex; align-items: center; gap: 5px; }
.pagination-page-slot { display: inline-flex; align-items: center; gap: 5px; }
.pagination-link { display: inline-grid; min-width: 29px; height: 29px; padding: 0 8px; place-items: center; border: 1px solid #dfe8e3; border-radius: 8px; background: rgba(255,255,255,.72); color: #4e675b; font-size: 9px; font-weight: 650; }
.pagination-link:hover { border-color: #a9cfbb; background: #edf7f1; color: #1e5542; }
.pagination-link.active { border-color: #4aa47d; background: #1f4a3a; color: #fff; }
.pagination-link.disabled { opacity: .42; cursor: default; }
.pagination-nav { min-width: 54px; }
.pagination-ellipsis { color: #93a199; font-size: 10px; }
@keyframes metric-ambient-float {
  0%, 100% { translate: 0 0; }
  50% { translate: -4px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .metric-ambient > span { animation: none; }
}
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(275px, .9fr); gap: 15px; }
.panel-card { border: 1px solid var(--line); border-radius: 12px; background: white; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 18px 14px; border-bottom: 1px solid #edf0ee; }
.panel-header h2 { margin: 0; color: #2d4038; font-size: 12px; font-weight: 650; }
.panel-header p { margin: 4px 0 0; color: #98a39e; font-size: 9px; }
.panel-body { padding: 16px 18px; }
.setup-list { display: grid; gap: 8px; }
.setup-item { display: flex; align-items: center; gap: 11px; padding: 11px 10px; border: 1px solid #edf1ee; border-radius: 9px; }
.setup-item:hover { border-color: #d5e8dc; background: #fbfdfb; }
.setup-check { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #dce8df; border-radius: 8px; background: #f6faf7; color: #84a893; }
.setup-check.done { border-color: #c7e7d4; background: #e9f7ee; color: #4f9a6e; }
.setup-copy { min-width: 0; flex: 1; }
.setup-copy strong { display: block; color: #465a51; font-size: 10px; font-weight: 620; }
.setup-copy small { display: block; margin-top: 4px; color: #98a39d; font-size: 9px; }
.setup-arrow { color: #99aaa0; }
.setup-progress { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: #929e98; font-size: 9px; }
.progress-track { width: 100%; height: 5px; margin-top: 7px; overflow: hidden; border-radius: 5px; background: #edf2ef; }
.progress-fill { height: 100%; border-radius: inherit; background: #78b990; transition: width .2s ease; }
.empty-state { display: grid; min-height: 190px; place-items: center; padding: 18px; text-align: center; }
.empty-illustration { display: grid; width: 48px; height: 48px; margin: 0 auto 11px; place-items: center; border: 1px solid #e0ebe4; border-radius: 16px; background: #f2f8f4; color: #71a481; }
.empty-state strong { display: block; color: #50635a; font-size: 11px; font-weight: 620; }
.empty-state p { max-width: 250px; margin: 6px auto 12px; color: #97a39c; font-size: 9px; line-height: 1.6; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 20px; background: #f4f6f5; color: #8b9791; font-size: 9px; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: #acb5b0; content: ""; }
.status-pill.success { background: #eaf6ee; color: #538565; }
.status-pill.success::before { background: #60ae78; }
.status-pill.warning { background: #fbf3e9; color: #ab7b42; }
.status-pill.warning::before { background: #d9a65e; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); gap: 16px; align-items: start; }
.form-card { padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.form-card + .form-card { margin-top: 14px; }
.profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.profile-settings-grid .form-card { margin: 0; }
.profile-account-card { display: flex; grid-column: 1 / -1; align-items: center; gap: 13px; }
.profile-account-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent-hover); font-size: 16px; font-weight: 700; }
.profile-account-card .eyebrow { display: block; margin: 0 0 6px; }
.profile-account-card strong { display: block; color: var(--ink); font-size: 13px; }
.profile-account-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.profile-password-grid { margin-bottom: 4px; }
.form-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.form-card-heading h2 { margin: 0; color: #31463d; font-size: 12px; font-weight: 650; }
.form-card-heading p { margin: 5px 0 0; color: #91a098; font-size: 10px; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; }
.plain-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.plain-fieldset:disabled { opacity: .7; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #5b6d64; font-size: 10px; font-weight: 620; }
.field input, .field select, .field textarea { width: 100%; min-height: 37px; padding: 9px 10px; border: 1px solid #e4eae6; border-radius: 7px; outline: none; background: #fff; color: #31443b; font-size: 10px; transition: border .15s, box-shadow .15s; }
.field textarea { min-height: 89px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 211, 102, .14); }
.field input::placeholder, .field textarea::placeholder { color: #b3bcb7; }
.field-help { color: #99a49e; font-size: 9px; line-height: 1.45; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #edf0ee; }
.form-note { color: #98a49e; font-size: 9px; }
.bot-preferences-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf0ee; }
.bot-preferences-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.bot-preferences-heading strong { color: #31463d; font-size: 11px; font-weight: 650; }
.bot-preferences-heading span { color: #91a098; font-size: 9px; }
.info-card { padding: 17px; border: 1px solid #dfebe3; border-radius: 11px; background: #f0f7f2; }
.info-card h3 { margin: 0; color: #426450; font-size: 11px; }
.info-card p { margin: 7px 0 0; color: #748b7c; font-size: 10px; line-height: 1.6; }
.info-list { display: grid; gap: 11px; margin-top: 17px; }
.info-list-item { display: flex; gap: 9px; color: #5d7766; font-size: 10px; line-height: 1.5; }
.info-list-item .info-check { color: #60a478; }
.notice { margin-bottom: 15px; padding: 11px 13px; border: 1px solid #d6eadc; border-radius: 8px; background: #eff8f1; color: #4f805e; font-size: 10px; }
.notice.error { border-color: #efd8cf; background: #fff5f1; color: #a8614b; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid #edf0ee; }
.toggle-row strong { display: block; color: #475b51; font-size: 10px; }
.toggle-row small { display: block; margin-top: 4px; color: #94a098; font-size: 9px; }
.toggle-row input { width: 30px; height: 17px; accent-color: #478566; }
.table-list { width: 100%; min-width: 580px; border-collapse: collapse; text-align: left; }
.table-list th { padding: 9px 10px; color: #98a39d; font-size: 9px; font-weight: 600; }
.table-list td { padding: 11px 10px; border-top: 1px solid #edf1ee; color: #5d7067; font-size: 10px; }
.table-list td strong { color: #3d5248; font-size: 10px; font-weight: 620; }
.table-overflow { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.inline-form, .member-actions, .member-actions form { display: flex; align-items: center; gap: 6px; }
.inline-form select, .member-actions select { min-height: 32px; padding: 5px 7px; border: 1px solid #e4eae6; border-radius: 6px; background: white; color: #52685d; font-size: 9px; }
.inline-form .button-secondary, .member-actions .button-secondary { min-height: 31px; padding: 0 8px; font-size: 9px; }
.member-actions { justify-content: flex-end; margin-left: auto; }
.member-actions form .button-secondary:last-child { color: #a46050; }
.danger-button { color: #a46050; }
.hours-grid { display: grid; gap: 9px; }
.hours-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 11px; border: 1px solid #edf1ee; border-radius: 8px; }
.simple-hours-row { grid-template-columns: minmax(95px, .8fr) minmax(76px, .55fr) repeat(2, minmax(110px, 1fr)); align-items: center; }
.simple-hours-row .field input { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.staff-edit-row { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid #edf1ee; }
.staff-edit-row:last-child { border-bottom: 0; }
.staff-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staff-row-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-service-help { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #e4ebe6; }
.staff-add-panel { border-top: 1px solid #edf1ee; }
.staff-add-panel h3 { margin: 0 0 12px; color: #455a50; font-size: 12px; }
.booking-rules-note { margin-top: 13px; padding: 12px; }
.booking-rules-note p { margin: 0; }
.connection-results { display: grid; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #edf1ee; }
.connection-results p { margin: 0; }
.connection-results small { color: #89968f; font-size: 9px; }
.hours-row > strong { align-self: center; color: #455a50; font-size: 10px; }
.hours-closed { display: flex; align-items: center; gap: 6px; color: #75867d; font-size: 9px; }
.hours-closed input { accent-color: #478566; }
.hours-row .field { gap: 4px; }
.hours-row .field > span { color: #98a39d; font-size: 8px; }
.hours-row .field select { min-height: 31px; padding: 6px; font-size: 9px; }
.catalog-actions { display: flex; align-items: center; gap: 9px; }
.catalog-actions .button-secondary { min-height: 30px; padding: 0 8px; font-size: 9px; }
.mini-badge { display: inline-flex; padding: 4px 7px; border-radius: 5px; background: #f0f5f1; color: #648370; font-size: 9px; }
.list-stack { display: grid; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1ee; }
.list-row:last-child { border-bottom: 0; }
.list-row-main { min-width: 0; flex: 1; }
.list-row-main strong { display: block; overflow: hidden; color: #455a50; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.list-row-main small { display: block; margin-top: 4px; color: #99a49e; font-size: 9px; }
.notification-page { display: grid; gap: 20px; }
.notification-page > .page-heading { margin-bottom: 2px; }
.notification-page > .notice { margin: 0; }
.notification-row { align-items: flex-start; }
.notification-read { background: #f4f6f5; color: #a3ada8; }
.notification-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.notification-actions .button-secondary { min-height: 30px; padding: 0 8px; font-size: 9px; }
.notification-row .list-row-main small { white-space: normal; line-height: 1.55; }
.catalog-import-panel { margin-bottom: 16px; }
.catalog-import-panel > .panel-body { display: grid; gap: 13px; }
.import-source-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.import-source-tabs button { min-height: 34px; padding: 0 12px; border: 1px solid #dfe9e3; border-radius: 8px; background: #fff; color: #688074; font-size: 10px; font-weight: 650; cursor: pointer; }
.import-source-tabs button.selected { border-color: #b7d9c0; background: #eff8f1; color: #3e7651; }
.import-preview-form { display: grid; gap: 10px; padding: 14px; border: 1px solid #e7ede9; border-radius: 10px; background: #fbfcfb; }
.import-consent { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; color: #61756a; font-size: 10px; }
.import-consent input { accent-color: #4d9a69; }
.import-preview-summary { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #78877f; font-size: 9px; }
.import-preview-summary strong { color: #456b53; }
.import-table-wrap { max-height: 420px; border: 1px solid #e7ede9; border-radius: 9px; }
.import-table { min-width: 1050px; }
.import-table td { min-width: 96px; vertical-align: top; }
.import-table td:first-child { min-width: 150px; }
.import-table input, .import-table select, .import-table textarea { width: 100%; min-height: 30px; margin: 2px 0; padding: 5px 6px; border: 1px solid #e2e9e4; border-radius: 5px; background: #fff; color: #445a4d; font-size: 9px; }
.import-table textarea { min-width: 150px; resize: vertical; }
.import-table .mini-badge { display: inline-flex; margin: 3px 3px 0 0; }
.catalog-import-save { display: grid; grid-template-columns: minmax(240px, 1fr); gap: 8px; padding-top: 8px; border-top: 1px solid #edf0ee; }
.catalog-import-save .field { max-width: 380px; }
.catalog-import-save .form-actions { margin: 0; }
.danger-link { color: #b46558; }
.notification-settings-panel { margin: 0; }
.notification-settings-panel > .panel-header { align-items: flex-start; }
.notification-settings-panel > .panel-body { padding: 22px; }
.notification-settings-form, .notification-settings-form .plain-fieldset { display: grid; }
.notification-settings-form .plain-fieldset { gap: 24px; }
.notification-settings-group { display: grid; gap: 12px; }
.notification-settings-group + .notification-settings-group { padding-top: 22px; border-top: 1px solid #e5ebe7; }
.notification-group-heading { display: grid; gap: 4px; }
.notification-group-heading h3 { margin: 0; color: #354f43; font-size: 11px; font-weight: 680; }
.notification-group-heading p { margin: 0; color: #8c9992; font-size: 9px; line-height: 1.55; }
.warning-text { color: #a36c35; }
.delivery-status { display: block; margin-top: 4px; color: #8a9990; font-size: 8px; }
.notification-toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.notification-toggle-grid label { display: flex; align-items: flex-start; gap: 10px; min-height: 78px; padding: 14px; border: 1px solid #e6ece8; border-radius: 10px; background: #fcfdfc; cursor: pointer; }
.notification-toggle-grid input { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; accent-color: #4d9a69; }
.notification-toggle-grid span { display: grid; min-width: 0; gap: 5px; }
.notification-toggle-grid strong { color: #4a6657; font-size: 10px; }
.notification-toggle-grid small { color: #94a198; font-size: 9px; line-height: 1.55; }
.notification-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.notification-recipient-grid { gap: 16px; }
.notification-recipient-grid textarea { min-height: 88px; line-height: 1.55; resize: vertical; }
.notification-recipient-grid .field > small { line-height: 1.55; }
.notification-feedback { display: grid; gap: 8px; }
.notification-feedback .field-help { margin: 0; padding: 11px 12px; border: 1px solid #dfe8e2; border-radius: 8px; background: #f7faf8; line-height: 1.55; }
.notification-settings-form .form-actions { margin-top: 0; padding-top: 18px; }
.notification-list-panel { margin: 0; }
.notification-list-panel > .panel-body { padding: 14px 18px 18px; }
.notification-list-panel .list-stack { gap: 9px; }
.notification-list-panel .notification-row { gap: 12px; padding: 13px; border: 1px solid #e5ebe7; border-radius: 10px; background: #fbfcfb; }
.notification-list-panel .list-row-main strong { font-size: 11px; line-height: 1.4; white-space: normal; }
.notification-list-panel .list-row-main small { margin-top: 5px; }
.inbox-conversation { color: inherit; text-decoration: none; }
.inbox-conversation:hover { border-color: #c8ddd0; background: #f9fcfa; }
.conversation-detail-card { overflow: hidden; }
.conversation-detail-header { background: #fbfcfb; }
.conversation-message-list { display: flex; min-height: 220px; max-height: 58vh; flex-direction: column; gap: 10px; overflow: auto; padding: 18px; background: #f7f8f5; }
.conversation-message { max-width: min(78%, 650px); padding: 10px 12px; border: 1px solid #e7ece8; border-radius: 10px; background: white; box-shadow: 0 1px 3px #20352608; }
.conversation-message.inbound { align-self: flex-start; }
.conversation-message.outbound { align-self: flex-end; border-color: #d1e8d7; background: #eff8f1; }
.conversation-message small { color: #93a097; font-size: 8px; }
.conversation-message p { margin: 5px 0 0; color: #4c5c52; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-reply-area { display: grid; gap: 10px; padding: 15px; border-top: 1px solid #e9eeeb; }
.conversation-reply-area form:first-child { display: grid; gap: 8px; }
.resolve-conversation-form { display: flex; justify-content: flex-end; }
.appointment-date-header { align-items: flex-end; }
.appointment-date-nav, .appointment-date-picker { display: flex; align-items: center; gap: 10px; }
.appointment-date-nav h2 { font-size: 12px; }
.appointment-date-nav .button-secondary { min-width: 30px; justify-content: center; padding: 0 8px; font-size: 16px; }
.appointment-date-picker .field { gap: 4px; }
.appointment-date-picker .field span { color: #98a39d; font-size: 8px; }
.appointment-date-picker input { min-height: 31px; padding: 5px 7px; border: 1px solid #e4eae6; border-radius: 6px; color: #52685d; font-size: 9px; }
.appointment-calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; padding: 16px; }
.appointment-slot { display: flex; min-height: 78px; flex-direction: column; gap: 5px; padding: 11px; border: 1px solid #dcebe0; border-radius: 9px; background: #f1f8f3; }
.appointment-slot strong { color: #385b46; font-size: 12px; }
.appointment-slot span { color: #538365; font-size: 10px; font-weight: 650; }
.appointment-slot small { color: #91a397; font-size: 8px; }
.appointment-slot.busy { border-color: #eedfdc; background: #fbf3f1; }
.appointment-slot.busy strong, .appointment-slot.busy span { color: #a66b5f; }
.appointment-slot.partial { border-color: #dfcda8; background: #f8f3e8; }
.appointment-slot.partial strong, .appointment-slot.partial span { color: #85683b; }
.appointment-manual-embedded { padding: 14px 16px 16px; border-bottom: 1px solid var(--line); }
.appointment-manual-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); }
.appointment-manual-heading h3 { margin: 0; color: var(--ink); font-size: 11px; }
.appointment-manual-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.appointment-manual-form { display: grid; gap: 12px; }
.appointment-manual-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.appointment-manual-form .field { min-width: 0; }
.appointment-manual-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.appointment-manual-footer > span { color: var(--muted); font-size: 9px; }
.appointment-row-actions { display: grid; min-width: 290px; gap: 7px; }
.appointment-row-actions .inline-form { flex-wrap: nowrap; }
.appointment-row-actions .inline-form select { max-width: 145px; }
.appointment-customer-phone { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.appointment-row-tools > summary, .appointment-delete-confirm > summary { width: fit-content; color: var(--accent-hover); font-size: 10px; font-weight: 650; cursor: pointer; }
.appointment-row-tools-popover { display: grid; min-width: 220px; gap: 10px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.appointment-reschedule-form { display: grid; gap: 7px; }
.appointment-reschedule-form > strong { margin-bottom: 2px; font-size: 10px; }
.appointment-reschedule-form .field { gap: 3px; }
.appointment-reschedule-form .field span { color: var(--muted); font-size: 8px; }
.appointment-reschedule-form .field input { min-height: 31px; padding: 5px 7px; }
.appointment-delete-confirm { padding-top: 8px; border-top: 1px solid var(--line); }
.appointment-delete-confirm form { display: grid; justify-items: start; gap: 6px; margin-top: 7px; }
.appointment-delete-confirm p { margin: 0; color: var(--muted); font-size: 9px; }
.appointment-delete-confirm .button-danger { min-height: 30px; padding-inline: 10px; font-size: 9px; }
.status-cell { text-align: right; }

.auth-page, .setup-page { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(ellipse at 15% 10%, #e4f1e8 0%, transparent 38%), #f6f8f6; }
.auth-layout { display: grid; width: min(100%, 850px); min-height: 540px; grid-template-columns: .92fr 1.08fr; overflow: hidden; border: 1px solid #e3ebe5; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(41, 75, 57, .08); }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 29px; background: #17382d; color: #eff8f2; }
.auth-brand-panel::before, .auth-brand-panel::after { position: absolute; width: 260px; height: 260px; border: 1px solid rgba(181, 224, 196, .18); border-radius: 50%; content: ""; }
.auth-brand-panel::before { right: -91px; bottom: -50px; }
.auth-brand-panel::after { right: -40px; bottom: 2px; width: 160px; height: 160px; }
.auth-brand-panel .brand-lockup { margin: 0; }
.auth-brand-panel .brand-lockup small { color: #9db8a8; }
.auth-promise { position: relative; z-index: 1; max-width: 300px; margin-bottom: 30px; }
.auth-promise h1 { margin: 0; color: #f2f8f4; font-size: 31px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.auth-promise p { max-width: 270px; margin-top: 13px; color: #b4cabe; font-size: 11px; line-height: 1.7; }
.auth-brand-foot { position: relative; z-index: 1; color: #8eaa9a; font-size: 9px; }
.auth-form-panel { padding: 34px clamp(24px, 5vw, 52px); }
.auth-tabs { display: flex; gap: 18px; margin-bottom: 29px; border-bottom: 1px solid #e8eeea; }
.auth-tabs button { padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #9aa69f; font-size: 11px; }
.auth-tabs button.selected { border-color: #4e9b72; color: #315e47; font-weight: 650; }
.auth-form-title { margin: 0; color: #293e34; font-size: 22px; font-weight: 620; letter-spacing: -.6px; }
.auth-subtitle { margin: 8px 0 19px; color: #8e9b94; font-size: 10px; line-height: 1.55; }
.auth-form { display: grid; gap: 13px; }
.auth-form .field input { min-height: 40px; font-size: 11px; }
.auth-submit { width: 100%; min-height: 41px; margin-top: 5px; }
.auth-footnote { margin-top: 17px; color: #a2aca6; font-size: 9px; line-height: 1.5; text-align: center; }
.auth-error { margin-bottom: 14px; padding: 10px 11px; border-radius: 7px; background: #fff3ef; color: #a35c45; font-size: 10px; }
.auth-error-plain { padding: 0; border: 0; border-radius: 0; background: transparent; color: #000; }
.auth-success { margin-bottom: 14px; padding: 10px 11px; border-radius: 7px; background: #edf8f0; color: #4d805d; font-size: 10px; }
.setup-card { width: min(100%, 580px); padding: 30px; border: 1px solid #e0eae3; border-radius: 16px; background: white; box-shadow: 0 22px 65px rgba(37, 70, 51, .08); }
.setup-card .brand-lockup { margin: 0 0 32px; }
.setup-card h1 { margin: 0; color: #253b31; font-size: 24px; letter-spacing: -.7px; }
.setup-card > p { color: #83918a; font-size: 11px; line-height: 1.65; }
.code-block { margin: 15px 0; padding: 14px; overflow-x: auto; border-radius: 8px; background: #172a23; color: #c7e6d2; font: 10px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.setup-steps { display: grid; gap: 10px; margin-top: 22px; }
.setup-steps div { display: flex; gap: 10px; color: #64766d; font-size: 10px; line-height: 1.5; }
.setup-steps b { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 6px; background: #eaf5ed; color: #5c9670; font-size: 9px; }

@media (max-width: 1050px) {
  .sidebar { width: 225px; min-width: 225px; }
  .page-content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination-links { flex-wrap: wrap; }
  .app-frame { display: block; }
  .sidebar { position: relative; z-index: 20; width: 100%; min-width: 0; height: 62px; overflow: visible; padding: 10px 12px 8px; }
  .brand-lockup { margin: 0 3px 8px; }
  .workspace-switcher, .sidebar-bottom, .nav-heading { display: none; }
  .side-nav-container { position: static; flex: 0 0 auto; }
  .mobile-menu-trigger { position: absolute; top: 12px; right: 12px; display: inline-flex; min-width: 82px; height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid #34483f; border-radius: 9px; background: #1a2d26; color: #e8f3ed; font-size: 11px; font-weight: 620; }
  .mobile-menu-trigger:focus-visible { outline: 2px solid #bce9d3; outline-offset: 2px; }
  .side-nav { position: absolute; z-index: 30; top: calc(100% + 6px); left: 12px; display: none; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 82px); flex: 0 1 auto; flex-direction: column; gap: 0; overflow-x: hidden; overflow-y: auto; padding: 8px; border: 1px solid #34483f; border-radius: 13px; background: #14251f; box-shadow: 0 16px 38px rgba(0,0,0,.3); }
  .side-nav-container.is-open .side-nav { display: flex; animation: mobile-nav-reveal .2s ease-out both; }
  .side-nav .nav-heading { display: block; padding: 8px 10px 6px; }
  .nav-group { display: grid; flex: 0 0 auto; gap: 2px; margin: 0 0 7px; }
  .nav-link { width: 100%; height: 38px; margin: 0; padding: 0 10px; white-space: nowrap; }
  .nav-link span:not(.nav-count) { font-size: 10px; }
  .main-area { position: relative; z-index: 0; width: 100%; height: calc(100vh - 62px); height: calc(100dvh - 62px); min-height: 0; }
  .topbar { height: 52px; min-height: 52px; padding: 0 16px; }
  .breadcrumb { font-size: 9px; }
  .breadcrumb { min-width: 0; flex: 1; overflow: hidden; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-box { display: none; }
  .topbar-actions { gap: 7px; }
  .page-content { padding: 23px 16px 18px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .page-heading { flex-wrap: wrap; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions > .button-primary, .form-actions > .button-secondary, .form-actions > button { width: 100%; }
  .appointment-date-header, .appointment-date-nav { align-items: flex-start; }
  .appointment-date-header { flex-direction: column; }
  .appointment-date-picker { width: 100%; }
  .appointment-date-picker .field { flex: 1; }
  .appointment-manual-embedded { padding: 13px 14px; }
  .appointment-manual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .appointment-manual-notes { grid-column: 1 / -1; }
  .appointment-manual-footer { align-items: stretch; flex-direction: column; }
  .appointment-manual-footer .button-primary { width: 100%; }
  .appointment-row-actions { min-width: 265px; }
  .simple-hours-row { grid-template-columns: minmax(90px, .8fr) minmax(72px, .55fr); }
  .simple-hours-row .field { grid-column: span 1; }
  .staff-fields { grid-template-columns: 1fr; }
  .appointment-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 11px; }
  .notification-row { flex-wrap: wrap; }
  .notification-actions { width: 100%; justify-content: flex-start; padding-top: 4px; }
  .notification-page { gap: 14px; }
  .notification-page > .page-heading { margin-bottom: 0; }
  .notification-settings-panel > .panel-header, .notification-list-panel > .panel-header { align-items: flex-start; flex-direction: column; }
  .notification-settings-panel > .panel-body { padding: 16px; }
  .notification-settings-form .plain-fieldset { gap: 19px; }
  .notification-settings-group + .notification-settings-group { padding-top: 18px; }
  .notification-toggle-grid label { min-height: 0; padding: 13px; }
  .notification-recipient-grid { gap: 14px; }
  .notification-settings-form .form-actions { align-items: stretch; flex-direction: column; }
  .notification-settings-form .form-actions .button-primary { width: 100%; }
  .notification-list-panel > .panel-body { padding: 11px 12px 13px; }
  .notification-list-panel .notification-row { padding: 12px; }
  .import-source-tabs button { flex: 1; padding: 0 8px; }
  .import-preview-form { padding: 11px; }
  .catalog-import-save .form-actions { align-items: stretch; flex-direction: column; }
  .notification-toggle-grid, .notification-event-grid { grid-template-columns: 1fr; }
  .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-account-card { grid-column: auto; }
  .conversation-message { max-width: 92%; }
  .conversation-reply-area .form-actions { align-items: stretch; flex-direction: column; }
  .member-actions { width: 100%; flex: 1 0 100%; justify-content: flex-start; flex-wrap: wrap; margin-left: 0; }
  .page-heading h1 { font-size: 25px; }
  .date-chip { display: none; }
  .welcome { min-height: 0; padding: 19px 18px 18px 23px; }
  .welcome h2 { font-size: 18px; }
  .welcome p { max-width: 320px; font-size: 10px; }
  .welcome-actions { margin-top: 15px; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 116px; padding: 15px 14px 12px; }
  .metric-card::before { right: 14px; left: 14px; }
  .metric-number { margin-top: 11px; font-size: 26px; }
  .metric-foot { padding-top: 11px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .content-grid > * { min-width: 0; }
  .dashboard-columns { gap: 12px; }
  .app-footer { padding: 12px 16px 15px; font-size: 9px; }
  .auth-layout { max-width: 460px; min-height: auto; grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 210px; padding: 21px; }
  .auth-promise { margin: 27px 0 5px; }
  .auth-promise h1 { font-size: 25px; }
  .auth-brand-foot { display: none; }
  .auth-form-panel { padding: 25px 22px 28px; }
}
@keyframes mobile-nav-reveal { from { opacity: 0; transform: translateX(-12px) scaleX(.96); transform-origin: left center; } to { opacity: 1; transform: translateX(0) scaleX(1); transform-origin: left center; } }
@media (max-width: 430px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-avatar { width: 28px; height: 28px; }
  .tester-top-badge { display: none; }
  .page-heading p { max-width: 260px; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-card { padding: 15px; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.setup-wizard-resume-form { margin: 0 2px 10px; }
.setup-wizard-resume { display: flex; width: 100%; min-height: 37px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #35584a; border-radius: 9px; background: #1b3028; color: #c4ead7; font-size: 10px; font-weight: 620; text-align: left; }
.setup-wizard-resume span { flex: 1; }
.setup-wizard-resume:hover { border-color: #5b9273; background: #20372e; }
.setup-wizard-backdrop { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10, 17, 15, .52); backdrop-filter: blur(3px); }
.setup-wizard { width: min(100%, 540px); padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 90px rgba(10, 20, 15, .28); }
.setup-wizard-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.setup-wizard-close { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--ink-soft); }
.setup-wizard-close:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.setup-wizard-heading { display: flex; align-items: flex-start; gap: 14px; margin-top: 17px; }
.setup-wizard-step-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent-hover); font-size: 17px; font-weight: 750; }
.setup-wizard-heading h2 { margin: 1px 0 0; color: var(--ink); font-size: 20px; letter-spacing: -.45px; }
.setup-wizard-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.setup-wizard-progress-meta { display: flex; justify-content: space-between; margin-top: 23px; color: var(--muted); font-size: 10px; }
.setup-wizard-progress { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 5px; background: var(--surface-inset); }
.setup-wizard-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.setup-wizard-tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.setup-wizard-tip svg { flex: 0 0 auto; color: var(--accent-hover); }
.setup-wizard-actions { display: grid; gap: 14px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.setup-wizard-secondary-actions, .setup-wizard-primary-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.setup-wizard-primary-actions { justify-content: flex-end; }
.setup-wizard-primary-actions form, .setup-wizard-secondary-actions form { margin: 0; }
.setup-wizard-primary-actions .button-secondary, .setup-wizard-primary-actions .button-primary { display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 11px; font-size: 10px; }
.setup-wizard-skip { padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.setup-wizard-skip:hover { color: var(--ink); text-decoration: underline; }
:root[data-theme="dark"] .setup-wizard { border-color: #34483f; background: #172621; }
:root[data-theme="dark"] .setup-wizard-resume { border-color: #34483f; background: #1b3028; color: #c4ead7; }
:root[data-theme="dark"] .setup-wizard-resume:hover { border-color: #5b9273; background: #20372e; }

@media (max-width: 600px) {
  .setup-wizard-backdrop { align-items: end; padding: 12px; }
  .setup-wizard { max-height: min(88dvh, 620px); overflow-y: auto; padding: 19px; border-radius: 16px; }
  .setup-wizard-heading h2 { font-size: 18px; }
  .setup-wizard-primary-actions { align-items: stretch; flex-direction: column; }
  .setup-wizard-primary-actions > a, .setup-wizard-primary-actions form, .setup-wizard-primary-actions .button-primary { width: 100%; justify-content: center; }
}

.auth-form-panel { display: flex; flex-direction: column; justify-content: center; }
.auth-tabs { gap: 22px; margin-bottom: 24px; }
.auth-tabs button { font-size: 11px; }
.auth-heading-row { margin-bottom: 20px; }
.auth-kicker { display: block; margin-bottom: 9px; color: #6c987d; font-size: 8px; font-weight: 750; letter-spacing: 1.4px; }
.auth-form-title { font-size: 25px; }
.auth-subtitle { max-width: 340px; margin-bottom: 0; line-height: 1.7; }
.auth-brand-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 17px; padding: 7px 9px; border: 1px solid rgba(186, 225, 198, .21); border-radius: 20px; color: #c1e3cc; font-size: 8px; letter-spacing: .8px; }
.auth-promise h1 { font-size: 34px; }
.auth-preview-card { display: flex; align-items: center; gap: 9px; width: 265px; margin-top: 27px; padding: 11px; border: 1px solid rgba(216, 239, 224, .13); border-radius: 11px; background: rgba(231, 247, 236, .08); }
.auth-preview-avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #bce9d3; color: #173c31; font-size: 11px; font-weight: 700; }
.auth-preview-card > span:nth-child(2) { min-width: 0; flex: 1; }
.auth-preview-card strong, .auth-preview-card small { display: block; }
.auth-preview-card strong { color: #eff8f2; font-size: 9px; }
.auth-preview-card small { margin-top: 4px; color: #adc7b7; font-size: 8px; }
.auth-preview-card i { color: #91d4a9; font-size: 7px; font-style: normal; white-space: nowrap; }
.auth-form-footer { margin-top: 18px; text-align: center; }
.auth-switch-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.auth-switch-link { padding: 4px; border: 0; background: transparent; color: #4c8867; font-size: 10px; font-weight: 650; }
.auth-form-footer p { margin: 6px 0 0; color: #a1aca5; font-size: 8px; }
.tester-code-field .field-help { margin-top: 1px; }

.app-frame[data-tester="true"] .tester-top-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #d7eadc; border-radius: 20px; background: #f0f8f2; color: #4e805f; font-size: 9px; font-weight: 650; }
.tester-access-banner { display: flex; align-items: center; gap: 10px; margin: 13px 38px 0; padding: 10px 13px; border: 1px solid #d7eadc; border-radius: 9px; background: #f0f8f2; color: #4c7358; }
.tester-access-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #deefe3; color: #4e805e; }
.tester-access-banner strong, .tester-access-banner small { display: block; }
.tester-access-banner strong { font-size: 10px; }
.tester-access-banner small { margin-top: 3px; color: #78917e; font-size: 9px; }
.tester-live-demo { margin-left: auto; color: #71877a; font-size: 9px; }
.tester-readonly-content :is(button, input, textarea, select, a) { cursor: not-allowed; }
.tester-readonly-content :is(input, textarea, select) { background: #f7f9f7; color: #74827a; }
.tester-readonly-content button { opacity: .65; }

.simulation-shell { width: min(100%, 1180px); margin: 0 auto; }
.simulation-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.simulation-heading .eyebrow { margin-bottom: 7px; }
.simulation-heading h1 { margin: 0; color: #20332d; font-size: clamp(25px, 2.3vw, 32px); font-weight: 630; letter-spacing: -1px; }
.simulation-heading p { margin: 5px 0 0; color: #81908a; font-size: 11px; }
.simulation-status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #e0eae3; border-radius: 20px; background: white; color: #76877e; font-size: 9px; white-space: nowrap; }
.simulation-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d8a863; }
.simulation-layout { display: grid; grid-template-columns: minmax(225px, .72fr) minmax(400px, 1.28fr); gap: 19px; align-items: stretch; }
.simulation-info-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 610px; padding: 24px 21px; border: 1px solid #dfeae2; border-radius: 15px; background: linear-gradient(150deg, #f5faf6, #edf5ef); }
.simulation-info-mark { display: grid; width: 38px; height: 38px; margin-bottom: 20px; place-items: center; border-radius: 12px; background: #dcefe2; color: #4e8c66; }
.simulation-label { color: #5a916c; font-size: 8px; font-weight: 750; letter-spacing: 1.05px; }
.simulation-info-card h2 { max-width: 240px; margin: 10px 0 0; color: #2c4337; font-size: 19px; line-height: 1.3; letter-spacing: -.4px; }
.simulation-info-card > p { margin: 10px 0 0; color: #73867a; font-size: 10px; line-height: 1.7; }
.simulation-info-card > .simulation-provider-note { margin-top: 8px; color: #8c9a90; font-size: 8px; }
.simulation-steps { display: grid; width: 100%; gap: 0; margin-top: 28px; }
.simulation-steps > div { display: flex; align-items: center; gap: 10px; min-height: 42px; border-top: 1px solid #e0eae2; }
.simulation-steps span { color: #81a18a; font-size: 8px; font-weight: 700; letter-spacing: .6px; }
.simulation-steps p { margin: 0; color: #546b5c; font-size: 10px; font-weight: 560; }
.simulation-reset { width: 100%; margin-top: auto; }
.phone-demo-card { position: relative; display: flex; height: 640px; min-height: 0; flex-direction: column; align-items: center; padding: 14px 20px 10px; border: 1px solid #e1e8e3; border-radius: 18px; background: #fbfcfb; box-shadow: 0 16px 38px rgba(38, 70, 50, .06); }
.phone-demo-top { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 13px; }
.phone-camera { width: 7px; height: 7px; border-radius: 50%; background: #b9c3bd; }
.phone-speaker { width: 42px; height: 4px; border-radius: 4px; background: #d9dfdb; }
.wa-chat-window { display: flex; width: min(100%, 480px); min-height: 0; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid #d9e2dc; border-radius: 12px; background: #f7f4ed; }
.wa-chat-header { display: flex; align-items: center; gap: 10px; min-height: 57px; padding: 8px 12px; background: #f8fffb; box-shadow: 0 1px 4px rgba(40, 76, 54, .1); }
.wa-back { color: #5c7166; font-size: 25px; line-height: 1; }
.wa-business-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #cbe8d4; color: #38684c; font-size: 12px; font-weight: 700; }
.wa-contact { min-width: 0; flex: 1; }
.wa-contact strong, .wa-contact small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-contact strong { color: #2c4036; font-size: 10px; font-weight: 650; }
.wa-contact small { margin-top: 4px; color: #7c8e84; font-size: 8px; }
.wa-header-icons { display: flex; align-items: center; gap: 12px; color: #668371; }
.wa-header-icons span { font-size: 19px; }
.simulation-start-screen { display: flex; min-height: 490px; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center; }
.simulation-start-icon { display: grid; width: 63px; height: 63px; margin-bottom: 15px; place-items: center; border-radius: 22px; background: #dcf3e3; color: #35915e; }
.simulation-start-screen h2 { margin: 0; color: #31483b; font-size: 16px; }
.simulation-start-screen p { max-width: 250px; margin: 8px 0 17px; color: #85958b; font-size: 10px; line-height: 1.6; }
.simulation-start-screen .button-primary { min-height: 39px; }
.wa-chat-body { display: flex; min-height: 0; flex: 1 1 0%; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 15px 12px; background-color: #efeae2; background-image: url("whatsapp-light-pattern.svg"); background-size: 300px 300px; scrollbar-color: #a7b8ad #e6e1d8; scrollbar-width: thin; }
.wa-chat-body::-webkit-scrollbar { width: 8px; }
.wa-chat-body::-webkit-scrollbar-track { background: #e6e1d8; }
.wa-chat-body::-webkit-scrollbar-thumb { border: 2px solid #e6e1d8; border-radius: 8px; background: #a7b8ad; }
.wa-date-pill { align-self: center; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .75); color: #819087; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
.wa-demo-disclaimer { display: inline-flex; align-items: center; align-self: center; gap: 5px; padding: 5px 8px; border-radius: 7px; background: #fff8d9; color: #927d44; font-size: 7px; }
.wa-message-row { display: flex; max-width: 91%; flex-direction: column; align-items: flex-start; gap: 5px; }
.wa-message-row.customer { align-self: flex-end; align-items: flex-end; }
.wa-message-bubble { max-width: 100%; padding: 8px 9px 5px; border-radius: 8px 8px 8px 2px; background: #fff; box-shadow: 0 1px 1px rgba(34, 52, 40, .08); }
.wa-message-bubble.customer { border-radius: 8px 8px 2px 8px; background: #d9fdd3; }
.wa-message-bubble p { margin: 0; color: #34463c; font-size: 9px; line-height: 1.55; white-space: pre-line; }
.wa-message-bubble small { display: block; margin-top: 4px; color: #95a098; font-size: 7px; text-align: right; }
.wa-checks { color: #52a8a1; font-size: 8px; }
.wa-option-list, .wa-starter-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.wa-option-list button, .wa-starter-actions button { min-height: 27px; padding: 5px 8px; border: 1px solid #d6e7dc; border-radius: 15px; background: #fbfffc; color: #397451; font-size: 8px; font-weight: 600; }
.wa-option-list button:disabled { opacity: .5; }
.wa-typing { display: flex; align-items: center; gap: 3px; height: 27px; padding: 0 10px; border-radius: 8px; background: white; }
.wa-typing i { width: 4px; height: 4px; border-radius: 50%; background: #9aa9a0; animation: wa-typing 1s ease-in-out infinite; }
.wa-typing i:nth-child(2) { animation-delay: .12s; }
.wa-typing i:nth-child(3) { animation-delay: .24s; }
@keyframes wa-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-3px); opacity: 1; } }
.wa-compose { display: flex; align-items: center; gap: 7px; padding: 8px 9px; background: #f8fffb; }
.wa-compose input { min-width: 0; min-height: 36px; flex: 1; padding: 8px 12px; border: 1px solid #e1e8e3; border-radius: 19px; outline: none; background: #fff; color: #34483d; font-size: 9px; }
.wa-compose input:focus { border-color: #9bc7aa; }
.wa-compose button { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #367d59; color: white; transform: rotate(45deg); }
.wa-compose button:disabled { background: #a8b8ad; cursor: not-allowed; }
.phone-demo-bottom { width: 56px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: #dce2de; }

@media (max-width: 1050px) {
  .simulation-layout { grid-template-columns: minmax(205px, .7fr) minmax(350px, 1.3fr); gap: 13px; }
  .simulation-info-card { padding: 20px 17px; }
}
@media (max-width: 760px) {
  .tester-access-banner { align-items: flex-start; margin: 10px 16px 0; }
  .tester-live-demo { display: none; }
  .simulation-heading { align-items: flex-start; flex-direction: column; }
  .simulation-status { white-space: normal; }
  .simulation-layout { display: flex; flex-direction: column; }
  .simulation-info-card { min-height: auto; padding: 18px; }
  .simulation-info-mark { margin-bottom: 12px; }
  .simulation-steps { margin-top: 15px; }
  .simulation-reset { margin-top: 13px; }
  .phone-demo-card { order: -1; width: 100%; height: min(560px, calc(100svh - 210px)); min-height: 380px; padding: 10px; }
  .auth-brand-tag { margin-bottom: 10px; }
  .auth-promise h1 { font-size: 28px; }
  .auth-preview-card { display: none; }
}
@media (max-width: 850px) {
  .simulation-layout { grid-template-columns: 1fr; }
  .simulation-info-card { min-height: auto; }
}

.admin-frame { display: flex; width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--canvas); }
.admin-sidebar { position: relative; display: flex; width: 250px; min-width: 250px; height: 100vh; height: 100dvh; flex: 0 0 250px; flex-direction: column; overflow: hidden; padding: 21px 14px 13px; background: #14251f; color: #f1f8f4; }
.admin-brand { display: flex; align-items: center; gap: 10px; margin: 0 7px 27px; }
.admin-brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px 12px 12px 4px; background: #bce9d3; color: #173c31; }
.admin-brand strong, .admin-brand small, .admin-workspace strong, .admin-workspace small { display: block; }
.admin-brand strong { color: #f4f8f5; font-size: 18px; letter-spacing: -.6px; }
.admin-brand small { margin-top: 4px; color: #91a59c; font-size: 8px; letter-spacing: 1.2px; }
.admin-workspace { display: flex; align-items: center; gap: 10px; min-height: 57px; padding: 9px; border: 1px solid #34483f; border-radius: 11px; background: #1a2d26; }
.admin-workspace-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #d1ebdc; color: #244a3a; font-size: 10px; font-weight: 750; }
.admin-workspace strong { color: #f2f7f4; font-size: 11px; font-weight: 600; }
.admin-workspace small { margin-top: 4px; color: #93a69e; font-size: 9px; }
.admin-nav { min-height: 0; flex: 1; overflow-y: auto; padding-top: 27px; scrollbar-width: none; -ms-overflow-style: none; }
.admin-nav-label { display: block; padding: 0 10px 9px; color: #83968e; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; height: 39px; margin: 2px 0; padding: 0 10px; border-radius: 8px; color: var(--menu-link); font-size: 11px; transition: background .15s, color .15s, box-shadow .15s; }
.admin-profile-row { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-top: auto; padding: 12px 3px 3px; border-top: 1px solid #34483f; }
.admin-profile-row .profile-menu-root { width: 100%; }
.admin-profile-row .profile-menu-trigger { min-height: 38px; }
.admin-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d7c2aa; color: #503f31; font-size: 11px; font-weight: 700; }
.admin-profile-copy { min-width: 0; flex: 1; }
.admin-profile-copy strong, .admin-profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile-copy strong { color: #f2f7f4; font-size: 10px; font-weight: 600; }
.admin-profile-copy small { margin-top: 4px; color: #93a69e; font-size: 8px; }
.admin-logout { display: grid; width: 31px; height: 31px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #aebac1; }
.admin-logout:hover { background: #20372e; color: #eff8f3; }
.admin-main { width: 0; height: 100vh; height: 100dvh; min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.admin-topbar { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.admin-topbar > div:first-child { display: flex; align-items: center; gap: 9px; font-size: 10px; }
.admin-breadcrumb { color: #8b9992; }
.admin-breadcrumb-sep { color: #c4cdc8; }
.admin-topbar strong { color: #465a50; font-weight: 620; }
.admin-top-user { display: flex; align-items: center; gap: 9px; }
.admin-role-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #dfebe3; border-radius: 20px; background: #f8fcf9; color: #5a8068; font-size: 9px; }
.admin-top-email { max-width: 230px; overflow: hidden; color: #78877f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-top-profile { display: none; }
.admin-content { width: min(100%, 1500px); flex: 1; margin: 0 auto; padding: 30px 34px 25px; }
.admin-content .page-heading { margin-bottom: 20px; }
.admin-footer { display: flex; align-items: center; gap: 7px; padding: 12px 34px 15px; color: #97a29c; font-size: 9px; }
.admin-footer span { color: #c4cdc8; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-metric-card { min-height: 117px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.admin-metric-top { display: flex; align-items: center; justify-content: space-between; color: #84928b; font-size: 9px; }
.admin-metric-card > strong { display: block; margin-top: 10px; color: #263a33; font-size: 25px; font-weight: 650; letter-spacing: -.8px; }
.admin-metric-card > small { display: block; margin-top: 2px; color: #99a49e; font-size: 8px; }
.admin-recent-card { margin-bottom: 14px; }
.admin-tenant-link { display: inline-flex; flex-direction: column; gap: 3px; }
.admin-tenant-link strong { color: #3d5248; }
.admin-tenant-link small { color: #99a49e; font-size: 8px; }
.admin-empty { padding: 25px 18px; color: #84928b; font-size: 10px; text-align: center; }
.admin-empty p { margin: 6px 0 0; color: #96a19b; font-size: 9px; }
.admin-next-card { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #e2ebe5; border-radius: 11px; background: #f9fcfa; }
.admin-next-card > div { min-width: 0; flex: 1; }
.admin-next-card strong { color: #42584c; font-size: 10px; }
.admin-next-card p { margin: 4px 0 0; color: #8a9890; font-size: 9px; }
.admin-next-card .button-secondary { min-height: 33px; font-size: 9px; }
.admin-filter-bar { display: flex; align-items: center; gap: 8px; padding: 13px 15px; border-bottom: 1px solid #edf0ee; }
.admin-search { display: flex; min-width: 160px; max-width: 390px; flex: 1; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #e4eae6; border-radius: 7px; color: #92a098; }
.admin-search input { width: 100%; min-height: 34px; border: 0; outline: none; background: transparent; color: #43574d; font-size: 10px; }
.admin-filter-bar select, .admin-detail-status select { min-height: 35px; padding: 0 9px; border: 1px solid #e4eae6; border-radius: 7px; background: #fff; color: #52685d; font-size: 9px; }
.admin-filter-bar .button-secondary { min-height: 35px; font-size: 9px; }
.admin-business-table td { vertical-align: middle; }
.admin-business-table td:last-child { min-width: 170px; }
.admin-business-table .inline-form select { min-width: 83px; }
.admin-tenant-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.admin-tenant-key { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.admin-tenant-key code { overflow-wrap: anywhere; color: var(--text-muted); font-size: 8px; letter-spacing: .02em; }
.admin-tenant-key-toggle { width: 24px; height: 24px; border-radius: 5px; }
.admin-notice { margin-bottom: 13px; padding: 11px 13px; border: 1px solid #e5ece7; border-radius: 8px; background: #f8fbf9; color: #5f7768; font-size: 10px; }
.admin-notice.success { border-color: #d4eadb; background: #f0f8f2; color: #4c795a; }
.admin-notice.error { border-color: #f0d8d2; background: #fff5f2; color: #a65d4c; }
.admin-notice.warning { border-color: #f0dfc4; background: #fff9f0; color: #946a35; }
.admin-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(235px, 1.3fr); gap: 10px; margin-bottom: 15px; }
.admin-detail-summary > div, .admin-detail-status { display: flex; min-height: 79px; flex-direction: column; justify-content: center; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.admin-detail-summary > div span, .admin-detail-status label { color: #8a9890; font-size: 8px; }
.admin-detail-summary > div strong { color: #33483d; font-size: 17px; font-weight: 650; }
.admin-setup-checklist { margin-bottom: 15px; }
.admin-setup-checklist-items { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 0 14px 12px; }
.admin-setup-checklist-item { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.admin-setup-checklist-item > span { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 700; }
.admin-setup-checklist-item strong { overflow: hidden; color: #52675c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-setup-checklist-item small { color: #8b9991; font-size: 7px; }
.admin-setup-checklist-item.ready { border-color: #dcebe1; background: #f6faf7; }
.admin-setup-checklist-item.ready > span { background: #e9f7ee; color: #4f9a6e; }
.admin-setup-checklist-item.missing { border-color: #f1e6d5; background: #fffaf2; }
.admin-setup-checklist-item.missing > span { background: #fbecd1; color: #a06a18; }
.admin-setup-checklist-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 13px; border-top: 1px solid #edf1ee; color: #8a9890; font-size: 8px; }
.admin-setup-checklist-action .button-secondary { min-height: 29px; padding: 0 9px; font-size: 8px; }
.admin-detail-status { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 8px; }
.admin-detail-status label { grid-column: 1 / -1; }
.admin-detail-status .button-primary { min-height: 31px; padding: 0 9px; font-size: 9px; }
.admin-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-detail-grid > .panel-card { min-width: 0; overflow: hidden; }
.admin-detail-list { display: grid; padding: 3px 16px 11px; }
.admin-detail-item { padding: 10px 0; border-bottom: 1px solid #edf1ee; }
.admin-detail-item:last-child { border-bottom: 0; }
.admin-detail-item > span { display: block; margin-bottom: 4px; color: #98a39d; font-size: 8px; }
.admin-detail-item > p { margin: 0; color: #52675c; font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.admin-token-usage { padding: 11px 0 3px; border-top: 1px solid #edf1ee; }
.admin-token-usage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.admin-token-usage-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #98a39d; font-size: 8px; }
.admin-token-usage-periods { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid #e7eeea; border-radius: 8px; background: #f8faf8; }
.admin-token-usage-periods button { min-height: 25px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #77877e; font: inherit; font-size: 8px; cursor: pointer; }
.admin-token-usage-periods button[aria-pressed="true"] { background: #fff; color: #315a47; box-shadow: 0 1px 3px #1e483414; font-weight: 650; }
.admin-token-usage-periods button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-token-usage-period-label { margin: 9px 0 0; color: #98a39d; font-size: 8px; }
.admin-token-usage-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 7px; }
.admin-token-usage-totals > div > span { display: block; color: #819088; font-size: 8px; }
.admin-token-usage-total { display: block; margin-top: 9px; color: #315a47; font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.admin-token-usage-cost { display: block; margin-top: 9px; color: #315a47; font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.admin-token-usage-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.admin-token-usage-breakdown > span { color: #98a39d; font-size: 8px; }
.admin-token-usage-breakdown strong { display: block; margin-top: 4px; color: #52675c; font-size: 9px; font-weight: 650; }
.admin-token-usage-pricing-warning { margin: 9px 0 0; color: #99672e; font-size: 8px; line-height: 1.5; }
.admin-token-usage-note { display: block; margin-top: 11px; color: #98a39d; font-size: 7px; line-height: 1.5; }
.admin-token-budget-status { display: grid; gap: 4px; margin-top: 10px; padding: 9px; border: 1px solid #e5eee8; border-radius: 8px; background: #f7faf8; color: #75857c; font-size: 8px; }
.admin-token-budget-status strong { color: #315a47; font-size: 9px; }
.admin-token-budget-status.warning { border-color: #f0d9b7; background: #fff9f0; color: #99672e; }
.admin-token-budget-status small { color: #99672e; }
.admin-ai-budget-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 11px 0 3px; padding: 10px; border: 1px solid #e8eeea; border-radius: 8px; background: #fbfcfb; }
.admin-ai-budget-form > strong, .admin-ai-budget-form > small, .admin-ai-budget-form > button { grid-column: 1 / -1; }
.admin-ai-budget-form > strong { color: #52675c; font-size: 9px; }
.admin-ai-budget-form label { display: grid; gap: 4px; color: #819088; font-size: 8px; }
.admin-ai-budget-form input, .admin-ai-budget-form select { min-width: 0; min-height: 30px; padding: 0 7px; border: 1px solid #e4eae6; border-radius: 6px; background: #fff; color: #315a47; font: inherit; font-size: 9px; }
.admin-ai-budget-form > small { color: #98a39d; font-size: 7px; line-height: 1.5; }
.admin-ai-budget-form > button { justify-self: start; min-height: 29px; padding: 0 9px; font-size: 8px; }
.content-edit-details { margin-top: 8px; color: #56806b; font-size: 9px; }
.content-edit-details summary { width: fit-content; cursor: pointer; }
.content-edit-form { display: grid; gap: 8px; margin-top: 8px; padding: 9px; border: 1px solid #e8eeea; border-radius: 8px; background: #fbfcfb; }
.content-edit-form label { display: grid; gap: 4px; color: #819088; font-size: 8px; }
.content-edit-form input, .content-edit-form textarea { width: 100%; min-height: 31px; padding: 7px 8px; border: 1px solid #e4eae6; border-radius: 6px; background: #fff; color: #315a47; font: inherit; font-size: 9px; }
.content-edit-form textarea { min-height: 90px; resize: vertical; }
.content-edit-form button { justify-self: start; min-height: 29px; padding: 0 9px; font-size: 8px; }
.content-revision-list { display: grid; gap: 6px; margin-top: 8px; }
.content-revision-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border: 1px solid #e8eeea; border-radius: 7px; background: #fbfcfb; }
.content-revision-row > span { display: grid; min-width: 0; gap: 3px; }
.content-revision-row strong, .content-revision-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-revision-row strong { color: #53695d; font-size: 8px; }
.content-revision-row small { color: #899790; font-size: 7px; }
.content-revision-row .button-secondary { min-height: 27px; padding: 0 8px; font-size: 8px; }
.admin-compact-list { padding: 2px 15px; }
.admin-compact-row { display: flex; min-height: 47px; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf1ee; color: #607268; font-size: 9px; }
.admin-compact-row:last-child { border-bottom: 0; }
.admin-compact-row > span:first-child { min-width: 0; }
.admin-compact-row > span:first-child strong, .admin-compact-row > span:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-compact-row > span:first-child strong { color: #455a50; font-size: 9px; }
.admin-compact-row > span:first-child small { margin-top: 4px; color: #96a29b; font-size: 8px; }
.admin-compact-row > strong { flex: 0 0 auto; color: #62766b; font-size: 8px; font-weight: 550; }
.admin-sublist { border-top: 1px solid #e9eeeb; background: #fbfcfb; }
.admin-access-form-card { margin-bottom: 14px; }
.admin-access-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, .9fr) auto; align-items: end; gap: 11px; }
.admin-access-form .button-primary { min-height: 37px; }
.admin-account-filter { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-managed-accounts { margin-bottom: 14px; overflow: hidden; }
.admin-account-list { max-height: 370px; overflow-y: auto; padding: 0 16px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.admin-account-item { border-bottom: 1px solid #edf1ee; }
.admin-account-item:last-child { border-bottom: 0; }
.admin-account-item > summary { display: flex; min-height: 64px; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.admin-account-item > summary::-webkit-details-marker { display: none; }
.admin-account-summary { display: grid; min-width: 0; flex: 1; gap: 4px; }
.admin-account-summary strong { overflow: hidden; color: #455a50; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-summary small { overflow: hidden; color: #96a29b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-details { padding: 0 0 13px 42px; }
.tenant-key-visibility { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 9px 12px; border: 1px solid #e8eeea; border-radius: 8px; background: #fbfcfb; }
.tenant-key-visibility > div { display: grid; min-width: 0; gap: 4px; }
.tenant-key-label { color: #819088; font-size: 8px; }
.tenant-key-visibility code { overflow-wrap: anywhere; color: #40574b; font-size: 10px; letter-spacing: .04em; }
.tenant-key-toggle { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #e4eae6; border-radius: 6px; background: #fff; color: #53695d; cursor: pointer; }
.tenant-key-toggle:hover { border-color: #b9d4c5; background: #f2f7f4; }
.admin-account-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid #e8eeea; border-radius: 8px; background: #fbfcfb; }
.admin-account-edit-form .field { min-width: 0; }
.admin-account-edit-form .field label { display: block; margin-bottom: 5px; color: #819088; font-size: 8px; }
.admin-account-edit-form .field input { width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid #e4eae6; border-radius: 6px; background: #fff; color: #40574b; font-size: 9px; }
.admin-account-tenant { grid-column: 1 / -1; margin: 0; color: #899790; font-size: 8px; }
.admin-account-tenant strong { color: #53695d; font-weight: 650; }
.admin-account-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid #e8eeea; }
.admin-account-actions span { color: #91a098; font-size: 8px; line-height: 1.5; }
.admin-account-actions .button-primary { min-height: 33px; flex: 0 0 auto; font-size: 9px; }
.admin-account-delete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; padding: 10px 12px; border: 1px solid #f0dfdb; border-radius: 8px; background: #fffaf8; }
.admin-account-delete-confirm { display: flex; align-items: flex-start; gap: 8px; color: #926e65; font-size: 8px; line-height: 1.5; }
.admin-account-delete-confirm input { flex: 0 0 auto; margin: 1px 0 0; accent-color: #a34e3d; }
.admin-account-delete .button-danger { min-height: 32px; flex: 0 0 auto; font-size: 9px; }
.admin-simulation-early-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 9px 12px; border: 1px solid #e7e6d8; border-radius: 8px; background: #fafaf5; }
.admin-simulation-early-end span { color: var(--muted); font-size: 8px; line-height: 1.5; }
.admin-simulation-early-end .button-secondary { min-height: 31px; flex: 0 0 auto; font-size: 8px; }
.admin-expired-delete { display: flex; min-width: 245px; align-items: center; gap: 9px; }
.admin-expired-decision { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.admin-expired-decision input { flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
.admin-expired-delete .button-primary { min-height: 30px; flex: 0 0 auto; padding: 0 9px; font-size: 8px; white-space: nowrap; }
.admin-account-protected-note { margin-top: 9px; margin-bottom: 0; }
.admin-log-list { padding: 4px 18px; }
.admin-log-scroll-list { max-height: 318px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.admin-log-scroll-list .admin-log-row { box-sizing: border-box; height: 62px; overflow: hidden; padding: 9px 0; }
.admin-log-scroll-list .admin-log-main { min-width: 0; overflow: hidden; }
.admin-log-scroll-list .admin-log-main strong, .admin-log-scroll-list .admin-log-main p, .admin-log-scroll-list .admin-log-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.admin-log-scroll-list .admin-log-main p { margin: 3px 0; }
.admin-log-row { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid #edf1ee; }
.admin-log-row:last-child { border-bottom: 0; }
.admin-log-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #69ad7b; box-shadow: 0 0 0 4px #eff7f0; }
.admin-log-dot.warning { background: #cf8a4b; box-shadow: 0 0 0 4px #fbf2e8; }
.admin-inline-status { margin: 0 16px 9px; color: #75857c; font-size: 9px; }
.admin-log-main strong { color: #465a50; font-size: 10px; }
.admin-log-main p { margin: 4px 0; color: #718178; font-size: 9px; }
.admin-log-main small { color: #9aa49e; font-size: 8px; }
.admin-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-detail-actions .button-primary, .admin-detail-actions .button-secondary { min-height: 35px; font-size: 9px; }
.admin-tenant-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 38px 13px; padding: 10px 13px; border: 1px solid #d5e9db; border-radius: 9px; background: #f0f8f2; color: #50725b; }
.admin-tenant-banner > span { display: grid; grid-template-columns: 20px auto; align-items: center; gap: 2px 8px; }
.admin-tenant-banner > span > svg { grid-row: span 2; }
.admin-tenant-banner strong { font-size: 10px; }
.admin-tenant-banner small { color: #78917e; font-size: 8px; }
.admin-tenant-banner button { min-height: 30px; padding: 0 10px; border: 1px solid #cfe2d5; border-radius: 7px; background: white; color: #4d7358; font-size: 9px; font-weight: 650; }
.admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 18% 20%, #e7f3eb 0, transparent 34%), #f5f8f5; }
.admin-login-card { width: min(100%, 410px); padding: 32px; border: 1px solid #e1e9e3; border-radius: 17px; background: white; box-shadow: 0 20px 70px rgba(28, 66, 46, .08); }
.admin-login-mark { display: grid; width: 43px; height: 43px; margin-bottom: 22px; place-items: center; border-radius: 13px 13px 13px 4px; background: #173c31; color: #c4ead7; font-size: 13px; font-weight: 750; letter-spacing: -.5px; }
.admin-login-card .eyebrow { margin-bottom: 7px; }
.admin-login-card h1 { margin: 0; color: #20332d; font-size: 25px; letter-spacing: -.6px; }
.admin-login-card > p { margin: 8px 0 20px; color: #81908a; font-size: 10px; }
.admin-login-fields { gap: 13px; }
.admin-login-note { display: block; margin-top: 16px; color: #98a49d; font-size: 8px; line-height: 1.5; text-align: center; }
.admin-mobile-signout { display: none; }

@media (max-width: 1000px) {
  .admin-detail-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-setup-checklist-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-detail-status { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .admin-frame { flex-direction: column; }
  .admin-sidebar { position: relative; width: 100%; min-width: 0; height: auto; min-height: 0; flex: 0 0 auto; align-items: stretch; padding: 10px 12px 7px; }
  .admin-brand { margin: 0 3px 8px; }
  .admin-brand > span:last-child { display: block; }
  .admin-workspace, .admin-nav-label, .admin-profile-row { display: none; }
  .admin-brand-mark { width: 34px; height: 34px; }
  .admin-nav { display: flex; width: 100%; flex: 0 0 auto; gap: 4px; overflow-x: auto; padding: 2px 0 3px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-link { flex: 0 0 auto; justify-content: flex-start; width: auto; height: 36px; margin: 0; padding: 0 10px; white-space: nowrap; }
  .admin-nav-link span { display: inline; }
  .admin-main { width: 100%; height: auto; min-height: 0; }
  .admin-topbar { min-height: 52px; padding: 0 13px; }
  .admin-topbar > div:first-child { min-width: 0; overflow: hidden; }
  .admin-topbar > div:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-top-email { display: none; }
  .admin-top-profile { display: block; }
  .admin-top-user { gap: 6px; }
  .admin-role-badge { padding: 5px 7px; white-space: nowrap; }
  .admin-content { padding: 22px 13px; }
  .admin-content .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-setup-checklist-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-setup-checklist-action { align-items: flex-start; flex-direction: column; }
  .admin-detail-status { grid-column: 1 / -1; }
  .admin-detail-grid { grid-template-columns: 1fr; }
  .admin-access-form { grid-template-columns: 1fr; }
  .admin-filter-bar { align-items: stretch; flex-wrap: wrap; }
  .admin-search { max-width: none; flex-basis: 100%; }
  .admin-account-edit-form { grid-template-columns: 1fr; }
  .admin-account-tenant, .admin-account-actions { grid-column: auto; }
  .admin-account-actions { align-items: flex-start; flex-direction: column; }
  .admin-account-delete { align-items: flex-start; flex-direction: column; }
  .admin-simulation-early-end { align-items: flex-start; flex-direction: column; }
  .admin-account-details { padding-left: 0; }
  .admin-next-card { align-items: flex-start; flex-wrap: wrap; }
  .admin-next-card .button-secondary { margin-left: 40px; }
  .admin-footer { padding: 10px 13px 14px; }
  .admin-tenant-banner { align-items: flex-start; flex-direction: column; margin: 10px 13px; }
}

.theme-toggle { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--green-dark); transition: border-color .15s ease, background .15s ease, color .15s ease; }
.theme-toggle:hover { border-color: var(--accent-hover); background: var(--accent-soft); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-top-user .theme-toggle { width: 30px; height: 30px; }

.main-area,
.admin-main {
  background-color: var(--canvas);
  background-image: url("whatsapp-light-pattern.svg");
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* Light theme surface hierarchy: separates parent cards from nested controls. */
:root:not([data-theme="dark"]) :is(.panel-card, .form-card, .admin-metric-card, .admin-detail-summary > div, .admin-detail-status, .admin-account-filter) {
  border-color: #dce5df;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 2px rgba(31, 61, 48, .035), 0 10px 28px rgba(31, 61, 48, .045);
}

:root:not([data-theme="dark"]) .panel-header {
  border-bottom-color: #e1e8e4;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(180deg, #fff 0%, #fbfcfb 100%);
}

:root:not([data-theme="dark"]) :is(.setup-item, .hours-row, .import-preview-form, .notification-toggle-grid label, .admin-next-card, .admin-token-budget-status, .admin-ai-budget-form, .content-edit-form, .content-revision-row, .admin-account-edit-form) {
  border-color: #dce6e0;
  background: #f6f9f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

:root:not([data-theme="dark"]) :is(.setup-item, .notification-toggle-grid label, .admin-next-card, .content-revision-row) {
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

:root:not([data-theme="dark"]) :is(.setup-item, .notification-toggle-grid label, .admin-next-card, .content-revision-row):hover {
  border-color: #cbdcd2;
  background: #fbfdfc;
  box-shadow: 0 5px 16px rgba(31, 61, 48, .055);
}

:root:not([data-theme="dark"]) .notification-toggle-grid label:has(input:checked) {
  border-color: #c6ddcf;
  background: #eef6f1;
}

:root:not([data-theme="dark"]) :is(.staff-add-panel, .conversation-detail-header, .conversation-reply-area, .admin-sublist) {
  background: #f7faf8;
}

:root:not([data-theme="dark"]) :is(.form-actions, .bot-preferences-block, .connection-results, .staff-add-panel, .conversation-reply-area, .admin-account-actions, .admin-sublist) {
  border-color: #dde6e1;
}

:root:not([data-theme="dark"]) :is(.list-row, .table-list td, .admin-detail-item, .admin-compact-row, .admin-account-item, .admin-log-row) {
  border-color: #e2e9e5;
}

:root:not([data-theme="dark"]) :is(.field input, .field select, .field textarea, .import-table input, .import-table select, .import-table textarea, .admin-ai-budget-form input, .admin-ai-budget-form select, .content-edit-form input, .content-edit-form textarea, .admin-account-edit-form .field input) {
  border-color: #dbe4df;
  background: #fff;
}

/* Light theme typography: keep compact dashboard copy readable on white surfaces. */
:root:not([data-theme="dark"]) {
  --text-primary: #20372e;
  --text-secondary: #40564c;
  --text-muted: #52675d;
  --text-placeholder: #6f8178;
  --ink-soft: var(--text-secondary);
  --muted: var(--text-muted);
}

:root:not([data-theme="dark"]) :is(.breadcrumb, .admin-breadcrumb, .page-heading p, .simulation-heading p, .metric-label, .metric-foot, .form-card-heading p, .notification-group-heading p, .connection-results small, .conversation-message small, .appointment-slot small, .simulation-provider-note) {
  color: var(--text-secondary);
}

:root:not([data-theme="dark"]) :is(.panel-header p, .setup-copy small, .setup-progress, .empty-state p, .field label, .field-help, .form-note, .bot-preferences-heading span, .toggle-row small, .table-list th, .hours-row .field > span, .list-row-main small, .delivery-status, .notification-toggle-grid small, .appointment-date-picker .field span, .admin-metric-top, .admin-metric-card > small, .admin-tenant-link small, .admin-empty, .admin-empty p, .admin-next-card p, .admin-search, .admin-detail-summary > div span, .admin-detail-status label, .admin-setup-checklist-item small, .admin-setup-checklist-action, .admin-detail-item > span, .admin-token-usage-heading, .admin-token-usage-period-label, .admin-token-usage-totals > div > span, .admin-token-usage-breakdown > span, .admin-token-usage-note, .admin-ai-budget-form label, .admin-ai-budget-form > small, .content-edit-form label, .content-revision-row small, .admin-compact-row > span:first-child small, .admin-account-summary small, .admin-account-edit-form .field label, .admin-account-tenant, .admin-account-actions span, .admin-inline-status, .admin-log-main small, .admin-login-note, .app-footer, .admin-footer) {
  color: var(--text-muted);
}

:root:not([data-theme="dark"]) :is(.field label, .hours-row .field > span, .appointment-date-picker .field span, .admin-detail-status label, .admin-ai-budget-form label, .content-edit-form label, .admin-account-edit-form .field label) {
  color: var(--text-secondary);
  font-weight: 620;
}

:root:not([data-theme="dark"]) :is(.field input::placeholder, .field textarea::placeholder, .admin-search input::placeholder, .content-edit-form input::placeholder, .content-edit-form textarea::placeholder, .admin-account-edit-form input::placeholder) {
  color: var(--text-placeholder);
  opacity: 1;
}

:root:not([data-theme="dark"]) :is(.status-pill, .date-chip, .import-preview-summary, .admin-token-usage-periods button) {
  color: var(--text-secondary);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f8f4;
  --ink-soft: #d6e5dd;
  --muted: #a3b4ac;
  --line: #34483f;
  --canvas: #151a1b;
  --white: #14251f;
  --surface: #1a2d26;
  --surface-raised: #20372e;
  --surface-soft: #1b3028;
  --surface-inset: #111617;
  --accent: #42a77f;
  --accent-hover: #65bd94;
  --accent-soft: #20372e;
  --green: #bfe9d5;
  --green-strong: #42a77f;
  --green-dark: #173c31;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-frame,
:root[data-theme="dark"] .admin-frame,
:root[data-theme="dark"] .main-area,
:root[data-theme="dark"] .admin-main { background: var(--canvas); color: var(--ink); }

:root[data-theme="dark"] .main-area,
:root[data-theme="dark"] .admin-main {
  background-color: #151a1b;
  background-image: url("whatsapp-dark-pattern.svg");
  background-repeat: repeat;
  background-size: 300px 300px;
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .admin-topbar { border-color: var(--line); background: rgba(20, 37, 31, .94); }
:root[data-theme="dark"] .breadcrumb,
:root[data-theme="dark"] .breadcrumb strong,
:root[data-theme="dark"] .admin-breadcrumb,
:root[data-theme="dark"] .admin-breadcrumb-sep,
:root[data-theme="dark"] .admin-topbar strong,
:root[data-theme="dark"] .admin-top-email { color: var(--muted); }

:root[data-theme="dark"] .page-content :is(h1, h2, h3, h4, strong, label, td, th),
:root[data-theme="dark"] .admin-content :is(h1, h2, h3, h4, strong, label, td, th) { color: var(--ink); }
:root[data-theme="dark"] .page-content :is(p, small, .field-help, .form-note, .metric-foot, .empty-state, .admin-empty, .admin-inline-status),
:root[data-theme="dark"] .admin-content :is(p, small, .field-help, .form-note, .metric-foot, .empty-state, .admin-empty, .admin-inline-status) { color: var(--muted); }

:root[data-theme="dark"] :is(.panel-card, .metric-card, .form-card, .date-chip, .admin-metric-card, .admin-detail-summary > div, .admin-detail-status, .setup-item, .hours-row, .admin-next-card, .admin-account-filter, .admin-account-edit-form, .admin-ai-budget-form, .content-edit-form, .content-revision-row, .notification-toggle-grid label, .conversation-detail-header, .conversation-reply-area) {
  border-color: var(--line);
  background: var(--surface);
}
:root[data-theme="dark"] :is(.panel-header, .form-actions, .bot-preferences-block, .conversation-reply-area, .connection-results, .staff-add-panel, .admin-filter-bar, .admin-setup-checklist-action, .admin-detail-item, .admin-token-usage, .admin-account-item, .admin-account-actions, .table-list td) { border-color: var(--line); }
:root[data-theme="dark"] :is(.panel-header h2, .form-card-heading h2, .bot-preferences-heading strong, .setup-copy strong, .list-row-main strong, .admin-tenant-link strong, .admin-next-card strong, .admin-detail-summary > div strong, .admin-detail-item > p, .admin-setup-checklist-item strong, .admin-token-usage-breakdown strong, .admin-token-budget-status strong, .admin-ai-budget-form > strong, .content-revision-row strong, .admin-compact-row > span:first-child strong, .admin-compact-row > strong, .admin-account-summary strong, .admin-account-tenant strong, .admin-log-main strong, .admin-log-main p, .staff-add-panel h3, .hours-row > strong, .table-list td strong, .conversation-message p, .conversation-message.outbound p) { color: var(--ink); }
:root[data-theme="dark"] :is(.panel-header p, .form-card-heading p, .bot-preferences-heading span, .setup-copy small, .setup-progress, .empty-state p, .field label, .field-help, .field input::placeholder, .field textarea::placeholder, .form-note, .admin-metric-top, .admin-metric-card > small, .admin-tenant-link small, .admin-empty, .admin-empty p, .admin-next-card p, .admin-search, .admin-setup-checklist-action, .admin-setup-checklist-item small, .admin-detail-summary > div span, .admin-detail-status label, .admin-detail-item > span, .admin-token-usage-heading, .admin-token-usage-period-label, .admin-token-usage-totals > div > span, .admin-token-usage-breakdown > span, .admin-token-usage-note, .admin-ai-budget-form label, .admin-ai-budget-form > small, .content-revision-row small, .admin-compact-row > span:first-child small, .admin-inline-status, .admin-log-main small, .app-footer, .admin-footer, .date-chip) { color: var(--muted); }

:root[data-theme="dark"] :is(.metric-number, .admin-metric-card > strong, .admin-token-usage-total, .admin-token-usage-cost) { color: #dcebe1; }
:root[data-theme="dark"] .metric-card { border-color: #34483f; background: rgba(26, 45, 38, .94); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
:root[data-theme="dark"] .metric-card:hover { border-color: #496657; box-shadow: 0 14px 34px rgba(0, 0, 0, .27); }
:root[data-theme="dark"] .pagination { border-color: var(--line); }
:root[data-theme="dark"] .pagination-summary, :root[data-theme="dark"] .pagination-ellipsis { color: var(--muted); }
:root[data-theme="dark"] .pagination-link { border-color: #3a5046; background: rgba(26,45,38,.72); color: #b5c9be; }
:root[data-theme="dark"] .pagination-link:hover { border-color: #5d8370; background: #263e34; color: #e2f0e8; }
:root[data-theme="dark"] .pagination-link.active { border-color: #65bd94; background: #285944; color: #effaf4; }
:root[data-theme="dark"] .metric-ambient { color: #8bc9ad; opacity: .11; }
:root[data-theme="dark"] .metric-card:hover .metric-ambient { opacity: .17; }
:root[data-theme="dark"] .metric-label { color: #b3c5bb; }
:root[data-theme="dark"] .metric-foot { border-color: #34483f; color: #91a69b; }
:root[data-theme="dark"] .metric-foot > span { color: #79b998; }
:root[data-theme="dark"] :is(.metric-top, .admin-metric-top, .appointment-date-picker .field > span, .hours-row .field > span, .admin-log-main, .admin-access-list, .admin-token-usage-heading, .admin-compact-row) { color: var(--muted); }
:root[data-theme="dark"] .welcome { border-color: #34483f; background: linear-gradient(112deg, #1b3028 0%, #20372e 59%, #1a2d26 100%); }
:root[data-theme="dark"] .welcome h1 { color: #f1f8f4; }
:root[data-theme="dark"] .welcome p { color: #c0d5ca; }
:root[data-theme="dark"] .welcome::before { background: #65bd94; }

:root[data-theme="dark"] :is(.field input, .field select, .field textarea, .admin-search input, .admin-filter-bar select, .admin-detail-status select, .inline-form select, .member-actions select, .import-table input, .import-table select, .import-table textarea, .appointment-date-picker input, .admin-ai-budget-form input, .admin-ai-budget-form select, .content-edit-form input, .content-edit-form textarea, .admin-account-edit-form .field input) {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--ink);
}
:root[data-theme="dark"] :is(.field input, .field select, .field textarea, .admin-search input, .admin-filter-bar select, .admin-detail-status select, .inline-form select, .member-actions select, .import-table input, .import-table select, .import-table textarea, .appointment-date-picker input, .admin-ai-budget-form input, .admin-ai-budget-form select, .content-edit-form input, .content-edit-form textarea)::placeholder { color: var(--muted); }

/* Authentication inputs stay neutral and readable regardless of the saved panel theme. */
:root :is(.auth-page, .admin-login-page) .auth-form .field input {
  border-color: #e4eae6;
  background: #fff;
  color: #31443b;
  color-scheme: light;
}
:root :is(.auth-page, .admin-login-page) .auth-form .field input::placeholder {
  color: #b3bcb7;
  opacity: 1;
}
:root :is(.auth-page, .admin-login-page) .auth-form .field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .14);
  color: #31443b;
}
:root[data-theme="dark"] .admin-search { border-color: var(--line); }
:root[data-theme="dark"] .button-secondary { border-color: var(--line); background: var(--surface-soft); color: var(--ink-soft); }
:root[data-theme="dark"] .button-secondary:hover { border-color: var(--accent-hover); background: var(--accent-soft); color: var(--ink); }
:root[data-theme="dark"] .button-danger { border-color: #69423a; background: #382521; color: #f0b2a4; }
:root[data-theme="dark"] .button-danger:hover { background: #482c26; }
:root[data-theme="dark"] .theme-toggle { border-color: var(--line); background: var(--surface-soft); color: var(--accent); }
:root[data-theme="dark"] .theme-toggle:hover { border-color: var(--accent-hover); background: var(--accent-soft); color: var(--accent-hover); }
:root[data-theme="dark"] :is(.progress-track, .admin-token-usage-periods, .admin-sublist, .conversation-message-list, .conversation-detail-header, .notification-read) { background: var(--surface-inset); }
:root[data-theme="dark"] .setup-item:hover,
:root[data-theme="dark"] .import-source-tabs button,
:root[data-theme="dark"] .import-preview-form,
:root[data-theme="dark"] .inbox-conversation:hover,
:root[data-theme="dark"] .tester-readonly-content :is(input, textarea, select) { border-color: var(--line); background: var(--surface-raised); }
:root[data-theme="dark"] .setup-check { border-color: var(--line); background: var(--surface-raised); }
:root[data-theme="dark"] .setup-check.done { border-color: #c7e7d4; background: #e9f7ee; color: #4f9a6e; }
:root[data-theme="dark"] .empty-illustration { border-color: #e0ebe4; background: #f2f8f4; color: #71a481; }
:root[data-theme="dark"] .progress-track { background: var(--surface-inset); }
:root[data-theme="dark"] .import-source-tabs button { color: #c0cec5; }
:root[data-theme="dark"] .import-source-tabs button.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
:root[data-theme="dark"] .notification-toggle-grid label { background: var(--surface-raised); }
:root[data-theme="dark"] .notification-settings-group + .notification-settings-group { border-color: var(--line); }
:root[data-theme="dark"] .notification-group-heading h3 { color: var(--ink); }
:root[data-theme="dark"] .notification-group-heading p { color: var(--muted); }
:root[data-theme="dark"] .notification-feedback .field-help,
:root[data-theme="dark"] .notification-list-panel .notification-row { border-color: var(--line); background: var(--surface-raised); }
:root[data-theme="dark"] .status-pill:not(.success):not(.warning) { background: var(--surface); color: var(--ink-soft); }
:root[data-theme="dark"] .admin-compact-row { border-color: var(--line); color: #bac8c0; }
:root[data-theme="dark"] .admin-compact-row > span:first-child strong { color: var(--ink); }
:root[data-theme="dark"] .admin-compact-row > span:first-child small { color: var(--muted); }
:root[data-theme="dark"] .admin-tenant-banner button { border-color: #34483f; background: #1a2d26; color: #c4ead7; }
:root[data-theme="dark"] .admin-tenant-banner button:hover { background: #20372e; }
:root[data-theme="dark"] .admin-ai-budget-form,
:root[data-theme="dark"] .admin-account-edit-form,
:root[data-theme="dark"] .tenant-key-visibility,
:root[data-theme="dark"] .content-edit-form,
:root[data-theme="dark"] .content-revision-row,
:root[data-theme="dark"] .admin-account-filter { background: var(--surface-raised); }
:root[data-theme="dark"] .tenant-key-visibility { border-color: var(--line); }
:root[data-theme="dark"] .tenant-key-label { color: var(--muted); }
:root[data-theme="dark"] .tenant-key-visibility code { color: var(--ink); }
:root[data-theme="dark"] .tenant-key-toggle { border-color: var(--line); background: var(--surface); color: var(--ink-soft); }
:root[data-theme="dark"] .tenant-key-toggle:hover { border-color: var(--accent-hover); background: var(--accent-soft); color: var(--ink); }
:root[data-theme="dark"] .admin-token-usage-periods { border-color: var(--line); }
:root[data-theme="dark"] .admin-token-usage-periods button { color: #b4c2ba; }
:root[data-theme="dark"] .admin-token-usage-periods button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: none; }
:root[data-theme="dark"] .admin-setup-checklist-item.ready { border-color: #34483f; background: #1b3028; }
:root[data-theme="dark"] .admin-setup-checklist-item.missing { border-color: #554732; background: #2d281e; }
:root[data-theme="dark"] .appointment-slot { border-color: #3b5948; background: #1b3028; }
:root[data-theme="dark"] .appointment-slot strong,
:root[data-theme="dark"] .appointment-slot span { color: #c4ead7; }
:root[data-theme="dark"] .appointment-slot.busy { border-color: #65413c; background: #302321; }
:root[data-theme="dark"] .appointment-slot.busy strong,
:root[data-theme="dark"] .appointment-slot.busy span { color: #edb0a4; }
:root[data-theme="dark"] .appointment-slot.partial { border-color: #63583f; background: #2a2b24; }
:root[data-theme="dark"] .appointment-slot.partial strong,
:root[data-theme="dark"] .appointment-slot.partial span { color: #dfc98f; }
:root[data-theme="dark"] .conversation-message.inbound { border-color: var(--line); background: #202c33; }
:root[data-theme="dark"] .conversation-message.outbound { border-color: #35584a; background: #20483a; }
:root[data-theme="dark"] .conversation-message small { color: #a3b0a8; }

:root[data-theme="dark"] :is(.admin-notice, .notice, .tester-access-banner, .admin-tenant-banner, .info-card, .admin-token-budget-status) { border-color: #35584a; background: #1b3028; color: #c2ebd6; }
:root[data-theme="dark"] :is(.admin-notice, .notice, .tester-access-banner, .admin-tenant-banner, .info-card, .admin-token-budget-status) :is(strong, h3, p, small) { color: inherit; }
:root[data-theme="dark"] :is(.admin-notice.success, .notice:not(.error), .auth-success) { border-color: #3b654c; background: #20372e; color: #c4ead7; }
:root[data-theme="dark"] :is(.admin-notice.error, .notice.error, .auth-error:not(.auth-error-plain)) { border-color: #644038; background: #35231f; color: #efb4a5; }
:root[data-theme="dark"] .auth-page .auth-error.auth-error-plain,
:root[data-theme="dark"] .admin-login-page .auth-error.auth-error-plain {
  border: 0;
  background: transparent;
  color: #000;
}
:root[data-theme="dark"] :is(.admin-notice.warning, .admin-token-budget-status.warning) { border-color: #605039; background: #30291d; color: #e7c68f; }
:root[data-theme="dark"] .info-card h3 { color: #c4ead7; }
:root[data-theme="dark"] .info-card p { color: #b2c9bc; }
:root[data-theme="dark"] .admin-tenant-banner button { border-color: #34483f; background: #1a2d26; color: #c4ead7; }
:root[data-theme="dark"] .admin-log-dot { box-shadow: 0 0 0 4px #1b3028; }
:root[data-theme="dark"] .admin-log-dot.warning { box-shadow: 0 0 0 4px #30291e; }
:root[data-theme="dark"] .admin-account-delete { border-color: #64413a; background: #2d211f; }
:root[data-theme="dark"] .admin-account-delete-confirm { color: #e1b7ad; }
:root[data-theme="dark"] .admin-simulation-early-end { border-color: #4c4937; background: #24261f; }
:root[data-theme="dark"] .admin-expired-decision { color: var(--muted); }

:root[data-theme="dark"] .simulation-heading h1 { color: var(--ink); }
:root[data-theme="dark"] .simulation-heading p { color: var(--muted); }
:root[data-theme="dark"] .simulation-status { border-color: var(--line); background: var(--surface); color: #b5c2ba; }
:root[data-theme="dark"] .simulation-info-card { border-color: #34483f; background: linear-gradient(150deg, #1a2d26, #20372e); }
:root[data-theme="dark"] .simulation-info-card h2 { color: #e3eee7; }
:root[data-theme="dark"] .simulation-info-card > p { color: #b2c2b7; }
:root[data-theme="dark"] .simulation-info-card > .simulation-provider-note { color: #9cafa2; }
:root[data-theme="dark"] .simulation-steps > div { border-color: #384b3d; }
:root[data-theme="dark"] .simulation-steps p { color: #cad9ce; }
:root[data-theme="dark"] .phone-demo-card { border-color: #34483f; background: #14251f; }
:root[data-theme="dark"] .phone-camera { background: #89988f; }
:root[data-theme="dark"] .phone-speaker,
:root[data-theme="dark"] .phone-demo-bottom { background: #415d4f; }
:root[data-theme="dark"] .wa-chat-window { border-color: var(--line); background: #111b21; }
:root[data-theme="dark"] .wa-chat-header,
:root[data-theme="dark"] .wa-compose { background: #202c33; }
:root[data-theme="dark"] .wa-back { color: #c0d0c6; }
:root[data-theme="dark"] .wa-contact strong { color: #e5efe9; }
:root[data-theme="dark"] .wa-contact small { color: #a4b2aa; }
:root[data-theme="dark"] .wa-header-icons { color: #a9d5b7; }
:root[data-theme="dark"] .simulation-start-screen { background: #19231e; }
:root[data-theme="dark"] .simulation-start-screen h2 { color: #e4eee8; }
:root[data-theme="dark"] .simulation-start-screen p { color: #aab8b0; }
:root[data-theme="dark"] .wa-chat-body { background-color: #111718; background-image: url("whatsapp-dark-pattern.svg"); background-repeat: repeat; background-size: 300px 300px; scrollbar-color: #45514c #171d1e; }
:root[data-theme="dark"] .wa-chat-body::-webkit-scrollbar-track { background: #111b21; }
:root[data-theme="dark"] .wa-chat-body::-webkit-scrollbar-thumb { border-color: #111b21; background: #37474f; }
:root[data-theme="dark"] .wa-date-pill { background: rgba(32, 44, 51, .92); color: #c5d0d5; }
:root[data-theme="dark"] .wa-message-bubble:not(.customer),
:root[data-theme="dark"] .wa-typing { background: #202c33; }
:root[data-theme="dark"] .wa-message-bubble:not(.customer) p { color: #e0e8e2; }
:root[data-theme="dark"] .wa-message-bubble.customer { background: #005c4b; }
:root[data-theme="dark"] .wa-message-bubble.customer p { color: #e9edef; }
:root[data-theme="dark"] .wa-message-bubble small { color: #aab5ad; }
:root[data-theme="dark"] .wa-option-list button,
:root[data-theme="dark"] .wa-starter-actions button { border-color: #16745b; background: #164e3e; color: #d7f7e4; }
:root[data-theme="dark"] .wa-compose input { border-color: #37474f; background: #111b21; color: #e9edef; }
:root[data-theme="dark"] .wa-compose input::placeholder { color: #8696a0; }

.employee-auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--page); }
.employee-auth-card { width: min(100%, 460px); padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.employee-portal-frame:has(.employee-activate-card) .employee-portal-header { display: none; }
.employee-portal-main:has(.employee-activate-card) { width: 100%; min-height: 100dvh; display: grid; place-items: center; margin: 0; padding: 24px; }
.employee-auth-card h1 { margin: 8px 0; font-size: clamp(24px, 4vw, 32px); }
.employee-auth-card > .auth-subtitle { margin: 0 0 22px; }
.employee-brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
.employee-auth-card .auth-kicker { margin-top: 18px; }
.employee-auth-card .auth-switch-link { display: block; margin-top: 18px; text-align: center; }
.employee-portal-frame { min-height: 100dvh; background: var(--page); }
.employee-portal-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: var(--surface); }
.employee-portal-header > div, .employee-portal-user { display: flex; align-items: center; gap: 12px; }
.employee-portal-header > div > span:last-child { display: grid; gap: 2px; }
.employee-portal-header small { color: var(--muted); }
.employee-portal-main { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.employee-dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.employee-dashboard-heading h1 { margin: 4px 0 6px; }
.employee-dashboard-heading p:last-child { margin: 0; color: var(--muted); }
.employee-appointments-card { overflow: hidden; }
.employee-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-row-actions .button-secondary { white-space: nowrap; }
.employee-appointments-card td small { display: block; margin-top: 3px; color: var(--muted); }
.employee-access-settings { border-top: 1px solid var(--line); background: var(--surface-raised); }
.employee-access-settings > div:first-child p { margin: 6px 0 12px; color: var(--muted); }
.employee-access-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 14px; }
.employee-access-form { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.employee-access-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.employee-access-form fieldset { display: grid; gap: 8px; }
.employee-access-form .button-secondary { justify-self: start; }
.employee-email-saved-row { display: flex; align-items: center; gap: 8px; }
.employee-email-saved-row input { flex: 1; min-width: 0; }
.employee-access-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-setup-link { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); }
.employee-setup-link input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font-size: 12px; }
.admin-employee-global { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px; margin-bottom: 16px; }
.admin-employee-global h2 { margin: 12px 0 4px; }
.admin-employee-global p { margin: 0; color: var(--muted); }
.admin-employee-global form { display: grid; gap: 12px; min-width: 270px; }
.admin-employee-tenants, .admin-employee-audit { margin-top: 16px; overflow: hidden; }
.admin-employee-audit { margin-bottom: 16px; }
.admin-employee-tenants td small { display: block; margin-top: 3px; color: var(--muted); }
.admin-employee-tenant-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-employee-tenant-row > div { display: grid; gap: 4px; }
.admin-employee-tenant-row small { color: var(--muted); }
.admin-employee-audit .panel-body { max-height: 460px; overflow: auto; }

@media (max-width: 680px) {
  .employee-auth-card { padding: 22px; }
  .employee-email-saved-row { align-items: stretch; flex-direction: column; }
  .employee-portal-header { align-items: flex-start; padding: 12px 16px; }
  .employee-portal-user { flex-direction: column; align-items: flex-end; }
  .employee-dashboard-heading { align-items: flex-start; flex-direction: column; }
  .admin-employee-global { align-items: stretch; flex-direction: column; }
  .admin-employee-tenant-row { align-items: stretch; flex-direction: column; }
}

@media (max-width: 760px) {
  .admin-top-user { gap: 8px; }
  .theme-toggle, .icon-button { width: 28px; height: 28px; }
}

@media (max-width: 430px) {
  .admin-topbar { gap: 6px; }
  .admin-topbar > div:first-child { gap: 5px; font-size: 9px; }
  .admin-role-badge { gap: 3px; padding: 5px 6px; font-size: 8px; }
  .admin-content .page-heading h1 { font-size: 23px; }
  .admin-metric-card { min-height: 105px; padding: 12px; }
  .admin-detail-summary { gap: 7px; }
  .admin-detail-summary > div, .admin-detail-status { padding: 9px; }
}



