﻿:root {
      --bg: #0b0d11;
      --panel: #111318;
      --panel-2: #151922;
      --panel-3: #0f1218;
      --line: #242a35;
      --line-soft: #1b2029;
      --text: #eef2f6;
      --muted: #8b95a5;
      --muted-2: #667085;
      --green: #00e5a0;
      --green-2: #4df0bd;
      --green-soft: rgba(0, 229, 160, .12);
      --yellow: #f6c744;
      --red: #ff6b6b;
      --blue: #7bb7ff;
      --radius: 12px;
      --radius-sm: 8px;
      --shadow: 0 24px 80px rgba(0, 0, 0, .34);
      --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    /* Acesso ao relatório e ações de conta */
    .logout-button {
      border-color: rgba(239, 68, 68, .42);
      color: #ff6b6b;
    }
    .logout-button:hover {
      border-color: #ef4444;
      background: rgba(239, 68, 68, .12);
      color: #ff8585;
    }
    .nav-upgrade-label {
      margin-left: auto;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--yellow);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
    }
    .nav-btn.active .nav-upgrade-label {
      background: transparent !important;
      color: var(--yellow) !important;
    }
    body.sidebar-collapsed .nav-upgrade-label { display: none; }
    #page-report { position: relative; }
    #page-report.report-locked {
      min-height: min(760px, calc(100vh - 100px));
      isolation: isolate;
    }
    #page-report.report-locked > :not(.report-access-gate) {
      filter: blur(7px);
      opacity: .42;
      pointer-events: none;
      user-select: none;
    }
    .report-access-gate {
      position: absolute;
      inset: 0;
      z-index: 8;
      display: grid;
      place-items: start center;
      padding: clamp(74px, 11vh, 130px) 18px 40px;
      background: linear-gradient(180deg, rgba(11, 13, 17, .18), rgba(11, 13, 17, .52));
    }
    .report-access-gate-card {
      position: relative;
      width: min(520px, 100%);
      padding: clamp(24px, 4vw, 38px);
      border: 1px solid rgba(0, 229, 160, .28);
      border-radius: 18px;
      background: rgba(17, 19, 24, .96);
      box-shadow: 0 28px 90px rgba(0, 0, 0, .5);
      text-align: center;
      backdrop-filter: blur(18px);
    }
    .report-access-close {
      position: absolute;
      top: 12px;
      right: 12px;
      display: grid;
      place-items: center;
      width: 36px;
      height: 36px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
      color: var(--muted);
      font-size: 23px;
      line-height: 1;
    }
    .report-access-close:hover { border-color: var(--muted-2); color: var(--text); }
    .report-access-icon {
      display: grid;
      place-items: center;
      width: 54px;
      height: 54px;
      margin: 0 auto 18px;
      border: 1px solid rgba(0, 229, 160, .28);
      border-radius: 14px;
      background: var(--green-soft);
      color: var(--green-2);
      font-size: 26px;
      font-weight: 800;
    }
    .report-access-gate-card h2 {
      margin: 8px 0 10px;
      font-size: clamp(25px, 4vw, 34px);
      letter-spacing: -.04em;
    }
    .report-access-gate-card p {
      margin: 0 auto 22px;
      color: var(--muted);
      line-height: 1.6;
    }
    .report-upgrade-benefits {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 7px;
      margin: -5px 0 22px;
    }
    .report-upgrade-benefits span {
      padding: 6px 9px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-3);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .report-access-actions {
      display: grid;
      grid-template-columns: .82fr 1.18fr;
      gap: 9px;
    }
    .report-access-actions .btn {
      width: 100%;
      min-width: 0;
      padding-inline: 10px;
    }
    .report-access-gate-card small {
      display: block;
      margin-top: 12px;
      color: var(--muted-2);
      line-height: 1.45;
    }
    .report-access-gate-card.is-requested {
      border-color: rgba(123, 183, 255, .32);
    }
    .report-access-gate-card.is-requested .report-access-icon {
      border-color: rgba(123, 183, 255, .28);
      background: rgba(123, 183, 255, .1);
      color: var(--blue);
    }
    .report-access-gate-card.is-previewing {
      width: min(840px, 100%);
      text-align: left;
    }
    .report-inline-preview > p {
      max-width: 680px;
      margin: 8px 0 20px;
    }
    .report-inline-preview h2 {
      max-width: 690px;
      margin-top: 8px;
    }
    .report-preview-back {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 34px;
      margin: 0 0 18px;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }
    .report-preview-back:hover { color: var(--green-2); }
    .report-preview-summary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 10px;
    }
    .report-preview-summary > div {
      display: grid;
      gap: 4px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
    }
    .report-preview-summary span {
      color: var(--muted-2);
      font-size: 9px;
      font-weight: 750;
      letter-spacing: .07em;
      text-transform: uppercase;
    }
    .report-preview-summary strong { font-size: 18px; }
    .report-preview-outcomes {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      margin: 0 0 18px;
    }
    .report-preview-outcomes span {
      padding: 11px 12px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
    }
    .report-preview-outcomes strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 12px; }
    .report-inline-preview > .btn-primary {
      width: auto;
      min-width: 250px;
    }
    .admin-report-access-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }
    .admin-report-access-card h3 { margin: 6px 0; }
    .admin-report-access-card p { max-width: 690px; }
    .admin-report-access-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex: 0 0 auto;
    }
    .report-preview-modal { width: min(720px, 100%); }
    .report-upgrade-form-modal { width: min(620px, 100%); }
    .report-denial-modal { width: min(560px, 100%); }
    .report-preview-modal > p,
    .report-upgrade-form-modal > p,
    .report-denial-modal > p {
      margin-bottom: 20px;
    }
    .report-preview-chart {
      display: flex;
      align-items: end;
      gap: clamp(5px, 1.3vw, 12px);
      min-height: 230px;
      padding: 24px 20px 18px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 14px;
      background:
        repeating-linear-gradient(to top, transparent 0 45px, var(--line-soft) 46px),
        var(--panel-3);
    }
    .report-preview-bar {
      display: grid;
      align-content: end;
      justify-items: center;
      gap: 7px;
      flex: 1 1 0;
      height: 185px;
      min-width: 0;
    }
    .report-preview-bar i {
      display: block;
      width: min(30px, 80%);
      height: var(--preview-height);
      min-height: 12px;
      border-radius: 6px 6px 2px 2px;
      background: linear-gradient(180deg, var(--green), rgba(0, 229, 160, .3));
      box-shadow: 0 8px 24px rgba(0, 229, 160, .12);
    }
    .report-preview-bar span {
      max-width: 100%;
      overflow: hidden;
      color: var(--muted-2);
      font-size: 9px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .report-preview-value {
      display: grid;
      gap: 4px;
      margin: 14px 0 18px;
      padding: 14px;
      border-left: 2px solid var(--green);
      background: var(--panel-3);
    }
    .report-preview-value span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
    .report-preview-value strong { font-size: 14px; line-height: 1.5; }
    .optional-label {
      color: var(--muted-2);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0;
      text-transform: none;
    }
    .request-thread-empty {
      border-color: var(--line);
      background: var(--panel-3);
      color: var(--muted);
    }
    html[data-theme="light"] .request-thread-empty {
      border-color: #d8e1e8;
      background: #f4f7f9;
      color: #596675;
    }
    .client-ticket-priority {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 0 8px;
      border: 1px solid rgba(126, 143, 164, .3);
      border-radius: 7px;
      background: rgba(126, 143, 164, .1);
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
    }
    .client-ticket-priority.priority-alta {
      border-color: rgba(246, 199, 68, .38);
      background: rgba(246, 199, 68, .13);
      color: #ffdb74;
    }
    .client-ticket-priority.priority-urgente {
      border-color: rgba(255, 107, 107, .48);
      background: rgba(255, 107, 107, .16);
      color: #ffc2c2;
    }
    html[data-theme="light"] .client-ticket-priority.priority-normal {
      border-color: #cbd5df;
      background: #eef2f5;
      color: #536171;
    }
    html[data-theme="light"] .client-ticket-priority.priority-alta {
      border-color: #d9a51f;
      background: #fff5cf;
      color: #7a5600;
    }
    html[data-theme="light"] .client-ticket-priority.priority-urgente {
      border-color: #dc6666;
      background: #ffe5e5;
      color: #a52c2c;
    }
    html[data-theme="light"] .report-access-gate {
      background: linear-gradient(180deg, rgba(244, 247, 249, .18), rgba(244, 247, 249, .62));
    }
    html[data-theme="light"] .report-access-gate-card {
      background: rgba(255, 255, 255, .96);
      box-shadow: 0 28px 70px rgba(38, 55, 70, .18);
    }
    @media (max-width: 680px) {
      .topbar-account.client-only {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      }
      .topbar-account-btn.logout-button { padding-inline: 7px; }
      .nav-upgrade-label {
        display: none;
      }
      .admin-report-access-card {
        align-items: flex-start;
        flex-direction: column;
      }
      .admin-report-access-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
      }
      .admin-report-access-actions .btn { width: 100%; }
      .report-access-gate { padding-top: 48px; }
      .report-access-actions { grid-template-columns: 1fr; }
      .report-preview-summary,
      .report-preview-outcomes { grid-template-columns: 1fr; }
      .report-inline-preview > .btn-primary { width: 100%; min-width: 0; }
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      min-height: 100vh;
      background:
        radial-gradient(circle at top right, rgba(0,229,160,.12), transparent 34vw),
        radial-gradient(circle at left 45%, rgba(123,183,255,.06), transparent 34vw),
        var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      -webkit-font-smoothing: antialiased;
    }
    button, input, textarea, select { font: inherit; }
    button { cursor: pointer; }
    a { color: inherit; text-decoration: none; }
    .hidden { display: none !important; }
    .admin-only { display: none !important; }
    .client-only { display: initial !important; }
    body.admin-mode .client-only { display: none !important; }
    body.admin-mode .admin-only { display: block !important; }
    body.admin-mode .nav-label.admin-only { display: none !important; }
    body.admin-mode .nav-btn.admin-only { display: flex !important; }
    body.admin-mode .btn.admin-only { display: inline-flex !important; }
    body.admin-mode .topbar-account-btn.admin-only { display: inline-flex !important; }
    body.admin-mode .admin-only.grid { display: grid !important; }
    .nav-label.client-only { display: none !important; }
    .nav-btn.client-only { display: flex !important; }
    .btn.client-only { display: inline-flex !important; }
    body.admin-mode .nav-btn.client-only,
    body.admin-mode .btn.client-only { display: none !important; }
    body.admin-mode .client-contract-field { display: none; }

    .portal-boot {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 28px;
      background: var(--bg);
      color: var(--muted);
      opacity: 1;
      visibility: visible;
      transition: opacity .5s ease, visibility .5s ease;
    }
    .portal-boot.is-finished {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    .portal-boot-logo {
      display: block;
      width: clamp(104px, 24vw, 132px);
      height: clamp(104px, 24vw, 132px);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: clamp(24px, 6vw, 32px);
      object-fit: cover;
      box-shadow: 0 28px 72px rgba(0, 0, 0, .42);
      opacity: 0;
      animation: portalBootFadeIn .65s ease .12s forwards;
    }
    .portal-boot-bar {
      width: min(200px, 55vw);
      height: 2px;
      overflow: hidden;
      border-radius: 2px;
      background: var(--line);
      opacity: 0;
      animation: portalBootFadeIn .35s ease .45s forwards;
    }
    .portal-boot-bar-fill {
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--blue), var(--green));
      animation: portalBootLoad 2.2s cubic-bezier(.22, .8, .28, 1) .55s forwards;
    }
    .portal-boot.is-finished .portal-boot-bar-fill {
      width: 100%;
      animation: none;
      transition: width .22s ease;
    }
    .portal-boot-label {
      margin-top: -14px;
      font-size: 12px;
      letter-spacing: .08em;
      opacity: 0;
      animation: portalBootFadeIn .35s ease .62s forwards;
    }
    @keyframes portalBootFadeIn { to { opacity: 1; } }
    @keyframes portalBootLoad { to { width: 88%; } }
    .portal-booting .login-view,
    .portal-booting .portal-view { visibility: hidden; }
    html[data-display-mode="standalone"] .portal-boot-logo,
    html[data-display-mode="standalone"] .portal-boot-bar,
    html[data-display-mode="standalone"] .portal-boot-label { display: none; }

    .brand {
      font-family: var(--font-display);
      font-weight: 800;
      letter-spacing: -.04em;
    }
    .brand span { color: var(--green); }

    .login-view {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 72px 24px 32px;
      position: relative;
      overflow: hidden;
    }
    .login-view::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
      background-size: 52px 52px;
      mask-image: linear-gradient(to bottom, #000, transparent 82%);
    }
    .login-shell {
      width: min(1120px, 100%);
      display: grid;
      grid-template-columns: minmax(0, 1fr) 390px;
      gap: 18px;
      position: relative;
      z-index: 1;
    }
    .login-story,
    .login-card {
      background: linear-gradient(180deg, rgba(21,25,34,.92), rgba(15,18,24,.94));
      border: 1px solid var(--line);
      border-radius: 26px;
      box-shadow: var(--shadow);
    }
    .login-story {
      padding: 36px;
      min-height: 390px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      overflow: hidden;
      position: relative;
    }
    .login-story::after {
      content: "";
      position: absolute;
      width: 340px;
      height: 340px;
      right: -140px;
      bottom: -130px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(0,229,160,.18), transparent 68%);
    }
    .login-logo { font-size: 28px; }
    .login-kicker {
      color: var(--green);
      text-transform: uppercase;
      letter-spacing: .16em;
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 14px;
    }
    .login-story h1 {
      font-family: var(--font-display);
      font-size: clamp(36px, 4.2vw, 54px);
      line-height: 1;
      letter-spacing: -.06em;
      max-width: 560px;
      margin-bottom: 18px;
    }
    .login-story p {
      max-width: 560px;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.65;
    }
    .login-mobile-description {
      display: none;
    }
    .login-solutions-label {
      margin-top: 23px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .14em;
      text-transform: uppercase;
    }
    .login-proof {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 9px;
      position: relative;
      z-index: 1;
    }
    .proof-card {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      border-radius: 16px;
      padding: 15px;
      min-width: 0;
      color: inherit;
      font: inherit;
      text-align: left;
      cursor: pointer;
      transition: transform .18s ease, border-color .18s ease, background .18s ease;
    }
    .proof-card:hover,
    .proof-card:focus-visible {
      transform: translateY(-3px);
      border-color: rgba(0, 229, 160, .42);
      background: rgba(0, 229, 160, .06);
      outline: none;
    }
    .proof-card strong {
      display: block;
      font-family: var(--font-display);
      font-size: 17px;
      color: var(--text);
      line-height: 1.15;
      margin-bottom: 8px;
      letter-spacing: -.03em;
      overflow-wrap: anywhere;
    }
    .proof-card small {
      display: block;
      margin-bottom: 9px;
      color: var(--green-2);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .12em;
      line-height: 1.2;
      text-transform: uppercase;
    }
    .proof-card span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }
    .proof-card > b {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 15px;
      color: var(--green-2);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .03em;
    }
    .proof-card > b span {
      color: inherit;
      font-size: 16px;
      transition: transform .18s ease;
    }
    .proof-card:hover > b span { transform: translateX(3px); }
    .login-access-context {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      margin-top: 12px;
      color: var(--muted);
    }
    .login-access-context > span {
      display: grid;
      place-items: center;
      flex: 0 0 24px;
      width: 24px;
      height: 24px;
      border: 1px solid var(--line-soft);
      border-radius: 8px;
      color: var(--green-2);
      font-size: 11px;
    }
    .login-access-context p {
      margin: 0;
      font-size: 11px;
      line-height: 1.45;
    }
    .login-access-context strong { color: var(--text); }
    .login-how-we-work {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin-top: 5px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--green-2);
      font-size: 10px;
      font-weight: 800;
      line-height: 1.4;
      text-align: left;
    }
    .login-how-we-work:hover,
    .login-how-we-work:focus-visible { text-decoration: underline; }
    .login-how-we-work span { color: inherit; font-size: 13px; }
    .login-card {
      position: relative;
      padding: 32px;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .login-page-back {
      position: absolute;
      top: 22px;
      left: 24px;
      z-index: 3;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 0 10px;
      border: 1px solid var(--line-soft);
      border-radius: 8px;
      background: var(--panel);
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
      backdrop-filter: blur(10px);
    }
    .login-page-back:hover { border-color: var(--line); color: var(--green-2); }
    .login-page-back span { font-size: 17px; }
    .login-card h2 {
      font-family: var(--font-display);
      font-size: 28px;
      letter-spacing: -.04em;
      margin: 0 0 8px;
    }
    .login-access-label {
      display: block;
      margin-bottom: 10px;
      color: var(--green-2);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .14em;
      text-transform: uppercase;
    }
    .login-card p {
      color: var(--muted);
      line-height: 1.65;
      margin-bottom: 28px;
    }
    .field { margin-bottom: 16px; }
    .field label {
      display: block;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 8px;
    }
    .field input,
    .field textarea,
    .field select {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      background: #0b0d11;
      color: var(--text);
      border-radius: 12px;
      outline: 0;
      padding: 12px 14px;
      transition: border-color .18s, box-shadow .18s;
    }
    .field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
    .field input:focus,
    .field textarea:focus,
    .field select:focus {
      border-color: var(--green);
      box-shadow: 0 0 0 4px var(--green-soft);
    }
    .login-error {
      position: relative;
      border: 1px solid rgba(255,107,107,.28);
      background: rgba(255,107,107,.1);
      color: #ffc2c2;
      border-radius: 12px;
      padding: 12px 12px 12px 40px;
      font-size: 13px;
      line-height: 1.5;
      margin-top: 12px;
    }
    .login-error::before {
      content: "!";
      position: absolute;
      top: 11px;
      left: 13px;
      display: grid;
      place-items: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: rgba(255, 107, 107, .18);
      color: #ffd1d1;
      font-size: 11px;
      font-weight: 900;
    }
    .btn {
      min-height: 44px;
      border: 0;
      border-radius: 12px;
      padding: 0 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 800;
      transition: transform .18s, opacity .18s, border-color .18s, background .18s;
      white-space: nowrap;
    }
    .btn:active { transform: scale(.98); }
    .btn-primary {
      width: 100%;
      background: var(--green);
      color: #07100d;
    }
    .btn-primary:hover { opacity: .88; }
    .btn-secondary {
      border: 1px solid var(--line);
      background: var(--panel-2);
      color: var(--text);
    }
    .btn-secondary:hover { border-color: var(--green); }
    .btn-ghost {
      border: 1px solid var(--line);
      background: transparent;
      color: var(--muted);
    }
    .btn-ghost:hover { color: var(--text); border-color: var(--line-soft); background: rgba(255,255,255,.03); }
    .login-help {
      margin-top: 22px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }
    .login-help a { color: var(--green); font-weight: 800; }
    .login-security-note {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      margin-top: 14px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
      text-align: center;
    }
    .login-security-note span {
      color: var(--green-2);
      font-size: 14px;
      font-weight: 800;
    }
    body.login-showcase-open { overflow: hidden; }
    .login-showcase-backdrop { z-index: 120; }
    .modal.login-showcase-modal {
      width: min(1040px, calc(100vw - 32px));
      max-width: 1040px;
      max-height: calc(100dvh - 32px);
      overflow: auto;
    }
    .login-showcase-head h2 { margin-top: 5px; }
    .login-showcase-layout {
      display: grid;
      grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
      gap: 24px;
      align-items: stretch;
      margin-top: 18px;
    }
    .login-showcase-copy {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 8px 0 4px;
    }
    .login-showcase-copy h3 {
      margin: 16px 0 12px;
      font-family: var(--font-display);
      font-size: clamp(27px, 3vw, 38px);
      line-height: 1.05;
      letter-spacing: -.045em;
    }
    .login-showcase-copy > p {
      margin: 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.65;
    }
    .login-showcase-benefits {
      display: grid;
      gap: 10px;
      width: 100%;
      margin: 22px 0 0;
      padding: 0;
      list-style: none;
    }
    .login-showcase-benefits li {
      position: relative;
      padding: 12px 13px 12px 38px;
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      background: rgba(255, 255, 255, .025);
      color: var(--text);
      font-size: 13px;
      line-height: 1.45;
    }
    .login-showcase-benefits li::before {
      content: "✓";
      position: absolute;
      top: 11px;
      left: 13px;
      display: grid;
      place-items: center;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      background: var(--green-soft);
      color: var(--green-2);
      font-size: 10px;
      font-weight: 900;
    }
    .login-showcase-actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      width: 100%;
      margin-top: auto;
      padding-top: 24px;
    }
    .login-showcase-actions .btn-primary { width: auto; }
    .login-product-preview {
      min-width: 0;
      padding: 18px;
      border: 1px solid rgba(0, 229, 160, .2);
      border-radius: 20px;
      background:
        radial-gradient(circle at 100% 0, rgba(0, 229, 160, .12), transparent 38%),
        #0b0d11;
      box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    }
    .login-preview-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line-soft);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .login-preview-brand {
      color: var(--text);
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 800;
    }
    .login-preview-brand span { color: var(--green); }
    .login-preview-alert {
      margin-top: 14px;
      padding: 11px 13px;
      border: 1px solid rgba(0, 229, 160, .2);
      border-radius: 11px;
      background: rgba(0, 229, 160, .055);
      color: var(--green-2);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.4;
    }
    .login-preview-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      margin-top: 12px;
    }
    .login-preview-metric {
      min-width: 0;
      padding: 13px;
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      background: rgba(255, 255, 255, .03);
    }
    .login-preview-metric strong {
      display: block;
      color: var(--text);
      font-family: var(--font-display);
      font-size: 21px;
      line-height: 1;
    }
    .login-preview-metric span {
      display: block;
      margin-top: 6px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.25;
    }
    .login-preview-panel {
      margin-top: 12px;
      padding: 14px;
      border: 1px solid var(--line-soft);
      border-radius: 14px;
      background: rgba(255, 255, 255, .025);
    }
    .login-preview-panel-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
      font-size: 10px;
    }
    .login-preview-panel-head strong { color: var(--text); font-size: 12px; }
    .login-preview-list { display: grid; gap: 8px; margin-top: 12px; }
    .login-preview-row {
      display: grid;
      grid-template-columns: 9px minmax(0, 1fr) auto;
      gap: 9px;
      align-items: center;
      padding: 9px 10px;
      border-radius: 9px;
      background: rgba(255, 255, 255, .035);
      color: var(--muted);
      font-size: 10px;
    }
    .login-preview-row::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 3px var(--green-soft);
    }
    .login-preview-row strong { min-width: 0; color: var(--text); font-size: 11px; }
    .login-product-preview > small {
      display: block;
      margin-top: 12px;
      color: var(--muted);
      font-size: 9px;
      line-height: 1.45;
      text-align: center;
    }

    .portal-view {
      min-height: 100vh;
      display: none;
      grid-template-columns: 1fr;
      grid-template-rows: auto 1fr;
    }
    .portal-view.active { display: grid; }
    .sidebar {
      position: sticky;
      top: 0;
      z-index: 30;
      min-height: 78px;
      border-bottom: 1px solid var(--line-soft);
      background: rgba(11,13,17,.86);
      backdrop-filter: blur(18px);
      padding: 12px 24px;
      display: grid;
      grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) auto;
      align-items: center;
      gap: 22px;
    }
    .sidebar-identity {
      min-width: 0;
      display: grid;
      gap: 6px;
    }
    .sidebar .brand {
      font-size: 24px;
      padding: 0;
    }
    .client-pill {
      border: 0;
      background: transparent;
      border-radius: 0;
      padding: 0;
      min-width: 0;
      max-width: none;
    }
    .client-pill span {
      display: block;
      color: var(--muted);
      font-size: 10px;
      margin-bottom: 2px;
      text-transform: uppercase;
      letter-spacing: .1em;
      font-weight: 800;
    }
    .client-pill strong { display: block; font-size: 13px; line-height: 1.25; }
    .client-pill-name {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }
    .client-pill-name strong {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .alert-dot {
      min-width: max-content;
      height: 24px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255,107,107,.32);
      background: rgba(255,107,107,.1);
      color: #ffaaaa;
      font-size: 11px;
      font-weight: 900;
      padding: 0 10px;
      white-space: nowrap;
      box-shadow: none;
    }
    .nav-group {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      align-items: center;
      gap: 6px;
      width: 100%;
      border: 1px solid var(--line-soft);
      background: rgba(255,255,255,.025);
      border-radius: 14px;
      padding: 6px;
    }
    .nav-label {
      color: var(--muted-2);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .14em;
      font-weight: 900;
      padding: 0 10px;
      margin: 6px 0;
      flex-basis: 100%;
      display: none;
    }
    .nav-btn {
      position: relative;
      width: 100%;
      min-height: 48px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      border-radius: 12px;
      text-align: center;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-weight: 800;
      font-size: 17px;
    }
    .nav-btn span {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,.04);
      color: var(--green);
      font-size: 13px;
    }
    .nav-btn:hover,
    .nav-btn.active {
      color: var(--text);
      background: rgba(255,255,255,.045);
      border-color: var(--line);
    }
    .nav-btn.active span { background: var(--green); color: #07100d; }
    .nav-btn .nav-notification-badge,
    .nav-btn.active .nav-notification-badge {
      position: absolute;
      top: 3px;
      right: 4px;
      display: inline-grid;
      place-items: center;
      width: auto;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border: 2px solid var(--bg);
      border-radius: 999px;
      background: #df5353;
      color: #fff;
      box-shadow: 0 4px 12px rgba(223, 83, 83, .28);
      font-size: 9px;
      font-weight: 850;
      line-height: 1;
    }
    .nav-btn .nav-notification-badge.hidden {
      display: none !important;
    }
    .sidebar-logout { min-width: 72px; }
    .main {
      min-width: 0;
      padding: 28px;
    }
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 26px;
    }
    .topbar h1 {
      font-family: var(--font-display);
      font-size: clamp(30px, 4vw, 48px);
      line-height: 1;
      letter-spacing: -.06em;
      margin-bottom: 8px;
    }
    .page-title-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px 14px;
    }
    .page-title-line h1 { margin-bottom: 0; }
    .client-budget-header-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0 14px;
      border: 1px solid color-mix(in srgb, var(--green) 46%, var(--line));
      border-radius: 999px;
      background: var(--green-soft);
      color: var(--green-2);
      font: 750 13px/1 var(--font-body);
      white-space: nowrap;
    }
    .client-budget-header-action::before {
      content: "";
      width: 7px;
      height: 7px;
      margin-right: 8px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 15%, transparent);
    }
    .client-budget-header-action:hover {
      border-color: var(--green);
      background: color-mix(in srgb, var(--green) 18%, var(--panel));
    }
    .client-budget-header-action.hidden { display: none !important; }
    .topbar p { color: var(--muted); line-height: 1.55; }
    .topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
    .page { display: none; }
    .page.active { display: block; animation: fadeUp .22s ease both; }
    @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

    .grid { display: grid; gap: 16px; }
    .grid-2 { grid-template-columns: 1.08fr .92fr; }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .card {
      border: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(21,25,34,.94), rgba(15,18,24,.96));
      border-radius: var(--radius);
      padding: 20px;
      box-shadow: 0 16px 42px rgba(0,0,0,.16);
    }
    .card.soft { background: rgba(255,255,255,.035); }
    .card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 14px;
    }
    .card h2, .card h3 {
      font-family: var(--font-display);
      letter-spacing: -.04em;
    }
    .card h2 { font-size: 26px; }
    .card h3 { font-size: 20px; }
    .card p { color: var(--muted); line-height: 1.65; }
    .metric {
      display: grid;
      gap: 8px;
      min-height: 132px;
    }
    .metric label {
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .12em;
      font-weight: 900;
    }
    .metric strong {
      font-family: var(--font-display);
      font-size: 36px;
      line-height: 1;
      letter-spacing: -.05em;
    }
    .metric small { color: var(--muted); line-height: 1.45; }
    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      border-radius: 999px;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }
    .badge.green { background: var(--green-soft); color: var(--green-2); border: 1px solid rgba(0,229,160,.24); }
    .badge.yellow { background: rgba(246,199,68,.12); color: #ffdb74; border: 1px solid rgba(246,199,68,.26); }
    .badge.pending-signature {
      border: 1px solid rgba(123, 183, 255, .3);
      background: rgba(123, 183, 255, .1);
      color: #b9d9ff;
    }
    .badge.gray { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line); }
    .badge.red { background: rgba(255,107,107,.1); color: #ffc2c2; border: 1px solid rgba(255,107,107,.22); }
    .badge.blue { background: rgba(123,183,255,.1); color: #a9d1ff; border: 1px solid rgba(123,183,255,.2); }

    .hero-panel {
      position: relative;
      overflow: hidden;
      padding: 28px;
      min-height: 260px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .hero-panel::after {
      content: "";
      position: absolute;
      right: -120px;
      top: -120px;
      width: 320px;
      height: 320px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(0,229,160,.18), transparent 70%);
      pointer-events: none;
    }
    .hero-panel h2 {
      font-size: clamp(30px, 4vw, 44px);
      line-height: 1;
      max-width: 720px;
      position: relative;
      z-index: 1;
    }
    .hero-panel p {
      max-width: 720px;
      font-size: 16px;
      position: relative;
      z-index: 1;
    }
    .hero-meta {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 20px;
      position: relative;
      z-index: 1;
    }

    .progress {
      height: 10px;
      border-radius: 999px;
      background: rgba(255,255,255,.08);
      overflow: hidden;
    }
    .progress span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--green), #7bb7ff);
    }
    .scope-line {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }
    .scope-line > div {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
      font-size: 13px;
    }

    .insight-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 16px;
    }
    .insight-card {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.032);
      border-radius: 16px;
      padding: 16px;
      display: grid;
      gap: 8px;
      min-height: 132px;
    }
    .insight-card span {
      color: var(--green);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
    }
    .insight-card strong {
      font-size: 17px;
      line-height: 1.35;
    }
    .insight-card p {
      font-size: 13px;
      line-height: 1.5;
    }

    .client-home {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      align-items: start;
    }
    .client-welcome {
      min-height: 248px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 22px;
    }
    .client-welcome h2 {
      font-size: clamp(32px, 4vw, 52px);
      line-height: 1;
      max-width: 760px;
    }
    .client-welcome p {
      max-width: 720px;
      font-size: 16px;
    }
    .quick-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 10px;
    }
    .quick-action {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      color: var(--text);
      border-radius: 16px;
      padding: 16px;
      min-height: 104px;
      text-align: left;
      display: grid;
      align-content: space-between;
      gap: 12px;
      transition: border-color .18s, background .18s, transform .18s;
    }
    .quick-action:hover {
      border-color: rgba(0,229,160,.38);
      background: rgba(0,229,160,.06);
      transform: translateY(-1px);
    }
    .quick-action strong {
      display: block;
      line-height: 1.25;
    }
    .quick-action span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }
    .simple-panel {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
    }
    .status-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 16px;
    }
    .status-row strong {
      display: block;
      margin-bottom: 4px;
      line-height: 1.3;
    }
    .status-row span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .status-row > .badge { display: inline-flex; align-items: center; gap: 4px; }
    .update-feed {
      display: grid;
      gap: 12px;
    }
    .update-card {
      display: grid;
      grid-template-columns: 72px 1fr auto;
      gap: 14px;
      align-items: start;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 16px;
    }
    .update-date {
      color: var(--green);
      font-weight: 900;
      font-size: 12px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .update-card strong {
      display: block;
      margin-bottom: 5px;
      line-height: 1.3;
    }
    .update-card p {
      font-size: 14px;
      line-height: 1.55;
    }

    .timeline { display: grid; gap: 12px; }
    .timeline-item {
      display: grid;
      grid-template-columns: 96px 1fr auto;
      gap: 14px;
      align-items: flex-start;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 14px;
    }
    .timeline-date {
      color: var(--green);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .timeline-title {
      font-weight: 900;
      color: var(--text);
      margin-bottom: 5px;
    }
    .timeline-desc {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.55;
    }
    .timeline-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .table-card { overflow: hidden; padding: 0; }
    .table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
    }
    .table th {
      text-align: left;
      color: var(--muted);
      font-size: 12px;
      letter-spacing: .1em;
      text-transform: uppercase;
      padding: 14px 16px;
      background: rgba(255,255,255,.03);
      border-bottom: 1px solid var(--line);
    }
    .table td {
      padding: 15px 16px;
      border-bottom: 1px solid var(--line-soft);
      color: var(--text);
      vertical-align: top;
    }
    .table tr:last-child td { border-bottom: 0; }
    .table small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.45; }

    .doc-list, .request-list { display: grid; gap: 12px; }
    .doc-item, .request-item {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 14px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 16px;
    }
    .doc-item strong, .request-item strong { display: block; margin-bottom: 5px; }
    .doc-item span, .request-item span { color: var(--muted); font-size: 13px; line-height: 1.45; }
    .doc-item .form-actions {
      flex: 0 0 auto;
      width: auto;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .doc-item .form-actions .btn,
    .doc-item .form-actions .badge { flex: 0 0 auto; width: auto; }
    .request-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .inline-tabs {
      display: inline-flex;
      gap: 6px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.025);
      border-radius: 14px;
      padding: 5px;
      margin: 16px 0;
    }
    .inline-tab {
      min-height: 36px;
      border: 0;
      border-radius: 10px;
      padding: 0 14px;
      background: transparent;
      color: var(--muted);
      font-weight: 900;
    }
    .inline-tab.active {
      background: var(--green);
      color: #06110d;
    }
    .request-filterbar {
      display: flex;
      align-items: end;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 16px;
    }
    .request-filterbar label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .request-filterbar select {
      min-height: 38px;
      min-width: 190px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--text);
      border-radius: 12px;
      padding: 0 12px;
      font-weight: 800;
    }
    .field select option,
    .request-filterbar select option {
      background: var(--panel);
      color: var(--text);
    }
    .compact-filter {
      margin-top: 0;
      justify-content: flex-end;
    }
    .updates-tab { display: none; }
    .updates-tab.active { display: block; }
    .compact-head {
      padding-top: 6px;
      margin-bottom: 12px;
    }
    .attention-list {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }
    .attention-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      border: 1px solid rgba(246,199,68,.42);
      background:
        linear-gradient(135deg, rgba(246,199,68,.16), rgba(0,229,160,.07)),
        rgba(255,255,255,.035);
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 18px 34px rgba(0,0,0,.12);
    }
    .attention-card strong,
    .attention-card span {
      display: block;
      line-height: 1.45;
    }
    .attention-card span {
      color: var(--muted);
      font-size: 13px;
      margin-top: 3px;
    }
    .attention-action {
      min-height: 38px;
      border-color: rgba(246,199,68,.42);
      background: #f6c744;
      color: #11140f;
    }

    .project-list {
      display: grid;
      gap: 12px;
    }
    .project-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 16px;
    }
    .project-item.active-project {
      border-color: rgba(0,229,160,.42);
      background: rgba(0,229,160,.06);
    }
    .project-item strong,
    .project-item span,
    .project-item small {
      display: block;
      line-height: 1.4;
    }
    .project-item strong {
      margin-bottom: 4px;
    }
    .project-item span,
    .project-item small {
      color: var(--muted);
      font-size: 13px;
    }
    .project-meta {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      max-width: 360px;
    }
    .project-meta span:not(.badge) {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      border-radius: 999px;
      padding: 5px 9px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .section-caption {
      display: block;
      color: var(--green);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .14em;
      text-transform: uppercase;
      margin: 18px 0 10px;
    }

    .admin-command {
      border: 1px solid rgba(0,229,160,.22);
      background:
        linear-gradient(135deg, rgba(0,229,160,.1), rgba(123,183,255,.05)),
        rgba(255,255,255,.03);
      border-radius: 20px;
      padding: 18px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: center;
    }
    .admin-command h3 {
      font-family: var(--font-display);
      font-size: 22px;
      letter-spacing: -.04em;
      margin-bottom: 6px;
    }
    .admin-command p {
      max-width: 780px;
      color: var(--muted);
      line-height: 1.6;
    }
    .admin-command-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .admin-toolbar {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 18px;
      padding: 14px;
      display: grid;
      grid-template-columns: minmax(260px, .7fr) minmax(240px, 1fr);
      gap: 12px;
      align-items: end;
      margin-bottom: 16px;
    }
    .admin-toolbar .field {
      margin-bottom: 0;
    }
    .admin-toolbar-context {
      min-height: 48px;
      border-left: 1px solid var(--line);
      padding-left: 16px;
      display: grid;
      align-content: center;
      gap: 4px;
    }
    .admin-toolbar-context span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .admin-toolbar-context strong { line-height: 1.35; }
    .admin-section { display: none; }
    .admin-section.active { display: block; animation: fadeUp .2s ease both; }
    .admin-metric-link {
      width: 100%;
      color: var(--text);
      text-align: left;
      cursor: pointer;
      transition: border-color .18s, transform .18s, background .18s;
    }
    .admin-metric-link:hover {
      border-color: rgba(0,229,160,.38);
      background: rgba(0,229,160,.055);
      transform: translateY(-1px);
    }
    .admin-start-panel {
      border: 1px solid rgba(0,229,160,.24);
      background:
        linear-gradient(135deg, rgba(0,229,160,.1), rgba(123,183,255,.05)),
        rgba(255,255,255,.03);
      border-radius: 22px;
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
    }
    .admin-start-panel h2 {
      font-family: var(--font-display);
      font-size: clamp(24px, 3vw, 34px);
      letter-spacing: -.05em;
      margin-bottom: 6px;
    }
    .admin-start-panel p {
      color: var(--muted);
      line-height: 1.55;
      max-width: 780px;
    }
    .admin-start-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .admin-crm {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .crm-column {
      min-width: 220px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.025);
      border-radius: 18px;
      padding: 14px;
      display: grid;
      gap: 12px;
      align-content: start;
    }
    .crm-column h4 {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--muted);
    }
    .crm-card {
      border: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(21,25,34,.94), rgba(15,18,24,.96));
      border-radius: 16px;
      padding: 14px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 10px;
      box-shadow: 0 14px 28px rgba(0,0,0,.12);
    }
    .crm-card strong,
    .crm-card span,
    .crm-card small {
      display: block;
      line-height: 1.4;
    }
    .crm-card span,
    .crm-card small {
      color: var(--muted);
      font-size: 13px;
    }
    .crm-card-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .mini-btn {
      min-height: 32px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      color: var(--text);
      border-radius: 10px;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 900;
    }
    .mini-btn.danger {
      color: #ffb4b4;
      border-color: rgba(255,107,107,.25);
      background: rgba(255,107,107,.08);
    }
    .client-data-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }
    .client-data-item {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 14px;
      padding: 13px;
    }
    .client-data-item span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .1em;
      font-weight: 900;
      margin-bottom: 6px;
    }
    .client-data-item strong {
      display: block;
      line-height: 1.35;
    }

    .report-hero {
      border: 1px solid rgba(0,229,160,.22);
      background:
        linear-gradient(135deg, rgba(0,229,160,.1), rgba(123,183,255,.06)),
        rgba(255,255,255,.03);
      border-radius: 24px;
      padding: 22px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 20px;
      align-items: center;
      margin-bottom: 16px;
    }
    .report-brand {
      display: flex;
      align-items: center;
      gap: 18px;
      min-width: 0;
    }
    .report-brand img {
      width: 82px;
      height: 82px;
      object-fit: contain;
      border-radius: 22px;
      background: rgba(255,255,255,.9);
      padding: 10px;
      flex: 0 0 auto;
    }
    .report-brand h2 {
      font-family: var(--font-display);
      font-size: clamp(30px, 4vw, 48px);
      line-height: 1;
      letter-spacing: -.06em;
      margin-bottom: 8px;
    }
    .report-brand p {
      color: var(--muted);
      max-width: 760px;
      line-height: 1.6;
    }
    .report-period {
      min-width: 190px;
      text-align: right;
    }
    .report-period .mini-btn {
      width: 100%;
      min-height: 44px;
    }
    .report-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .report-section-heading {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 20px;
      margin: 24px 0 14px;
    }
    .report-section-heading .section-caption { margin: 0 0 8px; }
    .report-section-heading h3 {
      font-family: var(--font-display);
      font-size: clamp(24px, 3vw, 34px);
      letter-spacing: -.04em;
      margin-bottom: 5px;
    }
    .report-section-heading p { color: var(--muted); line-height: 1.5; }
    .report-kpi {
      border: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(21,25,34,.94), rgba(15,18,24,.96));
      border-radius: 16px;
      padding: 14px;
      min-height: 142px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      position: relative;
    }
    .report-kpi-copy { display: grid; gap: 6px; align-content: start; padding-right: 28px; }
    .report-kpi label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
    }
    .report-kpi strong {
      font-family: var(--font-display);
      font-size: 29px;
      letter-spacing: -.05em;
      line-height: 1;
    }
    .report-kpi span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }
    .report-kpi .mini-btn {
      width: 100%;
      min-height: 36px;
      margin-top: auto;
    }
    .report-kpi-accent {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 6px var(--green-soft);
      margin: 0;
    }
    .club-report-grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 12px;
      margin-top: 16px;
    }
    .club-report-card {
      border: 1px solid var(--line);
      background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
        rgba(15,18,24,.96);
      border-radius: 18px;
      padding: 16px;
      display: grid;
      align-content: start;
      gap: 14px;
      height: 100%;
      min-height: 250px;
      grid-column: span 4;
    }
    .club-report-card.wide { grid-column: span 8; }
    .club-report-card strong {
      display: block;
      font-family: var(--font-display);
      font-size: 20px;
      letter-spacing: -.03em;
      margin-bottom: 8px;
    }
    .club-report-card p {
      color: var(--muted);
      line-height: 1.55;
      font-size: 14px;
    }
    .metric-bars {
      display: grid;
      gap: 12px;
      margin-top: 4px;
    }
    .metric-bar-line {
      display: grid;
      gap: 7px;
    }
    .metric-bar-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .metric-bar-head strong {
      font-family: var(--font-body);
      font-size: 13px;
      letter-spacing: 0;
      margin: 0;
    }
    .metric-bar-head span,
    .metric-bar-line small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .club-report-card ul {
      list-style: none;
      display: grid;
      gap: 8px;
      margin: 0;
      padding: 0;
      align-self: end;
    }
    .club-report-card li {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      color: var(--text);
      font-size: 13px;
      line-height: 1.4;
    }
    .club-report-card li::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: var(--green);
      margin-top: 6px;
      flex: 0 0 auto;
    }
    .report-donut-layout {
      display: grid;
      grid-template-columns: 150px minmax(0, 1fr);
      gap: 20px;
      align-items: center;
    }
    .report-donut {
      width: 146px;
      height: 146px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      position: relative;
      background: conic-gradient(var(--green) 0 var(--donut-value), rgba(255,255,255,.08) var(--donut-value) 100%);
    }
    .report-donut::after {
      content: "";
      position: absolute;
      inset: 20px;
      border-radius: 50%;
      background: var(--panel);
      border: 1px solid var(--line);
    }
    .report-donut strong,
    .report-donut span { position: relative; z-index: 1; text-align: center; }
    .report-donut strong { font-size: 30px; margin: 0; }
    .report-donut span { color: var(--muted); font-size: 11px; font-weight: 800; }
    .report-legend { display: grid; gap: 10px; }
    .report-legend-item {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr) auto;
      gap: 9px;
      align-items: center;
      border-bottom: 1px solid var(--line-soft);
      padding-bottom: 9px;
    }
    .report-legend-item:last-child { border-bottom: 0; padding-bottom: 0; }
    .report-legend-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
    .report-legend-item i.blue { background: var(--blue); }
    .report-legend-item i.yellow { background: var(--yellow); }
    .report-legend-item span { color: var(--muted); font-size: 13px; }
    .report-legend-item b { font-size: 15px; }
    .agenda-snapshot { display: grid; gap: 9px; }
    .agenda-item {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.025);
      border-radius: 14px;
      padding: 10px;
    }
    .agenda-date {
      min-height: 48px;
      border-radius: 11px;
      display: grid;
      place-items: center;
      background: var(--green-soft);
      color: var(--green-2);
      font-weight: 900;
      font-size: 12px;
    }
    .agenda-item strong { font-family: var(--font-body); font-size: 14px; margin: 0 0 3px; }
    .agenda-item span { color: var(--muted); font-size: 12px; }
    .agenda-item em { color: var(--muted); font-size: 11px; font-style: normal; }
    .engagement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .engagement-insight {
      border: 1px solid var(--line);
      border-left: 4px solid var(--green);
      background: rgba(255,255,255,.025);
      border-radius: 12px;
      padding: 12px;
    }
    .engagement-insight.attention { border-left-color: var(--yellow); }
    .engagement-insight strong { font-family: var(--font-body); font-size: 20px; margin: 0 0 4px; }
    .engagement-insight span { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
    .report-flow {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }
    .report-flow-item {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 14px;
      min-height: 145px;
    }
    .report-flow-item span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 12px;
      background: rgba(0,229,160,.12);
      color: var(--green);
      font-weight: 900;
      margin-bottom: 12px;
    }
    .report-flow-item strong {
      display: block;
      margin-bottom: 7px;
    }
    .report-flow-item p {
      color: var(--muted);
      line-height: 1.45;
      font-size: 13px;
    }
    .report-bars,
    .report-notes,
    .report-roadmap {
      display: grid;
      gap: 12px;
    }
    .audience-summary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 16px;
    }
    .audience-stat {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.025);
      border-radius: 14px;
      padding: 12px;
    }
    .audience-stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
    .audience-stat strong { font-family: var(--font-display); font-size: 23px; }
    .audience-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .audience-segmented {
      display: inline-flex;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.025);
    }
    .audience-segmented button {
      min-height: 34px;
      padding: 7px 13px;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
    }
    .audience-segmented button:hover { color: var(--text); }
    .audience-segmented button.active {
      background: rgba(0,229,160,.13);
      color: var(--green);
      box-shadow: inset 0 0 0 1px rgba(0,229,160,.2);
    }
    .audience-segmented button:disabled {
      opacity: .38;
      cursor: not-allowed;
    }
    .audience-chart {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.02);
      border-radius: 16px;
      padding: 12px;
      overflow: hidden;
    }
    .audience-chart-heading {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin: 2px 4px 8px;
    }
    .audience-chart-heading strong { font-size: 15px; }
    .audience-chart-heading span { color: var(--muted); font-size: 11px; }
    .audience-chart svg { width: 100%; height: 230px; display: block; overflow: visible; }
    .audience-chart-grid { stroke: rgba(255,255,255,.07); stroke-width: 1; }
    .audience-chart-axis { stroke: rgba(255,255,255,.16); stroke-width: 1; }
    .audience-line-current { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
    .audience-line-current.pageviews { stroke: var(--blue); }
    .audience-chart-point { fill: var(--green); stroke: #10141b; stroke-width: 3; }
    .audience-chart-point.pageviews { fill: var(--blue); }
    .audience-axis-label,
    .audience-x-label { fill: var(--muted-2); font-size: 10px; font-family: var(--font-body); }
    .audience-comparison { border-left: 3px solid var(--green); }
    .report-bar-row {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr) 54px 72px;
      gap: 12px;
      align-items: center;
      color: var(--muted);
      font-size: 13px;
    }
    .report-bar-row small {
      color: var(--muted-2);
      text-align: right;
    }
    .report-bar-track {
      height: 9px;
      border-radius: 999px;
      background: rgba(255,255,255,.08);
      overflow: hidden;
    }
    .report-bar-track span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--green), var(--blue));
    }
    .report-bar-track i {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--green), var(--blue));
    }
    .report-note,
    .report-roadmap div {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 14px;
    }
    .report-note strong,
    .report-roadmap strong {
      display: block;
      margin-bottom: 5px;
    }
    .report-note span,
    .report-roadmap span {
      display: block;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }
    .report-roadmap {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .report-roadmap strong {
      width: 28px;
      height: 28px;
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--green);
      color: #07100d;
      font-family: var(--font-display);
    }

    .request-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      align-items: start;
    }
    .field.full { grid-column: 1 / -1; }
    .form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
    .document-card-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: nowrap;
      white-space: nowrap;
    }
    .admin-documents-card .card-head { align-items: flex-start; }
    .document-filter-bar {
      display: inline-flex;
      width: fit-content;
      gap: 4px;
      padding: 4px;
      margin: 2px 0 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.025);
    }
    .document-filter-bar button {
      min-height: 34px;
      padding: 7px 13px;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
    }
    .document-filter-bar button:hover { color: var(--text); }
    .document-filter-bar button.active {
      background: rgba(0,229,160,.13);
      color: var(--green);
      box-shadow: inset 0 0 0 1px rgba(0,229,160,.2);
    }
    .notice {
      border: 1px solid rgba(246,199,68,.26);
      background: rgba(246,199,68,.08);
      border-radius: 14px;
      padding: 14px 16px;
      color: #f7dda0;
      font-size: 14px;
      line-height: 1.6;
    }
    .notice strong { color: #ffe7a6; }

    .contract-box {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .info {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 14px;
      padding: 14px;
    }
    .info span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .1em;
      font-weight: 900;
      margin-bottom: 8px;
    }
    .info strong { display: block; line-height: 1.35; }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.62);
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 22px;
    }
    .modal.metric-detail-modal { width: min(900px, 100%); }
    .metric-detail-list {
      display: grid;
      gap: 10px;
      margin-top: 18px;
      max-height: min(60vh, 620px);
      overflow: auto;
      padding-right: 4px;
    }
    .metric-detail-row {
      display: grid;
      grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(120px, .7fr) auto;
      gap: 14px;
      align-items: center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.025);
      border-radius: 14px;
      padding: 13px;
    }
    .metric-detail-row strong,
    .metric-detail-row span { min-width: 0; overflow-wrap: anywhere; }
    .metric-detail-row span { color: var(--muted); font-size: 13px; }
    .modal {
      width: min(520px, 100%);
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 22px;
      padding: 22px;
      box-shadow: var(--shadow);
    }
    .request-modal {
      width: min(980px, 100%);
      max-height: min(92vh, 900px);
      overflow: auto;
      padding-top: 0;
    }
    body.request-detail-open { overflow: hidden; }
    #request-modal.modal-backdrop {
      place-items: stretch;
      padding: 0;
      overflow: hidden;
      background: var(--bg);
    }
    #request-modal .request-modal {
      --request-page-padding: clamp(16px, 3.2vw, 44px);
      width: 100%;
      max-width: none;
      height: 100dvh;
      max-height: none;
      overflow-x: hidden;
      overflow-y: auto;
      padding: 0 var(--request-page-padding) 24px;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      scrollbar-width: none;
    }
    #request-modal .request-modal::-webkit-scrollbar { display: none; }
    .request-modal-scroll { display: contents; }
    #request-modal .modal-head {
      width: min(1180px, 100%);
      margin: 0 auto 18px;
      padding: 18px 0 15px;
      border-radius: 0;
    }
    #request-modal .request-guidance,
    #request-modal .request-detail-grid,
    #request-modal .request-detail-footer {
      width: min(1180px, 100%);
      margin-right: auto;
      margin-left: auto;
    }
    #request-modal .request-guidance.client-only {
      display: grid !important;
      box-sizing: border-box;
    }
    #request-modal .request-detail-footer {
      position: static;
      align-items: center;
      min-height: 76px;
      margin-top: 22px;
      padding: 14px 0;
      background: transparent;
    }
    #request-modal .client-request-footer {
      display: flex !important;
      align-items: stretch;
      gap: 10px;
      flex-wrap: nowrap !important;
    }
    #request-modal .client-request-footer .btn {
      display: inline-flex;
      flex: 1 1 0 !important;
      align-items: center;
      justify-content: center;
      width: 0 !important;
      min-width: 0;
      min-height: 46px;
      margin: 0;
      text-align: center;
    }
    .new-request-modal {
      width: min(820px, 100%);
      max-height: min(92vh, 860px);
      overflow: auto;
    }
    .new-document-modal {
      width: min(820px, 100%);
      max-height: min(92vh, 860px);
      overflow: auto;
    }
    .client-data-modal {
      width: min(860px, 100%);
      max-height: min(92vh, 860px);
      overflow: auto;
    }
    .welcome-email-modal {
      width: min(820px, 100%);
      max-height: min(94vh, 920px);
      overflow: auto;
      padding-top: 0;
    }
    .welcome-email-preview {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #0b0d11;
    }
    .welcome-email-preview iframe {
      display: block;
      width: 100%;
      height: min(62vh, 700px);
      border: 0;
      background: #0b0d11;
    }
    .welcome-email-actions {
      margin-top: 16px;
    }
    .request-detail-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .request-detail-main {
      display: grid;
      gap: 14px;
    }
    .request-detail-meta,
    .request-detail-proposal {
      display: grid;
      gap: 10px;
    }
    .request-message,
    .proposal-box,
    .request-summary-panel,
    .request-detail-actions,
    .request-admin-section {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.03);
      border-radius: 16px;
      padding: 16px;
    }
    .request-message-client {
      background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
    }
    .request-message-cqdata {
      border-color: rgba(0,229,160,.22);
      background: rgba(0,229,160,.06);
    }
    .request-message span,
    .proposal-box span,
    .compact-row span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .1em;
      margin-bottom: 6px;
    }
    .request-message p,
    .proposal-box p {
      display: block;
      color: var(--text);
      line-height: 1.65;
      margin: 0;
    }
    .request-message p {
      font-size: 15px;
      white-space: pre-wrap;
    }
    .comment-thread {
      display: grid;
      gap: 10px;
    }
    .comment-item {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      border-radius: 14px;
      padding: 14px;
    }
    .comment-cqdata {
      border-color: rgba(0,229,160,.25);
      background: rgba(0,229,160,.07);
    }
    .comment-client {
      background: rgba(255,255,255,.04);
    }
    .comment-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .comment-head strong {
      color: var(--text);
      font-size: 13px;
    }
    .comment-head small {
      display: block;
      color: var(--muted);
      font-size: 11px;
      margin-top: 3px;
    }
    .comment-head span {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      text-transform: none;
      letter-spacing: 0;
      white-space: nowrap;
    }
    .comment-head small { overflow-wrap: anywhere; }
    .modal-support-text {
      margin: -4px 0 18px;
      color: var(--muted);
      line-height: 1.55;
    }
    .modal-footer-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 18px;
    }
    .comment-item p {
      color: var(--text);
      line-height: 1.65;
      margin: 0;
      white-space: pre-wrap;
    }

    @media (max-width: 680px) {
      .comment-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
      }
      .comment-head span { font-size: 11px; }
      .modal-footer-actions {
        display: grid;
        grid-template-columns: 1fr;
      }
      .modal-footer-actions .btn { width: 100%; }
    }
    .comment-attachment {
      display: inline-flex;
      align-items: center;
      min-height: 34px;
      border: 1px solid rgba(123,183,255,.24);
      background: rgba(123,183,255,.08);
      color: var(--blue);
      border-radius: 10px;
      padding: 0 10px;
      margin-top: 10px;
      font-size: 12px;
      font-weight: 900;
    }
    .comment-attachment.comment-image {
      display: grid;
      width: min(460px, 100%);
      padding: 8px;
      gap: 8px;
      background: rgba(255,255,255,.035);
    }
    .comment-attachment.comment-image img {
      display: block;
      width: 100%;
      max-height: 280px;
      object-fit: contain;
      border-radius: 8px;
      background: #080a0e;
    }
    .comment-attachment.comment-image span { padding: 2px 4px; }
    .comment-attachments {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }
    .comment-attachments-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .comment-attachments .comment-attachment {
      width: 100%;
      margin-top: 0;
    }
    .paste-hint {
      display: block;
      margin-top: 7px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }
    .paste-preview {
      margin-top: 10px;
      display: grid;
      gap: 12px;
      padding: 10px;
      border: 1px solid rgba(0,229,160,.28);
      border-radius: 12px;
      background: rgba(0,229,160,.06);
    }
    .paste-preview-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .paste-preview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
    }
    .paste-preview-item {
      display: grid;
      grid-template-columns: 64px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-width: 0;
      padding: 7px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
    }
    .paste-preview-item img {
      grid-row: 1 / span 2;
      width: 64px;
      height: 54px;
      object-fit: cover;
      border-radius: 8px;
      background: #080a0e;
    }
    .paste-preview-item .mini-btn {
      justify-self: start;
      margin-top: 0;
    }
    .paste-preview strong,
    .paste-preview span { display: block; }
    .paste-preview span { margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .comment-item .mini-btn {
      margin-top: 10px;
    }
    .comment-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }
    .request-client-actions {
      display: grid;
      gap: 12px;
    }
    .proposal-box {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
    }
    .proposal-box strong {
      display: block;
      font-family: var(--font-display);
      font-size: 22px;
      letter-spacing: -.04em;
      margin-bottom: 6px;
    }
    .proposal-box .form-actions {
      grid-column: 1 / -1;
      margin-top: 4px;
    }
    .proposal-box-action-required {
      border-color: rgba(0, 229, 160, .46);
      background: linear-gradient(135deg, rgba(0, 229, 160, .11), rgba(255,255,255,.025));
    }
    .proposal-decision-copy {
      grid-column: 1 / -1;
      margin: 0 0 4px !important;
      color: var(--muted) !important;
      font-size: 13px;
      line-height: 1.5;
    }
    .proposal-decision-modal { max-width: 560px; }
    .proposal-decision-modal > p {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
    }

    .admin-home-summary {
      width: 100%;
      margin: 22px auto 0;
    }
    .admin-home-summary-head { margin-bottom: 14px; }
    .admin-home-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }
    .admin-home-metrics > button {
      display: grid;
      gap: 6px;
      min-height: 128px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }
    .admin-home-metrics > button:hover {
      border-color: color-mix(in srgb, var(--green) 42%, var(--line));
      transform: translateY(-1px);
    }
    .admin-home-metrics span,
    .admin-home-metrics small { color: var(--muted); }
    .admin-home-metrics strong {
      font-family: var(--font-display);
      font-size: clamp(28px, 3vw, 38px);
      line-height: 1;
    }
    .admin-home-priority-card { padding: 0; overflow: hidden; }
    .admin-home-priority-card > .card-head { padding: 18px; }
    .admin-home-priority-card .ticket-list { border-top: 1px solid var(--line); }

    @media (max-width: 760px) {
      .admin-home-summary { margin-top: 16px; }
      .admin-home-summary-head { align-items: flex-start; }
      .admin-home-metrics { grid-template-columns: 1fr; }
      .admin-home-metrics > button { min-height: 100px; }
    }
    .proposal-form-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr);
      gap: 12px;
    }
    .proposal-detail {
      margin-top: 8px !important;
      color: var(--muted) !important;
      font-size: 13px;
    }
    .proposal-detail b { color: var(--text); }
    .proposal-flow-status {
      grid-column: 1 / -1;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-2);
    }
    .proposal-flow-status strong {
      flex: 0 0 auto;
      margin: 0;
      font-family: var(--font-body);
      font-size: 12px;
      letter-spacing: .02em;
    }
    .proposal-flow-status span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .proposal-flow-aprovada {
      border-color: color-mix(in srgb, var(--green) 34%, var(--line));
      background: color-mix(in srgb, var(--green) 8%, var(--panel-2));
    }
    .proposal-flow-recusada {
      border-color: color-mix(in srgb, var(--yellow) 34%, var(--line));
      background: color-mix(in srgb, var(--yellow) 8%, var(--panel-2));
    }
    .muted-box {
      opacity: .78;
    }
    .request-detail-actions {
      background: rgba(255,255,255,.025);
      display: grid;
      gap: 12px;
    }
    .request-detail-actions > .admin-only,
    .request-detail-actions > .client-only {
      display: grid;
      gap: 12px;
    }
    body.admin-mode .request-detail-actions > .admin-only {
      display: grid !important;
    }
    .request-detail-actions:not(.is-open) {
      display: none !important;
    }
    .request-detail-actions.is-open {
      display: grid;
      scroll-margin-top: 92px;
    }
    .request-workspace-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line-soft);
    }
    .request-workspace-head strong {
      display: block;
      margin-top: 5px;
      font-family: var(--font-display);
      font-size: 20px;
    }
    .request-action-section-collapsed {
      display: none !important;
    }
    .request-detail-footer {
      display: flex;
      justify-content: flex-end;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--line-soft);
    }
    .request-satisfaction-summary {
      display: grid;
      gap: 8px;
      padding: 16px;
      border: 1px solid rgba(0, 229, 160, .22);
      border-radius: 14px;
      background: rgba(0, 229, 160, .055);
    }
    .request-satisfaction-summary > div { display: grid; gap: 6px; }
    .request-satisfaction-summary strong { font-size: 16px; }
    .request-satisfaction-summary p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
    }
    .satisfaction-result-stars {
      color: #f7c948;
      font-size: 24px !important;
      letter-spacing: .08em;
    }
    .satisfaction-result-stars small {
      color: var(--text);
      font-size: 13px;
      letter-spacing: 0;
    }
    .rating-action {
      border-color: rgba(0, 229, 160, .34);
      color: var(--green-2);
    }
    .ticket-rating-preview {
      color: #f7c948;
      font-size: 12px;
      font-weight: 750;
    }
    .ticket-flag.flag-rating {
      border-color: rgba(0, 229, 160, .28);
      background: rgba(0, 229, 160, .08);
      color: var(--green-2);
    }
    .ticket-flag.flag-rating-pending {
      border-color: rgba(123, 183, 255, .3);
      background: rgba(123, 183, 255, .08);
      color: var(--blue);
    }
    .satisfaction-modal {
      width: min(580px, 100%);
      max-height: min(92vh, 760px);
      overflow: auto;
      padding-top: 0;
    }
    .delete-request-modal {
      width: min(620px, 100%);
      max-height: min(92vh, 760px);
      overflow: auto;
      padding-top: 0;
    }
    .danger-notice {
      margin-bottom: 16px;
      border-color: rgba(255, 107, 107, .28);
      background: rgba(255, 107, 107, .08);
      color: #ffc2c2;
    }
    .btn-danger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      border: 1px solid rgba(255, 107, 107, .45);
      border-radius: var(--radius-sm);
      padding: 0 16px;
      background: rgba(255, 107, 107, .13);
      color: #ffd2d2;
      font-weight: 750;
    }
    .btn-danger:hover {
      border-color: var(--red);
      background: rgba(255, 107, 107, .2);
    }
    .satisfaction-score {
      display: grid;
      gap: 10px;
      margin: 18px 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-3);
    }
    .satisfaction-score legend {
      padding: 0 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .satisfaction-stars {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .satisfaction-stars button {
      display: grid;
      place-items: center;
      width: 48px;
      height: 48px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--muted-2);
      font-size: 25px;
      line-height: 1;
    }
    .satisfaction-stars button:hover,
    .satisfaction-stars button.active {
      border-color: rgba(0, 229, 160, .42);
      background: var(--green-soft);
      color: var(--green);
    }
    #satisfaction-score-label {
      color: var(--text);
      font-size: 13px;
    }
    .optional-label {
      color: var(--muted-2);
      font-size: 11px;
      font-weight: 500;
    }
    .request-admin-section {
      margin-bottom: 12px;
    }
    .request-admin-section .section-caption {
      margin-top: 0;
    }
    .request-admin-section p {
      margin-bottom: 14px;
      font-size: 13px;
    }
    .compact-row {
      display: grid;
      grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      border-bottom: 1px solid var(--line-soft);
      padding: 10px 0;
    }
    .compact-row:first-child { padding-top: 0; }
    .compact-row:last-child { border-bottom: 0; padding-bottom: 0; }
    .compact-row strong {
      color: var(--text);
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .contract-mini {
      border-top: 1px solid var(--line-soft);
      margin-top: 12px;
      padding-top: 12px;
    }
    .modal h3 {
      font-family: var(--font-display);
      font-size: 24px;
      margin-bottom: 10px;
    }
    .modal p { color: var(--muted); line-height: 1.65; margin-bottom: 16px; }
    .modal-head {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin: 0 -22px 12px;
      padding: 18px 22px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(17,19,24,.96);
      backdrop-filter: blur(16px);
      border-radius: 22px 22px 0 0;
    }
    .modal-head-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .action-modal {
      width: min(760px, 100%);
      max-height: min(88vh, 760px);
      overflow: auto;
      padding-top: 0;
    }
    .action-modal-body {
      display: grid;
      gap: 14px;
    }
    .action-summary {
      border: 1px solid rgba(0,229,160,.22);
      background: rgba(0,229,160,.07);
      border-radius: 16px;
      padding: 16px;
      display: grid;
      gap: 6px;
    }
    .action-summary strong {
      font-family: var(--font-display);
      font-size: 24px;
      letter-spacing: -.04em;
    }
    .action-summary span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }
    .action-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .action-card {
      min-height: 112px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.035);
      border-radius: 16px;
      color: var(--text);
      padding: 16px;
      text-align: left;
      display: grid;
      align-content: start;
      gap: 8px;
      cursor: pointer;
    }
    .action-card:hover {
      border-color: rgba(0,229,160,.42);
      background: rgba(0,229,160,.06);
    }
    .action-card.action-card-primary {
      border-color: rgba(0,229,160,.42);
      background: rgba(0,229,160,.08);
    }
    .action-card.action-card-primary:hover {
      border-color: rgba(0,229,160,.62);
      background: rgba(0,229,160,.13);
    }
    .action-card strong {
      display: block;
      font-size: 15px;
    }
    .action-card span {
      color: var(--muted);
      line-height: 1.45;
      font-size: 13px;
    }
    .action-card.danger {
      border-color: rgba(255,111,111,.25);
    }
    .action-card.danger:hover {
      background: rgba(255,111,111,.08);
    }
    .document-modal {
      width: min(1180px, 100%);
      max-height: 96vh;
      display: flex;
      flex-direction: column;
      overflow: auto;
    }
    .document-viewer {
      border: 1px solid var(--line);
      background: #090b0f;
      border-radius: 16px;
      min-height: 500px;
      overflow: hidden;
      display: grid;
      place-items: center;
    }
    .document-viewer iframe {
      width: 100%;
      height: min(52vh, 600px);
      border: 0;
      background: #fff;
    }
    .pdf-pages {
      width: 100%;
      max-height: min(52vh, 600px);
      overflow: auto;
      display: grid;
      justify-items: center;
      gap: 16px;
      padding: 16px;
      background: #20242b;
    }
    .pdf-pages canvas {
      display: block;
      max-width: 100%;
      height: auto !important;
      background: #fff;
      box-shadow: 0 8px 28px rgba(0,0,0,.3);
    }
    .document-loading {
      color: var(--muted);
      font-weight: 800;
    }
    .document-modal:fullscreen {
      width: 100vw;
      height: 100vh;
      max-height: none;
      border: 0;
      border-radius: 0;
      padding: 20px;
      background: var(--panel);
      overflow: auto;
    }
    .document-modal:fullscreen .document-viewer { min-height: 0; flex: 1 1 auto; }
    .document-modal:fullscreen iframe {
      width: 100vw;
      height: 100%;
    }
    .document-modal:fullscreen .pdf-pages {
      max-height: none;
      min-height: 55vh;
    }
    .document-modal:fullscreen .document-acceptance {
      position: sticky;
      bottom: 0;
      z-index: 4;
      background: #10231d;
      box-shadow: 0 -12px 30px rgba(0,0,0,.35);
    }
    .document-fallback {
      max-width: 560px;
      text-align: center;
      padding: 34px;
    }
    .document-fallback strong {
      display: block;
      font-family: var(--font-display);
      font-size: 24px;
      letter-spacing: -.04em;
      margin-bottom: 10px;
    }
    .document-fallback span {
      color: var(--muted);
      line-height: 1.6;
    }
    .document-acceptance {
      margin-top: 14px;
      padding: 16px;
      display: grid;
      gap: 14px;
      border: 1px solid rgba(0,229,160,.3);
      border-radius: 16px;
      background: rgba(0,229,160,.06);
    }
    .document-acceptance .document-accept-button {
      width: fit-content;
      min-width: 240px;
      justify-self: end;
    }
    .document-acceptance strong { display: block; margin-top: 4px; }
    .document-acceptance p { margin: 4px 0 0; font-size: 13px; }
    .acceptance-check {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 13px 14px;
      color: var(--text);
      line-height: 1.45;
      cursor: pointer;
    }
    .acceptance-check input {
      width: 19px;
      height: 19px;
      margin: 1px 0 0;
      flex: 0 0 auto;
      accent-color: var(--green);
    }
    .acceptance-check.disabled-option { opacity: .48; cursor: not-allowed; }
    .document-acceptance-status {
      display: inline-flex;
      width: fit-content;
      margin-top: 7px;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 800;
    }
    .document-acceptance-status.accepted { color: var(--green); }
    .document-acceptance-status.pending {
      color: #b9d9ff;
      background: rgba(123,183,255,.08);
      border: 1px solid rgba(123,183,255,.24);
    }
    .toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 80;
      border: 1px solid rgba(0,229,160,.26);
      background: #0f1815;
      color: var(--text);
      border-radius: 14px;
      padding: 12px 14px;
      box-shadow: var(--shadow);
      opacity: 0;
      transform: translateY(12px);
      pointer-events: none;
      transition: opacity .2s, transform .2s;
    }
    .toast.show { opacity: 1; transform: none; }
    .toast[data-tone="error"] {
      border-color: rgba(255, 107, 107, .62);
      background: #2a1114;
      color: #ffd7d7;
    }
    .toast[data-tone="success"] {
      border-color: rgba(0,229,160,.5);
      background: #0d211a;
      color: #d9fff2;
    }
    .toast[data-tone="info"] {
      border-color: rgba(123,183,255,.5);
      background: #101d2d;
      color: #e2efff;
    }
    html[data-theme="light"] .toast {
      box-shadow: 0 14px 38px rgba(15, 23, 42, .18);
    }
    html[data-theme="light"] .toast[data-tone="error"] {
      border-color: #ef4444;
      background: #fff1f2;
      color: #991b1b;
    }
    html[data-theme="light"] .toast[data-tone="success"] {
      border-color: #0f9f74;
      background: #ecfdf5;
      color: #065f46;
    }
    html[data-theme="light"] .toast[data-tone="info"] {
      border-color: #3b82f6;
      background: #eff6ff;
      color: #1e3a8a;
    }

    @media (max-width: 980px) {
      .login-shell { grid-template-columns: 1fr; }
      .login-story { min-height: auto; }
      .portal-view { grid-template-columns: 1fr; }
      .document-card-actions { flex-wrap: wrap; justify-content: flex-start; }
      .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) auto;
      }
      .nav-group { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
      .client-home { grid-template-columns: 1fr; }
      .simple-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .insight-strip { grid-template-columns: 1fr; }
      .request-form, .contract-box { grid-template-columns: 1fr; }
      .timeline-item { grid-template-columns: 1fr; }
      .admin-command { grid-template-columns: 1fr; }
      .admin-toolbar { grid-template-columns: 1fr; }
      .admin-start-panel { align-items: flex-start; flex-direction: column; }
      .admin-start-actions { justify-content: flex-start; }
      .admin-command-actions { justify-content: flex-start; }
      .request-detail-grid { grid-template-columns: 1fr; }
      .action-grid { grid-template-columns: 1fr; }
      .attention-card { grid-template-columns: 1fr; }
      .attention-card .mini-btn { justify-self: start; }
      .report-hero { grid-template-columns: 1fr; }
      .report-period { text-align: left; }
      .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .club-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .club-report-card,
      .club-report-card.wide { grid-column: span 1; }
      .report-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .report-roadmap { grid-template-columns: 1fr; }
    }
    @media (max-width: 560px) {
      .login-proof { grid-template-columns: 1fr; }
      .login-card, .login-story { padding: 24px; border-radius: 20px; }
      .main { padding: 20px 14px 28px; }
      .sidebar { grid-template-columns: 1fr auto; padding: 12px 14px; gap: 12px; }
      .sidebar-identity { grid-column: 1; }
      .sidebar-logout { grid-column: 2; grid-row: 1; }
      .topbar { align-items: flex-start; flex-direction: column; }
      .topbar-actions { width: 100%; justify-content: stretch; }
      .topbar-actions .btn { flex: 1; }
      .quick-actions { grid-template-columns: 1fr; }
      .simple-panel { grid-template-columns: 1fr; }
      .update-card { grid-template-columns: 1fr; }
      .document-viewer { min-height: 320px; }
      .doc-item, .request-item { grid-template-columns: 1fr; }
      .project-item { grid-template-columns: 1fr; }
      .crm-card { grid-template-columns: 1fr; }
      .proposal-box { grid-template-columns: 1fr; }
      .proposal-form-grid { grid-template-columns: 1fr; }
      .compact-row { grid-template-columns: 1fr; gap: 2px; }
      .project-meta { justify-content: flex-start; max-width: none; }
      .client-data-grid { grid-template-columns: 1fr; }
      .nav-group { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .report-brand { align-items: flex-start; flex-direction: column; }
      .report-grid { grid-template-columns: 1fr; }
      .club-report-grid { grid-template-columns: 1fr; }
      .document-filter-bar { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .audience-summary { grid-template-columns: 1fr; }
      .audience-toolbar { align-items: stretch; flex-direction: column; }
      .audience-segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .audience-chart-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
      .audience-chart { padding: 10px 6px; }
      .audience-chart svg { height: 210px; }
      .report-flow { grid-template-columns: 1fr; }
      .report-bar-row { grid-template-columns: 1fr; }
      .report-donut-layout { grid-template-columns: 1fr; }
      .report-donut { margin: 0 auto; }
      .engagement-grid,
      .audience-summary { grid-template-columns: 1fr; }
      .agenda-item { grid-template-columns: 48px minmax(0, 1fr); }
      .agenda-item em { grid-column: 2; }
      .metric-detail-row { grid-template-columns: 1fr; gap: 5px; }
      .admin-toolbar-context { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
    }

    /* UX refresh: filas, hierarquia e ações */
    body {
      background:
        radial-gradient(circle at 92% 0, rgba(0, 229, 160, .07), transparent 28rem),
        var(--bg);
    }
    .card,
    .simple-panel,
    .admin-start-panel {
      border-color: rgba(255, 255, 255, .075);
      box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    }
    .client-action-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 16px;
      padding: 18px 20px;
      border: 1px solid rgba(246, 199, 68, .34);
      border-left: 4px solid var(--yellow);
      border-radius: var(--radius-sm);
      background: rgba(246, 199, 68, .075);
    }
    .client-action-banner > div { display: grid; gap: 3px; }
    .client-action-banner strong { font-size: 17px; }
    .client-action-banner p { color: var(--muted); font-size: 13px; }
    .client-action-kicker {
      color: var(--yellow);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .ticket-card {
      border-left: 3px solid transparent;
    }
    .ticket-card.ticket-needs-action {
      border-color: rgba(246, 199, 68, .24);
      border-left-color: var(--yellow);
      background: rgba(246, 199, 68, .035);
    }
    .ticket-main { min-width: 0; display: grid; gap: 5px; }
    .ticket-title-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
    .ticket-title-row strong { overflow: hidden; text-overflow: ellipsis; }
    .ticket-timing { color: var(--muted-2) !important; font-size: 12px !important; }
    .ticket-preview {
      max-width: 720px;
      overflow: hidden;
      color: var(--muted) !important;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .unread-dot {
      flex: 0 0 auto;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--blue);
      box-shadow: 0 0 0 4px rgba(123, 183, 255, .12);
    }
    .action-owner {
      display: inline-flex;
      align-items: center;
      width: max-content;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
    }
    .owner-client { color: var(--yellow); background: rgba(246, 199, 68, .11); }
    .owner-cqdata { color: var(--blue); background: rgba(123, 183, 255, .11); }
    .attention-action {
      border-color: rgba(246, 199, 68, .46) !important;
      color: var(--yellow) !important;
    }
    .admin-queue-toolbar {
      display: grid;
      gap: 12px;
      margin: 6px 0 16px;
      padding: 12px;
      border: 1px solid var(--line-soft);
      border-radius: var(--radius-sm);
      background: rgba(255, 255, 255, .018);
    }
    .queue-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
    .queue-tab {
      padding: 7px 10px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .queue-tab:hover { color: var(--text); background: var(--panel-2); }
    .queue-tab.active {
      border-color: rgba(0, 229, 160, .28);
      background: var(--green-soft);
      color: var(--green);
    }
    .queue-search {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .46fr)) auto;
      align-items: center;
      gap: 12px;
    }
    .queue-search input,
    .queue-search select {
      width: 100%;
      min-height: 38px;
      min-width: 0;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
      color: var(--text);
      font-weight: 600;
    }
    .queue-search select option {
      background: var(--panel);
      color: var(--text);
    }
    .queue-search span { color: var(--muted); font-size: 12px; }
    .admin-crm { display: grid; gap: 2px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
    .ticket-row {
      display: grid;
      grid-template-columns: 20px minmax(260px, 1fr) minmax(150px, auto) auto;
      align-items: center;
      gap: 12px;
      min-height: 68px;
      padding: 10px 12px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--panel-3);
    }
    .ticket-row:last-child { border-bottom: 0; }
    .ticket-row:hover { background: var(--panel-2); }
    .ticket-row.ticket-needs-cqdata { box-shadow: inset 3px 0 0 rgba(0, 229, 160, .65); }
    .ticket-signal { display: grid; place-items: center; gap: 8px; }
    .priority-marker { width: 3px; height: 20px; border-radius: 2px; background: var(--muted-2); }
    .priority-alta { background: var(--yellow); }
    .priority-urgente { background: var(--red); }
    .ticket-meta { display: grid; justify-items: end; gap: 5px; }
    .admin-client-layout { align-items: start; }
    .admin-client-layout > .card { align-self: start; }
    .document-acceptance {
      gap: 10px;
      padding: 12px 14px;
    }
    .document-acceptance-status.pending {
      min-height: auto;
      padding: 6px 9px;
    }
    .request-detail-proposal.hidden { display: none; }

    @media (max-width: 760px) {
      .client-action-banner { align-items: stretch; flex-direction: column; }
      .client-action-banner .btn { width: 100%; }
      .queue-search { grid-template-columns: 1fr; }
      .ticket-row { grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; }
      .ticket-row .ticket-meta { grid-column: 2; justify-items: start; }
      .ticket-row > .mini-btn { grid-column: 3; grid-row: 1; }
    }

    /* Tema mais calmo para a experiência do cliente */
    .nav-group {
      gap: 3px;
      padding: 4px;
      background: transparent;
      border-color: transparent;
    }
    .nav-btn {
      position: relative;
      min-height: 42px;
      justify-content: flex-start;
      padding: 0 12px;
      border: 0;
      border-radius: 9px;
      font-size: 14px;
      font-weight: 650;
    }
    .nav-btn:hover { background: rgba(255, 255, 255, .035); border-color: transparent; }
    .nav-btn.active {
      background: rgba(255, 255, 255, .055);
      border-color: transparent;
      color: var(--text);
    }
    .nav-btn.active::before {
      content: "";
      position: absolute;
      left: 0;
      width: 2px;
      height: 18px;
      border-radius: 2px;
      background: var(--green);
    }
    .alert-dot {
      background: var(--panel-2) !important;
      color: var(--text) !important;
      border: 1px solid var(--line) !important;
      box-shadow: none !important;
    }
    .simple-panel {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 1px;
      overflow: hidden;
      border: 1px solid var(--line-soft);
      border-radius: 13px;
      background: var(--line-soft);
    }
    .simple-panel .status-row {
      min-height: 108px;
      border: 0;
      border-radius: 0;
      background: var(--panel-3);
      padding: 15px;
    }
    .summary-value {
      color: var(--text) !important;
      font-family: var(--font-display);
      font-size: 20px !important;
      font-weight: 750;
      letter-spacing: -.03em;
    }
    .summary-value span { color: inherit; font-size: inherit; }
    .client-action-banner {
      padding: 13px 15px;
      border: 1px solid var(--line);
      border-left: 2px solid var(--green);
      background: var(--panel-3);
    }
    .client-action-kicker { color: var(--muted); }
    .client-banner-action {
      width: auto;
      min-height: 34px;
      padding: 0 12px;
      font-size: 12px;
    }
    .client-filterbar {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .48fr)) minmax(180px, .55fr);
      align-items: end;
      padding: 12px;
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      background: rgba(255, 255, 255, .018);
    }
    .request-filterbar label { display: grid; gap: 6px; }
    .request-filterbar input,
    .request-filterbar select {
      width: 100%;
      min-height: 38px;
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
      color: var(--text);
      padding: 0 11px;
      font-weight: 600;
    }
    .inline-tabs {
      width: 100%;
      margin: 12px 0;
      padding: 3px;
      border-color: var(--line-soft);
      border-radius: 10px;
      background: var(--panel-3);
    }
    .inline-tab {
      flex: 0 1 auto;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 700;
    }
    .inline-tab.active {
      background: var(--panel-2);
      color: var(--text);
      box-shadow: inset 0 0 0 1px var(--line);
    }
    #request-all-badge {
      background: var(--panel-2);
      color: var(--muted);
      border-color: var(--line);
    }
    .ticket-card {
      min-height: 94px;
      padding: 13px 14px;
      border-radius: 11px;
      border-left-width: 1px;
      background: var(--panel-3);
    }
    .ticket-card.ticket-needs-action {
      border-color: var(--line);
      border-left: 2px solid var(--green);
      background: var(--panel-3);
    }
    .ticket-card .request-actions {
      min-width: 122px;
      align-items: flex-end;
      flex-direction: column;
      flex-wrap: nowrap;
    }
    .client-ticket-status {
      color: var(--muted) !important;
      font-size: 12px !important;
      font-weight: 650;
    }
    .ticket-dates {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 5px 14px;
      margin-top: 4px;
    }
    .ticket-dates span {
      color: var(--muted-2);
      font-size: 11px;
    }
    .ticket-dates span strong {
      display: inline;
      margin: 0 3px 0 0;
      color: var(--muted);
      font-size: inherit;
      font-weight: 700;
    }
    .client-doc-item {
      grid-template-columns: 46px minmax(0, 1fr) auto;
      gap: 12px;
      padding: 13px 14px;
      border-radius: 11px;
      background: var(--panel-3);
    }
    .document-icon {
      display: grid;
      place-items: center;
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-2);
      filter: grayscale(1);
      font-size: 21px;
    }
    .document-main { min-width: 0; }
    .document-title-row {
      display: flex;
      align-items: center;
      margin-bottom: 4px;
    }
    .document-title-row strong {
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .document-main > span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .document-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 5px 12px;
      margin-top: 6px;
    }
    .document-meta span {
      color: var(--muted-2);
      font-size: 11px;
    }
    .document-state {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 22px;
      padding: 0 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-2);
      color: var(--muted) !important;
      font-size: 11px !important;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
    }
    .document-state i {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }
    .document-state.green { color: var(--green-2) !important; }
    .document-state.blue,
    .document-state.pending-signature { color: var(--blue) !important; }
    .document-state.yellow { color: #ffdb74 !important; }
    .document-state.red { color: #ffc2c2 !important; }
    .document-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      flex-wrap: wrap;
    }

    @media (max-width: 980px) {
      .simple-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .client-filterbar { grid-template-columns: 1fr 1fr; }
      .client-filterbar label:first-child { grid-column: 1 / -1; }
    }
    @media (max-width: 560px) {
      .simple-panel { grid-template-columns: 1fr; }
      .simple-panel .status-row { min-height: auto; }
      .client-filterbar { grid-template-columns: 1fr; }
      .client-filterbar label:first-child { grid-column: auto; }
      .inline-tabs {
        display: flex;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
      }
      .inline-tabs::-webkit-scrollbar { display: none; }
      .inline-tab { flex: 0 0 auto; }
      .ticket-card,
      .client-doc-item { grid-template-columns: 44px minmax(0, 1fr); }
      .ticket-card .request-actions { min-width: 0; align-items: stretch; }
      .client-ticket-status { text-align: left; }
      .document-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
      }
      .document-main > span { white-space: normal; }
      .document-meta {
        align-items: center;
        gap: 7px 10px;
      }
      .document-state {
        flex-basis: auto;
        order: -1;
      }
    }

    /* Cabeçalho, perfil e linguagem visual de central de atendimento */
    .sidebar-product {
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: .02em;
    }
    .topbar {
      min-height: 64px;
      margin-bottom: 22px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line-soft);
    }
    .topbar h1 {
      margin-bottom: 4px;
      font-size: clamp(25px, 3vw, 36px);
      font-weight: 700;
      letter-spacing: -.035em;
    }
    .topbar-actions { align-items: center; }
    .topbar-client-context.client-only {
      display: flex !important;
      align-items: center;
      gap: 10px;
      padding-right: 12px;
      border-right: 1px solid var(--line);
    }
    body.admin-mode .topbar-client-context.client-only { display: none !important; }
    .topbar-client-identity { display: grid; min-width: 130px; gap: 1px; }
    .topbar-client-identity span {
      color: var(--muted-2);
      font-size: 10px;
      font-weight: 650;
      letter-spacing: .06em;
      text-transform: uppercase;
    }
    .topbar-client-identity strong {
      max-width: 210px;
      overflow: hidden;
      color: var(--text);
      font-size: 13px;
      font-weight: 650;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .topbar-pending {
      min-height: 30px;
      padding: 0 9px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel-2);
      color: var(--muted);
      font-size: 11px;
      font-weight: 650;
    }
    .topbar-pending:hover { color: var(--text); border-color: var(--muted-2); }
    .topbar-profile::before {
      content: "👤";
      margin-right: 6px;
      filter: grayscale(1);
      font-size: 13px;
    }
    .btn,
    .mini-btn,
    input,
    select,
    textarea,
    .card,
    .modal,
    .status-row,
    .quick-action {
      border-radius: 7px;
    }
    .modal { border-radius: 10px; }
    .card-head h2,
    .card-head h3,
    .modal-head h3 {
      font-family: var(--font-body);
      font-weight: 700;
      letter-spacing: -.025em;
    }

    /* Detalhe do chamado: próxima etapa primeiro, conversa depois */
    .request-guidance {
      display: grid;
      grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
      align-items: center;
      gap: 14px;
      margin: 0 0 14px;
      padding: 11px 13px;
      border: 1px solid var(--line);
      border-left: 2px solid var(--green);
      border-radius: 7px;
      background: var(--panel-3);
    }
    .request-guidance strong { font-size: 13px; }
    .request-guidance span { color: var(--muted); font-size: 12px; line-height: 1.45; }
    body:not(.admin-mode) .request-modal { width: min(820px, 100%); }
    body:not(.admin-mode) .request-modal .modal-head .badge {
      border-color: var(--line);
      background: var(--panel-2);
      color: var(--muted);
    }
    body:not(.admin-mode) .request-summary-panel {
      padding: 13px;
      border-radius: 7px;
      background: var(--panel-3);
    }
    body:not(.admin-mode) .request-detail-meta {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0;
    }
    body:not(.admin-mode) .request-detail-meta .compact-row {
      grid-template-columns: 1fr;
      gap: 2px;
      padding: 8px 10px;
      border-bottom: 1px solid var(--line-soft);
    }
    body:not(.admin-mode) .request-detail-meta .compact-row span {
      margin: 0;
      color: var(--muted-2);
      font-size: 10px;
      letter-spacing: .05em;
    }
    body:not(.admin-mode) .request-detail-meta .compact-row strong {
      font-size: 13px;
      font-weight: 600;
    }
    body:not(.admin-mode) .contract-mini { display: none; }
    .request-message,
    .proposal-box,
    .request-summary-panel,
    .request-detail-actions,
    .request-admin-section,
    .comment-item {
      border-radius: 7px;
    }
    body:not(.admin-mode) .request-message-cqdata,
    body:not(.admin-mode) .comment-cqdata {
      border-color: var(--line);
      border-left: 2px solid var(--blue);
      background: var(--panel-3);
    }
    body:not(.admin-mode) .comment-client {
      border-color: var(--line);
      background: var(--panel-2);
    }
    body:not(.admin-mode) .request-message > span {
      color: var(--muted);
      letter-spacing: .06em;
    }
    .request-detail-footer {
      gap: 8px;
      flex-wrap: wrap;
    }
    .request-detail-footer .btn { min-width: 0; }

    /* Admin: filas e ticket com aparência tradicional */
    body.admin-mode .section-caption { color: var(--muted); }
    body.admin-mode .admin-start-panel,
    body.admin-mode .admin-toolbar,
    body.admin-mode #admin-section-requests > .card {
      border-radius: 8px;
      box-shadow: none;
    }
    body.admin-mode .admin-start-panel { background: var(--panel-3); }
    body.admin-mode .queue-tab.active {
      border-color: var(--line);
      background: var(--panel-2);
      color: var(--text);
    }
    body.admin-mode .admin-queue-toolbar {
      border-radius: 7px;
      background: var(--panel-3);
    }
    .ticket-table-head {
      display: grid;
      grid-template-columns: 20px minmax(260px, 1fr) minmax(150px, auto) 58px;
      gap: 12px;
      padding: 8px 12px;
      border: 1px solid var(--line-soft);
      border-bottom: 0;
      border-radius: 7px 7px 0 0;
      background: rgba(255, 255, 255, .025);
      color: var(--muted-2);
      font-size: 10px;
      font-weight: 650;
      letter-spacing: .06em;
      text-transform: uppercase;
    }
    body.admin-mode .admin-crm {
      border-radius: 0 0 7px 7px;
      box-shadow: none;
    }
    body.admin-mode .ticket-row {
      min-height: 62px;
      background: var(--panel);
    }
    body.admin-mode .ticket-row:hover { background: rgba(255, 255, 255, .025); }
    body.admin-mode .ticket-row.ticket-needs-cqdata { box-shadow: inset 2px 0 0 var(--muted-2); }
    body.admin-mode .ticket-row .action-owner,
    body.admin-mode .ticket-row .badge {
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
    }
    body.admin-mode .ticket-row .badge { color: var(--text); }
    body.admin-mode .request-detail-grid:has(.request-detail-actions.is-open) {
      grid-template-columns: minmax(0, 1fr);
    }
    body.admin-mode .request-detail-actions.is-open {
      position: static;
      width: 100%;
    }
    body.admin-mode #request-admin-response-section:not(.request-action-section-collapsed) {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin: 0;
      padding: 18px;
    }
    body.admin-mode #request-admin-response-section > .section-caption,
    body.admin-mode #request-admin-response-section > .request-response-context,
    body.admin-mode #request-admin-response-section > .field:nth-child(5),
    body.admin-mode #request-admin-response-section > .form-actions {
      grid-column: 1 / -1;
    }
    .request-response-context {
      display: grid;
      grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
      align-items: center;
      gap: 16px;
      padding: 13px 14px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-3);
    }
    .request-response-context > div {
      display: grid;
      justify-items: start;
      gap: 7px;
    }
    .request-response-context > div > span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .request-response-context p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }
    body.admin-mode #request-admin-response-section > .field {
      margin: 0;
    }
    body.admin-mode #request-admin-response-section textarea {
      min-height: 150px;
    }
    body.admin-mode #request-admin-response-section > .form-actions {
      justify-content: flex-start;
      margin-top: 2px;
      padding-top: 14px;
      border-top: 1px solid var(--line-soft);
    }
    body.admin-mode .admin-request-footer .request-primary-action {
      min-width: 190px;
    }

    @media (max-width: 980px) {
      .sidebar {
        grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
        gap: 12px;
      }
      .topbar { align-items: flex-start; }
      .topbar-actions { max-width: 62%; }
      body.admin-mode .request-detail-grid:has(.request-detail-actions.is-open) { grid-template-columns: 1fr; }
      body.admin-mode .request-detail-actions.is-open { position: static; }
    }
    @media (max-width: 680px) {
      .sidebar {
        position: sticky;
        top: 0;
        grid-template-columns: 1fr;
        padding: 10px 12px 8px;
      }
      .sidebar-identity {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
      }
      .nav-group {
        display: flex;
        grid-column: 1;
        width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
      }
      .nav-group::-webkit-scrollbar { display: none; }
      .nav-btn {
        flex: 0 0 auto;
        width: auto;
        min-height: 38px;
        padding: 0 12px;
        white-space: nowrap;
      }
      .topbar { gap: 12px; }
      .topbar-actions {
        display: grid;
        grid-template-columns: 1fr auto auto;
        max-width: none;
      }
      .topbar-client-context.client-only {
        min-width: 0;
        padding-right: 8px;
      }
      .topbar-client-identity { min-width: 0; }
      .topbar-client-identity strong { max-width: 130px; }
      .topbar-pending { flex: 0 0 auto; padding: 0 7px; }
      .topbar-profile,
      .topbar-actions > .btn { min-width: 0; padding: 0 10px; }
      body:not(.admin-mode) .request-detail-meta { grid-template-columns: 1fr; }
      .request-guidance { grid-template-columns: 1fr; gap: 3px; }
      .ticket-table-head { display: none; }
    }

    /* Navegação lateral recolhível e barra inferior móvel */
    @media (min-width: 681px) {
      .portal-view {
        grid-template-columns: 248px minmax(0, 1fr);
        grid-template-rows: 1fr;
        transition: grid-template-columns .18s ease;
      }
      body.sidebar-collapsed .portal-view { grid-template-columns: 68px minmax(0, 1fr); }
      .sidebar {
        position: sticky;
        top: 0;
        width: auto;
        height: 100vh;
        min-height: 0;
        padding: 16px 12px;
        border-right: 1px solid var(--line-soft);
        border-bottom: 0;
        background: rgba(11, 13, 17, .96);
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto minmax(20px, 1fr) auto;
        align-items: start;
        gap: 14px;
      }
      .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
      }
      .sidebar-toggle {
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--panel-2);
        color: var(--muted);
        font-size: 21px;
      }
      .sidebar-toggle:hover { color: var(--text); }
      .sidebar-menu-title {
        padding: 0 9px;
        color: var(--muted-2);
        font-size: 10px;
        font-weight: 650;
        letter-spacing: .08em;
        text-transform: uppercase;
      }
      .nav-group {
        display: grid;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 3px;
        padding: 0;
        overflow: visible;
      }
      .nav-btn {
        width: 100%;
        min-height: 42px;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 10px;
        text-align: left;
      }
      .nav-btn .nav-icon {
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        margin: 0;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--muted);
        font-size: 16px;
      }
      .nav-btn.active .nav-icon { color: var(--text); background: transparent; }
      .nav-btn .nav-text {
        display: inline;
        width: auto;
        height: auto;
        margin: 0;
        background: transparent;
        color: inherit;
        font-size: 13px;
      }
      .sidebar-account {
        display: grid;
        gap: 5px;
        padding-top: 12px;
        border-top: 1px solid var(--line-soft);
      }
      .sidebar-client-context {
        display: grid;
        gap: 2px;
        padding: 5px 9px 8px;
        min-width: 0;
      }
      .sidebar-client-context.client-only { display: grid !important; }
      body.admin-mode .sidebar-client-context.client-only { display: none !important; }
      .sidebar-client-context span {
        color: var(--muted-2);
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
      }
      .sidebar-client-context strong {
        overflow: hidden;
        font-size: 12px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .sidebar-account-btn {
        display: flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        min-height: 36px;
        padding: 0 10px;
        border: 1px solid transparent;
        border-radius: 6px;
        background: transparent;
        color: var(--muted);
        font-size: 12px;
        font-weight: 600;
        text-align: left;
      }
      .sidebar-account-btn.client-only { display: flex !important; }
      body.admin-mode .sidebar-account-btn.client-only { display: none !important; }
      .sidebar-account-btn:hover { border-color: var(--line); background: var(--panel-2); color: var(--text); }
      .account-icon { display: grid; place-items: center; width: 20px; color: var(--muted); }
      .pending-button.has-pending {
        border-color: rgba(255, 107, 107, .3);
        color: var(--text);
      }
      .pending-button.has-pending .account-icon {
        color: var(--red);
        font-weight: 800;
      }
      body.sidebar-collapsed .sidebar { padding-inline: 10px; }
      body.sidebar-collapsed .sidebar-identity,
      body.sidebar-collapsed .sidebar-menu-title,
      body.sidebar-collapsed .nav-text,
      body.sidebar-collapsed .sidebar-client-context,
      body.sidebar-collapsed .sidebar-account-btn > span:not(.account-icon) {
        display: none !important;
      }
      body.sidebar-collapsed .sidebar-header { justify-content: center; }
      body.sidebar-collapsed .nav-btn,
      body.sidebar-collapsed .sidebar-account-btn {
        justify-content: center;
        padding: 0;
      }
      body.sidebar-collapsed .nav-btn.active::before { left: -10px; }
      body.sidebar-collapsed .sidebar-account { justify-items: stretch; }
    }

    /* Fila administrativa alinhada */
    .ticket-table-head {
      grid-template-columns: minmax(260px, 1fr) 180px 64px;
    }
    body.admin-mode .ticket-row {
      grid-template-columns: minmax(260px, 1fr) 180px 64px;
    }
    body.admin-mode .ticket-meta { justify-items: start; }
    body.admin-mode .ticket-row > .mini-btn { justify-self: stretch; text-align: center; }
    .admin-ticket-title {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }
    .ticket-notification-count {
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      min-width: 21px;
      height: 21px;
      padding: 0 5px;
      border: 1px solid rgba(255, 107, 107, .58);
      border-radius: 999px;
      background: rgba(255, 107, 107, .16);
      color: #ffaaaa;
      font-size: 10px;
      font-weight: 900;
      line-height: 1;
      box-shadow: 0 0 0 3px rgba(255, 107, 107, .06);
    }
    html[data-theme="light"] .ticket-notification-count {
      border-color: rgba(185, 46, 46, .42);
      background: rgba(199, 67, 67, .1);
      color: #9d2929;
    }
    .admin-ticket-title strong { margin: 0; }
    .ticket-flag {
      display: inline-flex;
      align-items: center;
      min-height: 19px;
      padding: 0 6px;
      border: 1px solid var(--line);
      border-radius: 4px;
      background: var(--panel-2);
      color: var(--muted);
      font-size: 9px;
      font-weight: 700;
    }
    .flag-unread { color: var(--blue); border-color: rgba(123, 183, 255, .28); }
    .flag-new {
      color: var(--green-2);
      border-color: rgba(0, 229, 160, .32);
      background: rgba(0, 229, 160, .07);
    }
    .flag-replied {
      color: var(--blue);
      border-color: rgba(123, 183, 255, .32);
      background: rgba(123, 183, 255, .07);
    }
    .flag-budget-approved {
      color: var(--green);
      border-color: color-mix(in srgb, var(--green) 38%, transparent);
      background: color-mix(in srgb, var(--green) 10%, transparent);
    }
    .flag-budget-revision {
      color: var(--yellow);
      border-color: color-mix(in srgb, var(--yellow) 38%, transparent);
      background: color-mix(in srgb, var(--yellow) 10%, transparent);
    }
    .flag-budget-preparing {
      color: var(--blue);
      border-color: color-mix(in srgb, var(--blue) 38%, transparent);
      background: color-mix(in srgb, var(--blue) 10%, transparent);
    }
    .flag-high { color: var(--yellow); border-color: rgba(246, 199, 68, .28); }
    .flag-urgent { color: var(--red); border-color: rgba(255, 107, 107, .3); }

    /* Resumo compacto e modal de pendências */
    .simple-panel .status-row {
      min-height: 72px;
      padding: 12px 14px;
    }
    .simple-panel .status-row > div > strong {
      margin: 0;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
    }
    .simple-panel .summary-value { font-size: 18px !important; }
    .pending-modal { width: min(620px, 100%); }
    .pending-modal > p { color: var(--muted); font-size: 13px; }
    .pending-modal-list { display: grid; gap: 6px; margin-top: 14px; }
    .pending-modal-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-3);
    }
    .pending-modal-item strong,
    .pending-modal-item span,
    .pending-modal-item small { display: block; }
    .pending-modal-item strong { font-size: 13px; }
    .pending-modal-item span { margin-top: 3px; color: var(--muted); font-size: 12px; }
    .pending-modal-item small { margin-top: 4px; color: var(--muted-2); font-size: 10px; }

    /* O PDF expandido rola dentro do visualizador */
    .document-modal:fullscreen .document-viewer {
      min-height: 0;
      overflow: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      display: block;
    }
    .document-modal:fullscreen .pdf-pages {
      width: 100%;
      height: 100%;
      min-height: 0;
      max-height: 100%;
      overflow: auto;
    }

    @media (max-width: 680px) {
      .portal-view {
        display: none;
        padding-bottom: 66px;
      }
      .portal-view.active { display: block; }
      .sidebar {
        position: fixed;
        inset: auto 0 0;
        z-index: 80;
        width: 100%;
        height: 62px;
        min-height: 0;
        padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        border-right: 0;
        border-bottom: 0;
        background: rgba(11, 13, 17, .97);
        backdrop-filter: blur(18px);
        display: block;
      }
      .sidebar-header,
      .sidebar-menu-title { display: none; }
      .nav-group {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        height: 100%;
        padding: 0;
        overflow: visible;
      }
      .nav-btn {
        width: 100%;
        min-height: 50px;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        padding: 2px 4px;
        border-radius: 6px;
        font-size: 10px;
      }
      .nav-btn .nav-icon {
        display: block;
        width: auto;
        height: auto;
        margin: 0;
        background: transparent;
        color: var(--muted);
        font-size: 17px;
      }
      .nav-btn .nav-text {
        display: block;
        width: auto;
        height: auto;
        margin: 0;
        background: transparent;
        color: inherit;
        font-size: 9px;
      }
      .nav-btn.active::before {
        inset: -5px auto auto;
        width: 22px;
        height: 2px;
      }
      .sidebar-account {
        position: fixed;
        top: 10px;
        right: 12px;
        z-index: 90;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0;
        border: 0;
      }
      .sidebar-client-context { display: none !important; }
      .sidebar-account-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 34px;
        min-height: 32px;
        padding: 0 8px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--panel-3);
        color: var(--muted);
        font-size: 10px;
      }
      .sidebar-account-btn.client-only { display: flex !important; }
      body.admin-mode .sidebar-account-btn.client-only { display: none !important; }
      .sidebar-account-btn .account-icon { width: auto; }
      .sidebar-account-btn:not(.pending-button) .account-text { display: none; }
      .topbar { padding-right: 150px; }
      body.admin-mode .topbar { padding-right: 48px; }
      .main { padding-bottom: 24px; }
      body.admin-mode .ticket-row {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      body.admin-mode .ticket-meta {
        grid-column: 1;
        justify-items: start;
      }
      body.admin-mode .ticket-row > .mini-btn {
        grid-column: 2;
        grid-row: 1;
      }
      .pending-modal-item { grid-template-columns: 1fr; }
    }

    /* Escala tipográfica e controles com tamanho consistente */
    body { font-size: 15px; line-height: 1.5; }
    .nav-btn.active .nav-text {
      background: transparent !important;
      color: inherit !important;
    }
    .btn {
      min-height: 42px;
      padding-inline: 15px;
      font-size: 14px;
      font-weight: 650;
    }
    .mini-btn {
      min-height: 38px;
      padding-inline: 12px;
      font-size: 13px;
      font-weight: 650;
    }
    .queue-tab,
    .inline-tab {
      min-height: 40px;
      font-size: 13px;
    }
    .field label,
    .request-filterbar label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      letter-spacing: 0;
      text-transform: none;
    }
    .field input,
    .field select,
    .request-filterbar input,
    .request-filterbar select {
      min-height: 44px;
      font-size: 14px;
    }
    .field textarea { min-height: 112px; font-size: 14px; }
    .simple-panel .status-row > div > strong {
      font-size: 13px;
      font-weight: 650;
    }
    .simple-panel .summary-value {
      font-family: var(--font-body);
      font-size: 16px !important;
      font-weight: 700;
      letter-spacing: -.01em;
    }
    .badge {
      min-height: 30px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 650;
    }
    .badge.green {
      background: transparent;
      color: var(--green-2);
      border-color: rgba(0, 229, 160, .3);
    }

    /* Conta do cliente e projeto do admin no topo */
    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      max-width: none;
    }
    .topbar-account.client-only {
      display: flex !important;
      align-items: center;
      gap: 8px;
    }
    body.admin-mode .topbar-account.client-only { display: none !important; }
    .topbar-active-client {
      display: grid;
      gap: 1px;
      min-width: 150px;
      padding-right: 12px;
      border-right: 1px solid var(--line);
    }
    .topbar-active-client span {
      color: var(--muted-2);
      font-size: 12px;
      font-weight: 650;
      text-transform: uppercase;
    }
    .topbar-active-client strong {
      max-width: 210px;
      overflow: hidden;
      font-size: 15px;
      font-weight: 700;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .topbar-account-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 44px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-3);
      color: var(--text);
      font-size: 14px;
      font-weight: 650;
      white-space: nowrap;
    }
    .topbar-account-btn:hover { border-color: var(--muted-2); background: var(--panel-2); }
    .topbar-account-btn.pending-button:not(.has-pending) .account-icon { display: none; }
    .topbar-account-btn.pending-button.has-pending {
      border-color: rgba(255, 107, 107, .65);
      background: rgba(255, 107, 107, .13);
      color: #ffd2d2;
      box-shadow: 0 0 0 3px rgba(255, 107, 107, .08);
    }
    .topbar-admin-project {
      align-items: end;
      gap: 6px;
      min-width: min(620px, 52vw);
    }
    body.admin-mode .topbar-admin-project.admin-only { display: grid !important; }
    .topbar-admin-project label {
      color: var(--muted-2);
      font-size: 11px;
      font-weight: 650;
    }
    .topbar-admin-project select {
      width: 100%;
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-3);
      color: var(--text);
      padding: 0 12px;
      font-size: 14px;
      font-weight: 600;
    }
    .topbar-admin-project-controls {
      display: grid;
      grid-template-columns: minmax(230px, 1fr) auto;
      gap: 8px;
      align-items: stretch;
    }
    .topbar-create-project {
      min-height: 44px;
      padding-inline: 14px;
      white-space: nowrap;
    }
    .topbar-create-project > span:first-child {
      font-size: 17px;
      line-height: 1;
    }

    @media (max-width: 900px) {
      .topbar {
        align-items: flex-start;
        flex-direction: column;
      }
      .topbar-actions { width: 100%; }
      .topbar-account.client-only { width: 100%; }
      .topbar-active-client { margin-right: auto; }
      .topbar-admin-project { flex: 1; min-width: 0; }
    }
    @media (max-width: 680px) {
      .topbar {
        padding-right: 0;
        margin-bottom: 16px;
      }
      body.admin-mode .topbar { padding-right: 0; }
      .topbar-account.client-only {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .topbar-active-client {
        grid-column: 1 / -1;
        min-width: 0;
        padding: 0 0 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
      }
      .topbar-active-client strong { max-width: 100%; }
      .topbar-account-btn {
        width: 100%;
        min-height: 46px;
        padding: 0 8px;
        font-size: 13px;
      }
      .topbar-actions:has(.topbar-admin-project) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
      }
      .topbar-admin-project { min-width: 0; }
      .topbar-admin-project-controls {
        grid-template-columns: minmax(0, 1fr);
      }
      .topbar-create-project { width: 100%; }
      .nav-btn { min-height: 56px; }
      .nav-btn .nav-text { font-size: 11px; }
      .btn { min-height: 44px; }
      .mini-btn { min-height: 42px; }
      .queue-tab,
      .inline-tab { min-height: 44px; }
      .simple-panel .status-row {
        min-height: 64px;
        grid-template-columns: minmax(0, 1fr) auto;
      }
      .simple-panel .status-row > div > strong,
      .simple-panel .summary-value { font-size: 14px !important; }
    }

    /* Identidade do menu e destaques da visão geral */
    .sidebar-brand-mark {
      display: none;
      place-items: center;
      width: 38px;
      height: 38px;
      border: 1px solid rgba(255, 255, 255, .12);
      border-radius: 9px;
      background: var(--panel-2);
      color: var(--text);
      font-size: 14px;
      font-weight: 800;
      letter-spacing: -.06em;
      box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
    }
    .sidebar-brand-mark span { color: var(--green); }
    .sidebar-spacer { min-height: 1px; }
    .sidebar-contact {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 54px;
      padding: 9px 10px;
      border: 1px solid var(--line-soft);
      border-radius: 9px;
      background: rgba(255, 255, 255, .025);
      color: var(--text);
      text-decoration: none;
    }
    .sidebar-contact.client-only { display: flex !important; }
    body.admin-mode .sidebar-contact.client-only { display: none !important; }
    .sidebar-contact:hover {
      border-color: rgba(0, 229, 160, .32);
      background: rgba(0, 229, 160, .055);
    }
    .sidebar-contact-icon {
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: rgba(0, 229, 160, .1);
      color: var(--green);
      font-size: 16px;
      font-weight: 800;
    }
    .sidebar-contact-copy {
      display: grid;
      min-width: 0;
    }
    .sidebar-contact-copy strong { font-size: 12px; }
    .sidebar-contact-copy small { color: var(--muted); font-size: 11px; }

    .overview-highlights {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 14px;
      margin-top: 16px;
    }
    .overview-highlight-card {
      min-width: 0;
      min-height: 190px;
      padding: 18px;
      border: 1px solid var(--line-soft);
      border-radius: 13px;
      background: linear-gradient(180deg, rgba(21, 25, 34, .88), rgba(15, 18, 24, .96));
      box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
    }
    .portal-home-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; width:min(820px,100%); }
    .portal-home-summary-card { position:relative; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:13px; align-items:center; min-height:92px; padding:15px; border:1px solid var(--line-soft); border-radius:15px; background:var(--panel-2); color:var(--text); text-align:left; }
    button.portal-home-summary-card { font:inherit; cursor:pointer; }
    button.portal-home-summary-card:hover, button.portal-home-summary-card:focus-visible { border-color:rgba(0,184,134,.58); background:rgba(0,184,134,.08); }
    .portal-home-summary-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:rgba(0,184,134,.12); color:var(--green); font-weight:900; }
    .portal-home-summary-card.is-pending .portal-home-summary-icon { background:rgba(91,141,239,.12); color:#5b8def; }
    .portal-home-summary-card div { display:grid; gap:3px; min-width:0; }
    .portal-home-summary-card small { color:var(--muted); font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
    .portal-home-summary-card strong { font-size:21px; line-height:1.1; }
    .portal-home-summary-card div > span:last-child { overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
    .portal-home-summary-card > i { color:var(--muted); font-size:20px; font-style:normal; }
    .portal-home-compatibility-values { display:none !important; }
    .overview-audience-card { min-height:0; }
    .home-activity-row { display:grid; grid-template-columns:10px minmax(0,1fr) auto 18px; gap:12px; align-items:center; width:100%; padding:14px 4px; border:0; border-bottom:1px solid var(--line-soft); background:transparent; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
    .home-activity-row:last-child { border-bottom:0; }
    .home-activity-row:hover .home-activity-copy strong { color:var(--green); }
    .home-activity-marker { width:8px; height:8px; border-radius:50%; background:var(--muted); }
    .home-activity-marker.green { background:var(--green); }
    .home-activity-marker.orange { background:#f59e0b; }
    .home-activity-marker.blue { background:#5b8def; }
    .home-activity-copy { display:grid; gap:4px; min-width:0; }
    .home-activity-copy strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; transition:color .16s ease; }
    .home-activity-copy small { color:var(--muted); font-size:11px; }
    .home-activity-row > i { color:var(--muted); font-size:18px; font-style:normal; }
    .portal-home-premium { position:absolute; top:10px; right:12px; padding:3px 7px; border-radius:999px; background:rgba(245,158,11,.13); color:#d38a09; font-size:9px; letter-spacing:.05em; text-transform:uppercase; }
    .portal-home-actions button.is-locked { border-style:dashed; }
    .overview-highlight-head > div > span,
    .overview-members-card > div > span,
    .overview-members-total > span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }
    .overview-highlight-head > div > strong,
    .overview-members-card > div > strong,
    .overview-members-total > strong {
      display: block;
      margin-top: 5px;
      font-size: 30px;
      line-height: 1;
      letter-spacing: -.04em;
    }
    .overview-highlight-card small {
      display: block;
      margin-top: 5px;
      color: var(--muted-2);
      font-size: 12px;
    }
    .overview-highlight-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }
    .overview-mini-chart {
      display: flex;
      align-items: end;
      gap: 7px;
      min-height: 86px;
      margin-top: 18px;
      padding-top: 6px;
      border-bottom: 1px solid var(--line);
    }
    .overview-mini-bar {
      flex: 1 1 0;
      display: grid;
      grid-template-rows: 66px 16px;
      align-items: end;
      gap: 4px;
      min-width: 0;
      text-align: center;
    }
    .overview-mini-bar i {
      display: block;
      width: 100%;
      height: var(--bar-height);
      min-height: 5px;
      border-radius: 4px 4px 1px 1px;
      background: linear-gradient(180deg, var(--green), rgba(0, 229, 160, .28));
    }
    .overview-mini-bar small {
      overflow: hidden;
      font-size: 9px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .overview-highlight-empty {
      align-self: center;
      width: 100%;
      padding: 15px;
      color: var(--muted);
      font-size: 12px;
      text-align: center;
    }
    .overview-members-card {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: start;
      gap: 18px;
    }
    .overview-members-card > .mini-btn {
      grid-column: 1 / -1;
      align-self: end;
      justify-self: start;
    }
    .overview-members-total {
      padding-left: 18px;
      border-left: 1px solid var(--line);
    }
    .overview-members-total > strong { font-size: 22px; }

    .topbar-account-btn.pending-button.has-pending {
      border-color: rgba(255, 107, 107, .82);
      background: rgba(255, 107, 107, .18);
      color: #ffe0e0;
      box-shadow: 0 0 0 3px rgba(255, 107, 107, .11), 0 8px 22px rgba(255, 107, 107, .08);
    }
    .topbar-account-btn.pending-button.has-pending .account-icon {
      display: inline-grid;
      font-size: 16px;
    }

    @media (min-width: 681px) {
      .nav-group { gap: 6px; }
      .nav-btn { min-height: 50px; }
      .nav-btn .nav-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
      }
      .nav-btn .nav-text { font-size: 14px; }
      body.sidebar-collapsed .sidebar-header {
        display: grid;
        justify-items: center;
        gap: 10px;
      }
      body.sidebar-collapsed .sidebar-brand-mark { display: grid; }
      body.sidebar-collapsed .sidebar-toggle {
        width: 38px;
        height: 34px;
      }
      body.sidebar-collapsed .nav-btn { min-height: 52px; }
      body.sidebar-collapsed .nav-btn .nav-icon {
        width: 34px;
        height: 34px;
        font-size: 23px;
      }
      body.sidebar-collapsed .sidebar-contact {
        justify-content: center;
        min-height: 50px;
        padding: 0;
      }
      body.sidebar-collapsed .sidebar-contact-copy { display: none; }
      body.sidebar-collapsed .sidebar-contact-icon {
        width: 34px;
        height: 34px;
        font-size: 18px;
      }
    }

    @media (max-width: 900px) {
      .overview-highlights { grid-template-columns: 1fr; }
    }
    @media (max-width: 680px) {
      .sidebar-brand-mark,
      .sidebar-spacer,
      .sidebar-contact.client-only { display: none !important; }
      .overview-highlights { margin-top: 12px; }
      .overview-highlight-card { min-height: 0; padding: 15px; }
      .overview-highlight-head { align-items: center; }
      .overview-members-card { grid-template-columns: 1fr 1fr; }
      .overview-highlight-head > div > strong,
      .overview-members-card > div > strong { font-size: 26px; }
      .overview-mini-chart { min-height: 80px; }
      .portal-home-summary { grid-template-columns:1fr; }
      .portal-home-summary-card { min-height:82px; }
      .home-activity-row { grid-template-columns:9px minmax(0,1fr) 16px; }
      .home-activity-row > .badge { display:none; }
      .home-activity-copy small { white-space:normal; }
    }

    /* Refinamentos finais: navegação, chamados e temas */
    .sidebar-brand-mark {
      position: relative;
      padding-right: 2px;
      line-height: 1;
    }
    .sidebar-brand-mark span {
      position: absolute;
      right: 6px;
      bottom: 8px;
      width: 4px;
      height: 4px;
      overflow: hidden;
      border-radius: 50%;
      background: var(--green);
      color: transparent;
      font-size: 0;
    }
    .sidebar-product {
      font-size: 12px;
      font-weight: 600;
    }
    .sidebar-menu-title {
      font-size: 11px;
      font-weight: 700;
    }
    .theme-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .theme-toggle [data-theme-icon] {
      font-size: 16px;
      line-height: 1;
    }
    .portal-theme-switch {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 11px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
      color: var(--text);
      font: inherit;
      font-size: 12px;
      font-weight: 750;
      cursor: pointer;
    }
    .portal-theme-switch:hover {
      border-color: var(--muted-2);
      background: var(--panel-2);
    }
    .portal-theme-switch > i {
      position: relative;
      display: inline-flex;
      width: 31px;
      height: 17px;
      padding: 2px;
      border-radius: 999px;
      background: var(--line);
      transition: background .2s ease;
    }
    .portal-theme-switch > i > b {
      display: block;
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: var(--text);
      transition: transform .2s ease;
    }
    .portal-theme-switch[aria-checked="true"] > i { background: var(--green); }
    .portal-theme-switch[aria-checked="true"] > i > b { transform: translateX(14px); }
    html[data-theme="light"] .portal-theme-switch {
      background: #fff;
      color: #17202b;
    }
    .mobile-menu-brand.client-only {
      display: none !important;
    }
    .settings-popover {
      position: fixed;
      z-index: 110;
      width: min(430px, calc(100vw - 24px));
    }
    .settings-panel {
      max-height: calc(100dvh - 24px);
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel);
      box-shadow: var(--shadow);
    }
    .settings-head {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding: 15px 16px 12px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--panel);
    }
    .settings-head h3 {
      margin: 3px 0 0;
      font-family: var(--font-body);
      font-size: 19px;
      letter-spacing: -.02em;
    }
    .settings-client-summary {
      display: grid;
      gap: 3px;
      margin-bottom: 14px;
      padding: 13px 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
    }
    .settings-client-summary span {
      color: var(--muted-2);
      font-size: 10px;
      font-weight: 750;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .settings-client-summary strong {
      overflow: hidden;
      font-size: 15px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
.settings-actions {
      display: grid;
      gap: 6px;
      padding: 10px;
    }
    .settings-action {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      width: 100%;
      min-height: 66px;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
      color: var(--text);
      font: inherit;
      text-align: left;
      cursor: pointer;
    }
    .settings-action.client-only { display: grid !important; }
    body.admin-mode .settings-action.client-only { display: none !important; }
    body.admin-mode .settings-action.admin-only { display: grid !important; }
    .settings-action:hover {
      border-color: var(--muted-2);
      background: var(--panel-2);
    }
    .settings-action > span:nth-child(2) {
      display: grid;
      min-width: 0;
      gap: 3px;
    }
    .settings-action strong {
      font-size: 14px;
    }
    .settings-action small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .settings-action > span:last-child {
      color: var(--muted-2);
      font-size: 22px;
    }
    .settings-action-icon {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-2);
      font-size: 18px;
    }
    .settings-action:disabled {
      cursor: default;
      opacity: .7;
    }
    .settings-action:disabled:hover {
      border-color: var(--line);
      background: var(--panel-3);
    }
    .settings-action-danger {
      border-color: rgba(239, 68, 68, .32);
    }
    .settings-action-danger strong,
    .settings-action-danger .settings-action-icon { color: #ff6b6b; }
    .settings-action-danger:hover {
      border-color: #ef4444;
      background: rgba(239, 68, 68, .1);
    }
    html[data-theme="light"] .settings-action-danger strong,
    html[data-theme="light"] .settings-action-danger .settings-action-icon { color: #b91c1c; }
    html[data-theme="light"] .settings-action-danger:hover { background: #fff1f2; }
    .settings-label-mobile {
      display: none;
    }
    .sidebar .nav-btn.active::before {
      display: none !important;
      content: none !important;
    }
    .sidebar .nav-btn.active .nav-icon,
    .sidebar .nav-btn.active .nav-text {
      background: transparent !important;
      color: var(--text) !important;
    }
    body.admin-mode .topbar-actions {
      align-items: flex-end;
    }
    body.admin-mode .topbar-actions > .btn {
      min-height: 44px;
    }
    .ticket-label-guide {
      border-top: 1px solid var(--line-soft);
      padding-top: 10px;
    }
    .ticket-label-guide summary {
      width: fit-content;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      list-style-position: inside;
    }
    .ticket-label-guide[open] summary {
      margin-bottom: 10px;
      color: var(--text);
    }
    .ticket-label-guide-content {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 16px;
      color: var(--muted);
      font-size: 12px;
    }
    .ticket-label-guide-content > span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }
    .ticket-label-guide-content small {
      flex-basis: 100%;
      color: var(--muted-2);
    }
    .admin-documents-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
    }
    .admin-documents-card {
      width: 100%;
      min-width: 0;
    }
    .admin-documents-card .card-head {
      gap: 18px;
    }
    .admin-documents-card .card-head > div:first-child {
      min-width: 0;
    }
    .admin-documents-card .card-head p {
      max-width: 720px;
    }
    .admin-document-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 18px;
      min-height: 86px;
      padding: 13px 14px;
    }
    .admin-document-main {
      min-width: 0;
    }
    .admin-document-title {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 7px;
    }
    .admin-document-title strong {
      min-width: 180px;
      overflow-wrap: anywhere;
      font-size: 14px;
    }
    .admin-document-main > p {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .admin-document-acceptance:empty {
      display: none;
    }
    .admin-document-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 6px;
      max-width: 520px;
    }
    .admin-document-actions .mini-btn {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .request-summary-panel {
      padding: 12px;
    }
    .request-detail-meta {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1px;
      overflow: hidden;
      border: 1px solid var(--line-soft);
      border-radius: 9px;
      background: var(--line-soft);
    }
    .request-detail-meta .compact-row {
      min-height: 64px;
      padding: 10px 12px;
      background: var(--panel-3);
    }
    .request-detail-meta .compact-row span {
      margin-bottom: 5px;
      font-size: 10px;
    }
    .request-detail-meta .compact-row strong {
      font-size: 13px;
      line-height: 1.35;
    }

    .ticket-situation {
      display: grid;
      justify-items: start;
      gap: 5px;
    }
    .ticket-situation-owner {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--text);
      font-size: 12px;
      font-weight: 700;
    }
    .ticket-situation-owner i {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--blue);
      box-shadow: 0 0 0 3px rgba(123, 183, 255, .1);
    }
    .ticket-situation-owner.is-client i {
      background: var(--yellow);
      box-shadow: 0 0 0 3px rgba(246, 199, 68, .1);
    }
    .ticket-situation-owner.is-progress i {
      background: var(--green);
      box-shadow: 0 0 0 3px rgba(0, 229, 160, .1);
    }
    .ticket-situation-owner.is-closed i {
      background: var(--muted-2);
      box-shadow: none;
    }
    .ticket-situation small {
      color: var(--muted);
      font-size: 11px;
    }

    .pending-modal {
      width: min(720px, 100%);
    }
    .pending-overview-list {
      display: grid;
      gap: 9px;
    }
    .pending-overview-sections {
      display: grid;
      gap: 18px;
    }
    .pending-overview-group {
      display: grid;
      gap: 9px;
    }
    .pending-group-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 7px;
      border-bottom: 1px solid var(--line-soft);
    }
    .pending-group-head strong {
      font-size: 14px;
    }
    .pending-group-head span {
      display: grid;
      place-items: center;
      min-width: 24px;
      height: 24px;
      padding: 0 7px;
      border-radius: 999px;
      background: var(--panel-2);
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }
    .pending-overview-item {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
    }
    .pending-overview-item > div {
      min-width: 0;
    }
    .pending-overview-item strong,
    .pending-overview-item small {
      display: block;
    }
    .pending-overview-item strong {
      margin-top: 3px;
      overflow-wrap: anywhere;
      font-size: 14px;
    }
    .pending-overview-item small {
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .pending-kind-icon,
    .pending-document-icon {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--panel-2);
      font-size: 19px;
      filter: grayscale(1);
    }
    .pending-kind-label {
      display: block;
      color: var(--muted-2);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .pending-back {
      border: 0;
      background: transparent;
      color: var(--green);
      padding: 2px 0 10px;
      font: inherit;
      font-size: 13px;
      font-weight: 750;
      cursor: pointer;
    }
    .pending-document-detail {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-3);
    }
    .pending-document-detail > div {
      min-width: 0;
    }
    .pending-document-detail strong {
      display: block;
      margin-top: 4px;
      overflow-wrap: anywhere;
    }
    .pending-document-detail p {
      margin: 6px 0 0;
      font-size: 13px;
    }
    .pending-document-actions {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .pending-modal-item {
      align-items: start;
    }
    .pending-modal-summary {
      min-width: 0;
    }
    .pending-quick-reply {
      grid-column: 1 / -1;
      display: grid;
      gap: 7px;
      width: 100%;
      padding-top: 11px;
      border-top: 1px solid var(--line-soft);
    }
    .pending-quick-reply label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }
    .pending-quick-reply textarea {
      width: 100%;
      min-height: 72px;
      resize: vertical;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-2);
      color: var(--text);
      padding: 10px 11px;
      font-size: 14px;
    }
    .pending-quick-reply > div {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .pending-quick-reply .btn {
      width: auto;
    }

    @media (min-width: 681px) {
      .sidebar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
      }
      .sidebar-spacer {
        flex: 1 1 auto;
        min-height: 16px;
      }
      .nav-group {
        flex: 0 0 auto;
        gap: 8px;
      }
      .nav-btn {
        min-height: 54px;
      }
      body.sidebar-collapsed .sidebar-header {
        flex: 0 0 auto;
      }
      body.sidebar-collapsed .sidebar-spacer {
        flex: 1 1 auto;
      }
      body.sidebar-collapsed .sidebar-contact {
        flex: 0 0 auto;
      }
    }

    /* Tema claro */
    html[data-theme="light"] {
      color-scheme: light;
      --bg: #f3f6f8;
      --panel: #ffffff;
      --panel-2: #eef2f5;
      --panel-3: #f8fafb;
      --line: #d8e0e6;
      --line-soft: #e6ebef;
      --text: #17212b;
      --muted: #586574;
      --muted-2: #718091;
      --green: #008f68;
      --green-2: #007c5b;
      --green-soft: rgba(0, 143, 104, .1);
      --yellow: #9b6b00;
      --red: #c74343;
      --blue: #2f6fae;
      --shadow: 0 18px 50px rgba(38, 55, 70, .12);
    }
    html[data-theme="light"] body {
      background:
        radial-gradient(circle at 92% 0, rgba(0, 143, 104, .07), transparent 28rem),
        var(--bg);
    }
    html[data-theme="light"] .portal-boot,
    html[data-theme="light"] .sidebar {
      background: rgba(255, 255, 255, .97);
    }
    html[data-theme="light"] .card,
    html[data-theme="light"] .overview-highlight-card,
    html[data-theme="light"] .login-card,
    html[data-theme="light"] .login-story,
    html[data-theme="light"] .modal,
    html[data-theme="light"] .admin-start-panel,
    html[data-theme="light"] .request-message,
    html[data-theme="light"] .proposal-box,
    html[data-theme="light"] .request-summary-panel,
    html[data-theme="light"] .request-detail-actions,
    html[data-theme="light"] .request-admin-section,
    html[data-theme="light"] .comment-item {
      background: var(--panel);
      box-shadow: 0 12px 30px rgba(38, 55, 70, .07);
    }
    html[data-theme="light"] .modal-head {
      background: rgba(255, 255, 255, .97);
    }
    html[data-theme="light"] .modal-backdrop {
      background: rgba(23, 33, 43, .48);
    }
    html[data-theme="light"] .report-hero {
      border-color: var(--line);
      background: var(--panel);
      box-shadow: 0 12px 30px rgba(38, 55, 70, .06);
    }
    html[data-theme="light"] .report-kpi,
    html[data-theme="light"] .club-report-card,
    html[data-theme="light"] .agenda-item,
    html[data-theme="light"] .engagement-insight,
    html[data-theme="light"] .report-flow-item,
    html[data-theme="light"] .audience-stat,
    html[data-theme="light"] .audience-segmented,
    html[data-theme="light"] .audience-chart,
    html[data-theme="light"] .report-note,
    html[data-theme="light"] .report-roadmap div,
    html[data-theme="light"] .metric-detail-row,
    html[data-theme="light"] .action-card,
    html[data-theme="light"] .pending-overview-item,
    html[data-theme="light"] .pending-document-detail {
      background: var(--panel-3);
    }
    html[data-theme="light"] .report-kpi {
      background: var(--panel);
    }
    html[data-theme="light"] .badge.pending-signature {
      border-color: rgba(47, 111, 174, .25);
      background: rgba(47, 111, 174, .08);
      color: #315f8d;
    }
    html[data-theme="light"] .action-summary {
      background: rgba(0, 143, 104, .06);
    }
    html[data-theme="light"] .report-donut {
      background: conic-gradient(var(--green) 0 var(--donut-value), rgba(23, 33, 43, .1) var(--donut-value) 100%);
    }
    html[data-theme="light"] .report-bar-track {
      background: #dce4e8;
    }
    html[data-theme="light"] .audience-chart-grid {
      stroke: rgba(23, 33, 43, .1);
    }
    html[data-theme="light"] .audience-chart-axis {
      stroke: rgba(23, 33, 43, .2);
    }
    html[data-theme="light"] .audience-chart-point {
      stroke: #fff;
    }
    html[data-theme="light"] .quick-action,
    html[data-theme="light"] .status-row,
    html[data-theme="light"] .request-item,
    html[data-theme="light"] .ticket-row,
    html[data-theme="light"] .pending-modal-item,
    html[data-theme="light"] .doc-item,
    html[data-theme="light"] .notice {
      background: var(--panel-3);
    }
    html[data-theme="light"] .comment-thread .request-thread-empty {
      border-color: #d8e1e8;
      background: #f4f7f9;
      color: #596675;
    }
    html[data-theme="light"] .nav-btn:hover,
    html[data-theme="light"] .nav-btn.active {
      background: var(--panel-2);
    }
    html[data-theme="light"] .topbar-account-btn,
    html[data-theme="light"] .btn-ghost,
    html[data-theme="light"] .mini-btn,
    html[data-theme="light"] input,
    html[data-theme="light"] textarea,
    html[data-theme="light"] select {
      background: var(--panel);
      color: var(--text);
    }
    html[data-theme="light"] .request-message-cqdata,
    html[data-theme="light"] .comment-cqdata {
      border-color: var(--line);
      border-left-color: var(--blue);
      background: var(--panel-3);
    }
    html[data-theme="light"] .document-acceptance-status.pending {
      border-color: rgba(47, 111, 174, .24);
      background: rgba(47, 111, 174, .07);
      color: #315f8d;
    }
    html[data-theme="light"] .topbar-account-btn.pending-button.has-pending {
      border-color: rgba(199, 67, 67, .55);
      background: rgba(199, 67, 67, .1);
      color: #8f2424;
      box-shadow: 0 0 0 3px rgba(199, 67, 67, .07);
    }
    html[data-theme="light"] .overview-mini-bar i {
      background: linear-gradient(180deg, #00a879, rgba(0, 143, 104, .35));
    }
    html[data-theme="light"] .sidebar-brand-mark {
      background: #17212b;
      color: #fff;
    }
    /* Estados de atenção precisam continuar legíveis no fundo branco. */
    html[data-theme="light"] .badge.yellow,
    html[data-theme="light"] .document-state.yellow,
    html[data-theme="light"] .flag-high {
      background: #fff4d8;
      border-color: #d8a240;
      color: #754b00 !important;
    }
    html[data-theme="light"] .badge.red,
    html[data-theme="light"] .flag-urgent,
    html[data-theme="light"] .danger-notice {
      background: #fff0f0;
      border-color: #cf6969;
      color: #932b2b !important;
    }
    html[data-theme="light"] .notice,
    html[data-theme="light"] .notice strong {
      color: #5c430d;
    }
    html[data-theme="light"] .notice {
      border-color: #ddbd66;
      background: #fff8e8;
    }
    html[data-theme="light"] .proposal-box-action-required {
      border-color: #49a785;
      background: linear-gradient(135deg, #ecfbf5, #fff);
    }

    @media (max-width: 680px) {
      .portal-view {
        padding-bottom: 76px;
      }
      .sidebar {
        height: 70px;
      }
      .nav-group {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }
      .mobile-menu-brand.client-only {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
        color: var(--text);
      }
      body.admin-mode .mobile-menu-brand.client-only {
        display: none !important;
      }
      body.admin-mode .nav-group {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }
      .mobile-menu-brand strong {
        position: relative;
        font-size: 18px;
        line-height: 1;
        letter-spacing: -.06em;
      }
      .mobile-menu-brand strong span {
        color: var(--green);
      }
      .mobile-menu-brand small {
        color: var(--muted);
        font-size: 9px;
        font-weight: 700;
      }
      .nav-btn {
        min-height: 58px;
        gap: 3px;
      }
      .nav-btn .nav-icon {
        font-size: 20px;
      }
      .nav-btn .nav-text {
        font-size: 10px;
        font-weight: 700;
      }
      .nav-btn.active::before {
        display: none;
        content: none;
      }
      .nav-btn.active {
        background: var(--panel-2);
      }
      .topbar-account.client-only {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
      }
      .topbar-active-client {
        grid-column: 1 / -1;
        align-content: center;
        padding: 0 0 7px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
      }
      .topbar-active-client span {
        font-size: 9px;
      }
      .topbar-active-client strong {
        font-size: 12px;
      }
      .topbar-account-btn {
        width: 100%;
        min-height: 44px;
        padding-inline: 9px;
        font-size: 12px;
      }
      .settings-label-full {
        display: none;
      }
      .settings-label-mobile {
        display: inline;
      }
      body.admin-mode .topbar-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
      }
      body.admin-mode .topbar-admin-project {
        grid-column: 1 / -1;
      }
      body.admin-mode .topbar-actions > .btn,
      body.admin-mode .topbar-actions > .settings-trigger {
        width: 100%;
        padding-inline: 8px;
      }
      .request-detail-meta {
        grid-template-columns: 1fr 1fr !important;
      }
      body.admin-mode #request-admin-response-section:not(.request-action-section-collapsed) {
        grid-template-columns: 1fr;
        padding: 14px;
      }
      body.admin-mode #request-admin-response-section > .field,
      body.admin-mode #request-admin-response-section > .section-caption,
      body.admin-mode #request-admin-response-section > .request-response-context,
      body.admin-mode #request-admin-response-section > .form-actions {
        grid-column: 1;
      }
      .request-response-context {
        grid-template-columns: 1fr;
      }
      .request-detail-footer {
        display: flex;
        align-items: stretch;
        flex-wrap: wrap;
      }
      .request-detail-footer .btn {
        flex: 1 1 132px;
        width: auto;
        padding-inline: 8px;
        white-space: normal;
        line-height: 1.25;
      }
      .request-detail-footer .request-primary-action,
      .request-detail-footer .request-more-options {
        grid-column: auto;
      }
      #request-modal .request-modal {
        --request-page-padding: 14px;
      }
      #request-modal .modal-head {
        align-items: center;
      }
      #request-modal .modal-head h3 {
        font-size: 19px;
      }
      .satisfaction-stars {
        justify-content: space-between;
        gap: 5px;
      }
      .satisfaction-stars button {
        width: 44px;
        height: 44px;
      }
      .admin-document-row {
        grid-template-columns: 1fr;
        align-items: start;
      }
      .admin-documents-card .card-head {
        display: grid;
        grid-template-columns: 1fr;
      }
      .document-card-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
      }
      .admin-document-actions {
        justify-content: flex-start;
        max-width: none;
      }
      .admin-document-actions .mini-btn {
        flex: 1 1 auto;
      }
      .pending-modal-item {
        grid-template-columns: 1fr;
      }
      .pending-overview-item {
        grid-template-columns: 42px minmax(0, 1fr);
      }
      .pending-overview-item > .mini-btn {
        grid-column: 1 / -1;
        width: 100%;
      }
      .pending-modal-item > .mini-btn {
        width: 100%;
      }
      .pending-quick-reply {
        grid-column: 1;
      }
      .pending-quick-reply > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }
      .pending-quick-reply .btn {
        width: 100%;
      }
    }

    /* Relatório premium: estado bloqueado discreto e estável no menu */
    .sidebar .nav-btn[data-page="report"].is-locked {
      border-color: rgba(123, 183, 255, .16);
    }
    .sidebar .nav-btn[data-page="report"].is-locked .nav-icon {
      color: var(--muted);
      font-size: 16px;
    }
    .sidebar .nav-btn[data-page="report"].is-locked .nav-upgrade-label {
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
      width: auto !important;
      height: auto !important;
      min-height: 20px;
      margin-left: auto;
      padding: 2px 7px;
      border: 1px solid rgba(123, 183, 255, .22);
      border-radius: 6px;
      background: rgba(123, 183, 255, .07) !important;
      color: var(--muted) !important;
      font-size: 9px;
      font-weight: 750;
      line-height: 1;
      letter-spacing: .045em;
      text-transform: uppercase;
      white-space: nowrap;
    }
    .sidebar .nav-btn[data-page="report"].is-locked .nav-text {
      flex: 1 1 auto;
      min-width: 0;
    }
    .sidebar .nav-btn[data-page="report"].is-locked.active {
      border-color: rgba(123, 183, 255, .26);
      background: var(--panel-2);
      box-shadow: inset 0 0 0 1px rgba(123, 183, 255, .05);
    }
    html[data-theme="light"] .sidebar .nav-btn[data-page="report"].is-locked .nav-upgrade-label {
      border-color: rgba(47, 111, 174, .22);
      background: rgba(47, 111, 174, .06) !important;
      color: #52677b !important;
    }
    body.sidebar-collapsed .sidebar .nav-btn[data-page="report"].is-locked .nav-upgrade-label {
      display: none !important;
    }

    @media (max-width: 680px) {
      .sidebar .nav-btn[data-page="report"].is-locked .nav-upgrade-label {
        display: none !important;
      }
      .sidebar .nav-btn[data-page="report"].is-locked .nav-icon {
        font-size: 18px;
      }
      #page-report.report-locked {
        min-height: 0;
      }
      #page-report.report-locked > :not(.report-access-gate) {
        display: none;
      }
      #page-report.report-locked .report-access-gate {
        position: relative;
        inset: auto;
        display: block;
        min-height: calc(100dvh - 180px);
        padding: 12px 0 92px;
        background: transparent;
      }
      #page-report.report-locked .report-access-gate-card,
      #page-report.report-locked .report-access-gate-card.is-previewing {
        width: 100%;
        padding: 24px 16px 22px;
        border-radius: 14px;
      }
      #page-report.report-locked .report-access-close {
        top: 10px;
        right: 10px;
      }
      #page-report.report-locked .report-access-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
        font-size: 22px;
      }
      #page-report.report-locked .report-access-gate-card h2 {
        padding-inline: 16px;
        font-size: 25px;
      }
      #page-report.report-locked .report-upgrade-benefits {
        justify-content: flex-start;
      }
      #page-report.report-locked .report-preview-chart {
        min-height: 190px;
        padding: 18px 10px 14px;
      }
      #page-report.report-locked .report-preview-bar {
        height: 145px;
      }
    }

    /* Identidade do usuário no cabeçalho */
    .mobile-user-card {
      display: none;
    }
    .desktop-user-welcome {
      display: inline-grid;
      grid-template-columns: 40px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      min-width: 190px;
      margin-bottom: 18px;
      padding: 8px 11px 8px 8px;
      border: 1px solid var(--line-soft);
      border-radius: 11px;
      background: var(--panel-3);
      color: var(--text);
      font: inherit;
      text-align: left;
      cursor: pointer;
      transition: border-color .18s ease, background .18s ease;
    }
    .desktop-user-welcome:hover {
      border-color: var(--muted-2);
      background: var(--panel-2);
    }
    .desktop-user-avatar {
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
      border: 1px solid rgba(0, 229, 160, .28);
      border-radius: 50%;
      background: var(--green-soft);
      color: var(--green-2);
      font-size: 15px;
      font-weight: 800;
    }
    .desktop-user-welcome > div {
      display: grid;
      min-width: 0;
      gap: 3px;
    }
    .desktop-user-welcome strong {
      overflow: hidden;
      color: var(--text);
      font-size: 15px;
      line-height: 1.2;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .desktop-user-welcome small {
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      line-height: 1.2;
    }
    .desktop-user-chevron {
      color: var(--muted);
      font-size: 18px;
      line-height: 1;
      transition: transform .18s ease;
    }
    .desktop-user-welcome:hover .desktop-user-chevron {
      transform: translateY(2px);
    }

    @media (max-width: 680px) {
      .login-view {
        min-height: 100dvh;
        place-items: start center;
        overflow-x: hidden;
        overflow-y: auto;
        padding:
          calc(env(safe-area-inset-top, 0px) + 58px)
          16px
          calc(env(safe-area-inset-bottom, 0px) + 24px);
      }
      .login-view::before {
        background-size: 42px 42px;
        opacity: .65;
      }
      .login-page-back {
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: 16px;
        min-height: 38px;
        padding-inline: 11px;
      }
      .login-shell {
        width: 100%;
        gap: 10px;
      }
      .login-story {
        min-height: 0;
        padding: 16px 20px;
        border-radius: 16px;
        background: rgba(17, 19, 24, .9);
      }
      .login-story::after,
      .login-story .login-kicker,
      .login-story .login-story-description {
        display: none;
      }
      .login-logo {
        font-size: 23px;
      }
      .login-story h1 {
        margin: 14px 0 7px;
        font-size: 27px;
        line-height: 1.05;
      }
      .login-story .login-mobile-description {
        display: block !important;
        max-width: 31ch;
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.45;
      }
      .login-solutions-label { margin-top: 16px; }
      .login-proof {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
        margin-top: 8px;
      }
      .proof-card {
        padding: 13px 14px;
        border-radius: 13px;
      }
      .proof-card small { margin-bottom: 6px; font-size: 9px; }
      .proof-card strong { margin-bottom: 5px; font-size: 15px; }
      .proof-card > span { display: block; font-size: 11px; line-height: 1.4; }
      .proof-card > b { margin-top: 9px; }
      .login-access-context { margin-top: 10px; }
      .login-access-context p { font-size: 10px; }
      .login-card {
        padding: 22px 20px 20px;
        border-radius: 16px;
      }
      .login-card h2 {
        font-size: 25px;
      }
      .login-access-label {
        margin-bottom: 8px;
        font-size: 10px;
      }
      .login-card p {
        margin-bottom: 21px;
        font-size: 14px;
        line-height: 1.5;
      }
      .login-card .field {
        margin-bottom: 14px;
      }
      .login-card .field label {
        margin-bottom: 7px;
        font-size: 11px;
      }
      .login-card .field input {
        min-height: 52px;
        font-size: 16px;
      }
      .login-card .btn-primary {
        min-height: 50px;
      }
      .login-help {
        margin-top: 18px;
      }
      .login-security-note {
        margin-top: 12px;
      }
      .modal.login-showcase-modal {
        width: calc(100vw - 20px);
        max-width: none;
        max-height: calc(100dvh - 20px);
        padding: 18px;
        overflow-x: hidden;
      }
      .login-showcase-head {
        margin-inline: -18px;
        padding-inline: 18px;
      }
      .login-showcase-layout { grid-template-columns: 1fr; gap: 18px; }
      .login-showcase-copy h3 { font-size: 28px; }
      .login-showcase-actions { grid-template-columns: 1fr; }
      .login-showcase-actions .btn { width: 100%; }
      .login-product-preview { padding: 14px; }
      .login-preview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

      .topbar {
        gap: 14px;
      }
      .desktop-user-welcome {
        display: none;
      }
      .mobile-user-card {
        display: grid;
        width: 100%;
        gap: 14px;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--panel);
        box-shadow: 0 14px 36px rgba(0, 0, 0, .16);
      }
      .mobile-user-identity {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
      }
      .mobile-user-avatar {
        display: grid;
        place-items: center;
        width: 48px;
        height: 48px;
        border: 1px solid rgba(0, 229, 160, .28);
        border-radius: 50%;
        background: var(--green-soft);
        color: var(--green-2);
        font-size: 18px;
        font-weight: 800;
      }
      .mobile-user-identity > div {
        display: grid;
        min-width: 0;
        gap: 3px;
      }
      .mobile-user-identity strong {
        overflow: hidden;
        font-size: 17px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .mobile-user-identity small {
        color: var(--muted);
        font-size: 13px;
        font-weight: 600;
      }
      .mobile-user-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
        gap: 8px;
      }
      body.admin-mode .mobile-user-actions {
        grid-template-columns: 44px minmax(0, 1fr);
      }
      .mobile-user-actions .portal-theme-switch {
        width: 44px;
        min-width: 44px;
        padding: 0;
      }
      .mobile-account-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 44px;
        padding: 0 10px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: var(--panel-3);
        color: var(--text);
        font-size: 13px;
        font-weight: 700;
      }
      .mobile-account-action.pending-button.has-pending {
        border-color: rgba(255, 107, 107, .55);
        background: rgba(255, 107, 107, .11);
        color: #ffd2d2;
      }
      .topbar-heading {
        width: 100%;
      }
      .page-title-line {
        align-items: flex-start;
        gap: 9px;
      }
      .client-budget-header-action {
        min-height: 34px;
        padding-inline: 12px;
        font-size: 12px;
      }
      body:not(.admin-mode) .topbar-actions {
        display: none !important;
      }
      body.admin-mode .topbar-actions {
        display: block;
        width: 100%;
      }
      body.admin-mode .topbar-actions > .settings-trigger,
      body.admin-mode .topbar-actions > .logout-button {
        display: none !important;
      }
      body.admin-mode .topbar-admin-project {
        display: grid !important;
        width: 100%;
      }

      body.settings-open {
        overflow: hidden;
      }
      .settings-popover {
        inset: 0 !important;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        width: 100%;
        padding:
          calc(env(safe-area-inset-top, 0px) + 12px)
          12px
          calc(env(safe-area-inset-bottom, 0px) + 82px);
        overflow-x: hidden;
        overflow-y: auto;
        background: rgba(5, 7, 10, .76);
        backdrop-filter: blur(10px);
      }
      .settings-popover.hidden {
        display: none !important;
      }
      .settings-panel {
        width: min(480px, 100%);
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 106px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 16px;
      }
      .settings-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--panel);
      }
      .settings-action {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        min-height: 64px;
      }
      .settings-action-icon {
        width: 40px;
        height: 40px;
      }
    html[data-theme="light"] .settings-popover {
      background: rgba(29, 41, 54, .38);
    }
  }

  body.image-preview-open {
    overflow: hidden;
  }

  .admin-report-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
  }

  .admin-report-heading .section-caption {
    margin-top: 0;
  }

  .admin-report-heading h2 {
    margin: 0 0 7px;
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -.035em;
  }

  .admin-report-heading p {
    margin: 0;
    color: var(--muted);
  }

  .service-report-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .service-kpi {
    display: grid;
    align-content: start;
    min-height: 132px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
  }

  .service-kpi.is-attention {
    border-color: rgba(255, 107, 107, .38);
    background: linear-gradient(135deg, rgba(255, 107, 107, .1), var(--panel));
  }

  .service-kpi span,
  .service-kpi small {
    color: var(--muted);
    font-size: 12px;
  }

  .service-kpi strong {
    margin: 10px 0 7px;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -.045em;
  }

  .service-report-insight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(0, 229, 160, .24);
    border-radius: 14px;
    background: var(--green-soft);
  }

  .service-report-insight .section-caption {
    margin: 0 0 5px;
  }

  .service-report-insight > span {
    color: var(--muted);
    font-size: 13px;
    text-align: right;
  }

  .service-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
  }

  .service-chart-card {
    min-width: 0;
  }

  .service-horizontal-chart {
    display: grid;
    gap: 13px;
    margin-top: 18px;
  }

  .service-chart-row {
    display: grid;
    grid-template-columns: minmax(112px, .8fr) minmax(110px, 1.7fr) 28px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
  }

  .service-chart-row > span {
    color: var(--muted);
  }

  .service-chart-row > div {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--panel-3);
  }

  .service-chart-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
  }

  .service-chart-row i.danger { background: var(--red); }
  .service-chart-row i.blue { background: var(--blue); }
  .service-chart-row i.muted { background: var(--muted-2); }
  .service-chart-row i.rating { background: var(--yellow); }

  .service-chart-row > strong {
    text-align: right;
  }

  .service-volume-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(36px, 1fr));
    align-items: end;
    gap: 9px;
    height: 210px;
    margin-top: 12px;
  }

  .service-volume-column {
    display: grid;
    grid-template-rows: 20px minmax(0, 1fr) 20px;
    align-items: end;
    gap: 6px;
    height: 100%;
    text-align: center;
  }

  .service-volume-column > strong,
  .service-volume-column > span {
    font-size: 11px;
  }

  .service-volume-column > span {
    color: var(--muted);
    text-transform: capitalize;
  }

  .service-volume-column > div {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 8px 8px 3px 3px;
    background: var(--panel-3);
  }

  .service-volume-column i {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, var(--green-2), rgba(0, 229, 160, .46));
  }

  .rating-chart .service-chart-row {
    grid-template-columns: minmax(94px, auto) minmax(90px, 1fr) 28px;
  }

  .service-report-footnote {
    display: block;
    margin-top: 18px;
    color: var(--muted-2);
    line-height: 1.5;
  }

  .service-priority-summary {
    display: grid;
    gap: 10px;
    margin-top: 18px;
  }

  .service-priority-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel-3);
  }

  .service-priority-summary > div > strong {
    font-size: 22px;
  }

  .comment-attachment.comment-image {
    cursor: zoom-in;
  }

  .image-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(4, 6, 9, .9);
    backdrop-filter: blur(12px);
  }

  .image-preview-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1180px, 100%);
    height: min(92dvh, 900px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .image-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .image-preview-head > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .image-preview-head strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .image-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .image-preview-stage {
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: auto;
    padding: 16px;
    background: #07090d;
  }

  .image-preview-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  #request-modal:has(#request-action-workspace.is-open) .admin-request-footer .request-primary-action {
    display: none !important;
  }

  @media (max-width: 680px) {
    .admin-report-heading,
    .service-report-insight {
      align-items: flex-start;
      flex-direction: column;
    }

    .admin-report-heading .btn {
      width: 100%;
    }

    .service-report-kpis,
    .service-report-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .service-kpi {
      min-height: 112px;
    }

    .service-report-insight > span {
      text-align: left;
    }

    .service-chart-row {
      grid-template-columns: minmax(102px, .9fr) minmax(70px, 1.2fr) 24px;
    }

    .comment-attachments-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .paste-preview-head {
      align-items: flex-start;
      flex-direction: column;
    }

    .paste-preview-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .image-preview-backdrop {
      padding: 0;
    }

    .image-preview-dialog {
      width: 100%;
      height: 100dvh;
      border: 0;
      border-radius: 0;
    }

    .image-preview-head {
      align-items: flex-start;
    }

    .image-preview-actions .btn {
      min-height: 40px;
      padding-inline: 10px;
      font-size: 11px;
    }

    .image-preview-stage {
      padding: 10px;
    }
  }

  /* Chamados no celular: leitura, rolagem do detalhe e ações acima do menu. */
  @media (max-width: 680px) {
    .ticket-card {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 12px;
    }
    .ticket-card .request-actions {
      display: flex;
      width: 100%;
      min-width: 0;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
    }
    .ticket-card .client-ticket-priority {
      flex: 0 0 auto;
    }
    .ticket-card .client-ticket-status {
      flex: 1 1 150px;
      min-width: 0;
      text-align: left;
    }
    .ticket-card .rating-action,
    .ticket-card .ticket-rating-preview,
    .ticket-card .ticket-details-action {
      display: inline-flex;
      flex: 1 1 135px;
      align-items: center;
      justify-content: center;
      width: auto;
      min-height: 42px;
      margin: 0;
      text-align: center;
    }
    .ticket-card .ticket-rating-preview {
      padding: 0 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-2);
      white-space: nowrap;
    }

    body.request-detail-open .sidebar {
      visibility: hidden;
      pointer-events: none;
    }
    #request-modal.modal-backdrop {
      z-index: 120;
    }
    #request-action-modal.modal-backdrop {
      z-index: 140;
    }
    #satisfaction-modal.modal-backdrop,
    #delete-request-modal.modal-backdrop {
      z-index: 150;
    }
    #request-action-modal .action-modal {
      max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }
    #request-modal .request-modal {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      width: 100%;
      height: 100vh;
      height: 100dvh;
      min-height: 0;
      padding: 0 14px;
      overflow: hidden;
      background: var(--bg);
    }
    #request-modal .modal-head {
      position: relative;
      z-index: 3;
      width: 100%;
      min-width: 0;
      margin: 0;
      padding: calc(10px + env(safe-area-inset-top, 0px)) 0 12px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--bg);
    }
    #request-modal .modal-head > div {
      min-width: 0;
    }
    #request-modal .modal-head h3 {
      overflow-wrap: anywhere;
      line-height: 1.25;
    }
    #request-modal .modal-head > .btn {
      flex: 0 0 auto;
      min-height: 42px;
    }
    #request-modal .request-modal-scroll {
      display: block;
      min-height: 0;
      padding: 12px 0 18px;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      scrollbar-width: auto;
    }
    #request-modal .request-modal-scroll::-webkit-scrollbar {
      display: initial;
      width: 4px;
    }
    #request-modal .request-modal-scroll::-webkit-scrollbar-thumb {
      border-radius: 999px;
      background: var(--line);
    }
    #request-modal .request-guidance,
    #request-modal .request-detail-grid {
      width: 100%;
    }
    #request-modal .request-detail-footer {
      position: relative;
      z-index: 3;
      width: 100%;
      min-height: 0;
      margin: 0;
      padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
      border-top: 1px solid var(--line-soft);
      background: var(--bg);
    }
    #request-modal .client-request-footer {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: stretch;
      gap: 8px;
      flex-wrap: wrap !important;
    }
    #request-modal .client-request-footer .btn {
      width: 100% !important;
      min-width: 0;
      min-height: 46px;
    }
    #request-modal .client-request-footer .request-more-options {
      grid-column: 1 / -1;
    }

    .mobile-user-card {
      position: fixed;
      top: calc(env(safe-area-inset-top, 0px) + 8px);
      right: 12px;
      left: 12px;
      z-index: 72;
      width: auto;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 13px;
      background: rgba(15, 18, 24, .96);
      backdrop-filter: blur(18px);
    }
    .mobile-user-identity {
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 9px;
    }
    .mobile-user-avatar {
      width: 38px;
      height: 38px;
      font-size: 14px;
    }
    .mobile-user-identity strong {
      font-size: 14px;
    }
    .mobile-user-identity small {
      font-size: 10px;
    }
    .mobile-user-actions,
    body.admin-mode .mobile-user-actions {
      display: flex;
      grid-template-columns: none;
      gap: 6px;
    }
    .mobile-account-action {
      width: auto;
      min-height: 40px;
      padding: 0 9px;
      font-size: 11px;
      white-space: nowrap;
    }
    .main {
      padding-top: calc(92px + env(safe-area-inset-top, 0px));
    }
    body.request-detail-open .mobile-user-card {
      visibility: hidden;
      pointer-events: none;
    }
    html[data-theme="light"] .mobile-user-card {
      background: rgba(255, 255, 255, .96);
    }
  }
