    :root {
      color-scheme: dark;
      --bg: #05070a;
      --paper: rgba(11, 19, 32, 0.5);
      --paper-strong: rgba(11, 19, 32, 0.72);
      --glass: rgba(11, 19, 32, 0.44);
      --glass-line: rgba(233, 241, 250, 0.09);
      --background-gradient:
        radial-gradient(ellipse at 22% 16%, rgba(46, 84, 150, 0.32) 0%, rgba(46, 84, 150, 0.1) 36%, rgba(46, 84, 150, 0) 64%),
        radial-gradient(ellipse at 82% 88%, rgba(217, 185, 120, 0.06) 0%, rgba(217, 185, 120, 0) 55%),
        linear-gradient(180deg, #081018 0%, #05070a 100%);
      --ink: #eef2f8;
      --muted: rgba(238, 242, 248, 0.6);
      --line: rgba(233, 241, 250, 0.09);
      --panel: var(--paper);
      --surface: #05070a;
      --surface-strong: rgba(233, 241, 250, 0.07);
      --button: #d9b978;
      --button-deep: #a8823f;
      --button-ink: #171004;
      --button-soft: rgba(217, 185, 120, 0.14);
      --teal: var(--button);
      --teal-soft: var(--button-soft);
      --green: #34c759;
      --amber: #f5b93f;
      --red: #ff6b6b;
      --plum: #d9b978;
      --cyan: #e6d3a3;
      --blue-glow: rgba(96, 150, 255, 0.14);
      --glow: rgba(217, 185, 120, 0.32);
      --meter-fill: linear-gradient(90deg, #d9b978, rgba(217, 185, 120, 0.7), rgba(11, 19, 32, 0.86));
      --shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
      --radius: 14px;
      --focus: 0 0 0 3px rgba(217, 185, 120, 0.5);
      --serif: "Instrument Serif", "Canela", "PP Editorial", Georgia, serif;
      --sans: "Neue Montreal", "Suisse Int'l", "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
      --ease: cubic-bezier(0.19, 1, 0.22, 1);
    }

    * {
      box-sizing: border-box;
    }

    html {
      min-width: 320px;
      background: var(--surface);
    }

    body {
      position: relative;
      isolation: isolate;
      margin: 0;
      min-height: 100vh;
      overflow-x: hidden;
      font-family: var(--sans);
      -webkit-font-smoothing: antialiased;
      color: var(--ink);
      background: var(--background-gradient);
      background-attachment: fixed;
      letter-spacing: 0;
    }

    body.auth-locked .app,
    body.auth-locked .mobile-tabbar {
      display: none;
    }

    body.member-mode .topbar .select-wrap,
    body.member-mode #saveButton,
    body.member-mode .export-wrap,
    body.member-mode .file-label,
    body.member-mode #printButton,
    body.member-mode .settings-wrap,
    body.member-mode [data-view-button="team"] {
      display: none !important;
    }

    body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(233, 241, 250, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(233, 241, 250, 0.03) 1px, transparent 1px);
      background-size: 34px 34px, 34px 34px;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
    }

    .app {
      position: relative;
      z-index: 2;
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr);
      min-height: 100vh;
    }

    .auth-gate {
      position: relative;
      z-index: 2;
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 24px;
    }

    .auth-gate[hidden] {
      display: none;
    }

    .auth-card {
      width: min(520px, 100%);
      display: grid;
      gap: 18px;
      padding: 22px;
      border: 1px solid rgba(233, 241, 250, 0.1);
      border-radius: 20px;
      background: linear-gradient(145deg, rgba(233, 241, 250, 0.07), rgba(233, 241, 250, 0.02));
      backdrop-filter: blur(24px) saturate(140%);
      -webkit-backdrop-filter: blur(24px) saturate(140%);
      box-shadow: 0 40px 110px rgba(0, 0, 0, 0.5), 0 0 70px rgba(217, 185, 120, 0.07);
    }

    .auth-brand {
      display: flex;
      align-items: center;
      gap: 13px;
    }

    .auth-brand img {
      width: 42px;
      height: auto;
      display: block;
    }

    .auth-brand h1 {
      margin: 0;
      font-family: var(--serif);
      font-weight: 400;
      font-size: 2rem;
      line-height: 1.05;
      letter-spacing: -0.01em;
    }

    .auth-brand span {
      display: block;
      margin-top: 4px;
      color: var(--cyan);
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.32em;
      text-transform: uppercase;
    }

    .auth-message {
      min-height: 22px;
      margin: 0;
      color: var(--muted);
      font-size: 0.88rem;
      font-weight: 750;
      line-height: 1.45;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      padding: 4px;
      border: 1px solid rgba(233, 241, 250, 0.1);
      border-radius: 999px;
      background: rgba(233, 241, 250, 0.05);
      backdrop-filter: blur(10px);
    }

    .auth-tabs button {
      min-height: 42px;
      border-radius: 999px;
      color: var(--muted);
      background: transparent;
      font-weight: 600;
      letter-spacing: 0.03em;
      transition: color 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
    }

    .auth-tabs button.active {
      color: var(--button-ink);
      background: linear-gradient(135deg, var(--button) 0%, var(--button-deep) 100%);
      box-shadow: 0 10px 30px rgba(217, 185, 120, 0.28);
    }

    .auth-form[hidden] {
      display: none;
    }

    .auth-form input {
      border-color: rgba(233, 241, 250, 0.12);
      border-radius: 12px;
      background: rgba(4, 7, 14, 0.55);
      transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
    }

    .auth-form input:focus {
      border-color: rgba(217, 185, 120, 0.55);
      box-shadow: var(--focus);
    }

    .auth-form .primary {
      border-radius: 999px;
      background: linear-gradient(135deg, var(--button) 0%, var(--button-deep) 100%);
      color: var(--button-ink);
      box-shadow: 0 10px 40px rgba(217, 185, 120, 0.28);
      letter-spacing: 0.03em;
      transition: box-shadow 0.5s var(--ease), filter 0.5s var(--ease);
    }

    .auth-form .primary:hover {
      box-shadow: 0 16px 60px rgba(217, 185, 120, 0.45);
    }

    .sidebar {
      position: sticky;
      top: 0;
      z-index: 15;
      height: 100vh;
      display: flex;
      flex-direction: column;
      gap: 18px;
      padding: 22px 18px;
      border-right: 1px solid var(--glass-line);
      background: var(--glass);
      backdrop-filter: blur(18px) saturate(145%);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 44px;
    }

    .brand-mark {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      border-radius: var(--radius);
      color: #fff;
      background: transparent;
    }

    .brand-mark img {
      width: 36px;
      height: auto;
      display: block;
      object-fit: contain;
    }

    .brand h1 {
      margin: 0;
      font-family: var(--serif);
      font-weight: 400;
      font-size: 1.2rem;
      line-height: 1.2;
      letter-spacing: 0.02em;
    }

    .brand span {
      display: block;
      margin-top: 2px;
      color: var(--cyan);
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3em;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav button,
    .utility button,
    .file-label,
    .export-action,
    .settings-action {
      width: 100%;
      min-height: 40px;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: var(--radius);
      color: var(--ink);
      background: transparent;
      text-align: left;
      font-weight: 600;
      transition: color 0.4s var(--ease), background 0.4s var(--ease);
    }

    .nav button svg,
    .utility button svg,
    .file-label svg,
    .export-action svg,
    .settings-action svg,
    .icon-button svg,
    .mini-button svg,
    .primary svg {
      width: 17px;
      height: 17px;
      flex: 0 0 auto;
      stroke-width: 2;
    }

    .nav button:hover,
    .utility button:hover,
    .file-label:hover,
    .export-action:hover,
    .settings-action:hover {
      color: var(--cyan);
      background: rgba(217, 185, 120, 0.08);
    }

    .nav button.active,
    .utility button.active,
    .settings-action.active {
      color: var(--button);
      background: rgba(217, 185, 120, 0.14);
    }

    .sidebar-spacer {
      flex: 1;
    }

    .utility {
      display: grid;
      gap: 6px;
    }

    .export-wrap,
    .settings-wrap {
      position: relative;
    }

    .export-panel,
    .settings-panel {
      position: absolute;
      left: calc(100% + 10px);
      bottom: 0;
      z-index: 14;
      width: min(330px, calc(100vw - 32px));
      display: grid;
      gap: 10px;
      padding: 12px;
      background: var(--paper-strong);
    }

    .export-panel[hidden],
    .settings-panel[hidden] {
      display: none;
    }

    .settings-panel .appearance-wrap {
      display: grid;
      width: 100%;
    }

    .settings-panel .appearance-panel {
      position: static;
      width: 100%;
      margin-top: 8px;
      padding: 12px;
      background: var(--paper-strong);
    }

    .settings-language {
      display: grid;
      gap: 6px;
      padding-top: 2px;
    }

    .settings-language select {
      min-height: 40px;
    }

    .file-label {
      cursor: pointer;
    }

    .file-label input {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      clip-path: inset(50%);
    }

    main {
      min-width: 0;
      padding: 26px;
    }

    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }

    .title-block {
      min-width: 0;
    }

    .title-block p {
      margin: 0 0 5px;
      color: var(--cyan);
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.3em;
      text-transform: uppercase;
    }

    .title-block h2 {
      margin: 0;
      font-family: var(--serif);
      font-weight: 400;
      font-size: clamp(1.7rem, 3vw, 2.4rem);
      line-height: 1.08;
      letter-spacing: -0.01em;
    }

    .title-block h2 em {
      font-style: italic;
      color: var(--cyan);
    }

    .filters {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      max-width: 720px;
    }

    .segmented {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: minmax(94px, 1fr);
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper);
      backdrop-filter: blur(18px) saturate(140%);
      box-shadow: var(--shadow);
    }

    .segmented button {
      min-height: 34px;
      padding: 7px 10px;
      border-radius: 6px;
      color: var(--muted);
      background: transparent;
      font-weight: 800;
    }

    .segmented button.active {
      color: var(--button-ink);
      background: linear-gradient(135deg, var(--button) 0%, var(--button-deep) 100%);
      box-shadow: 0 6px 20px rgba(217, 185, 120, 0.24);
    }

    .select-wrap,
    .field {
      display: grid;
      gap: 6px;
    }

    label {
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 800;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    select,
    input,
    textarea {
      min-height: 42px;
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 9px 10px;
      color: var(--ink);
      background: var(--paper-strong);
      backdrop-filter: blur(14px) saturate(130%);
      outline: none;
    }

    textarea {
      min-height: 86px;
      resize: vertical;
      font: inherit;
      line-height: 1.35;
    }

    select option {
      color: #e9f1fa;
      background: #0a1728;
    }

    select:focus,
    input:focus,
    button:focus-visible,
    .file-label:focus-within {
      box-shadow: var(--focus);
    }

    select:disabled,
    button:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    .scope-select {
      min-width: 250px;
    }

    .appearance-wrap {
      position: relative;
      display: inline-flex;
    }

    .appearance-toggle {
      white-space: nowrap;
    }

    .appearance-panel {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      z-index: 12;
      width: min(340px, calc(100vw - 32px));
      display: grid;
      gap: 12px;
      padding: 14px;
    }

    .appearance-panel[hidden] {
      display: none;
    }

    .color-controls {
      display: grid;
      gap: 8px;
    }

    .color-panel {
      min-height: 48px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 38px;
      gap: 10px;
      align-items: center;
      padding: 8px 9px;
      border: 1px solid var(--glass-line);
      border-radius: var(--radius);
      background: var(--paper);
      color: var(--muted);
      font-weight: 780;
      text-transform: none;
      letter-spacing: 0;
    }

    .color-panel input[type="color"] {
      width: 38px;
      height: 32px;
      min-height: 0;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: transparent;
      cursor: pointer;
      padding: 2px;
    }

    .color-panel input[type="color"]::-webkit-color-swatch-wrapper {
      padding: 0;
    }

    .color-panel input[type="color"]::-webkit-color-swatch {
      border: 0;
      border-radius: 5px;
    }

    .gradient-mode {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }

    .mode-button {
      min-height: 34px;
      border: 1px solid var(--glass-line);
      border-radius: var(--radius);
      background: var(--paper);
      color: var(--button);
      font-size: 0.78rem;
      font-weight: 850;
    }

    .mode-button.is-active {
      background: var(--button);
      color: var(--button-ink);
    }

    .appearance-panel-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .appearance-panel-title strong {
      font-size: 0.84rem;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .appearance-panel-title button {
      min-height: 32px;
      padding: 6px 9px;
      font-size: 0.74rem;
    }

    .view {
      display: none;
    }

    .view.active {
      display: block;
    }

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }

    .kpi {
      min-height: 116px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      backdrop-filter: blur(18px) saturate(140%);
      box-shadow: var(--shadow);
    }

    .kpi > span {
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .kpi strong {
      display: block;
      margin-top: 9px;
      font-family: var(--serif);
      font-weight: 400;
      font-size: clamp(1.85rem, 4vw, 2.65rem);
      line-height: 1;
      letter-spacing: 0;
    }

    .kpi small {
      display: block;
      margin-top: 8px;
      color: var(--muted);
      font-weight: 700;
    }

    .content-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
      gap: 12px;
      align-items: start;
    }

    body.member-mode #dashboardPrimaryGrid {
      grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    }

    body.member-mode #dashboardSecondaryGrid {
      grid-template-columns: minmax(0, 1.2fr);
      max-width: calc((100% - 14px) * 0.6);
    }

    #goalsView.member-goals .content-grid {
      grid-template-columns: 1fr;
    }

    .panel {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper);
      backdrop-filter: blur(18px) saturate(140%);
      box-shadow: var(--shadow);
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 56px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }

    .panel-header h3 {
      margin: 0;
      font-size: 1rem;
      line-height: 1.2;
      letter-spacing: 0;
    }

    .panel-header span {
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 700;
    }

    .panel-tools {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 180px;
    }

    .panel-tools select {
      min-height: 34px;
      padding: 6px 8px;
      font-size: 0.84rem;
      font-weight: 800;
    }

    .gauge-wrap {
      display: grid;
      grid-template-columns: 220px minmax(0, 1fr);
      gap: 22px;
      align-items: center;
      padding: 24px;
    }

    .gauge {
      --value: 0deg;
      position: relative;
      width: 210px;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background:
        radial-gradient(circle at center, var(--paper-strong) 0 58%, transparent 59%),
        conic-gradient(var(--button) var(--value), rgba(233, 241, 250, 0.13) 0);
      box-shadow:
        inset 0 0 0 1px rgba(233, 241, 250, 0.06),
        0 0 34px rgba(217, 185, 120, 0.14);
    }

    .gauge::after {
      content: "";
      position: absolute;
      inset: 24px;
      border-radius: 50%;
      border: 1px solid var(--line);
    }

    .gauge-number {
      position: relative;
      z-index: 1;
      text-align: center;
    }

    .gauge-number strong {
      display: block;
      font-family: var(--serif);
      font-weight: 400;
      font-size: 2.9rem;
      line-height: 1;
      letter-spacing: 0;
    }

    .gauge-number span {
      color: var(--muted);
      font-weight: 800;
      text-transform: uppercase;
      font-size: 0.76rem;
    }

    .meter-details {
      display: grid;
      gap: 12px;
    }

    .detail-row {
      display: grid;
      gap: 7px;
    }

    .detail-row header {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: var(--muted);
      font-size: 0.85rem;
      font-weight: 800;
    }

    .bar {
      position: relative;
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(133, 142, 151, 0.22);
      box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(233, 241, 250, 0.06);
    }

    .bar span {
      position: absolute;
      inset: 0 auto 0 0;
      width: var(--width, 0%);
      max-width: 100%;
      border-radius: inherit;
      background: var(--color, var(--teal));
    }

    .chart {
      padding: 18px 16px 20px;
    }

    .bars {
      display: grid;
      gap: 14px;
    }

    .bar-row {
      display: grid;
      grid-template-columns: minmax(88px, 112px) minmax(0, 1fr) minmax(46px, 54px);
      gap: 12px;
      align-items: center;
      min-height: 30px;
    }

    .bar-row b {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 0.9rem;
      text-align: center;
    }

    .bar-row output {
      color: var(--muted);
      font-weight: 800;
      text-align: center;
    }

    #memberTimeBars {
      gap: 12px;
      padding: 12px 16px 14px;
    }

    #memberTimeBars .bar-row {
      grid-template-columns: minmax(78px, 104px) minmax(140px, 1fr) minmax(44px, 54px);
      gap: 10px;
    }

    .goal-list {
      display: grid;
      gap: 10px;
      padding: 14px;
    }
    /* No Painel, "Minhas metas" acompanha o mesmo recuo do painel vizinho (participação). */
    #focusPanel .goal-list { padding: 18px 16px 20px; }

    .goal-card {
      width: 100%;
      min-width: 0;
      display: grid;
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      backdrop-filter: blur(14px) saturate(130%);
    }

    .goal-top {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
    }

    .goal-title {
      min-width: 0;
    }

    .goal-title strong {
      display: block;
      overflow-wrap: anywhere;
      font-size: 0.98rem;
      line-height: 1.25;
    }

    .goal-title span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 700;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      max-width: 170px;
      padding: 3px 8px;
      border-radius: 999px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--badge-ink, var(--teal));
      background: var(--badge-bg, var(--teal-soft));
      font-size: 0.75rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .badge.done {
      --badge-ink: var(--green);
      --badge-bg: rgba(52, 199, 89, 0.18);
    }

    .badge.watch {
      --badge-ink: var(--amber);
      --badge-bg: rgba(245, 185, 63, 0.16);
    }

    .badge.risk {
      --badge-ink: var(--red);
      --badge-bg: rgba(255, 107, 107, 0.18);
    }

    .goal-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
    }

    .goal-meta span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      text-align: center;
    }

    .goal-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: end;
      min-width: 0;
    }

    .goal-fields {
      flex: 1 1 340px;
      display: grid;
      grid-template-columns: minmax(74px, 0.8fr) minmax(74px, 0.8fr) minmax(120px, 1.3fr);
      gap: 10px;
      min-width: 0;
    }

    .compact-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .compact-field label {
      font-size: 0.68rem;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
    }

    .compact-field input {
      min-height: 36px;
      width: 100%;
      min-width: 0;
      padding: 6px 8px;
      text-align: center;
      text-overflow: ellipsis;
    }

    .compact-field input[type="number"] {
      appearance: textfield;
    }

    .compact-field input[type="number"]::-webkit-inner-spin-button,
    .compact-field input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .icon-cluster {
      flex: 0 0 auto;
      margin-left: auto;
      display: flex;
      gap: 6px;
      align-items: end;
      justify-content: flex-end;
    }

    .icon-button,
    .mini-button {
      min-width: 36px;
      min-height: 36px;
      display: inline-grid;
      place-items: center;
      border-radius: var(--radius);
      color: var(--ink);
      background: var(--surface-strong);
    }

    .icon-button:hover,
    .mini-button:hover {
      color: var(--teal);
      background: var(--teal-soft);
    }

    .icon-button.danger:hover {
      color: var(--red);
      background: rgba(255, 107, 107, 0.16);
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 16px;
    }

    .field.wide {
      grid-column: span 2;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    .form-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
      grid-column: 1 / -1;
      padding-top: 4px;
    }

    #memberPointRequestPanel .form-grid {
      grid-template-columns: minmax(0, 1.45fr) minmax(86px, 0.48fr) minmax(136px, 0.72fr);
      gap: 10px;
      padding: 14px 16px 15px;
      align-items: end;
    }

    #memberPointRequestPanel .field.wide {
      grid-column: auto;
    }

    #memberPointRequestPanel label {
      font-size: 0.68rem;
      line-height: 1;
      white-space: nowrap;
    }

    #memberPointRequestPanel input,
    #memberPointRequestPanel select {
      min-height: 38px;
      padding: 7px 9px;
      font-size: 0.88rem;
    }

    #memberPointRequestPanel .point-note-field {
      grid-column: 1 / 3;
    }

    #memberPointRequestPanel .form-actions {
      grid-column: 3;
      justify-content: end;
      padding-top: 0;
    }

    #memberPointRequestPanel .form-actions button {
      min-height: 38px;
      width: 100%;
      padding-inline: 10px;
      font-size: 0.84rem;
      white-space: nowrap;
    }

    .check-field {
      min-height: 42px;
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      color: var(--ink);
      background: var(--paper-strong);
      font-size: 0.88rem;
      font-weight: 800;
      text-transform: none;
    }

    .check-field input {
      min-height: auto;
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: var(--button);
    }

    .primary,
    .secondary {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 9px 14px;
      border-radius: var(--radius);
      font-weight: 900;
    }

    .primary {
      color: var(--button-ink);
      background: linear-gradient(135deg, var(--button) 0%, var(--button-deep) 100%);
      box-shadow: 0 8px 26px rgba(217, 185, 120, 0.22);
      transition: box-shadow 0.5s var(--ease), filter 0.5s var(--ease);
    }

    .primary:hover {
      filter: brightness(1.08);
      box-shadow: 0 12px 38px rgba(217, 185, 120, 0.34);
    }

    .save-button {
      align-self: end;
      white-space: nowrap;
    }

    .secondary {
      color: var(--button);
      border: 1px solid var(--line);
      background: var(--paper);
      backdrop-filter: blur(14px) saturate(130%);
    }

    .secondary:hover {
      background: var(--surface-strong);
    }

    .stack {
      display: grid;
      gap: 12px;
    }

    .team-grid {
      display: grid;
      grid-template-columns: minmax(260px, 0.75fr) repeat(2, minmax(300px, 1fr));
      gap: 12px;
      align-items: start;
    }

    .task-scores-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      align-items: start;
    }

    .auth-grid {
      grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.55fr);
    }

    .login-session-card {
      display: grid;
      gap: 12px;
      padding: 16px;
      transition: gap 260ms ease, padding 260ms ease, min-height 360ms ease;
    }

    .login-session-user {
      min-height: 86px;
      display: grid;
      gap: 6px;
      align-content: center;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      transition: min-height 380ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 320ms ease, border-color 260ms ease, background 260ms ease, box-shadow 260ms ease;
    }

    .login-session-user strong {
      overflow-wrap: anywhere;
      font-size: 1rem;
      line-height: 1.2;
    }

    .login-session-user span {
      color: var(--muted);
      font-size: 0.86rem;
      font-weight: 750;
    }

    #memberView.timer-only #memberKpiGrid,
    #memberView.timer-only #memberTimeChartPanel,
    #memberView.timer-only #memberRequestGrid {
      display: none;
    }

    #memberView.timer-only #memberTimerGrid {
      grid-template-columns: minmax(0, 860px);
      justify-content: center;
    }

    #memberView.timer-only #adminTimeGrid {
      grid-template-columns: minmax(0, 860px);
      justify-content: center;
    }

    #memberView.timer-only #memberTimerGrid > .panel {
      overflow: hidden;
      background:
        radial-gradient(circle at 50% 18%, rgba(52, 199, 89, 0.12), transparent 38%),
        var(--paper);
    }

    #memberView.timer-only .login-session-card {
      min-height: min(620px, calc(100vh - 220px));
      place-content: center;
      gap: 22px;
      padding: 28px;
    }

    #memberView.timer-only .login-session-user {
      min-height: 260px;
      justify-items: center;
      text-align: center;
      background: linear-gradient(180deg, rgba(233, 241, 250, 0.08), rgba(233, 241, 250, 0.03));
    }

    #memberView.timer-only #memberTimerDisplay {
      font-size: clamp(3.4rem, 9vw, 7rem);
      line-height: 0.95;
      font-variant-numeric: tabular-nums;
      transition: font-size 380ms cubic-bezier(0.2, 0.8, 0.2, 1), color 220ms ease, text-shadow 220ms ease, transform 300ms ease;
    }

    #memberView.timer-only.is-running #memberTimerDisplay {
      color: var(--green);
      text-shadow: 0 0 28px rgba(52, 199, 89, 0.22);
      font-size: clamp(4.3rem, 12vw, 9rem);
      animation: timer-start-pop 520ms cubic-bezier(0.2, 0.9, 0.2, 1) both, timer-digital-breathe 2600ms ease-in-out 520ms infinite;
    }

    #memberView.timer-only.is-running .login-session-card {
      gap: 16px;
    }

    #memberView.timer-only.is-running .login-session-user {
      min-height: min(470px, calc(100vh - 250px));
      transform: scale(1.012);
      border-color: rgba(52, 199, 89, 0.34);
      background:
        radial-gradient(circle at 50% 28%, rgba(52, 199, 89, 0.13), transparent 42%),
        linear-gradient(180deg, rgba(233, 241, 250, 0.09), rgba(233, 241, 250, 0.025));
      box-shadow: 0 18px 70px rgba(52, 199, 89, 0.1);
    }

    #memberView.timer-only .form-actions {
      justify-content: center;
    }

    .timer-task-fields {
      display: grid;
      gap: 12px;
      width: min(100%, 620px);
      margin: 0 auto;
      max-height: 230px;
      opacity: 1;
      overflow: hidden;
      transform: translateY(0) scale(1);
      visibility: visible;
      transition:
        max-height 330ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 220ms ease,
        transform 280ms ease,
        margin 330ms ease,
        visibility 0ms linear 0ms;
    }

    #memberView.timer-only.is-running .timer-task-fields {
      max-height: 0;
      margin-top: -10px;
      margin-bottom: -6px;
      opacity: 0;
      pointer-events: none;
      transform: translateY(-12px) scale(0.985);
      visibility: hidden;
      transition:
        max-height 330ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 180ms ease,
        transform 260ms ease,
        margin 330ms ease,
        visibility 0ms linear 330ms;
    }

    @keyframes timer-start-pop {
      0% {
        transform: scale(0.92);
        letter-spacing: 0;
      }
      65% {
        transform: scale(1.035);
      }
      100% {
        transform: scale(1);
        letter-spacing: 0;
      }
    }

    @keyframes timer-digital-breathe {
      0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 28px rgba(52, 199, 89, 0.22);
      }
      50% {
        transform: scale(1.012);
        text-shadow: 0 0 42px rgba(52, 199, 89, 0.34);
      }
    }

    #memberView.admin-time #memberTimerGrid {
      grid-template-columns: minmax(0, 1fr);
    }

    #memberView.admin-time #adminTimeGrid {
      grid-template-columns: minmax(0, 1fr);
      justify-content: center;
    }

    #memberView.admin-time #memberTimeChartPanel {
      min-height: 100%;
    }

    .login-note {
      margin: 0;
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 700;
      line-height: 1.45;
    }

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

    .account-actions button {
      min-height: 34px;
      padding: 7px 10px;
      font-size: 0.78rem;
    }

    button.activity-row {
      width: 100%;
      color: inherit;
      text-align: left;
      cursor: pointer;
    }

    .time-summary-row {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .time-summary-row > strong {
      align-self: center;
      min-width: 80px;
      text-align: right;
      font-family: var(--serif);
      font-weight: 400;
      font-size: 1.2rem;
    }

    .score-profiles {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 12px;
      padding: 14px;
    }

    .score-profile {
      position: relative;
      overflow: hidden;
      display: grid;
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      backdrop-filter: blur(14px) saturate(130%);
      transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
    }

    .score-profile.score-success {
      border-color: rgba(52, 199, 89, 0.78);
      box-shadow: 0 18px 42px rgba(52, 199, 89, 0.18), var(--shadow);
      animation: scoreSuccessLift 820ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .score-profile.score-success::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 50% 20%, rgba(52, 199, 89, 0.22), transparent 42%),
        linear-gradient(120deg, transparent 18%, rgba(233, 241, 250, 0.14) 38%, transparent 58%);
      opacity: 0;
      animation: successSheen 820ms ease-out;
    }

    .score-profile header {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }

    .score-profile strong {
      display: block;
      color: var(--ink);
      font-size: 1rem;
      overflow-wrap: anywhere;
    }

    .score-profile small {
      color: var(--muted);
      font-weight: 800;
    }

    .sector-badge {
      --sector-bg: var(--surface-strong);
      --sector-fg: var(--ink);
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: fit-content;
      max-width: 100%;
      padding: 3px 7px;
      border-radius: 999px;
      background: var(--sector-bg);
      color: var(--sector-fg);
      font-size: 0.64rem;
      font-weight: 800;
      line-height: 1.1;
      text-transform: uppercase;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sector-prev {
      --sector-bg: rgba(72, 134, 255, 0.24);
      --sector-fg: #a8c7ff;
    }

    .sector-civel {
      --sector-bg: rgba(52, 199, 89, 0.22);
      --sector-fg: #b7ffc5;
    }

    .sector-trabalhista {
      --sector-bg: rgba(255, 86, 86, 0.24);
      --sector-fg: #ffb8b8;
    }

    .sector-comercial {
      --sector-bg: rgba(245, 185, 63, 0.22);
      --sector-fg: #ffd98c;
    }

    .sector-default {
      --sector-bg: var(--surface-strong);
      --sector-fg: var(--muted);
    }

    .sector-box {
      background: linear-gradient(0deg, rgba(11, 19, 32, 0.7), rgba(11, 19, 32, 0.7)), var(--sector-bg);
      border-color: var(--sector-bg);
    }

    .sector-box .score-metric,
    .sector-box .open-pill {
      background: rgba(233, 241, 250, 0.1);
    }

    .team-row .sector-badge,
    .sector-edit .sector-badge {
      max-width: 92px;
      font-size: 0.6rem;
      padding-inline: 6px;
    }

    .sector-select {
      background: linear-gradient(0deg, rgba(11, 19, 32, 0.58), rgba(11, 19, 32, 0.58)), var(--sector-bg);
      border-color: var(--sector-bg);
      color: var(--sector-fg);
      font-weight: 800;
    }

    .score-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
      align-items: end;
    }

    .score-date-field,
    .score-goal-field {
      display: grid;
      gap: 6px;
    }

    .score-date-field input,
    .score-goal-field select,
    .score-actions button {
      min-height: 48px;
    }

    .score-protocol-button {
      position: relative;
      overflow: hidden;
      transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
    }

    .score-protocol-button.is-success {
      color: #fff;
      background: linear-gradient(180deg, #64e985 0%, #34c759 100%);
      box-shadow: 0 10px 28px rgba(52, 199, 89, 0.34);
      animation: protocolButtonPop 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .score-protocol-button.is-success::after {
      content: "";
      position: absolute;
      inset: 1px;
      border-radius: calc(var(--radius) - 1px);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 58%);
      pointer-events: none;
    }

    .score-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .score-metric {
      min-height: 68px;
      display: grid;
      place-items: center;
      gap: 3px;
      padding: 8px;
      border-radius: var(--radius);
      background: var(--surface-strong);
      text-align: center;
    }

    .score-metric b {
      font-family: var(--serif);
      font-weight: 400;
      font-size: 1.55rem;
      line-height: 1;
    }

    .score-metric span {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .activity-list {
      display: grid;
      gap: 8px;
      padding: 14px;
    }

    .activity-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      backdrop-filter: blur(14px) saturate(130%);
      color: var(--muted);
      font-weight: 800;
    }

    .activity-row strong {
      display: block;
      color: var(--ink);
    }

    .activity-row-button {
      width: 100%;
      cursor: pointer;
      text-align: left;
    }

    .activity-row-button:hover {
      border-color: var(--teal);
      background: var(--button-soft);
    }

    .activity-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-top: 4px;
    }

    .open-pill {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 6px 10px;
      border-radius: 999px;
      background: var(--surface-strong);
      color: var(--ink);
      font-size: 0.78rem;
      font-weight: 900;
    }

    .simple-list {
      display: grid;
      gap: 8px;
      padding: 14px;
    }

    .team-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      backdrop-filter: blur(14px) saturate(130%);
    }

    details.team-row {
      display: block;
    }

    .person-summary {
      list-style: none;
      display: grid;
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
      gap: 10px;
      align-items: center;
      cursor: pointer;
    }

    .person-summary::-webkit-details-marker {
      display: none;
    }

    .person-summary strong,
    .person-summary span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .person-summary span {
      color: var(--muted);
      font-weight: 750;
      font-size: 0.88rem;
    }

    .person-menu {
      display: grid;
      gap: 10px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }

    .team-row input,
    .team-row select {
      min-height: 36px;
      padding: 6px 8px;
      min-width: 0;
    }

    .sector-edit {
      display: block;
      min-width: 0;
    }

    .person-fields {
      display: grid;
      grid-template-columns: minmax(140px, 0.9fr) minmax(170px, 1.15fr) minmax(170px, 1fr);
      gap: 8px;
      align-items: center;
    }

    .person-menu .person-fields {
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .person-menu .area-line {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 20;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(4, 7, 14, 0.62);
      backdrop-filter: blur(14px) saturate(125%);
    }

    .modal-backdrop[hidden] {
      display: none;
    }

    .modal-box {
      width: min(720px, 100%);
      max-height: min(720px, calc(100vh - 36px));
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--paper-strong);
      backdrop-filter: blur(18px) saturate(140%);
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    }

    .modal-header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
      padding: 16px;
      border-bottom: 1px solid var(--line);
    }

    .modal-header h3 {
      margin: 0;
      font-size: 1.1rem;
    }

    .modal-header span {
      color: var(--muted);
      font-weight: 800;
    }

    .modal-body {
      min-height: 0;
      overflow: auto;
    }

    .empty {
      padding: 28px 18px;
      color: var(--muted);
      text-align: center;
      font-weight: 700;
    }

    .toast {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 10;
      max-width: min(380px, calc(100vw - 36px));
      padding: 12px 14px;
      border-radius: var(--radius);
      color: var(--ink);
      background: var(--paper-strong);
      border: 1px solid var(--line);
      box-shadow: var(--shadow);
      transform: translateY(18px);
      opacity: 0;
      pointer-events: none;
      transition: 180ms ease;
      font-weight: 800;
    }

    .toast.show {
      transform: translateY(0);
      opacity: 1;
    }

    .confetti-burst {
      position: fixed;
      inset: 0;
      z-index: 60;
      pointer-events: none;
      overflow: hidden;
    }

    .confetti-piece {
      position: fixed;
      left: var(--x);
      top: var(--y);
      width: var(--size);
      height: calc(var(--size) * 1.45);
      border-radius: 3px;
      background: var(--color);
      opacity: 0;
      box-shadow: 0 2px 7px rgba(0, 0, 0, 0.16);
      transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
      animation: confettiPop var(--duration) cubic-bezier(0.16, 0.95, 0.25, 1) forwards;
      animation-delay: var(--delay);
    }

    .confetti-piece.is-dot {
      width: var(--size);
      height: var(--size);
      border-radius: 999px;
    }

    .confetti-piece.is-capsule {
      border-radius: 999px;
    }

    @keyframes scoreSuccessLift {
      0% {
        transform: scale(1);
      }
      36% {
        transform: scale(1.012);
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes successSheen {
      0% {
        opacity: 0;
        transform: translateX(-18%);
      }
      32% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: translateX(18%);
      }
    }

    @keyframes protocolButtonPop {
      0% {
        transform: scale(0.98);
      }
      42% {
        transform: scale(1.028);
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes confettiPop {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.45) rotate(0deg);
      }
      12% {
        opacity: 1;
      }
      78% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.92) rotate(var(--rot));
      }
    }

    .mobile-tabbar {
      display: none;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    @media (max-width: 1120px) {
      .app {
        grid-template-columns: 88px minmax(0, 1fr);
      }

      .sidebar {
        padding: 18px 12px;
        align-items: center;
      }

      .brand {
        justify-content: center;
      }

      .brand h1,
      .nav button span,
      .utility button span,
      .file-label span {
        display: none;
      }

      .nav,
      .utility {
        width: 100%;
      }

      .nav button,
      .utility button,
      .file-label {
        justify-content: center;
        padding-inline: 8px;
      }

      .settings-panel .settings-action {
        justify-content: flex-start;
        padding-inline: 10px;
      }

      .settings-panel .settings-action span {
        display: inline;
      }

      .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .content-grid,
      .team-grid,
      .task-scores-grid,
      .auth-grid {
        grid-template-columns: 1fr;
      }

      body.member-mode #dashboardPrimaryGrid,
      body.member-mode #dashboardSecondaryGrid {
        grid-template-columns: 1fr;
        max-width: none;
      }

      .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      #memberPointRequestPanel .form-grid {
        grid-template-columns: 1fr;
      }

      #memberPointRequestPanel .point-note-field,
      #memberPointRequestPanel .form-actions {
        grid-column: 1;
      }
    }

    @media (max-width: 760px) {
      body {
        background: var(--background-gradient);
      }

      .app {
        display: block;
        padding-bottom: 72px;
      }

      .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

      .brand h1 {
        display: block;
      }

      .brand span,
      .nav,
      .utility,
      .sidebar-spacer {
        display: none;
      }

      main {
        padding: 16px;
      }

      .topbar {
        display: grid;
      }

      .filters {
        justify-content: stretch;
      }

      .filters,
      .scope-select,
      .segmented,
      .appearance-wrap,
      .appearance-toggle {
        width: 100%;
      }

      .segmented {
        grid-auto-columns: minmax(0, 1fr);
      }

      .appearance-panel {
        position: fixed;
        top: 86px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 112px);
        overflow: auto;
      }

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

      .gauge-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 18px;
      }

      .meter-details {
        width: 100%;
      }

      .bar-row {
        grid-template-columns: minmax(82px, 112px) minmax(0, 1fr) 48px;
      }

      .goal-fields {
        flex-basis: 100%;
        grid-template-columns: 1fr;
      }

      .icon-cluster {
        width: 100%;
        justify-content: flex-end;
      }

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

      .field.wide {
        grid-column: auto;
      }

      .person-fields {
        grid-template-columns: 1fr;
      }

      .sector-edit {
        grid-template-columns: 1fr;
      }

      .score-actions {
        grid-template-columns: 1fr;
      }

      .modal-backdrop {
        padding: 10px;
      }

      .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 8;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        border-top: 1px solid var(--line);
        background: var(--paper-strong);
        backdrop-filter: blur(18px) saturate(140%);
      }

      .mobile-tabbar button {
        min-height: 58px;
        display: grid;
        place-items: center;
        gap: 3px;
        color: var(--muted);
        background: transparent;
        font-size: 0.72rem;
        font-weight: 900;
      }

      .mobile-tabbar button.active {
        color: var(--teal);
      }

      .mobile-tabbar svg {
        width: 18px;
        height: 18px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .score-profile.score-success,
      .score-profile.score-success::after,
      .score-protocol-button.is-success,
      .confetti-piece {
        animation: none;
      }
    }

    .auth-back {
      display: block;
      margin-top: 1rem;
      font-size: 12px;
      text-align: center;
      color: rgba(233, 241, 250, 0.5);
      text-decoration: none;
      transition: color 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    }

    .auth-back:hover {
      color: #d9b978;
    }

    /* ============================================================
       AdvTrack v3 — camada enterprise (dark tech + gold)
       ============================================================ */

    .auth-gate {
      overflow: hidden;
      isolation: isolate;
    }

    .auth-scene {
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
    }

    .auth-scene__glow {
      position: absolute;
      border-radius: 50%;
      filter: blur(90px);
    }

    .auth-scene__glow--a {
      width: 55vw;
      height: 55vw;
      max-width: 860px;
      max-height: 860px;
      left: -14%;
      top: -22%;
      background: radial-gradient(circle, rgba(46, 84, 150, 0.34), transparent 65%);
      animation: authGlow 11s ease-in-out infinite alternate;
    }

    .auth-scene__glow--b {
      width: 44vw;
      height: 44vw;
      max-width: 680px;
      max-height: 680px;
      right: -12%;
      bottom: -24%;
      background: radial-gradient(circle, rgba(217, 185, 120, 0.13), transparent 65%);
      animation: authGlow 13s ease-in-out infinite alternate-reverse;
    }

    @keyframes authGlow {
      from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
      to { transform: translate3d(3%, 4%, 0) scale(1.08); opacity: 1; }
    }

    .auth-scene__lines {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      opacity: 0.7;
    }

    .auth-scene__lines path {
      fill: none;
      stroke: rgba(233, 241, 250, 0.07);
      stroke-width: 1;
      stroke-dasharray: 6 14;
      animation: lineDrift 26s linear infinite;
    }

    .auth-scene__lines path.line-b {
      stroke: rgba(96, 150, 255, 0.09);
      animation-duration: 34s;
      animation-direction: reverse;
    }

    @keyframes lineDrift {
      to { stroke-dashoffset: -400; }
    }

    .auth-scene__lines circle {
      fill: rgba(217, 185, 120, 0.55);
      animation: nodePulse 4s ease-in-out infinite;
    }

    .auth-scene__lines circle:nth-of-type(2) { animation-delay: 1.2s; }
    .auth-scene__lines circle:nth-of-type(3) { animation-delay: 2.1s; }
    .auth-scene__lines circle:nth-of-type(4) { animation-delay: 0.6s; }
    .auth-scene__lines circle:nth-of-type(5) { animation-delay: 2.8s; }

    @keyframes nodePulse {
      0%, 100% { opacity: 0.25; }
      50% { opacity: 0.9; }
    }

    .auth-scene__particles i {
      position: absolute;
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: rgba(217, 185, 120, 0.5);
      box-shadow: 0 0 10px rgba(217, 185, 120, 0.5);
      animation: floatUp 9s ease-in-out infinite;
    }

    .auth-scene__particles i:nth-child(odd) {
      background: rgba(96, 150, 255, 0.45);
      box-shadow: 0 0 10px rgba(96, 150, 255, 0.45);
    }

    .auth-scene__particles i:nth-child(1) { left: 8%; top: 72%; animation-delay: 0s; }
    .auth-scene__particles i:nth-child(2) { left: 16%; top: 34%; animation-delay: 1.4s; }
    .auth-scene__particles i:nth-child(3) { left: 27%; top: 58%; animation-delay: 2.8s; }
    .auth-scene__particles i:nth-child(4) { left: 38%; top: 22%; animation-delay: 0.9s; }
    .auth-scene__particles i:nth-child(5) { left: 47%; top: 80%; animation-delay: 3.4s; }
    .auth-scene__particles i:nth-child(6) { left: 56%; top: 40%; animation-delay: 2.2s; }
    .auth-scene__particles i:nth-child(7) { left: 64%; top: 66%; animation-delay: 4.6s; }
    .auth-scene__particles i:nth-child(8) { left: 72%; top: 28%; animation-delay: 1.8s; }
    .auth-scene__particles i:nth-child(9) { left: 81%; top: 74%; animation-delay: 3.9s; }
    .auth-scene__particles i:nth-child(10) { left: 88%; top: 46%; animation-delay: 0.4s; }
    .auth-scene__particles i:nth-child(11) { left: 93%; top: 18%; animation-delay: 2.5s; }
    .auth-scene__particles i:nth-child(12) { left: 33%; top: 88%; animation-delay: 5.2s; }

    @keyframes floatUp {
      0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.25; }
      50% { transform: translate3d(6px, -26px, 0); opacity: 0.8; }
    }

    .auth-stage {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 460px);
      align-items: center;
      gap: clamp(40px, 7vw, 110px);
      width: min(1180px, 100%);
      animation: authIn 1.4s var(--ease) both;
    }

    @keyframes authIn {
      from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
      to { opacity: 1; transform: translateY(0); filter: blur(0); }
    }

    .auth-hero__eyebrow {
      margin: 0 0 22px;
      color: var(--button);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.42em;
      text-transform: uppercase;
    }

    .auth-hero__title {
      margin: 0;
      font-family: var(--serif);
      font-weight: 400;
      font-size: clamp(2.4rem, 3.6vw, 3.7rem);
      line-height: 1.06;
      letter-spacing: -0.01em;
    }

    .auth-hero__title em {
      font-style: italic;
      color: var(--button);
    }

    .auth-hero__sub {
      margin: 22px 0 0;
      max-width: 30rem;
      color: var(--muted);
      font-size: 1rem;
      font-weight: 300;
      line-height: 1.65;
    }

    .auth-hero__stats {
      display: flex;
      align-items: center;
      gap: 22px;
      margin-top: 44px;
      padding-top: 26px;
      border-top: 1px solid var(--line);
    }

    .auth-hero__stats i {
      width: 1px;
      height: 34px;
      background: var(--line);
    }

    .auth-hero__stats strong {
      display: block;
      font-family: var(--serif);
      font-weight: 400;
      font-size: 1.7rem;
      line-height: 1;
    }

    .auth-hero__stats span {
      display: block;
      margin-top: 7px;
      color: var(--muted);
      font-size: 10.5px;
      font-weight: 500;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    .auth-card {
      width: 100%;
      padding: 30px 28px;
      border-radius: 24px;
      border-color: rgba(233, 241, 250, 0.12);
      box-shadow:
        0 60px 140px rgba(0, 0, 0, 0.6),
        0 0 90px rgba(46, 84, 150, 0.12),
        0 0 0 1px rgba(217, 185, 120, 0.06) inset;
    }

    .auth-card::before {
      content: "";
      position: absolute;
      inset: -1px;
      border-radius: 24px;
      padding: 1px;
      background: linear-gradient(150deg, rgba(217, 185, 120, 0.35), rgba(233, 241, 250, 0.06) 32%, rgba(233, 241, 250, 0.02) 70%, rgba(96, 150, 255, 0.18));
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
    }

    .auth-card { position: relative; }

    .auth-brand span {
      color: var(--button);
    }

    .auth-back {
      display: block;
      margin-top: 4px;
      text-align: center;
      color: rgba(238, 242, 248, 0.6);
      font-size: 12px;
      letter-spacing: 0.06em;
      text-decoration: none;
      transition: color 0.4s var(--ease);
    }

    .auth-back:hover {
      color: var(--button);
    }

    @media (max-width: 980px) {
      .auth-stage {
        grid-template-columns: 1fr;
        width: min(520px, 100%);
      }
      .auth-hero { display: none; }
    }

    /* --------- app chrome polish --------- */

    .view.active {
      animation: viewIn 0.65s var(--ease) backwards;
    }

    @keyframes viewIn {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .sidebar {
      background: linear-gradient(180deg, rgba(11, 19, 32, 0.6), rgba(5, 7, 10, 0.45));
    }

    .nav button.active {
      color: var(--button);
      background: rgba(217, 185, 120, 0.1);
      box-shadow: 0 0 0 1px rgba(217, 185, 120, 0.22) inset, 0 8px 26px rgba(0, 0, 0, 0.3);
    }

    .nav button.active svg {
      color: var(--button);
    }

    .nav button:hover:not(.active) {
      background: rgba(233, 241, 250, 0.05);
    }

    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
      background: rgba(233, 241, 250, 0.12);
      border-radius: 999px;
      border: 2px solid transparent;
      background-clip: content-box;
    }
    ::-webkit-scrollbar-thumb:hover { background-color: rgba(217, 185, 120, 0.35); }

    ::selection { background: rgba(217, 185, 120, 0.28); color: #fff; }

    @media (prefers-reduced-motion: reduce) {
      .auth-scene__glow,
      .auth-scene__lines path,
      .auth-scene__lines circle,
      .auth-scene__particles i,
      .auth-stage,
      .view.active {
        animation: none !important;
      }
    }

    /* ============================================================
       AdvTrack v3.2 — interior cinematográfico
       (glass em camadas, glow dourado, micro-motion, profundidade)
       ============================================================ */

    main {
      position: relative;
      padding: 28px 32px 40px;
    }

    main::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        radial-gradient(ellipse 90% 40% at 70% -5%, rgba(46, 84, 150, 0.16), transparent 60%),
        radial-gradient(ellipse 50% 30% at 8% 108%, rgba(217, 185, 120, 0.05), transparent 60%);
    }

    /* ---------- topbar flutuante ---------- */

    .topbar {
      position: sticky;
      top: 14px;
      z-index: 20;
      align-items: center;
      margin-bottom: 26px;
      padding: 14px 20px;
      border: 1px solid rgba(233, 241, 250, 0.08);
      border-radius: 20px;
      background: linear-gradient(160deg, rgba(11, 19, 32, 0.72), rgba(5, 7, 10, 0.55));
      backdrop-filter: blur(26px) saturate(150%);
      -webkit-backdrop-filter: blur(26px) saturate(150%);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    }

    .topbar::before {
      content: "";
      position: absolute;
      inset: 0 auto auto 0;
      width: 100%;
      height: 1px;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, rgba(217, 185, 120, 0.35) 18%, rgba(233, 241, 250, 0.12) 55%, transparent);
      pointer-events: none;
    }

    .title-block p {
      color: var(--button);
      letter-spacing: 0.38em;
      font-size: 10.5px;
      font-weight: 600;
    }

    .title-block h2 {
      font-size: clamp(1.8rem, 3vw, 2.5rem);
    }

    /* ---------- segmented pill ---------- */

    .segmented {
      border-radius: 999px;
      background: rgba(5, 7, 10, 0.5);
      border-color: rgba(233, 241, 250, 0.09);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    }

    .segmented button {
      border-radius: 999px;
      font-weight: 600;
      letter-spacing: 0.02em;
      transition: color 0.4s var(--ease), background 0.4s var(--ease);
    }

    .segmented button:hover:not(.active) {
      color: var(--ink);
    }

    .segmented button.active {
      box-shadow: 0 8px 24px rgba(217, 185, 120, 0.3);
    }

    /* ---------- KPIs premium ---------- */

    .kpi-grid {
      gap: 14px;
      margin-bottom: 14px;
    }

    .kpi {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      padding: 20px 20px 18px;
      border-radius: 20px;
      border-color: rgba(233, 241, 250, 0.08);
      background: linear-gradient(165deg, rgba(233, 241, 250, 0.05), rgba(11, 19, 32, 0.35) 55%);
      transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s var(--ease);
    }

    .kpi::before {
      content: "";
      position: absolute;
      inset: 0 auto auto 0;
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, rgba(217, 185, 120, 0.4), rgba(233, 241, 250, 0.08) 60%, transparent);
      opacity: 0.7;
    }

    .kpi::after {
      content: "";
      position: absolute;
      right: -30%;
      top: -55%;
      width: 75%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(46, 84, 150, 0.16), transparent 68%);
      z-index: -1;
      transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    }

    .kpi:hover {
      transform: translateY(-4px);
      border-color: rgba(217, 185, 120, 0.22);
      box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(217, 185, 120, 0.06);
    }

    .kpi:hover::after {
      transform: scale(1.15);
    }

    .kpi > span {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.16em;
      color: rgba(238, 242, 248, 0.55);
    }

    .kpi strong {
      margin-top: 12px;
      font-size: clamp(2.1rem, 4.2vw, 3rem);
      background: linear-gradient(180deg, #ffffff 20%, rgba(238, 242, 248, 0.72));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .kpi small {
      margin-top: 10px;
      font-weight: 500;
      font-size: 0.78rem;
      color: rgba(238, 242, 248, 0.5);
    }

    .view.active .kpi { animation: cardIn 0.9s var(--ease) backwards; }
    .view.active .kpi:nth-child(2) { animation-delay: 0.07s; }
    .view.active .kpi:nth-child(3) { animation-delay: 0.14s; }
    .view.active .kpi:nth-child(4) { animation-delay: 0.21s; }

    @keyframes cardIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ---------- painéis ---------- */

    .content-grid,
    .team-grid,
    .task-scores-grid,
    .stack {
      gap: 14px;
    }

    .panel {
      position: relative;
      border-radius: 20px;
      border-color: rgba(233, 241, 250, 0.08);
      background: linear-gradient(170deg, rgba(233, 241, 250, 0.04), rgba(11, 19, 32, 0.4) 60%);
      transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
    }

    .panel:hover {
      border-color: rgba(233, 241, 250, 0.13);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    }

    .panel-header {
      min-height: 60px;
      padding: 16px 20px;
      border-bottom-color: rgba(233, 241, 250, 0.07);
    }

    .panel-header h3 {
      font-size: 0.95rem;
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .panel-header span {
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(238, 242, 248, 0.58);
    }

    /* ---------- gauge dourado ---------- */

    .gauge {
      background:
        radial-gradient(circle at center, rgba(8, 16, 24, 0.92) 0 58%, transparent 59%),
        conic-gradient(from 0deg, #e8d5a4, var(--button) var(--value), rgba(233, 241, 250, 0.09) var(--value));
      box-shadow:
        inset 0 0 0 1px rgba(233, 241, 250, 0.05),
        0 0 60px rgba(217, 185, 120, 0.12),
        0 30px 70px rgba(0, 0, 0, 0.45);
    }

    .gauge::after {
      inset: 22px;
      border: 1px dashed rgba(233, 241, 250, 0.09);
    }

    .gauge-number strong {
      font-size: 3.2rem;
      background: linear-gradient(180deg, #fff 25%, rgba(238, 242, 248, 0.7));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .gauge-number span {
      font-size: 0.66rem;
      font-weight: 600;
      letter-spacing: 0.22em;
      color: rgba(238, 242, 248, 0.5);
    }

    /* ---------- barras com brilho ---------- */

    .bar {
      height: 8px;
      background: rgba(5, 7, 10, 0.6);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(233, 241, 250, 0.05);
    }

    .bar span {
      background: linear-gradient(90deg, #a8823f, var(--button) 55%, #e8d5a4);
      box-shadow: 0 0 14px rgba(217, 185, 120, 0.35);
      overflow: hidden;
    }

    .bar span::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
      transform: translateX(-100%);
    }

    .meter-details .detail-row:nth-child(-n+5) .bar span::after,
    .bars .bar-row:nth-child(-n+6) .bar span::after {
      animation: shimmer 3.2s var(--ease) infinite;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      55%, 100% { transform: translateX(100%); }
    }

    /* ---------- cards de meta ---------- */

    .goal-card {
      border-radius: 18px;
      border-color: rgba(233, 241, 250, 0.08);
      background: linear-gradient(165deg, rgba(233, 241, 250, 0.045), rgba(11, 19, 32, 0.5) 60%);
      transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
    }

    .goal-card:hover {
      transform: translateY(-3px);
      border-color: rgba(217, 185, 120, 0.2);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    }

    .badge {
      font-weight: 700;
      font-size: 0.68rem;
      letter-spacing: 0.08em;
      backdrop-filter: blur(8px);
      border: 1px solid transparent;
    }

    .badge.done { border-color: rgba(52, 199, 89, 0.28); }
    .badge.watch { border-color: rgba(245, 185, 63, 0.28); }
    .badge.risk { border-color: rgba(255, 107, 107, 0.28); }

    /* ---------- botões ---------- */

    .primary {
      position: relative;
      overflow: hidden;
      border-radius: 999px;
      padding: 9px 18px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .primary::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
      transform: translateX(-110%);
      transition: transform 0.9s var(--ease);
    }

    .primary:hover::after {
      transform: translateX(110%);
    }

    .secondary {
      border-radius: 999px;
      border-color: rgba(217, 185, 120, 0.25);
      background: rgba(217, 185, 120, 0.06);
      font-weight: 600;
      letter-spacing: 0.02em;
      transition: background 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
    }

    .secondary:hover {
      background: rgba(217, 185, 120, 0.14);
      border-color: rgba(217, 185, 120, 0.45);
    }

    .icon-button,
    .mini-button {
      border-radius: 12px;
      background: rgba(233, 241, 250, 0.05);
      border: 1px solid rgba(233, 241, 250, 0.07);
      transition: color 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
    }

    .icon-button:hover,
    .mini-button:hover {
      transform: translateY(-1px);
      border-color: rgba(217, 185, 120, 0.3);
    }

    /* ---------- inputs ---------- */

    select,
    input,
    textarea {
      border-radius: 12px;
      border-color: rgba(233, 241, 250, 0.1);
      background: rgba(5, 7, 10, 0.5);
      transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
    }

    select:focus,
    input:focus,
    textarea:focus {
      border-color: rgba(217, 185, 120, 0.5);
      background: rgba(5, 7, 10, 0.7);
    }

    label {
      font-size: 0.66rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      color: var(--muted);
    }

    /* ---------- sidebar cinematográfica ---------- */

    .sidebar {
      gap: 22px;
      padding: 26px 18px;
      border-right-color: rgba(233, 241, 250, 0.07);
    }

    .sidebar::after {
      content: "";
      position: absolute;
      top: 0;
      right: -1px;
      width: 1px;
      height: 100%;
      background: linear-gradient(180deg, transparent, rgba(217, 185, 120, 0.25) 30%, rgba(46, 84, 150, 0.3) 70%, transparent);
      pointer-events: none;
    }

    .brand-mark {
      position: relative;
    }

    .brand-mark::after {
      content: "";
      position: absolute;
      inset: -6px;
      border-radius: 16px;
      background: radial-gradient(circle, rgba(46, 84, 150, 0.35), transparent 70%);
      filter: blur(8px);
      z-index: -1;
    }

    .brand span {
      color: var(--button);
      letter-spacing: 0.32em;
      font-size: 9.5px;
      font-weight: 600;
    }

    .nav button,
    .utility button,
    .file-label,
    .export-action,
    .settings-action {
      position: relative;
      min-height: 44px;
      border-radius: 14px;
      font-weight: 500;
      font-size: 0.92rem;
      letter-spacing: 0.01em;
      color: rgba(238, 242, 248, 0.78);
      transition: color 0.45s var(--ease), background 0.45s var(--ease), transform 0.45s var(--ease);
    }

    .nav button:hover,
    .utility button:hover,
    .file-label:hover,
    .export-action:hover,
    .settings-action:hover {
      color: var(--ink);
      background: rgba(233, 241, 250, 0.05);
      transform: translateX(2px);
    }

    .nav button.active {
      color: var(--button);
      background: linear-gradient(90deg, rgba(217, 185, 120, 0.13), rgba(217, 185, 120, 0.04));
      box-shadow: 0 0 0 1px rgba(217, 185, 120, 0.18) inset;
      transform: none;
    }

    .nav button.active::before {
      content: "";
      position: absolute;
      left: -12px;
      top: 20%;
      width: 3px;
      height: 60%;
      border-radius: 999px;
      background: linear-gradient(180deg, #e8d5a4, var(--button-deep));
      box-shadow: 0 0 12px rgba(217, 185, 120, 0.6);
    }

    /* ---------- popovers / modal / toast ---------- */

    .export-panel,
    .settings-panel,
    .appearance-panel {
      border-radius: 18px;
      border: 1px solid rgba(233, 241, 250, 0.1);
      background: linear-gradient(165deg, rgba(17, 27, 43, 0.92), rgba(8, 16, 24, 0.94));
      backdrop-filter: blur(30px) saturate(150%);
      -webkit-backdrop-filter: blur(30px) saturate(150%);
      box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(217, 185, 120, 0.05) inset;
    }

    .modal-box {
      border-radius: 22px;
      border: 1px solid rgba(233, 241, 250, 0.11);
      background: linear-gradient(165deg, rgba(17, 27, 43, 0.94), rgba(8, 16, 24, 0.96));
      backdrop-filter: blur(30px) saturate(150%);
      box-shadow: 0 60px 140px rgba(0, 0, 0, 0.65), 0 0 80px rgba(46, 84, 150, 0.1);
    }

    .modal-backdrop {
      background: rgba(3, 5, 8, 0.65);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .toast {
      border-radius: 14px;
      border-color: rgba(217, 185, 120, 0.28);
      background: linear-gradient(160deg, rgba(17, 27, 43, 0.95), rgba(8, 16, 24, 0.95));
      backdrop-filter: blur(20px);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(217, 185, 120, 0.08);
      font-weight: 600;
      transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
    }

    /* ---------- estados vazios ---------- */

    .empty {
      padding: 40px 20px;
      font-family: var(--serif);
      font-weight: 400;
      font-style: italic;
      font-size: 1.05rem;
      color: rgba(238, 242, 248, 0.55);
      letter-spacing: 0.01em;
    }

    .empty::before {
      content: "";
      display: block;
      width: 36px;
      height: 1px;
      margin: 0 auto 16px;
      background: linear-gradient(90deg, transparent, rgba(217, 185, 120, 0.5), transparent);
    }

    /* ---------- tabela / linhas ---------- */

    .score-profile {
      border-radius: 16px;
      border-color: rgba(233, 241, 250, 0.08);
      transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    }

    .login-session-user {
      border-radius: 16px;
      border-color: rgba(233, 241, 250, 0.08);
      transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease), min-height 380ms cubic-bezier(0.2, 0.8, 0.2, 1), background 260ms ease;
    }

    .score-profile:hover {
      border-color: rgba(217, 185, 120, 0.2);
    }

    /* ---------- responsivo: manter beam dentro ---------- */

    @media (max-width: 1120px) {
      .nav button.active::before { left: -10px; }
      .sidebar { padding: 18px 12px; }
      main { padding: 20px 18px 40px; }
      .topbar { top: 10px; }
    }

    @media (prefers-reduced-motion: reduce) {
      .view.active .kpi,
      .bar span::after,
      .primary::after {
        animation: none !important;
        transition: none !important;
      }
    }

    /* ---------- tabbar mobile flutuante ---------- */

    @media (max-width: 760px) {
      .topbar { position: static; }
      .sidebar { padding: 12px; }
      main { padding: 16px 16px 24px; }

      .mobile-tabbar {
        left: 10px;
        right: 10px;
        bottom: 10px;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        grid-template-columns: none;
        border: 1px solid rgba(233, 241, 250, 0.1);
        border-radius: 20px;
        background: linear-gradient(160deg, rgba(17, 27, 43, 0.92), rgba(8, 16, 24, 0.94));
        backdrop-filter: blur(28px) saturate(150%);
        -webkit-backdrop-filter: blur(28px) saturate(150%);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(217, 185, 120, 0.05) inset;
        overflow: hidden;
      }

      .mobile-tabbar button {
        min-height: 56px;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        transition: color 0.4s var(--ease);
      }

      .mobile-tabbar button.active {
        color: var(--button);
      }

      .mobile-tabbar svg {
        width: 17px;
        height: 17px;
      }

    }

    /* ---------- correções de verificação (v3.3) ---------- */

    .settings-panel .appearance-panel {
      background: linear-gradient(165deg, rgba(17, 27, 43, 0.92), rgba(8, 16, 24, 0.94));
    }

    button:focus-visible,
    .file-label:focus-within {
      outline: 2px solid rgba(217, 185, 120, 0.75);
      outline-offset: 2px;
    }

    @media print {
      body {
        background: #fff !important;
        color: #000;
      }
      body::after,
      .sidebar,
      .topbar .filters,
      .mobile-tabbar,
      .toast {
        display: none !important;
      }
      main::before { display: none; }
      .topbar {
        position: static;
        border: 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
      }
      .kpi > strong,
      .gauge-number strong {
        background: none;
        -webkit-background-clip: initial;
        background-clip: initial;
        -webkit-text-fill-color: initial;
        color: #000;
      }
      .panel,
      .kpi,
      .goal-card {
        background: #fff;
        border-color: #ccc;
        box-shadow: none;
        color: #000;
      }
    }

    /* ============ v4.0 — Intranet (solicitações internas) ============ */
    .intranet-tabs {
      display: inline-flex;
      gap: 4px;
      padding: 4px;
      margin-bottom: 18px;
      background: var(--glass);
      border: 1px solid var(--glass-line);
      border-radius: 999px;
      backdrop-filter: blur(14px);
    }
    .intranet-tabs button {
      appearance: none;
      border: 0;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      padding: 8px 18px;
      border-radius: 999px;
      cursor: pointer;
      transition: background 0.4s var(--ease), color 0.4s var(--ease);
    }
    .intranet-tabs button.active {
      background: linear-gradient(135deg, var(--button) 0%, var(--button-deep) 100%);
      color: var(--button-ink);
    }
    .intranet-panel[hidden] { display: none; }

    .status-pill {
      display: inline-flex;
      align-items: center;
      padding: 4px 12px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
      border: 1px solid transparent;
    }
    .status-gold { color: var(--button); border-color: rgba(217, 185, 120, 0.4); background: rgba(217, 185, 120, 0.1); }
    .status-amber { color: var(--amber); border-color: rgba(245, 185, 63, 0.4); background: rgba(245, 185, 63, 0.1); }
    .status-green { color: var(--green); border-color: rgba(52, 199, 89, 0.4); background: rgba(52, 199, 89, 0.1); }
    .status-red { color: var(--red); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.12); }
    .status-muted { color: var(--muted); border-color: var(--line); background: rgba(233, 241, 250, 0.05); }

    .request-row { align-items: flex-start; }
    .request-main { min-width: 0; }
    .request-main > strong { display: block; }
    .request-main > span { color: var(--muted); font-size: 0.8rem; }
    .request-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

    .request-timeline {
      margin-top: 10px;
      padding: 10px 12px;
      border-left: 2px solid rgba(217, 185, 120, 0.45);
      background: rgba(11, 19, 32, 0.35);
      border-radius: 0 10px 10px 0;
      display: grid;
      gap: 10px;
    }
    .request-timeline[hidden] { display: none; }
    .timeline-item { display: grid; gap: 2px; font-size: 0.82rem; }
    .timeline-item b { color: var(--ink); font-size: 0.78rem; letter-spacing: 0.02em; }
    .timeline-item span { color: var(--ink); opacity: 0.85; }
    .timeline-item em { color: var(--muted); font-style: normal; font-size: 0.72rem; }
    .request-timeline-empty { color: var(--muted); font-size: 0.8rem; }

    .timesheet-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

    /* ============ v4.1 — Ponto, expediente e advertências ============ */
    .weekday-picker { display: flex; gap: 8px; flex-wrap: wrap; }
    .weekday-picker label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 12px;
      border: 1px solid var(--glass-line);
      border-radius: 999px;
      background: var(--glass);
      font-size: 0.8rem;
      cursor: pointer;
      user-select: none;
      transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
    }
    .weekday-picker label:has(input:checked) {
      border-color: rgba(217, 185, 120, 0.55);
      background: rgba(217, 185, 120, 0.12);
      color: var(--button);
    }
    .weekday-picker input { accent-color: var(--button); }

    .timesheet-cells {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      font-size: 0.78rem;
      color: var(--muted);
      align-items: center;
    }
    .off-hours { color: var(--red); font-weight: 600; }
    .timesheet-filters input[type="date"],
    .timesheet-filters select {
      background: var(--glass);
      border: 1px solid var(--glass-line);
      border-radius: 10px;
      color: var(--ink);
      padding: 8px 10px;
      font: inherit;
      font-size: 0.82rem;
    }

    .warning-overlay {
      position: fixed;
      inset: 0;
      z-index: 400;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(4, 6, 10, 0.78);
      backdrop-filter: blur(10px);
    }
    .warning-overlay[hidden] { display: none; }
    .warning-card {
      width: min(460px, 100%);
      background: linear-gradient(170deg, rgba(255, 107, 107, 0.1), rgba(11, 19, 32, 0.92) 55%);
      border: 1px solid rgba(255, 107, 107, 0.4);
      border-radius: 18px;
      padding: 26px;
      display: grid;
      gap: 14px;
    }
    .warning-card h3 {
      font-family: var(--serif);
      font-size: 1.5rem;
      color: var(--red);
      letter-spacing: 0.01em;
    }
    .warning-intro { color: var(--ink); font-size: 0.88rem; opacity: 0.9; }
    .warning-list { display: grid; gap: 10px; }
    .warning-item {
      display: grid;
      gap: 3px;
      padding: 10px 12px;
      border-left: 2px solid var(--red);
      background: rgba(11, 19, 32, 0.55);
      border-radius: 0 10px 10px 0;
      font-size: 0.82rem;
    }
    .warning-item em { color: var(--muted); font-style: normal; font-size: 0.72rem; }

    /* ============ v4.2 — Chat interno ============ */
    .nav-badge {
      display: inline-grid;
      place-items: center;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      margin-left: 6px;
      border-radius: 999px;
      background: var(--red);
      color: #fff;
      font-size: 0.62rem;
      font-weight: 700;
      font-style: normal;
      line-height: 1;
    }
    .nav-badge[hidden] { display: none; }

    .chat-layout {
      display: grid;
      grid-template-columns: 290px 1fr;
      gap: 18px;
      align-items: start;
    }
    .chat-sidebar { position: sticky; top: 90px; }
    .chat-channel-list { display: grid; gap: 6px; max-height: 62vh; overflow-y: auto; }
    .chat-channel {
      appearance: none;
      border: 1px solid transparent;
      background: transparent;
      color: var(--ink);
      font: inherit;
      text-align: left;
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-areas: "name badge" "preview badge";
      gap: 2px 8px;
      padding: 10px 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
    }
    .chat-channel:hover { background: rgba(233, 241, 250, 0.05); }
    .chat-channel.active {
      background: rgba(217, 185, 120, 0.1);
      border-color: rgba(217, 185, 120, 0.4);
    }
    .chat-channel-name { grid-area: name; font-weight: 600; font-size: 0.86rem; }
    .chat-channel-preview {
      grid-area: preview;
      color: var(--muted);
      font-size: 0.74rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 200px;
    }
    .chat-channel .nav-badge { grid-area: badge; align-self: center; margin-left: 0; }

    .chat-main { display: grid; grid-template-rows: auto 1fr auto; min-height: 60vh; }
    .chat-thread {
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow-y: auto;
      max-height: 52vh;
      padding: 8px 2px;
    }
    .chat-bubble-row { display: flex; }
    .chat-bubble-row.own { justify-content: flex-end; }
    .chat-bubble {
      max-width: 72%;
      display: grid;
      gap: 3px;
      padding: 9px 13px;
      border-radius: 14px 14px 14px 4px;
      background: var(--glass);
      border: 1px solid var(--glass-line);
      font-size: 0.86rem;
    }
    .chat-bubble.own {
      background: linear-gradient(135deg, rgba(217, 185, 120, 0.92) 0%, rgba(168, 130, 63, 0.92) 100%);
      color: var(--button-ink);
      border-color: transparent;
      border-radius: 14px 14px 4px 14px;
    }
    .chat-bubble b { font-size: 0.7rem; color: var(--button); }
    .chat-bubble span { white-space: pre-wrap; word-break: break-word; }
    .chat-bubble em { font-style: normal; font-size: 0.64rem; opacity: 0.65; justify-self: end; }

    .chat-composer {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      margin-top: 12px;
      align-items: end;
    }
    .chat-composer textarea {
      background: var(--glass);
      border: 1px solid var(--glass-line);
      border-radius: 12px;
      color: var(--ink);
      font: inherit;
      font-size: 0.88rem;
      padding: 10px 12px;
      resize: none;
      min-height: 42px;
    }
    .chat-composer textarea:focus { outline: 1px solid rgba(217, 185, 120, 0.5); }
    /* Botão de enviar compacto e à altura do campo — não um pill largo. */
    .chat-composer button {
      align-self: end;
      height: 42px;
      padding: 0 20px;
      font-size: 0.85rem;
      border-radius: 12px;
    }

    @media (max-width: 900px) {
      .chat-layout { grid-template-columns: 1fr; }
      .chat-sidebar { position: static; }
      .chat-channel-list { max-height: 30vh; }
    }

    /* ============ v4.3 — tabbar com 8 itens ============ */
    @media (max-width: 760px) {
      .mobile-tabbar {
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
      }
      .mobile-tabbar::-webkit-scrollbar { display: none; }
      .mobile-tabbar button {
        flex: 0 0 auto;
        min-width: 64px;
        padding-inline: 8px;
        font-size: 0.6rem;
      }
      .mobile-tabbar .nav-badge {
        position: absolute;
        top: 4px;
        right: 8px;
        margin-left: 0;
      }
      .mobile-tabbar button { position: relative; }
    }

    /* ============ v4.4 — popovers da sidebar (Exportar/Configurações) ============ */
    /* A classe generica .panel (camadas v3.x, definida depois) sobrescrevia o
       position: absolute destes popovers, jogando o conteudo para baixo no fluxo. */
    .export-wrap,
    .settings-wrap { position: relative; }
    .export-panel.panel,
    .settings-panel.panel {
      position: absolute;
      left: calc(100% + 10px);
      right: auto;
      bottom: 0;
      top: auto;
      max-height: min(76vh, 620px);
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    .export-panel.panel[hidden],
    .settings-panel.panel[hidden] { display: none; }

    /* ============ v4.5 — Intimações (DJEN) ============ */
    .intimacoes-layout {
      display: grid;
      grid-template-columns: 1fr 330px;
      gap: 18px;
      align-items: start;
    }
    .intimacoes-side { position: sticky; top: 90px; display: grid; gap: 14px; }
    .intimacoes-toolbar {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .intimacoes-toolbar .intranet-tabs { margin-bottom: 0; }
    .intimacoes-toolbar select {
      background: var(--glass);
      border: 1px solid var(--glass-line);
      border-radius: 10px;
      color: var(--ink);
      padding: 8px 10px;
      font: inherit;
      font-size: 0.82rem;
    }
    .intimacao-row { align-items: flex-start; }
    .intimacao-row.unread {
      border-left: 2px solid var(--button);
      background: rgba(217, 185, 120, 0.05);
    }
    .intimacao-main { min-width: 0; display: grid; gap: 4px; }
    .intimacao-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.86rem; }
    .intimacao-sub { color: var(--muted); font-size: 0.76rem; }
    .intimacao-sub em { color: var(--champagne); font-style: normal; }
    .intimacao-texto {
      margin-top: 8px;
      padding: 12px 14px;
      background: rgba(11, 19, 32, 0.55);
      border-left: 2px solid rgba(217, 185, 120, 0.45);
      border-radius: 0 10px 10px 0;
      font-size: 0.8rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 320px;
      overflow-y: auto;
    }
    .intimacao-texto[hidden] { display: none; }
    .intimacao-actions { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
    .intimacao-link { text-decoration: none; font-size: 0.78rem; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--glass-line); }

    /* Todo o conteúdo solto do painel lateral alinhado ao mesmo recuo (20px) do cabeçalho,
       com espaços iguais nas duas pontas. */
    .intimacoes-side { padding-bottom: 16px; }
    .intimacoes-side .coverage-note,
    .intimacoes-side .monitoring-block > h4 { padding-inline: 20px; }
    .intimacoes-side .form-grid,
    .intimacoes-side .simple-list { padding-inline: 20px; }
    /* Painel estreito: cada campo e o botão ocupam a linha inteira. */
    .intimacoes-side .form-grid { grid-template-columns: 1fr; }
    .intimacoes-side .form-grid .field,
    .intimacoes-side .form-grid .field.wide { grid-column: 1 / -1; }
    .intimacoes-side .form-grid button { width: 100%; justify-content: center; }
    .coverage-note { color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
    .monitoring-block { display: grid; gap: 8px; }
    .monitoring-block h4 { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--champagne); }
    /* O painel lateral é estreito (330px) em qualquer largura: nome em cima,
       campos de OAB embaixo — senão a coluna do nome é esmagada pelos controles. */
    .monitoring-row {
      grid-template-columns: 1fr;
      align-items: start;
      gap: 8px;
    }
    .monitoring-row .account-actions { justify-content: flex-start; flex-wrap: wrap; }
    .oab-input {
      width: 90px;
      background: var(--glass);
      border: 1px solid var(--glass-line);
      border-radius: 8px;
      color: var(--ink);
      padding: 6px 8px;
      font: inherit;
      font-size: 0.78rem;
    }
    .oab-input.oab-uf { width: 46px; text-transform: uppercase; }

    @media (max-width: 900px) {
      .intimacoes-layout { grid-template-columns: 1fr; }
      .intimacoes-side { position: static; }
      /* Empilha teor/ações abaixo do conteúdo para os botões não invadirem o texto. */
      .intimacao-row { grid-template-columns: 1fr; }
      .intimacao-actions { justify-content: flex-start; }
    }

/* ============ v4.0 — Intranet: cofre de senhas e contatos ============ */

.vault-main,
.contact-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vault-main strong,
.contact-main strong {
  color: var(--ink);
}

.vault-main span,
.contact-main span {
  color: var(--muted);
  font-size: 0.86rem;
}

.vault-link {
  color: var(--teal, #6fb7d8);
  font-size: 0.82rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vault-link:hover { text-decoration: underline; }

.vault-secret {
  margin-top: 2px;
}

.vault-secret code {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(217, 185, 120, 0.08);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  user-select: all;
}

.vault-masked {
  letter-spacing: 2px;
  color: var(--muted);
}

.vault-notes,
.contact-doc {
  color: var(--muted);
  font-size: 0.8rem;
}

.vault-actions,
.contact-actions {
  align-items: flex-start;
}

.vault-hint {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.vault-hint strong { color: var(--ink); }

.vault-restricted-field .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  cursor: pointer;
}

.vault-restricted-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--button, #d9b978);
}

/* divisões clicáveis de contatos: parceiros | prestadores */
.contacts-kinds {
  margin: 0 14px 10px;
}

.contacts-kinds .kind-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.contacts-kinds button.active .kind-count {
  background: rgba(0, 0, 0, 0.22);
}

.contact-channel {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

a.contact-channel:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .contacts-kinds {
    display: flex;
    width: calc(100% - 28px);
  }
  .contacts-kinds button { flex: 1; }
}

/* ============ v4.1 — Intranet: justificativas, documentos, treinamento e cultura ============ */

/* com 8 abas a barra precisa quebrar linha */
.intranet-tabs {
  flex-wrap: wrap;
  max-width: 100%;
}

.absence-main,
.doc-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.absence-main strong,
.doc-main strong { color: var(--ink); }

.absence-main span,
.doc-main span {
  color: var(--muted);
  font-size: 0.86rem;
}

.absence-reason,
.doc-body {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.absence-review {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

/* ------------------------------ documentos ------------------------------ */

.document-preview {
  padding: 14px;
  overflow-x: auto;
}

.document-page {
  background: #fbfaf7;
  color: #14161a;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 28px 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  line-height: 1.65;
  max-height: 460px;
  overflow-y: auto;
}

.document-page p {
  margin: 0 0 11px;
  text-align: justify;
}

/* ------------------------------ organograma ----------------------------- */

.org-chart { padding: 14px; }

.org-root {
  text-align: center;
  padding: 9px 16px;
  margin: 0 auto 6px;
  max-width: 320px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(217, 185, 120, 0.1);
  color: var(--ink);
  font-weight: 600;
}

.org-branches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.org-sector {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.org-sector-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  padding-bottom: 7px;
  margin-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.org-sector-name span {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(217, 185, 120, 0.16);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.org-members { display: grid; gap: 6px; }

.org-member {
  display: grid;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.org-member strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
}

.org-member span,
.org-empty {
  color: var(--muted);
  font-size: 0.74rem;
}

.org-empty { padding: 5px 7px; font-style: italic; }

@media print {
  .org-branches { grid-template-columns: repeat(3, 1fr); }
}

/* ============ v4.2 — Solicitações: encaminhamento a outros setores ============ */

.referral-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.referral-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
}

.referral-chip.pending {
  border-color: rgba(217, 185, 120, 0.45);
  background: rgba(217, 185, 120, 0.1);
  color: var(--ink);
}

.referral-chip.done {
  border-color: rgba(106, 168, 122, 0.4);
  background: rgba(106, 168, 122, 0.12);
}

.referral-chip.cancelled { opacity: 0.7; text-decoration: line-through; }

.referral-resolve {
  border: 0;
  background: none;
  padding: 0;
  color: var(--button, #d9b978);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.referral-resolve:hover { opacity: 0.8; }

.referral-block {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: italic;
}
