/* ============ TOKENS — tema claro (estado base, sem stamp) ============ */
  :root {
    --ground: #EEF3F2;
    --surface: #FFFFFF;
    --surface-2: #F6F9F8;
    --surface-3: #E8EFEE;
    --line: #D3DEDC;
    --line-soft: #E4ECEA;
    --ink: #0E1A1C;
    --ink-2: #40514F;
    --ink-3: #6C7F7C;

    --brand: #0F6F6C;
    --brand-strong: #0A514F;
    --brand-soft: #DCECEA;
    --brand-ink: #FFFFFF;

    --rail: #0C2A2C;
    --rail-ink: #BDD3D0;
    --rail-ink-strong: #FFFFFF;
    --rail-active: #14413F;

    --ok: #1E8E5A;
    --ok-soft: #DDF0E6;
    --warn: #B27A16;
    --warn-soft: #F8EDD5;
    --crit: #BF4A3F;
    --crit-soft: #F8E3E0;
    --info: #3E63A8;
    --info-soft: #E0E8F6;

    --shadow-lg: 0 24px 60px -28px rgba(9, 32, 33, .45);
    --shadow-sm: 0 1px 2px rgba(9, 32, 33, .07);

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    --sans: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ground: #08110F;
      --surface: #10201E;
      --surface-2: #142825;
      --surface-3: #1B322E;
      --line: #24413C;
      --line-soft: #1B322E;
      --ink: #E8F1EF;
      --ink-2: #B2C6C2;
      --ink-3: #7E958F;

      --brand: #3FB0A6;
      --brand-strong: #67C9BF;
      --brand-soft: #123230;
      --brand-ink: #04211F;

      --rail: #0B1B1A;
      --rail-ink: #91A9A5;
      --rail-ink-strong: #EAF4F2;
      --rail-active: #163430;

      --ok: #56C08A;
      --ok-soft: #10301F;
      --warn: #DCA43F;
      --warn-soft: #33270D;
      --crit: #E37A6D;
      --crit-soft: #351A17;
      --info: #7FA1E0;
      --info-soft: #16233B;

      --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, .8);
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    }
  }

  :root[data-theme="dark"] {
    --ground: #08110F;
    --surface: #10201E;
    --surface-2: #142825;
    --surface-3: #1B322E;
    --line: #24413C;
    --line-soft: #1B322E;
    --ink: #E8F1EF;
    --ink-2: #B2C6C2;
    --ink-3: #7E958F;

    --brand: #3FB0A6;
    --brand-strong: #67C9BF;
    --brand-soft: #123230;
    --brand-ink: #04211F;

    --rail: #0B1B1A;
    --rail-ink: #91A9A5;
    --rail-ink-strong: #EAF4F2;
    --rail-active: #163430;

    --ok: #56C08A;
    --ok-soft: #10301F;
    --warn: #DCA43F;
    --warn-soft: #33270D;
    --crit: #E37A6D;
    --crit-soft: #351A17;
    --info: #7FA1E0;
    --info-soft: #16233B;

    --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, .8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }

  /* ============ BASE ============ */
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, h4 { text-wrap: balance; margin: 0; line-height: 1.2; }
  p { margin: 0; }
  button { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

  .wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  /* ============ CABEÇALHO DA PÁGINA ============ */
  .intro { display: flex; flex-direction: column; gap: 14px; max-width: 68ch; }
  .eyebrow {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .intro h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.02em; }
  .intro h1 .mark { font-family: var(--serif); font-style: italic; color: var(--brand); }
  .lede { color: var(--ink-2); font-size: 17px; }
  .tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
  .tag {
    font-size: 12.5px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
  }

  /* ============ JANELA FALSA ============ */
  .frame {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }
  .chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
  }
  .dots { display: flex; gap: 6px; }
  .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
  .urlbar {
    flex: 1;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 4px 12px;
    text-align: center;
  }

  /* ============ SHELL DO APP ============ */
  .app { display: grid; grid-template-columns: 216px 1fr; min-height: 720px; }
  .rail {
    background: var(--rail);
    color: var(--rail-ink);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .brandmark { display: flex; align-items: center; gap: 9px; padding: 0 8px; }
  .brandmark .glyph {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--brand);
    display: grid; place-items: center;
    color: var(--brand-ink);
    font-family: var(--serif); font-size: 17px; font-weight: 700;
  }
  .brandmark .name {
    font-family: var(--serif);
    font-size: 19px;
    letter-spacing: .01em;
    color: var(--rail-ink-strong);
  }
  .navgroup { display: flex; flex-direction: column; gap: 2px; }
  .navlabel {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rail-ink);
    opacity: .6;
    padding: 0 10px 6px;
  }
  .navitem {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    background: none; border: 0;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    text-align: left;
    font-size: 14px;
    color: var(--rail-ink);
    cursor: pointer;
  }
  .navitem:hover { background: var(--rail-active); color: var(--rail-ink-strong); }
  .navitem[aria-current="true"] { background: var(--rail-active); color: var(--rail-ink-strong); font-weight: 600; }
  .navitem svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .navitem .badge {
    margin-left: auto;
    font-family: var(--mono); font-size: 10.5px;
    background: var(--brand); color: var(--brand-ink);
    border-radius: 999px; padding: 1px 6px;
  }
  .railfoot { margin-top: auto; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--rail-ink); }

  .main { display: flex; flex-direction: column; min-width: 0; background: var(--surface-2); }
  .topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .unit {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 5px 10px; font-size: 13px; background: var(--surface-2);
  }
  .unit b { font-weight: 600; }
  .search {
    flex: 1; max-width: 380px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 6px 10px; font-size: 13px; color: var(--ink-3);
    background: var(--surface-2);
  }
  .topactions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .btn {
    border: 1px solid var(--line); background: var(--surface);
    border-radius: var(--r-sm); padding: 6px 12px; font-size: 13px; cursor: pointer;
  }
  .btn:hover { background: var(--surface-3); }
  .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
  .btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
  .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
  }

  .canvas { padding: 22px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
  .screen[hidden] { display: none; }
  .screen { display: flex; flex-direction: column; gap: 18px; }
  .screenhead { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
  .screenhead h2 { font-size: 21px; letter-spacing: -.01em; }
  .screenhead .sub { color: var(--ink-3); font-size: 13px; }
  .screenhead .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
  }
  .card > header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
    display: flex; align-items: center; gap: 10px;
  }
  .card > header h3 { font-size: 14px; font-weight: 650; }
  .card > header .meta { margin-left: auto; font-size: 12px; color: var(--ink-3); }
  .card .body { padding: 16px; }

  .grid { display: grid; gap: 14px; }
  .g4 { grid-template-columns: repeat(4, 1fr); }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }

  /* KPI */
  .kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
  .kpi .label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
  .kpi .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .kpi .delta { font-size: 12px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
  .delta.up { color: var(--ok); }
  .delta.down { color: var(--crit); }
  .kpi svg { margin-top: 2px; }

  .pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600;
    padding: 2px 8px; border-radius: 999px;
    white-space: nowrap;
  }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.ok { background: var(--ok-soft); color: var(--ok); }
  .pill.warn { background: var(--warn-soft); color: var(--warn); }
  .pill.crit { background: var(--crit-soft); color: var(--crit); }
  .pill.info { background: var(--info-soft); color: var(--info); }
  .pill.mute { background: var(--surface-3); color: var(--ink-3); }
  .pill.brand { background: var(--brand-soft); color: var(--brand); }

  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th {
    text-align: left; font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600; padding: 8px 16px; border-bottom: 1px solid var(--line-soft);
  }
  td { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
  tr:last-child td { border-bottom: 0; }
  .num { text-align: right; font-variant-numeric: tabular-nums; }
  .scroller { overflow-x: auto; }

  /* AGENDA */
  .agenda { display: grid; grid-template-columns: 62px repeat(4, 1fr); }
  .agenda .colhead {
    padding: 10px 12px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft);
    background: var(--surface-2);
  }
  .agenda .colhead .who { font-size: 13px; font-weight: 650; }
  .agenda .colhead .spec { font-size: 11.5px; color: var(--ink-3); }
  .agenda .corner { border-bottom: 1px solid var(--line); background: var(--surface-2); }
  .slots { display: grid; grid-auto-rows: 46px; }
  .hourcol .h {
    font-family: var(--mono); font-size: 11px; color: var(--ink-3);
    padding: 4px 8px; text-align: right; border-bottom: 1px dashed var(--line-soft);
  }
  .lane { border-left: 1px solid var(--line-soft); position: relative; }
  .lane .slotline { border-bottom: 1px dashed var(--line-soft); }
  .appt {
    position: absolute; left: 4px; right: 4px;
    border-radius: var(--r-sm);
    padding: 5px 8px 5px 10px;
    font-size: 12px; line-height: 1.3;
    background: var(--surface-3);
    border: 1px solid var(--line);
    overflow: hidden;
    cursor: pointer;
  }
  .appt::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink-3);
  }
  .appt b { font-weight: 650; display: block; }
  .appt span { color: var(--ink-3); font-size: 11px; }
  .appt.s-conf { background: var(--ok-soft); border-color: transparent; }
  .appt.s-conf::before { background: var(--ok); }
  .appt.s-wait { background: var(--info-soft); border-color: transparent; }
  .appt.s-wait::before { background: var(--info); }
  .appt.s-hold { background: var(--warn-soft); border-color: transparent; }
  .appt.s-hold::before { background: var(--warn); }
  .appt.s-miss { background: var(--crit-soft); border-color: transparent; }
  .appt.s-miss::before { background: var(--crit); }
  .appt.s-free {
    background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface-3) 6px 12px);
    border: 1px dashed var(--line); color: var(--ink-3);
  }
  .appt.s-free::before { background: transparent; }
  .legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); padding: 10px 16px; }
  .legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }

  /* PRONTUÁRIO */
  .patienthead { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
  .patienthead .pic {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-weight: 700;
  }
  .patienthead .who h3 { font-size: 17px; }
  .patienthead .who .meta { font-size: 12.5px; color: var(--ink-3); }
  .patienthead .stats { margin-left: auto; display: flex; gap: 22px; }
  .patienthead .stats div { text-align: right; }
  .patienthead .stats .k { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
  .patienthead .stats .v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

  .tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
  .tab {
    border: 0; background: none; padding: 10px 12px; font-size: 13px; color: var(--ink-3);
    border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  }
  .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }

  .odonto { display: flex; flex-direction: column; gap: 10px; align-items: center; }
  .arch { display: flex; flex-direction: column; gap: 4px; align-items: center; }
  .archrow { display: flex; gap: 3px; }
  .quadgap { width: 14px; }
  .tooth { cursor: pointer; }
  .tooth .num { font-family: var(--mono); font-size: 8px; fill: var(--ink-3); }
  .tooth rect.face { fill: var(--surface-2); stroke: var(--line); stroke-width: .8; }
  .tooth.sel rect.face { stroke: var(--brand); stroke-width: 1.6; }
  .tooth rect.f-carie { fill: var(--crit); }
  .tooth rect.f-rest { fill: var(--info); }
  .tooth rect.f-plan { fill: var(--warn); }
  .tooth.absent rect.face { fill: var(--surface-3); stroke-dasharray: 2 2; }
  .tooth.absent .x { stroke: var(--ink-3); stroke-width: 1.2; }

  .toothinfo { display: flex; flex-direction: column; gap: 10px; }
  .kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
  .kv .k { color: var(--ink-3); }
  .kv .v { font-weight: 600; }

  .timeline { display: flex; flex-direction: column; }
  .tl {
    display: grid; grid-template-columns: 76px 1fr; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  }
  .tl .when { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
  .tl .what b { font-size: 13.5px; }
  .tl .what p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
  .tl .what .by { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

  .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .thumb {
    aspect-ratio: 4 / 3; border-radius: var(--r-sm); border: 1px solid var(--line);
    background: var(--surface-3);
    display: flex; align-items: flex-end; padding: 6px; font-size: 11px; color: var(--ink-3);
    background-image: radial-gradient(circle at 50% 40%, var(--surface-2), var(--surface-3));
  }

  /* ORÇAMENTO */
  .doc { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
  .totals { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
  .totals .row { display: flex; justify-content: space-between; font-size: 13.5px; }
  .totals .row.big { font-size: 19px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
  .payopts { display: flex; flex-direction: column; gap: 8px; }
  .payopt {
    border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
    display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; background: var(--surface);
  }
  .payopt.sel { border-color: var(--brand); background: var(--brand-soft); }
  .payopt .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
  .payopt.sel .dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 2px var(--surface); }
  .payopt .r { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

  /* FINANCEIRO */
  .bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 16px; }
  .bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%; }
  .bars .b .stack { display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; height: 100%; }
  .bars .b .in { background: var(--brand); border-radius: 3px 3px 0 0; }
  .bars .b .out { background: var(--surface-3); border: 1px solid var(--line); border-radius: 0 0 3px 3px; }
  .bars .b .lbl { font-family: var(--mono); font-size: 10px; color: var(--ink-3); text-align: center; }

  .ruler { display: flex; flex-direction: column; gap: 0; padding: 4px 0; }
  .step { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; }
  .step .node {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--mono); font-size: 10.5px; font-weight: 700;
    background: var(--brand-soft); color: var(--brand); position: relative;
  }
  .step:not(:last-child) .node::after {
    content: ""; position: absolute; top: 24px; left: 50%; width: 1px; height: 22px;
    background: var(--line); transform: translateX(-50%);
  }
  .step .t { font-size: 13px; }
  .step .t small { display: block; color: var(--ink-3); font-size: 11.5px; }

  /* CRM */
  .kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .col { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
  .col > h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); display: flex; justify-content: space-between; }
  .lead {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 9px 10px; display: flex; flex-direction: column; gap: 5px;
  }
  .lead b { font-size: 13px; }
  .lead .src { font-size: 11.5px; color: var(--ink-3); }
  .lead .val { font-size: 12.5px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brand); }

  /* AGENTE */
  .chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface-2); min-height: 340px; }
  .msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
  .msg.them { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
  .msg.us { background: var(--brand-soft); color: var(--ink); border-top-right-radius: 4px; align-self: flex-end; }
  .msg .time { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-top: 4px; }
  .msg .sysnote { display: block; margin-top: 6px; font-size: 11.5px; color: var(--brand); font-weight: 600; }
  .autolist { display: flex; flex-direction: column; }
  .auto { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
  .auto:last-child { border-bottom: 0; }
  .auto .t b { display: block; font-size: 13px; }
  .auto .t small { color: var(--ink-3); font-size: 11.5px; }
  .switch { margin-left: auto; width: 34px; height: 19px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
  .switch::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); top: 2px; left: 2px; transition: left .15s; }
  .switch.on { background: var(--brand); }
  .switch.on::after { left: 17px; }

  /* METAS */
  .goal { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
  .goal:last-child { border-bottom: 0; }
  .goal .top { display: flex; justify-content: space-between; font-size: 13px; }
  .goal .top b { font-variant-numeric: tabular-nums; }
  .track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
  .track i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
  .track i.warn { background: var(--warn); }
  .track i.crit { background: var(--crit); }

  /* ============ SEÇÕES FORA DO APP ============ */
  .section { display: flex; flex-direction: column; gap: 16px; }
  .section > h2 { font-size: 24px; letter-spacing: -.015em; }
  .section > .sublede { color: var(--ink-2); max-width: 70ch; }
  .maptable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
  .maptable table td:first-child { font-weight: 600; width: 25%; }
  .maptable table td:nth-child(2) { color: var(--ink-2); }
  .notecards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
  .note h4 { font-size: 14px; }
  .note p, .note li { font-size: 13.5px; color: var(--ink-2); }
  .note ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
  footer.pagefoot { color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px; }

  @media (max-width: 1080px) {
    .g4 { grid-template-columns: repeat(2, 1fr); }
    .split, .doc { grid-template-columns: 1fr; }
    .kanban { grid-template-columns: repeat(2, 1fr); }
    .notecards { grid-template-columns: 1fr; }
  }
  @media (max-width: 780px) {
    .app { grid-template-columns: 1fr; }
    .rail { flex-direction: row; overflow-x: auto; align-items: center; gap: 10px; }
    .rail .navgroup { flex-direction: row; }
    .navlabel, .railfoot { display: none; }
    .g4, .g3, .g2 { grid-template-columns: 1fr; }
    .agenda { min-width: 640px; }
    .agendawrap { overflow-x: auto; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }

/* ============ AJUSTES DO SITE (login + app em tela cheia) ============ */
html, body { height: 100%; }
body.app-body { overflow: hidden; }
body.app-body .app { min-height: 100vh; height: 100vh; }
body.app-body .main { overflow: hidden; }
body.app-body .canvas { overflow-y: auto; flex: 1; }
body.app-body .rail { height: 100vh; overflow-y: auto; }

/* ---- tela de login ---- */
body.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% -10%, var(--brand-soft), transparent 60%),
    var(--ground);
}
.login {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.login .brandline { display: flex; align-items: center; gap: 11px; }
.login .brandline .glyph {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 23px; font-weight: 700;
}
.login .brandline .name { font-family: var(--serif); font-size: 27px; letter-spacing: .01em; }
.login .brandline .sub { font-size: 12.5px; color: var(--ink-3); }
.login form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login h1 { font-size: 20px; letter-spacing: -.01em; }
.login .field { display: flex; flex-direction: column; gap: 6px; }
.login label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.login input {
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.login input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.login .btn.primary { padding: 11px; font-size: 15px; border-radius: var(--r-sm); }
.login .err {
  display: none;
  font-size: 13px;
  color: var(--crit);
  background: var(--crit-soft);
  border-radius: var(--r-sm);
  padding: 9px 11px;
}
.login .err.show { display: block; }
.login .hint {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  line-height: 1.5;
}
.login .hint b { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.login .foot { font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---- tela "Sobre" dentro do app ---- */
.about { display: flex; flex-direction: column; gap: 26px; }
.about .section > h2 { font-size: 20px; }