/* Catálogo de soluções: cada produto mantém sua própria aplicação e regras. */
.solutions-modal {
  width: min(820px, calc(100vw - 32px));
}

/* Entrada pública: autenticação direta, sem misturar apresentação comercial ao portal. */
.login-view {
  --login-paper: #efeee8;
  --login-panel: #fbfaf7;
  --login-ink: #14181f;
  --login-muted: #62666e;
  --login-line: #d8d5cb;
  --login-green: #1e4a3d;
  --login-brass: #9c7a34;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 76px 24px 42px;
  background: var(--login-paper);
  color: var(--login-ink);
  font-family: 'IBM Plex Sans', sans-serif;
}

.login-view::before {
  opacity: .42;
  background-image:
    linear-gradient(var(--login-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-line) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 76%);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 470px);
  max-width: 470px;
}

.login-story { display: none; }

.login-card {
  width: 100%;
  min-height: 0;
  padding: clamp(28px, 5vw, 42px);
  border: 1px solid var(--login-line);
  border-radius: 3px;
  background: rgba(251, 250, 247, .97);
  color: var(--login-ink);
  box-shadow: 0 24px 70px rgba(20, 24, 31, .10);
}

.login-card-brand {
  margin-bottom: 42px;
  color: var(--login-ink);
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.03em;
}
.login-card-brand span { color: var(--login-muted); font-weight: 500; }
.login-card-brand b { color: var(--login-brass); font-weight: 600; }

