/* Tualatin Denture Center brand adaptation.
   Palette values sampled from the official homepage; component colors are
   adapted for portal contrast and clarity. */
@media screen {
  [data-tab-tone="teal"]   { --tab-fill: #e0f2ed; --tab-ink: #115e57; }
  [data-tab-tone="blue"]   { --tab-fill: #e8f0fc; --tab-ink: #254f86; }
  [data-tab-tone="amber"]  { --tab-fill: #fbefd9; --tab-ink: #754713; }
  [data-tab-tone="violet"] { --tab-fill: #f1e9f7; --tab-ink: #624179; }
  [data-tab-tone="cyan"]   { --tab-fill: #e3f3f5; --tab-ink: #175d6a; }
  [data-tab-tone="olive"]  { --tab-fill: #edf3e5; --tab-ink: #405e24; }
  [data-tab-tone="clay"]   { --tab-fill: #faece4; --tab-ink: #814123; }
  [data-tab-tone="rose"]   { --tab-fill: #f9e8ee; --tab-ink: #823351; }
  [data-tab-tone="slate"]  { --tab-fill: #e7edf4; --tab-ink: #36495f; }
  :is(a, button)[data-tab-tone] {
    color: var(--tab-ink);
    background: var(--tab-fill);
    border-color: transparent;
  }
  [data-tab-tone]:hover { box-shadow: inset 0 0 0 1px var(--tab-ink); }
  [data-tab-tone]:is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]) {
    color: #fff;
    background: var(--tab-ink);
    box-shadow: inset 0 -3px 0 #ffffff85;
  }
  [data-tab-tone]:focus-visible { outline: 2px solid var(--tab-ink); outline-offset: 2px; }

  #office-practice-tab {
    margin-inline-start: 5px;
    border: 1px solid var(--ui-control);
    background: transparent;
    color: var(--ui-muted);
    box-shadow: none;
    font-weight: 650;
  }
  #office-practice-tab:is(:hover, [aria-selected="true"]) {
    background: var(--tab-fill);
    color: var(--tab-ink);
    border-color: var(--tab-ink);
  }
  #office-practice-tab[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--tab-ink); }

  :is(.office-tabs-practice, .lab-case-tabs) {
    padding-block-end: 4px;
    border-block-end: 1px solid var(--tdc-line);
  }

  :is(.office-tabs-chart, .office-tabs-practice, .lab-case-tabs, .lab-billing-tabs) > button[data-tab-tone] {
    min-block-size: 44px;
    border-radius: 7px 7px 3px 3px;
    background: transparent;
    color: var(--tab-ink);
    box-shadow: none;
    font-weight: 650;
  }
  :is(.office-tabs-chart, .office-tabs-practice, .lab-case-tabs, .lab-billing-tabs) > button[data-tab-tone]:hover {
    background: var(--tab-fill);
  }
  :is(.office-tabs-chart, .office-tabs-practice, .lab-case-tabs, .lab-billing-tabs) > button[data-tab-tone][aria-selected="true"] {
    background: var(--tab-fill);
    box-shadow: inset 0 -3px 0 var(--tab-ink);
    font-weight: 750;
  }
  :is(.office-tabs-chart, .office-tabs-practice, .lab-case-tabs, .lab-billing-tabs) .ui-icon {
    inline-size: 22px;
    block-size: 22px;
  }
  :is(.office-tabs-chart, .office-tabs-practice, .lab-case-tabs, .lab-billing-tabs) .ui-icon::before {
    inline-size: 18px;
    block-size: 18px;
  }
}

@media (forced-colors: active) {
  [data-tab-tone]:is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]) {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}

@media screen {
  .portal-shell {
    --clinic-surface: #fbfdfc;
    --clinic-line: #cededc;
    --clinic-ink: #142e43;
    --clinic-accent: #12626b;
    --clinic-tint: #e6f2ef;
    --clinic-shadow: 0 1px 2px #142e430d, 0 9px 26px #153f4910;
    background:
      radial-gradient(ellipse at 4% 4%, #daeeea, transparent 42rem),
      radial-gradient(ellipse at 96% 3%, #eee8db, transparent 34rem),
      #f1f6f4;
  }

  .portal-shell .topbar {
    background:
      radial-gradient(ellipse at 18% 160%, #397e8155, transparent 58%),
      linear-gradient(110deg, #0e2435, #16364a 50%, #246468);
    border-bottom-color: #83baa7;
    box-shadow: 0 4px 16px #10263721;
  }
  .portal-shell .topbar .brand { background-color: transparent; }
  .portal-shell .topbar .brand img { filter: brightness(0) invert(1); }
  .portal-shell .topbar .account-label { color: #e5f4ee; }
  .portal-shell .topbar .button.quiet { background-color: #10263770; color: #fff; }
  .portal-shell .topbar .button.quiet:hover { background-color: #0d2635; }
  .portal-shell .topbar .workspace-switch { background-color: #f6f2e9; color: #362744; border-color: #d9cfdb; }
  .portal-shell .topbar .workspace-switch:hover { background-color: #fff; border-color: #e2cde3; }
  .portal-shell .topbar :focus-visible { outline-color: #afe0d8; }
  .portal-shell .portal-footer { background: #122e42; color: #dfede7; border-top-color: #9dc7b8; }

  .portal-shell .card {
    background-color: var(--clinic-surface);
    border-color: var(--clinic-line);
    box-shadow: var(--clinic-shadow);
  }
  .portal-shell .card :is(h2, h3), .portal-shell .row-title { color: var(--clinic-ink); }
  .portal-shell label { color: #244351; }
  .portal-shell :is(input:not([type="checkbox"], [type="radio"]), select, textarea):focus {
    box-shadow: 0 0 0 3px #25867729;
  }
  :is(.portal-shell, .office-portal #portal-content, .login-shell) .button.primary:not([data-tab-tone]) {
    background-image: linear-gradient(110deg, #18374d, #12626b);
    color: #fff;
  }
  :is(.portal-shell, .office-portal #portal-content, .login-shell) .button.primary:not([data-tab-tone], :disabled):hover {
    background-image: linear-gradient(110deg, #10293d, #14545a);
  }
  .portal-shell .button.outline:where(:not([data-tab-tone], .workspace-switch, :disabled)):hover {
    border-color: var(--clinic-accent);
    background-color: var(--clinic-tint);
  }
  .portal-shell .office-tabs-office {
    background: linear-gradient(120deg, #f8fbf9, #e3efeb);
    border-color: #c5d9d4;
    box-shadow: 0 1px 4px #153f4910;
  }
  .portal-shell .office-chart-header {
    background: radial-gradient(ellipse at 100% 0, #dceee7, transparent 74%), #fcfdfb;
    border-color: var(--clinic-line);
    border-top-color: var(--clinic-accent);
  }
  .portal-shell .office-chart .patient-avatar {
    background: linear-gradient(140deg, #edf7f3, #cde6df);
    box-shadow: inset 0 0 0 1px #12806c29;
  }
  .portal-shell :is(.office-directory, #clinic-calendar, #office-intake-panel > .card) {
    background-image: linear-gradient(145deg, #eaf5ef, #fbfdfc 18rem);
  }
  .portal-shell .office-chart-empty {
    background: linear-gradient(140deg, #e7f2ed, #f7faf8);
    border-color: #c5d9d4;
  }
  .portal-shell .office-directory-row:not(.is-selected) { background: #fff; border-color: #d5e4df; }
  .portal-shell .office-directory-row:not(.is-selected):hover { border-color: #82b7ab; }
  .portal-shell .schedule-controls { background: #eaf3ef; border-color: #c9ded4; }
  .portal-shell .table-wrap > table thead { background: #eaf3ef; }
  .portal-shell .table-wrap > table thead th { color: #32515b; }

  .portal-shell .patient-overview .patient-home-primary {
    background: radial-gradient(ellipse at 100% 10%, #cde7df, transparent 78%), #edf6f2;
    border-color: #b6d6cb;
    border-inline-start-color: var(--clinic-accent);
  }
  .portal-shell .patient-overview .patient-balance {
    background: linear-gradient(150deg, #ecf5f0, #fbfdfc 13rem);
  }
  .portal-shell :is(.patient-balance-amount, .patient-visit-date strong) { color: var(--clinic-accent); }
  .portal-shell .patient-visit-date { background: #f0f7f3; border-color: #bcd8ce; }
  .portal-shell .patient-information[open] > summary { border-bottom-color: var(--clinic-line); }
  .login-shell .login-card {
    background: linear-gradient(160deg, #f1f8f4, #fff 17rem);
    box-shadow: 0 14px 44px #183b4a1a;
  }
}

:root {
  --ink: #173548;
  --ink-2: #294f64;
  --muted: #6b808d;
  --line: #e1edf1;
  --paper: #fff;
  --canvas: #f7fbfd;
  --mint: #e8f8fc;
  --mint-2: #d7f1f8;
  --green: #08718f;
  --green-dark: #075b77;
  --gold: #689ADE;
  --coral: #b96f62;
  --shadow: 0 18px 48px rgba(24, 65, 82, .10);
  --font: Arial, Helvetica, sans-serif;
  --head: Arial, Helvetica, sans-serif;
  --brand-cyan: #28CFF9;
  --brand-blue: #689ADE;
  --brand-navy: #002E5D;
  --brand-black: #060607;

  --ui-font: "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --ui-display: Georgia, "Times New Roman", serif;
  --ui-ink: #192a39;
  --ui-navy: #142f45;
  --ui-muted: #4c6171;
  --ui-canvas: #f0f3f3;
  --ui-surface: #fff;
  --ui-soft: #f4f8f8;
  --ui-line: #d8e1e4;
  --ui-control: #bacbd1;
  --ui-action: #125d68;
  --ui-action-hover: #104c56;
  --ui-focus: #157d94;
  --ui-tint: #e2f1ef;
  --ui-radius: 14px;
  --ui-shadow: 0 3px 10px #132e4110;
}

@media screen {
  :is(.dev-banner, .demo-ribbon) {
    min-height: 30px;
    letter-spacing: .07em;
    background: #f2e9d8;
    color: #594729;
    border-bottom-color: #e2d7c2;
  }
  :is(.dev-banner, .demo-ribbon) .dev-dot { flex: 0 0 7px; width: 7px; height: 7px; box-shadow: none; background: #a9701c; }
  :is(.login-shell, .portal-shell, .lab-page, .intake-wrap) {
    font-family: var(--ui-font);
    color: var(--ui-ink);
  }
  :is(.login-shell, .portal-shell, .lab-page, .intake-wrap) :is(a, button, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--ui-focus);
    outline-offset: 3px;
  }
  .ui-icon {
    display: inline-grid; place-items: center; inline-size: 24px; block-size: 24px; flex: none;
    border-radius: 6px; background: color-mix(in srgb, currentColor 12%, transparent);
  }
  .ui-icon::before {
    content: ''; inline-size: 20px; block-size: 20px; background: currentColor;
    mask-image: url('/assets/tab-icons.png');
    mask-size: 600% 500%;
    mask-position: var(--icon-x) var(--icon-y);
    mask-repeat: no-repeat;
    forced-color-adjust: none;
  }
  /* Positions select one cell from the six-column, five-row icon sheet. */
  .ui-icon--patients      { --icon-x: 0%;   --icon-y: 0%; }
  .ui-icon--calendar      { --icon-x: 20%;  --icon-y: 0%; }
  .ui-icon--intake-review { --icon-x: 40%;  --icon-y: 0%; }
  .ui-icon--dashboard     { --icon-x: 60%;  --icon-y: 0%; }
  .ui-icon--fitting       { --icon-x: 80%;  --icon-y: 0%; }
  .ui-icon--repeat        { --icon-x: 100%; --icon-y: 0%; }
  .ui-icon--chart         { --icon-x: 0%;   --icon-y: 25%; }
  .ui-icon--shield        { --icon-x: 20%;  --icon-y: 25%; }
  .ui-icon--tooth         { --icon-x: 40%;  --icon-y: 25%; }
  .ui-icon--notes         { --icon-x: 60%;  --icon-y: 25%; }
  .ui-icon--folder        { --icon-x: 80%;  --icon-y: 25%; }
  .ui-icon--appointments  { --icon-x: 100%; --icon-y: 25%; }
  .ui-icon--wallet        { --icon-x: 0%;   --icon-y: 50%; }
  .ui-icon--front-desk    { --icon-x: 20%;  --icon-y: 50%; }
  .ui-icon--day           { --icon-x: 40%;  --icon-y: 50%; }
  .ui-icon--week          { --icon-x: 60%;  --icon-y: 50%; }
  .ui-icon--month         { --icon-x: 80%;  --icon-y: 50%; }
  .ui-icon--range         { --icon-x: 100%; --icon-y: 50%; }
  .ui-icon--queue         { --icon-x: 0%;   --icon-y: 75%; }
  .ui-icon--new-case      { --icon-x: 20%;  --icon-y: 75%; }
  .ui-icon--history       { --icon-x: 40%;  --icon-y: 75%; }
  .ui-icon--office        { --icon-x: 60%;  --icon-y: 75%; }
  .ui-icon--case-details  { --icon-x: 80%;  --icon-y: 75%; }
  .ui-icon--production    { --icon-x: 100%; --icon-y: 75%; }
  .ui-icon--invoice-notes { --icon-x: 0%;   --icon-y: 100%; }
  .ui-icon--card          { --icon-x: 20%;  --icon-y: 100%; }
  .ui-icon--statement     { --icon-x: 40%;  --icon-y: 100%; }
  .ui-icon--adjustments   { --icon-x: 60%;  --icon-y: 100%; }
  .ui-icon--ledger        { --icon-x: 80%;  --icon-y: 100%; }
  .ui-icon--export        { --icon-x: 100%; --icon-y: 100%; }
}

body { background: var(--canvas); color: var(--brand-black); }
.demo-ribbon { background: var(--brand-navy); color: #fff; }
.demo-dot { background: var(--brand-cyan); }
.welcome-panel { background: #f0fbfe; color: var(--brand-navy); }
.welcome-panel:before {
  background: radial-gradient(ellipse at 70% 85%, rgba(40, 207, 249, .16), transparent 45%),
    linear-gradient(145deg, transparent 55%, rgba(104, 154, 222, .08));
}
.eyebrow.light { color: #42758b; }
.welcome-copy h1 em { color: #168bad; }
.welcome-copy p, .welcome-foot { color: #426276; }
.tiny-line { background: var(--brand-blue); }
.welcome-art { border-color: rgba(40, 207, 249, .25); }

.brand-logo { display: block; width: 238px; height: auto; object-fit: contain; }
.welcome-panel .brand-logo { width: 266px; }
.sidebar-brand .brand-logo { width: 172px; }
.mobile-brand .brand-logo { width: 190px; }
.intake-topbar .brand-logo { width: 158px; }

/* The site uses white type on cyan buttons. Use navy type on the same cyan for
   better contrast in this portal UI. */
.button-primary {
  background: var(--brand-cyan);
  color: #07334c;
  box-shadow: 0 5px 12px rgba(40, 207, 249, .20);
}
.button-primary:hover { background: #16bce8; color: #07334c; }
.button-soft { background: #e8f8fc; color: #075b77; }
.button-outline, .button-quiet { color: #075b77; border-color: #cdeaf3; }
.button-outline:hover, .button-quiet:hover { background: #f0fbfe; }
.text-link, .password-label a, .intake-preview-link { color: #08718f; }
.login-heading .eyebrow { color: #08718f; }
.login-card label { color: #294f64; }
.portal-option { color: #617a88; }
.portal-option.selected { background: #e8f8fc; color: #075b77; box-shadow: inset 0 0 0 1px #d1edf4; }
.demo-chip { background: #eaf8fc; color: #075b77; }
.demo-chip .demo-dot { background: #168bad; }
.nav-item:hover { background: #f0fbfd; color: #075b77; }
.nav-item.active { background: #e7f8fc; color: #075b77; }
.nav-item.active .nav-icon, .nav-icon { color: #168bad; }
.nav-count { border-color: #dceff4; color: #617a88; }
.help-card, .settings-callout { background: #f3fbfd; border-color: #e3f1f5; }
.help-icon, .stat-icon, .treatment-icon, .photo-upload-icon, .complete-mark {
  background: #e4f7fc;
  color: #08718f;
}
.tag { background: #e3f6fb; color: #096c88; }
.mini-avatar { background: #e4f7fc; color: #168bad; }
.file-icon { background: #eef8fb; color: #168bad; }
.status { background: #e8f8fc; color: #0b718c; }
.status:before { background: #28a9ca; }
.status.pending { background: #edf3fc; color: #52729b; }
.status.pending:before { background: var(--brand-blue); }
.patient-header {
  background: linear-gradient(115deg, #e9f8fc 0%, #f8fcfe 68%);
  border-color: #dceff4;
}
.patient-photo { background: #dff3f9; color: #4c91a7; }
.balance-hero { background: var(--brand-navy); }
.balance-hero:after { border-color: #ffffff2b; }
.balance-hero .stat-value { color: #fff; }
.progress-fill { background: #28b9dd; }
.treatment-card h3, .table .amount { color: #075b77; }
.treatment-icon { color: #08718f; }

.intake-layout { background: var(--canvas); }
.intake-card { border-color: #e1edf1; box-shadow: 0 12px 38px rgba(24, 65, 82, .07); }
.intake-progress .eyebrow, .page-eyebrow { color: #08718f; }
.intake-grid input:focus, .login-card input:focus, .modal input:focus, .modal textarea:focus {
  border-color: #28b9dd;
  box-shadow: 0 0 0 3px #e4f7fc;
}
.intake-grid label, .photo-upload-copy strong, .modal label { color: #294f64; }
.photo-upload { border-color: #bde7f1; background: #f7fcfd; }
.photo-upload-icon { background: #e4f7fc; color: #08718f; }
.photo-lock { color: #168bad; }
.required-label { background: #eef3fc; color: #526f96; }
.patient-banner, .card { border-color: #e1edf1; }
.notice { border-color: #e3eff3; background: #f7fbfd; }
.notice-symbol, .lock-icon { color: #08718f; }
.date-tile { border-color: #e1edf1; }
.complete-mark { background: #e4f7fc; color: #08718f; }
.intake-complete .eyebrow, .stat-foot.good { color: #08718f; }

@media (max-width: 760px) {
  .welcome-panel .brand-logo { width: 200px; }
  .sidebar-brand .brand-logo { width: 136px; }
  .mobile-brand .brand-logo { width: 178px; }
}

@media screen {
  body:has(> .demo-ribbon) {
    --font: var(--ui-font);
    --head: var(--ui-font);
    --ink: var(--ui-navy);
    --line: var(--ui-line);
    --canvas: var(--ui-canvas);
    font-family: var(--ui-font);
  }
  .demo-ribbon ~ .login-layout .welcome-panel {
    background: radial-gradient(ellipse at right bottom, #31767a, #18384c 62%, #102637);
    color: #fff;
  }
  .welcome-panel .brand-logo { padding: 7px 12px; background: #fff; border-radius: 9px; }
  .welcome-copy h1 { font: 400 clamp(44px, 6vw, 84px)/1 var(--ui-display); letter-spacing: -.05em; }
  .welcome-copy h1 em { color: #afe0d8; }
  .welcome-panel :is(.eyebrow.light, .welcome-copy p, .welcome-foot) { color: #d9eeec; }
  .login-side { background: #eef2f0; }
  .login-layout .login-card, .app-shell .card, .intake-layout .intake-card { border-radius: var(--ui-radius); border-color: var(--ui-line); box-shadow: var(--ui-shadow); }
  .login-layout .login-heading h2 { color: var(--ui-navy); font-size: clamp(23px, 2.5vw, 32px); }
  .demo-ribbon ~ main .button { border-radius: 8px; }
  .demo-ribbon ~ main .button-primary { background: var(--ui-action); color: #fff; box-shadow: none; }
  .demo-ribbon ~ main .button-primary:hover { background: var(--ui-action-hover); color: #fff; }
  .app-shell .nav-item.active { background: var(--ui-tint); }
  .app-shell .balance-hero { background: #193a4c; }
}