.login-access-label {
  color: var(--login-green);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.login-card h2 {
  margin-top: 10px;
  color: var(--login-ink);
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.login-card > p { margin: 9px 0 28px; color: var(--login-muted); }
.login-card .field label { color: var(--login-muted); font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.login-card .field input {
  min-height: 48px;
  border: 1px solid var(--login-line);
  border-radius: 2px;
  background: #fff;
  color: var(--login-ink);
  font-family: 'IBM Plex Sans', sans-serif;
}
.login-card .field input::placeholder { color: #9a9992; }
.login-card .field input:focus { border-color: var(--login-green); box-shadow: 0 0 0 2px rgba(30, 74, 61, .1); }
.login-card .btn-primary { min-height: 48px; border-radius: 2px; background: var(--login-green); color: #fff; font-family: 'IBM Plex Mono', monospace; }
.login-security-note { color: var(--login-muted); border-color: var(--login-line); background: transparent; }
.login-security-note span { color: var(--login-green); }
.login-help { color: var(--login-muted); }
.login-help a { color: var(--login-green); }
.login-page-back {
  top: 24px;
  left: 28px;
  border: 0;
  border-bottom: 1px solid var(--login-line);
  border-radius: 0;
  background: transparent;
  color: var(--login-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.login-page-back:hover { border-color: var(--login-green); color: var(--login-green); }
.login-error { border-radius: 2px; }

/* Entrada dos produtos: a marca permanece consistente e a autenticação só
   aparece depois que a pessoa identifica o ambiente que deseja acessar. */
.portal-boot-logo {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 800;
  letter-spacing: -.055em;
}
.portal-boot-logo span { color: #fff; }
.portal-boot-logo b { color: var(--green); font-weight: 800; }

.login-card-brand {
  display: inline-flex;
  align-items: baseline;
  margin-bottom: 34px;
  padding: 9px 13px 10px;
  background: #0d1218;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
}
.login-card-brand span { color: #fff; font-weight: 800; }
.login-card-brand b { color: var(--green); font-weight: 800; }

.login-product-choice > p,
.login-credentials > p {
  margin: 9px 0 25px;
  color: var(--login-muted);
  line-height: 1.55;
}
.login-product-grid { display: grid; gap: 11px; }
.login-product-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 96px;
  padding: 15px;
  border: 1px solid var(--login-line);
  border-radius: 3px;
  background: #fff;
  color: var(--login-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.login-product-option:hover {
  border-color: var(--login-green);
  background: #f2f7f4;
  transform: translateY(-2px);
}
.login-product-option:focus-visible { outline: 3px solid rgba(30, 74, 61, .2); outline-offset: 2px; }
.login-product-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(30, 74, 61, .22);
  background: #edf5f1;
  color: var(--login-green);
  font-size: 21px;
}
.login-product-option strong,
.login-product-option small { display: block; }
.login-product-option strong { margin-bottom: 4px; font-size: 15px; }
.login-product-option small { color: var(--login-muted); font-size: 12px; line-height: 1.4; }
.login-product-option > b { color: var(--login-green); font-size: 18px; }
.login-choice-note { margin: 17px 0 0 !important; font-size: 12px; }

.login-change-product {
  margin: 0 0 18px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid var(--login-line);
  background: transparent;
  color: var(--login-muted);
  font: 500 11px 'IBM Plex Mono', monospace;
  cursor: pointer;
}
.login-change-product:hover { border-color: var(--login-green); color: var(--login-green); }
.login-selected-product {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid rgba(30, 74, 61, .24);
  background: #edf5f1;
}
.login-selected-product > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--login-green);
  color: #fff;
  font-size: 19px;
}
.login-selected-product strong,
.login-selected-product small { display: block; }
.login-selected-product strong { color: var(--login-ink); font-size: 14px; }
.login-selected-product small { margin-top: 2px; color: var(--login-muted); font-size: 11px; }
.login-credentials form { margin-top: 0; }
.login-password-control { position: relative; }
.login-password-control input { padding-right: 104px; }
.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-height: 34px;
  padding: 0 9px;
  transform: translateY(-50%);
  border: 0;
  border-left: 1px solid var(--login-line);
  background: transparent;
  color: var(--login-green);
  font: 600 11px 'IBM Plex Sans', sans-serif;
  cursor: pointer;
}
.login-password-toggle:hover,
.login-password-toggle:focus-visible { color: #123b30; text-decoration: underline; }
.login-remember-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -2px 0 18px;
  color: var(--login-ink);
  cursor: pointer;
}
.login-remember-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--login-green);
}
.login-remember-option span,
.login-remember-option strong,
.login-remember-option small { display: block; }
.login-remember-option strong { font-size: 12px; font-weight: 600; }
.login-remember-option small { margin-top: 2px; color: var(--login-muted); font-size: 10px; line-height: 1.4; }
.login-error {
  display: grid;
  gap: 2px;
  border-color: #e6b7b4;
  background: #fff4f3;
  color: #7e2925;
  box-shadow: 0 0 0 1px rgba(157, 55, 48, .03);
}
.login-error::before { background: #f7d8d5; color: #9d3730; }
.login-error strong { font-size: 12px; }
.login-error span { font-size: 12px; line-height: 1.45; }
.login-card input[aria-invalid="true"] {
  border-color: #b94740;
  box-shadow: 0 0 0 2px rgba(185, 71, 64, .12);
}

/* Entrada clara dos Produtos CQData. O carregamento não herda o tema escuro
   da área autenticada e a marca acompanha o site institucional. */
.portal-boot {
  background-color: #f4f6f7;
  background-image:
    linear-gradient(rgba(23, 32, 42, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  color: #637080;
}
.portal-boot-logo {
  color: #17202a;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -.06em;
}
.portal-boot-logo span { color: #17202a; }
.portal-boot-logo b { margin-left: 2px; color: #18a878; }
.portal-boot-bar { background: #d8dee3; }
.portal-boot-bar-fill { background: #18a878; }
.portal-boot-label { color: #637080; }

.login-card-brand {
  margin-bottom: 36px;
  padding: 0;
  background: transparent;
  color: #17202a;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -.055em;
}
.login-card-brand span { color: #17202a; font-weight: 700; }
.login-card-brand b { margin-left: 1px; color: #18a878; }

.login-product-option[data-login-product="atendimento"] .login-product-icon {
  border-color: #b8d9cd;
  background: #edf6f2;
  color: #1e7b5e;
}
.login-product-option[data-login-product="assistencia"] .login-product-icon {
  border-color: #c8d5e2;
  background: #eef3f8;
  color: #365f84;
}
html[data-login-product="atendimento"] .login-selected-product {
  border-color: #b8d9cd;
  background: #edf6f2;
}
html[data-login-product="atendimento"] .login-selected-product > span { background: #1e7b5e; }
html[data-login-product="assistencia"] .login-selected-product {
  border-color: #c8d5e2;
  background: #eef3f8;
}
html[data-login-product="assistencia"] .login-selected-product > span { background: #365f84; }
html[data-login-product="assistencia"] #login-product-context { color: #365f84; }
.login-credentials:not(.hidden) { animation: loginStepIn .26s ease both; }
.login-product-choice:not(.hidden) { animation: loginStepIn .26s ease both; }
.login-card .btn-primary {
  padding-inline: 16px;
  white-space: normal;
  line-height: 1.35;
}
@keyframes loginStepIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* A escolha obrigatória de contexto vira uma etapa própria. Nenhum painel é
   exibido ao fundo enquanto a pessoa decide em qual projeto entrar. */
body.project-choice-stage #project-switcher-modal {
  padding: 24px;
  background-color: #f4f6f7;
  background-image:
    linear-gradient(rgba(23, 32, 42, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  backdrop-filter: none;
}
body.project-choice-stage #project-switcher-modal .project-switcher-modal {
  border: 1px solid #d7dde2;
  background: #fff;
  color: #17202a;
  box-shadow: 0 24px 80px rgba(23, 32, 42, .13);
}
body.project-choice-stage #project-switcher-modal .context-switcher-head { border-color: #e1e5e8; }
body.project-choice-stage #project-switcher-modal .context-switcher-caption,
body.project-choice-stage #project-switcher-modal .context-switcher-description,
body.project-choice-stage #project-switcher-modal .project-choice-copy span,
body.project-choice-stage #project-switcher-modal .project-choice-copy p { color: #667382; }
body.project-choice-stage #project-switcher-modal .context-switcher-head h3,
body.project-choice-stage #project-switcher-modal .project-choice-copy h4 { color: #17202a; }
body.project-choice-stage #project-switcher-modal .project-choice-card {
  border-color: #dfe4e8;
  background: #fafbfb;
}
body.project-choice-stage #project-switcher-modal .project-choice-card.is-current {
  border-color: #8ecab6;
  background: #eef8f4;
}
body.project-choice-stage #project-switcher-modal .project-choice-icon { border-color: #d8e1e5; background: #fff; }
body.project-choice-stage #project-switcher-modal .context-switcher-close { border-color: #d8e0e5; color: #637080; }

.portal-home-hero + .client-action-banner + .client-home .client-welcome { min-height: 0; }

.portal-home-overview {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.portal-home-overview-heading { max-width: 760px; }
.portal-home-overview-heading h2 { margin: 6px 0 5px; font-size: clamp(22px, 2vw, 30px); }
.portal-home-overview-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
@media (max-width: 760px) {
  .portal-home-overview { margin-top: 16px; padding-top: 20px; }
}

@media (max-width: 640px) {
  .login-view { align-items: start; padding: 78px 16px 28px; }
  .login-shell { width: 100%; }
  .login-card { padding: 28px 22px; }
  .login-card-brand { margin-bottom: 32px; }
  .login-page-back { top: 18px; left: 18px; }
  .login-product-option { min-height: 90px; padding: 13px; }
  .login-product-option small { font-size: 11px; }
}

@media (max-width: 430px) {
  body.project-choice-stage #project-switcher-modal { padding: 10px; }
}

.settings-group-label {
  display: block;
  margin: 9px 4px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.solution-card {
  min-width: 0;
  min-height: 238px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.solution-card.is-current {
  border-color: rgba(0, 229, 160, .34);
  background: rgba(0, 229, 160, .055);
}

.solution-card.is-disabled {
  opacity: .72;
}

.solution-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.solution-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--panel);
  font-size: 21px;
  font-weight: 800;
}

.solution-card h4 {
  margin: 0 0 8px;
  font-size: 19px;
}

.solution-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.solution-card .btn {
  width: 100%;
  justify-content: center;
}

.project-product-field {
  padding: 16px;
  border: 1px solid rgba(0, 229, 160, .2);
  border-radius: 15px;
  background: rgba(0, 229, 160, .045);
}

.project-product-preview {
  min-height: 42px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-product-preview .solution-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 18px;
}

.project-product-preview strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 14px;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
}

.field-help {
  display: block;
  margin-top: 7px;
  line-height: 1.4;
}

@media (max-width: 680px) {
  .solutions-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }

  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .solution-card {
    min-height: 210px;
  }

  .project-product-field {
    padding: 14px;
  }
}

/* Shell administrativo no desktop: menu e conteúdo ocupam colunas próprias. */
@media (min-width: 681px) {
  body.admin-desktop-shell .portal-view.active {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: minmax(100vh, auto);
    align-items: stretch;
    width: 100%;
    max-width: none;
  }

  body.admin-desktop-shell.sidebar-collapsed .portal-view.active {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  body.admin-desktop-shell .sidebar {
    position: sticky;
    inset: 0 auto auto 0;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.admin-desktop-shell .sidebar .nav-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    align-content: start;
  }

  body.admin-desktop-shell .sidebar .nav-btn {
    width: 100%;
    min-width: 0;
  }

  body.admin-desktop-shell .main {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  body.admin-desktop-shell #page-admin,
  body.admin-desktop-shell #page-admin > .admin-section,
  body.admin-desktop-shell #page-admin .admin-owner-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}
