:root {
  color-scheme: dark;
  /* Oceania Institutional Suite — Obsidian Slate, Pearl & Architectural Gold */
  --bg-app: #06090f;
  --bg-sidebar: #0a0e17;
  --bg-panel: #0e1420;
  --bg-card: #131b2a;
  --bg-elevated: #192438;
  --bg-input: #080c14;

  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(212, 175, 106, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(212, 175, 106, 0.45);
  --border-focus: #e6c687;

  --text-main: #f8fafc;
  --text-silver: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent: #d4af6a;
  --accent-hover: #ebd096;
  --accent-deep: #9c793b;
  --accent-soft: rgba(212, 175, 106, 0.12);

  --primary: #3b82f6;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;

  --radius: 14px;
  --radius-sm: 9px;
  --font-serif: 'Cormorant Garamond', 'Cinzel', Georgia, serif;
  --font-display: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

/* CUSTOM SCROLLBARS */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(186, 198, 220, 0.16);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(202, 164, 93, 0.45);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

input[type="file"]::file-selector-button {
  background: linear-gradient(180deg, #19243c 0%, #11192b 100%);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  margin-right: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

input[type="file"]::file-selector-button:hover {
  border-color: rgba(202, 164, 93, 0.55);
  color: #faf0da;
}

/* LAYOUT SHELL */
.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% -8%, rgba(212, 175, 106, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 22% 108%, rgba(59, 130, 246, 0.06) 0%, transparent 44%),
    var(--bg-app);
}

/* SIDEBAR */
.sidebar {
  width: 284px;
  min-width: 284px;
  background: linear-gradient(180deg, #0b101b 0%, #070a11 100%);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 17px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.sidebar-brand::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(202, 164, 93, 0.55), rgba(212, 218, 230, 0.15), transparent);
  pointer-events: none;
}

.brand-crest {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #070b14;
  border: 1.5px solid rgba(202, 164, 93, 0.68);
  box-shadow:
    0 0 0 3px rgba(202, 164, 93, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-crest svg, .brand-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.brand-sub {
  font-size: 10px;
  color: var(--accent-hover);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.92;
}

/* LAWYER BADGE CARD IN SIDEBAR */
.lawyer-badge-card {
  margin: 14px 14px 4px;
  padding: 12px 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.15) 0%, rgba(19, 28, 48, 0.94) 100%);
  border: 1px solid rgba(202, 164, 93, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.08), 0 8px 20px rgba(3, 7, 18, 0.36);
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lawyer-badge-card:hover {
  border-color: rgba(227, 196, 133, 0.65);
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.23) 0%, rgba(25, 36, 60, 0.96) 100%);
  transform: translateY(-1px);
}

.lawyer-badge-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.28), rgba(202, 164, 93, 0.08));
  border: 1px solid rgba(202, 164, 93, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.lawyer-badge-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.lawyer-badge-info strong {
  font-size: 13px;
  font-weight: 700;
  color: #faf6ed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lawyer-badge-info span {
  font-size: 10.5px;
  color: var(--accent-hover);
  opacity: 0.92;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 13px 18px;
}

.nav-group {
  margin-bottom: 16px;
}

.nav-channel {
  margin-bottom: 14px;
  padding: 10px 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(212, 175, 106, 0.55);
}

.nav-channel[data-channel="juridico"] {
  border-left-color: rgba(212, 175, 106, 0.72);
}

.nav-channel[data-channel="psicologia"] {
  border-left-color: rgba(16, 185, 129, 0.72);
}

.nav-channel[data-channel="psicologia"] .nav-channel-title {
  color: #6ee7b7;
  border-bottom-color: rgba(16, 185, 129, 0.18);
}

.nav-channel[data-channel="civil"] {
  border-left-color: rgba(59, 130, 246, 0.75);
}

.nav-channel[data-channel="civil"] .nav-channel-title {
  color: #93c5fd;
  border-bottom-color: rgba(59, 130, 246, 0.2);
}

.nav-channel[data-channel="sistema"] {
  border-left-color: rgba(148, 163, 184, 0.5);
}

.nav-channel[data-channel="sistema"] .nav-channel-title {
  color: var(--text-silver);
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

.nav-channel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent-hover);
}

.nav-channel-icon {
  font-size: 13px;
  line-height: 1;
}

.nav-channel .nav-group {
  margin-bottom: 12px;
}

.nav-channel .nav-group:last-child {
  margin-bottom: 0;
}

#navGroupPsicoAdocao.legal-order {
  display: flex;
  flex-direction: column;
}
#navGroupPsicoAdocao.legal-order .nav-group-title { order: 0; }
#navGroupPsicoAdocao.legal-order #navPsicoSolicitacao { order: 1; }
#navGroupPsicoAdocao.legal-order #navPsicoDocPendentes { order: 2; }
#navGroupPsicoAdocao.legal-order #navPsicoDocFinalizados { order: 3; }
#navGroupPsicoAdocao.legal-order #navPsicoPagamentos { order: 4; }
#navGroupPsicoAdocao.legal-order #navPsicoComprovantes { order: 5; }

.nav-group-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 7px 10px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(202, 164, 93, 0.25), transparent);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: rgba(202, 164, 93, 0.08);
  color: var(--text-main);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(202, 164, 93, 0.19) 0%, rgba(202, 164, 93, 0.04) 100%);
  color: #faf0da;
  font-weight: 600;
  border-color: rgba(202, 164, 93, 0.34);
  box-shadow: inset 3px 0 0 var(--accent), 0 4px 14px rgba(0, 0, 0, 0.22);
}

.nav-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.78;
}

.nav-item.active .nav-icon {
  color: var(--accent-hover);
  opacity: 1;
}

.nav-icon svg {
  width: 15.5px;
  height: 15.5px;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  background: rgba(8, 12, 21, 0.92);
  color: var(--accent-hover);
  border: 1px solid rgba(202, 164, 93, 0.34);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(6, 10, 18, 0.78);
}

.server-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--text-silver);
  background: var(--bg-input);
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.server-pill .dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}

.server-pill.online .dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
}

/* USER SESSION BAR IN SIDEBAR */
.user-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(19, 28, 48, 0.85);
  border: 1px solid var(--border-subtle);
}

.user-session-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.user-session-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: var(--accent-hover);
  box-shadow: 0 0 8px rgba(227, 196, 133, 0.55);
  flex-shrink: 0;
}

.user-session-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: rgba(220, 38, 38, 0.13);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* AUTH OVERLAY (LOGIN / CADASTRO) */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 80% 15%, rgba(212, 175, 106, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 18% 85%, rgba(59, 130, 246, 0.1) 0%, transparent 45%),
    #05080e;
}

.auth-split {
  width: min(960px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: rgba(13, 18, 29, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 36px 96px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: modalRise 0.25s ease;
}

.auth-showcase {
  padding: 36px 34px;
  background:
    radial-gradient(circle at 15% 15%, rgba(212, 175, 106, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #101829 0%, #090d16 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(212, 175, 106, 0.12);
  border: 1px solid rgba(212, 175, 106, 0.3);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.auth-showcase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.auth-showcase-crest {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 106, 0.72);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.12), 0 10px 26px rgba(0, 0, 0, 0.5);
  margin-bottom: 18px;
}

.auth-showcase-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-showcase h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.03em;
}

.auth-showcase > p {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.auth-showcase-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.auth-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(212, 175, 106, 0.12);
  border: 1px solid rgba(212, 175, 106, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.auth-feature-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.auth-feature-item span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-card {
  width: 100%;
  margin: 0;
  background: rgba(11, 15, 25, 0.98);
  border: none;
  border-radius: 0;
  padding: 34px 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-crest {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #070b14;
  border: 1.5px solid rgba(202, 164, 93, 0.75);
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.14), 0 8px 20px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-crest img,
.auth-crest svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-brand-text h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.auth-brand-text span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent-hover);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.auth-tab:hover {
  color: var(--text-main);
}

.auth-tab.active {
  background: linear-gradient(135deg, #e5c687 0%, #b88e44 100%);
  color: #090d16;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(202, 164, 93, 0.28);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-register-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-silver);
  letter-spacing: 0.03em;
}

.auth-field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-field input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.16);
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap input {
  padding-right: 44px;
}

.auth-toggle-pw {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  line-height: 1;
}

.auth-toggle-pw:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.auth-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.42);
  color: #fecaca;
  font-size: 12.5px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  font-size: 13.5px;
  margin-top: 2px;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 16px;
}

.auth-setup-intro {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(202, 164, 93, 0.1);
  border: 1px solid rgba(202, 164, 93, 0.3);
}

.auth-setup-intro h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #faf0da;
}

.auth-setup-intro p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-silver);
}

.auth-pending-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 4px;
}

.auth-pending-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(202, 164, 93, 0.14);
  border: 1px solid rgba(202, 164, 93, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.auth-pending-box h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: #faf0da;
}

.auth-pending-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-silver);
}

/* ADMIN USERS & APPROVALS */
.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 21, 37, 0.92) 0%, rgba(10, 15, 27, 0.96) 100%);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-user-row:hover {
  border-color: var(--border-accent);
}

.admin-user-row.pending {
  border-color: rgba(202, 164, 93, 0.45);
  background: rgba(202, 164, 93, 0.06);
}

.admin-user-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}

.admin-user-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.admin-user-meta {
  font-size: 12.5px;
  color: var(--text-silver);
}

.admin-user-sub {
  font-size: 11.5px;
  color: var(--text-dim);
}

.admin-role-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2.5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-silver);
  background: rgba(255, 255, 255, 0.04);
}

.admin-role-pill.admin {
  color: #f6e3ba;
  border-color: rgba(202, 164, 93, 0.5);
  background: rgba(202, 164, 93, 0.15);
}

.admin-role-pill.pending {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.13);
}

.admin-role-pill.approved {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.11);
}

.admin-role-pill.psychologist {
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(139, 92, 246, 0.16);
}

.admin-role-pill.civil {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.14);
}

/* ADMIN ROLE FILTER BAR (SIDEBAR) */
.admin-role-filter-box {
  margin: 0 14px 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(202, 164, 93, 0.08);
  border: 1px solid rgba(202, 164, 93, 0.28);
}

.admin-role-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f6e3ba;
  margin-bottom: 7px;
}

.admin-role-filter-all {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-silver);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-role-filter-all:hover {
  background: rgba(202, 164, 93, 0.2);
  color: #fff;
}

.admin-role-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-role-chip {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-role-chip:hover {
  border-color: rgba(202, 164, 93, 0.45);
  color: var(--text-main);
}

.admin-role-chip.active {
  background: rgba(202, 164, 93, 0.22);
  border-color: rgba(202, 164, 93, 0.65);
  color: #f6e3ba;
  box-shadow: 0 0 0 1px rgba(202, 164, 93, 0.15);
}

/* CANAL PSICOLOGIA */
.psico-subtabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.psico-chat-box {
  display: flex;
  flex-direction: column;
  height: min(560px, 68vh);
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  overflow: hidden;
}

.psico-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.psico-msg,
.psico-chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(20, 29, 49, 0.88);
  border: 1px solid var(--border-subtle);
  max-width: 84%;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(2, 6, 16, 0.22);
}

.psico-msg.mine,
.psico-chat-msg.mine {
  align-self: flex-end;
  border-color: rgba(202, 164, 93, 0.42);
  background: rgba(202, 164, 93, 0.11);
}

.psico-msg-head,
.psico-chat-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  margin-bottom: 4px;
}

.psico-chat-author {
  font-weight: 700;
  color: var(--text-main);
}

.psico-chat-time {
  font-size: 11px;
  color: var(--text-muted);
}

.psico-msg-body,
.psico-chat-msg-body {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-main);
  word-break: break-word;
  white-space: pre-wrap;
}

.btn-icon-del {
  margin-left: auto;
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 7px;
  padding: 2px 7px;
  font-size: 11.5px;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-del:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.psico-chat-form {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 27, 0.9);
}

.psico-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
}

.psico-chat-form input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.15);
}

.psico-two-col {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.psico-two-col > * {
  min-width: 0;
}

@media (max-width: 1080px) {
  .psico-two-col {
    grid-template-columns: 1fr;
  }
}

.psico-doc-preview-wrap {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 8%, #18233a 0%, #0d1424 100%);
  padding: 18px;
  display: flex;
  justify-content: center;
  overflow: auto;
}

.psico-doc-stage {
  width: 461px;
  height: 652px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.psico-doc-scale {
  width: 794px;
  height: 1123px;
  transform: scale(0.58);
  transform-origin: top left;
}

@media (max-width: 1320px) {
  .psico-doc-stage {
    width: 397px;
    height: 562px;
  }
  .psico-doc-scale {
    transform: scale(0.5);
  }
}

@media (max-width: 520px) {
  .psico-doc-preview-wrap {
    padding: 10px;
  }
  .psico-doc-stage {
    width: 302px;
    height: 427px;
  }
  .psico-doc-scale {
    transform: scale(0.38);
  }
}

.psico-doc-stage.landscape {
  width: 573px;
  height: 323px;
}

.psico-doc-scale.landscape {
  width: 1024px;
  height: 576px;
  transform: scale(0.56);
  transform-origin: top left;
}

@media (max-width: 1460px) {
  .psico-doc-stage.landscape {
    width: 492px;
    height: 276px;
  }
  .psico-doc-scale.landscape {
    transform: scale(0.48);
  }
}

@media (max-width: 1200px) {
  .psico-doc-stage.landscape {
    width: 430px;
    height: 242px;
  }
  .psico-doc-scale.landscape {
    transform: scale(0.42);
  }
}

@media (max-width: 520px) {
  .psico-doc-stage.landscape {
    width: 307px;
    height: 173px;
  }
  .psico-doc-scale.landscape {
    transform: scale(0.3);
  }
}

.psico-status-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.psico-status-pill.agendado {
  color: #f6e3ba;
  border-color: rgba(202, 164, 93, 0.5);
  background: rgba(202, 164, 93, 0.14);
}

.psico-status-pill.em_atendimento {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.15);
}

.psico-status-pill.concluido {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(16, 185, 129, 0.14);
}

.psico-status-pill.cancelado {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.13);
}

/* PAGAMENTOS PSICOLOGIA */
.pag-receipt-dropzone {
  border: 1.5px dashed rgba(202, 164, 93, 0.48);
  border-radius: 12px;
  padding: 14px;
  background: rgba(14, 21, 37, 0.72);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.pag-receipt-dropzone:hover,
.pag-receipt-dropzone.has-img {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(16, 185, 129, 0.06);
}

.pag-receipt-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.pag-receipt-thumb {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.pag-receipt-thumb:hover {
  transform: scale(1.04);
}

.pag-amount-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  color: #86efac;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.45);
}

/* HOSPITAL OCEANIA — FOLHA OFICIAL A4 DE AVALIAÇÃO PSIQUIÁTRICA (ADOÇÃO) 794x1123 */
.hosp-sheet {
  position: relative;
  width: 794px;
  height: 1123px;
  min-height: 1123px;
  background: #ffffff;
  color: #111827;
  font-family: 'Alice', Georgia, serif;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

.hosp-bg-img {
  position: absolute;
  inset: 0;
  width: 794px;
  height: 1123px;
  display: block;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

.hosp-overlay-layer {
  position: relative;
  width: 794px;
  height: 1123px;
  z-index: 1;
}

.hosp-relatorio-block {
  position: absolute;
  left: 72px;
  top: 136px;
  max-width: 380px;
}

.hosp-data-block {
  position: absolute;
  left: 465px;
  top: 138px;
  right: 26px;
  text-align: right;
}

.hosp-meta-label {
  font-family: 'Montserrat', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 2px;
}

.hosp-meta-title {
  font-family: 'Plus Jakarta Sans', 'Carlito', 'Montserrat', sans-serif;
  font-size: 20.5px;
  font-weight: 700;
  color: #1697b0;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.hosp-meta-date {
  font-family: 'Plus Jakarta Sans', 'Carlito', 'Montserrat', sans-serif;
  font-size: 19.5px;
  font-weight: 700;
  color: #29b6d8;
  line-height: 1.18;
  white-space: nowrap;
}

.hosp-salutation {
  position: absolute;
  left: 36px;
  top: 242px;
  font-family: 'Alice', Georgia, serif;
  font-size: 17.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}

.hosp-intro {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 282px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 400;
  color: #111827;
  line-height: 1.3;
}

.hosp-sol-row {
  position: absolute;
  left: 36px;
  width: 722px;
}

.hosp-sol-row.row-1 {
  top: 328px;
}

.hosp-sol-row.row-2 {
  top: 414px;
}

.hosp-sol-labels {
  position: relative;
  height: 22px;
}

.hosp-sol-labels .lbl-nome {
  position: absolute;
  left: 8px;
  top: 2px;
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.01em;
}

.hosp-sol-labels .lbl-tel {
  position: absolute;
  left: 498px;
  top: 0;
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.hosp-sol-labels .lbl-id {
  position: absolute;
  left: 658px;
  top: 0;
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.hosp-sol-boxes {
  position: relative;
  height: 34px;
}

.hosp-field-box {
  position: absolute;
  top: 0;
  height: 34px;
  border: 1.5px solid #262626;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  font-family: 'Alice', Georgia, serif;
  font-size: 18.5px;
  font-weight: 700;
  color: #24b2d4;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hosp-field-box.box-sol-nome {
  left: 0;
  width: 482px;
  justify-content: flex-start;
  padding-left: 12px;
  font-size: 19.5px;
}

.hosp-field-box.box-sol-tel {
  left: 498px;
  width: 144px;
  font-size: 17.5px;
}

.hosp-field-box.box-sol-id {
  left: 658px;
  width: 64px;
  font-size: 14.5px;
}

.hosp-paragraph {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 504px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.62;
  color: #111827;
  text-align: left;
  word-break: break-word;
}

.hosp-declare {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 688px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.2px;
  font-weight: 700;
  color: #111827;
  line-height: 1.28;
}

.hosp-adotando-row {
  position: absolute;
  left: 56px;
  width: 682px;
  height: 34px;
}

.hosp-adotando-row.ado-1 {
  top: 738px;
}

.hosp-adotando-row.ado-2 {
  top: 790px;
}

.hosp-adotando-row .hosp-field-box {
  height: 34px;
  border-color: #6b7280;
}

.hosp-field-box.box-ado-nome {
  left: 0;
  width: 598px;
  justify-content: flex-start;
  padding-left: 16px;
  font-size: 19px;
}

.hosp-field-box.box-ado-id {
  left: 616px;
  width: 66px;
  font-size: 15px;
}

.hosp-sig-block {
  position: absolute;
  top: 912px;
  text-align: center;
}

.hosp-sig-block.sig-left {
  left: 34px;
  width: 336px;
}

.hosp-sig-block.sig-right {
  left: 424px;
  width: 336px;
}

.hosp-sig-cursive {
  font-family: 'Great Vibes', 'Dancing Script', 'Sacramento', 'Brush Script MT', cursive;
  font-size: 40px;
  font-weight: 400;
  color: #25b4d6;
  line-height: 1.05;
  height: 75px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 6px 2px;
  margin-bottom: -4px;
  white-space: nowrap;
  overflow: visible;
  box-sizing: border-box;
}

.hosp-sig-line {
  height: 3.5px;
  background: #0a0a0a;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hosp-sig-role {
  font-family: 'Alice', 'Carlito', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #21a6c8;
  margin-top: 6px;
  line-height: 1.2;
}

.hosp-sig-doc {
  font-family: 'Alice', 'Carlito', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #21a6c8;
  margin-top: 3px;
  line-height: 1.2;
}

/* HOSPITAL OCEANIA — FICHA DE ATENDIMENTO PSICOLÓGICO A4 (794x1123) */
.ficha-sheet {
  position: relative;
  width: 794px;
  height: 1123px;
  min-height: 1123px;
  background: #ffffff;
  color: #111827;
  font-family: 'Alice', Georgia, serif;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

.ficha-col {
  position: absolute;
  left: 145px;
  width: 504px;
}

.ficha-label {
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.ficha-box {
  position: relative;
  border: 1.5px solid #262626;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.36);
  box-sizing: border-box;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #24b2d4;
  overflow: hidden;
}

.ficha-box.single {
  height: 33px;
  display: flex;
  align-items: center;
  padding: 2px 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ficha-box.single.centered {
  justify-content: center;
  padding: 2px 6px;
}

.ficha-box.multi {
  height: 122px;
  padding: 8px 12px;
  line-height: 1.44;
  font-size: 15px;
  word-break: break-word;
  white-space: pre-wrap;
}

.ficha-retorno-block {
  position: absolute;
  left: 0;
  right: 0;
  top: 848px;
  text-align: center;
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: #111827;
}

.ficha-retorno-q {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ficha-retorno-opts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  font-size: 20px;
  font-weight: 700;
}

.ficha-check-mark {
  display: inline-block;
  min-width: 18px;
  color: #24b2d4;
  font-weight: 800;
  text-align: center;
}

.ficha-sig-block {
  position: absolute;
  left: 215px;
  width: 364px;
  top: 940px;
  text-align: center;
}

/* HOSPITAL OCEANIA — PSICOTÉCNICO / PORTE DE ARMAS (1024x576) */
.psico-tec-sheet {
  position: relative;
  width: 1024px;
  height: 576px;
  min-height: 576px;
  background: #ffffff;
  color: #111827;
  font-family: 'Alice', Georgia, serif;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

.psico-tec-sheet .hosp-bg-img {
  width: 1024px;
  height: 576px;
  object-fit: fill;
}

.psico-tec-sheet .hosp-overlay-layer {
  width: 1024px;
  height: 576px;
}

.psico-tec-fields {
  position: absolute;
  left: 80px;
  top: 192px;
  width: 356px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.psico-tec-field-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.psico-tec-field-label {
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  line-height: 1.1;
  padding-bottom: 1px;
}

.psico-tec-field-line {
  flex: 1;
  min-width: 0;
  border-bottom: 1.5px solid #2b4c6f;
  min-height: 23px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 6px 2px;
  font-family: 'Alice', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #24b2d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.psico-tec-left-para {
  position: absolute;
  left: 60px;
  top: 352px;
  width: 392px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.46;
  color: #111827;
  text-align: center;
  word-break: break-word;
}

.psico-tec-right-para {
  position: absolute;
  left: 536px;
  top: 204px;
  width: 434px;
  font-family: 'Alice', Georgia, serif;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.48;
  color: #111827;
  text-align: center;
  word-break: break-word;
}

.psico-tec-sig-block {
  position: absolute;
  left: 590px;
  top: 332px;
  width: 326px;
  text-align: center;
}

.psico-tec-sig-block .hosp-sig-cursive {
  height: 62px;
  font-size: 36px;
}

.psico-tec-sig-block .hosp-sig-line {
  height: 2px;
  background: #1f4466;
  width: 294px;
  margin: 0 auto;
}

.psico-tec-sig-block .hosp-sig-role,
.psico-tec-sig-block .hosp-sig-doc {
  color: #21a6c8;
  font-family: 'Alice', 'Carlito', Georgia, serif;
  font-weight: 700;
}

/* HOSPITAL OCEANIA — ATESTADO MÉDICO (1024x576) */
.psico-atest-sheet {
  position: relative;
  width: 1024px;
  height: 576px;
  min-height: 576px;
  background: #ffffff;
  color: #111827;
  font-family: 'Alice', Georgia, serif;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

.psico-atest-sheet .hosp-bg-img {
  width: 1024px;
  height: 576px;
  object-fit: fill;
}

.psico-atest-sheet .hosp-overlay-layer {
  width: 1024px;
  height: 576px;
}

.atest-top-row {
  position: absolute;
  left: 164px;
  top: 138px;
  width: 698px;
  display: flex;
  gap: 22px;
  align-items: flex-end;
}

.atest-top-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.atest-top-label {
  font-family: 'Carlito', 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.01em;
}

.atest-top-label.lg {
  font-size: 16.5px;
}

.atest-top-box {
  height: 34px;
  border: 1.5px solid #262626;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  font-family: 'Alice', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #24b2d4;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atest-presc-title {
  position: absolute;
  left: 166px;
  top: 214px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.atest-line-1 {
  position: absolute;
  left: 166px;
  top: 245px;
  width: 680px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-family: 'Alice', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.atest-inline-underline {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1.5px solid #2b4c6f;
  padding: 0 6px 1px;
  min-height: 22px;
  font-family: 'Alice', Georgia, serif;
  font-size: 17.5px;
  font-weight: 700;
  color: #24b2d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.atest-line-2 {
  position: absolute;
  left: 166px;
  top: 282px;
  width: 720px;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #111827;
}

.atest-checks {
  position: absolute;
  left: 166px;
  top: 322px;
  width: 740px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atest-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Alice', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #111827;
}

.atest-check-sq {
  width: 24px;
  height: 24px;
  border: 1.5px solid #52525b;
  background: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Carlito', 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #111827;
  flex-shrink: 0;
  box-sizing: border-box;
}

.atest-obs-box {
  position: absolute;
  left: 168px;
  top: 468px;
  width: 442px;
  height: 96px;
  border: 1.3px solid #6b7280;
  background: rgba(255, 255, 255, 0.45);
  padding: 10px 14px;
  box-sizing: border-box;
  overflow: hidden;
}

.atest-obs-title {
  font-family: 'Alice', Georgia, serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 5px;
}

.atest-obs-text {
  font-family: 'Alice', Georgia, serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.atest-sig-block {
  position: absolute;
  left: 700px;
  top: 438px;
  width: 298px;
  text-align: center;
}

.atest-sig-block .hosp-sig-cursive {
  height: 62px;
  font-size: 34px;
}

.atest-sig-block .hosp-sig-line {
  height: 2px;
  background: #1f4466;
  width: 290px;
  margin: 0 auto;
}

.atest-sig-block .hosp-sig-role,
.atest-sig-block .hosp-sig-doc {
  color: #21a6c8;
  font-family: 'Alice', 'Carlito', Georgia, serif;
  font-weight: 700;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-empty {
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--border-subtle);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ADMIN TEAM PRESENCE (ONLINE / EM SERVICO) */
.presence-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.presence-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.presence-kpi-card:hover {
  border-color: rgba(202, 164, 93, 0.52);
  transform: translateY(-1px);
}

.presence-kpi-card.active {
  border-color: rgba(202, 164, 93, 0.78);
  background: rgba(202, 164, 93, 0.1);
}

.presence-kpi-card.online.active {
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(34, 197, 94, 0.1);
}

.presence-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.presence-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.presence-kpi-card.online .presence-kpi-value {
  color: #86efac;
}

.presence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.presence-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.presence-search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.14);
}

.presence-search-box input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.presence-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.presence-filter-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-silver);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.presence-filter-btn.active {
  color: #faf0da;
  border-color: rgba(202, 164, 93, 0.65);
  background: rgba(202, 164, 93, 0.18);
}

.admin-user-row.online {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(16, 185, 129, 0.05);
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.presence-pill.online {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.presence-pill.offline {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(148, 163, 184, 0.08);
}

.presence-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  display: inline-block;
}

.presence-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.presence-dot.offline {
  background: #64748b;
}

/* BATE-PONTO AUTOMATICO */
.nav-badge.ponto-badge-open {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
}

.ponto-layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ponto-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ponto-date-select {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.ponto-date-select:focus {
  border-color: var(--border-focus);
}

.ponto-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 24, 42, 0.96) 0%, rgba(10, 16, 30, 0.98) 100%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 30px rgba(0, 0, 0, 0.28);
  margin-bottom: 18px;
}

.ponto-hero-card.open {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(12, 24, 34, 0.96) 55%, rgba(10, 16, 30, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(134, 239, 172, 0.16), 0 14px 34px rgba(16, 185, 129, 0.09);
}

.ponto-hero-card.paused {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(12, 19, 34, 0.98) 65%);
}

.ponto-hero-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ponto-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ponto-timer-big {
  font-size: 38px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: var(--text-main);
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.ponto-hero-card.open .ponto-timer-big {
  color: #86efac;
}

.ponto-hero-sub {
  font-size: 12.5px;
  color: var(--text-silver);
}

.ponto-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.ponto-hero-total-pill {
  font-size: 12.5px;
  color: var(--text-silver);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.ponto-btn-in {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: 1px solid rgba(134, 239, 172, 0.45);
  padding: 11px 18px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.3);
}

.ponto-btn-in:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ponto-btn-out {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid rgba(252, 165, 165, 0.45);
  padding: 11px 18px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

.ponto-btn-out:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ponto-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(8, 12, 21, 0.85);
  border: 1px solid var(--border-subtle);
}

.ponto-mode-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ponto-mode-btn:hover {
  color: var(--text-main);
}

.ponto-mode-btn.active {
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.25) 0%, rgba(202, 164, 93, 0.1) 100%);
  color: #faf0da;
  border-color: rgba(202, 164, 93, 0.48);
}

.ponto-offline-banner {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: #fecaca;
  font-size: 12.5px;
  font-weight: 600;
}

.ponto-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ponto-meta-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(14, 21, 37, 0.78);
  border: 1px solid var(--border-subtle);
}

.ponto-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.ponto-meta-val {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.ponto-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px 0;
}

.ponto-section-head h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #f6e3ba;
  letter-spacing: 0.02em;
}

.ponto-timeline {
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
}

.ponto-tl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14, 21, 37, 0.85);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.15s ease;
}

.ponto-tl-item:hover {
  border-color: var(--border-accent);
}

.ponto-tl-item.active {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(14, 21, 37, 0.9) 100%);
}

.ponto-tl-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-silver);
  border: 1px solid var(--border-subtle);
  min-width: 34px;
  text-align: center;
}

.ponto-tl-badge.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.ponto-tl-times {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.ponto-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.ponto-chip.in {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.ponto-chip.out {
  background: rgba(239, 68, 68, 0.11);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.ponto-chip.live {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  font-weight: 700;
}

.ponto-tl-arrow {
  color: var(--text-dim);
  font-weight: 700;
}

.ponto-reason-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 999px;
}

.ponto-tl-dur {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.ponto-tl-dur.active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(16, 185, 129, 0.16);
}

.ponto-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.ponto-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(14, 21, 37, 0.85);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.ponto-history-row:hover,
.ponto-history-row.selected {
  border-color: rgba(202, 164, 93, 0.72);
  background: rgba(202, 164, 93, 0.08);
  transform: translateY(-1px);
}

.ponto-history-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ponto-history-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-size: 13.5px;
}

.ponto-history-total {
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-silver);
}

.ponto-history-total.open {
  color: #86efac;
}

@media (max-width: 720px) {
  .ponto-hero-right {
    align-items: flex-start;
    width: 100%;
  }
  .ponto-timer-big {
    font-size: 30px;
  }
}

.ponto-team-duration {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.admin-user-row.online .ponto-team-duration {
  color: #86efac;
}

.ponto-team-details {
  width: 100%;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.ponto-name-total {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-silver);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.ponto-name-total.open {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(16, 185, 129, 0.13);
}

.ponto-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-silver);
}

/* MAIN AREA */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 26px;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  flex-wrap: wrap;
  position: relative;
}

.topbar::after {
  content: '';
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.35), transparent 65%);
  pointer-events: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.topbar-title-wrap {
  min-width: 0;
}

.btn-mobile-menu {
  display: none;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 18px;
  cursor: pointer;
}

.page-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
  margin: 0 4px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8.5px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.07);
}

.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-silver);
  border-color: var(--border-subtle);
}
.btn-ghost:hover, .btn-ghost.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: rgba(202, 164, 93, 0.5);
}

.btn-secondary {
  background: linear-gradient(180deg, #19243c 0%, #11192b 100%);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #213050 0%, #151f36 100%);
  border-color: rgba(202, 164, 93, 0.52);
  color: #faf0da;
}

.btn-primary {
  background: linear-gradient(135deg, #e5c687 0%, #b88e44 100%);
  color: #090d16;
  font-weight: 700;
  border-color: rgba(255, 244, 220, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 4px 16px rgba(202, 164, 93, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 20px rgba(202, 164, 93, 0.36);
}

.btn-discord {
  background: linear-gradient(135deg, #6370f7 0%, #4752c4 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 14px rgba(88, 101, 242, 0.3);
}
.btn-discord:hover {
  filter: brightness(1.07);
}

.btn-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.34);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* SUBTABS BAR */
.subtabs-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 28px;
  background: rgba(10, 15, 27, 0.94);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.subtab {
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(19, 28, 48, 0.88);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.subtab:hover {
  color: var(--text-main);
  border-color: rgba(202, 164, 93, 0.48);
}

.subtab.active {
  background: linear-gradient(135deg, #e5c687 0%, #b88e44 100%);
  color: #090d16;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(202, 164, 93, 0.28);
}

/* WORKSPACE SPLIT */
.workspace-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 490px 1fr;
  min-height: 0;
  overflow: hidden;
}

.form-panel {
  background: linear-gradient(180deg, #0c111c 0%, #080c14 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
  background: #0a101d;
}

.panel-tab {
  padding: 13px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.16s;
}

.panel-tab:hover {
  color: var(--text-main);
}

.panel-tab.active {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, transparent 0%, rgba(202, 164, 93, 0.08) 100%);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 34px;
}

.quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.btn-chip {
  background: var(--bg-card);
  color: var(--text-silver);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6.5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-chip:hover {
  color: var(--accent-hover);
  border-color: rgba(202, 164, 93, 0.55);
  background: rgba(202, 164, 93, 0.1);
}
.btn-chip-danger:hover {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(220, 38, 38, 0.12);
}

/* FORM GROUPS */
.form-section {
  background: linear-gradient(180deg, rgba(20, 29, 49, 0.78) 0%, rgba(13, 20, 35, 0.92) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.04), 0 6px 18px rgba(2, 6, 16, 0.22);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-section:focus-within {
  border-color: rgba(202, 164, 93, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.06), 0 8px 24px rgba(2, 6, 16, 0.34);
}

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-hover);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(202, 164, 93, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-silver);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.field-group input[type="text"],
.field-group input[type="number"],
.field-group input[type="password"],
.field-group input[type="date"],
.field-group input[type="time"],
.field-group input[type="url"],
.field-group input[type="search"],
.field-group select,
.field-group textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid rgba(186, 198, 220, 0.18);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--border-focus);
  background: #0c1322;
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.16);
}

.field-group textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}

.inline-helpers {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.helper-pill {
  font-size: 11.5px;
  padding: 4.5px 10px;
  border-radius: 7px;
  background: rgba(15, 22, 38, 0.95);
  color: var(--text-silver);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s;
}
.helper-pill:hover {
  color: var(--accent-hover);
  border-color: rgba(202, 164, 93, 0.55);
  background: rgba(202, 164, 93, 0.1);
}
.helper-pill.active {
  color: #faf0da;
  border-color: rgba(202, 164, 93, 0.78);
  background: rgba(202, 164, 93, 0.22);
  font-weight: 600;
}

/* IMAGE PASTE / UPLOAD DROPZONE */
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.16s;
}

.upload-zone:hover, .upload-zone:focus-within {
  border-color: var(--accent);
  background: rgba(202, 164, 93, 0.07);
}

.upload-zone p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.upload-preview {
  margin-top: 10px;
  position: relative;
}

.upload-preview img {
  max-width: 100%;
  max-height: 165px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* CUSTOMIZER BANNER */
.customizer-banner {
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.14) 0%, rgba(202, 164, 93, 0.04) 100%);
  border: 1px solid rgba(202, 164, 93, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #f6e7c7;
  margin-bottom: 16px;
  line-height: 1.52;
}

.custom-fields-box {
  margin-top: 14px;
}

/* PREVIEW PANEL (EXECUTIVE DRAFTING DESK) */
.preview-panel {
  background: radial-gradient(ellipse at 50% 0%, #121a2a 0%, #0a0f19 60%, #06090f 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.preview-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.preview-badge-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.preview-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}

.preview-badge {
  font-size: 12px;
  color: var(--text-silver);
  font-weight: 500;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-main);
  background: var(--bg-input);
  padding: 4px 8px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
}

.btn-zoom {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-zoom:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.preview-scroll {
  flex: 1;
  overflow: auto;
  padding: 32px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-image: radial-gradient(rgba(202, 164, 93, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}

.preview-scale-box {
  position: relative;
  flex-shrink: 0;
}

.preview-scale-wrapper {
  width: 794px;
  height: 1123px;
  transform-origin: top left;
  transition: transform 0.15s ease;
}

.preview-scale-wrapper .doc-sheet {
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(202, 164, 93, 0.22);
}

/* ARCHIVE, COMM, PAID & SETTINGS VIEWS */
.archive-view, .settings-view, .comm-view, .paid-view {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: radial-gradient(circle at 85% 0%, rgba(202, 164, 93, 0.05) 0%, transparent 45%);
}

.archive-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 10px 15px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(202, 164, 93, 0.14);
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 13.5px;
}

.archive-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.archive-card {
  background: linear-gradient(180deg, rgba(20, 29, 49, 0.94) 0%, rgba(12, 18, 31, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.05), 0 10px 26px rgba(2, 6, 16, 0.3);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.archive-card:hover {
  border-color: rgba(202, 164, 93, 0.56);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.08), 0 16px 34px rgba(2, 6, 16, 0.45);
}

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

.archive-type-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(202, 164, 93, 0.36);
}

.archive-date {
  font-size: 11.5px;
  color: var(--text-dim);
}

.archive-folder-pill {
  font-size: 11.5px;
  color: #86efac;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
  padding: 6px 10px;
  word-break: break-all;
}

.archive-lawyer-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #faf0da;
  background: rgba(202, 164, 93, 0.13);
  border: 1px solid rgba(202, 164, 93, 0.34);
  border-radius: 8px;
  padding: 6px 10px;
}

.archive-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.archive-meta {
  font-size: 12.5px;
  color: var(--text-silver);
  line-height: 1.55;
}

.archive-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.archive-actions .btn {
  padding: 7px 11px;
  font-size: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 68px 24px;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(19, 28, 48, 0.6), rgba(10, 15, 27, 0.82));
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* SETTINGS */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 22px;
  max-width: 1280px;
}

.settings-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(20, 29, 49, 0.94) 0%, rgba(12, 18, 31, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.05), 0 10px 28px rgba(2, 6, 16, 0.32);
}

.settings-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--accent-hover);
}

.settings-card p.desc {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* COMUNICAÇÃO PRIMÁRIA */
.comm-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 24px;
  max-width: 1320px;
  align-items: start;
}

@media (max-width: 980px) {
  .comm-grid {
    grid-template-columns: 1fr;
  }
}

.comm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.comm-pill {
  background: var(--bg-input);
  color: var(--text-silver);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6.5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.comm-pill:hover {
  color: var(--text-main);
  border-color: rgba(202, 164, 93, 0.52);
}

.comm-pill.active {
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.24), rgba(202, 164, 93, 0.08));
  color: #faf0da;
  border-color: rgba(202, 164, 93, 0.65);
  box-shadow: 0 2px 10px rgba(202, 164, 93, 0.16);
}

.comm-preview-box {
  background: #080d17;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 215px;
  margin-bottom: 18px;
}

.comm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* PAGO (NÃO CONCLUÍDO) */
.paid-layout {
  display: grid;
  grid-template-columns: 455px 1fr;
  gap: 26px;
  align-items: start;
}

@media (max-width: 1120px) {
  .paid-layout {
    grid-template-columns: 1fr;
  }
}

.paid-reason-box {
  background: rgba(202, 164, 93, 0.1);
  border: 1px solid rgba(202, 164, 93, 0.34);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #faf0da;
}

.paid-reason-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.paid-reason-box strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-hover);
  margin-bottom: 5px;
}

.paid-status-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10.5px;
  border-radius: 999px;
}

.paid-status-pill.pending {
  background: rgba(202, 164, 93, 0.18);
  color: #f3d79e;
  border: 1px solid rgba(202, 164, 93, 0.45);
}

.paid-status-pill.done {
  background: rgba(16, 185, 129, 0.15);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.paid-value-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #86efac;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 7px;
  padding: 3.5px 9px;
  display: inline-block;
}

.paid-doc-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #d4dae6;
  background: rgba(186, 198, 220, 0.11);
  border: 1px solid rgba(186, 198, 220, 0.25);
  border-radius: 7px;
  padding: 3.5px 9px;
  display: inline-block;
}

.archive-card.is-editing {
  border-color: rgba(227, 196, 133, 0.85);
  box-shadow: 0 0 0 2px rgba(202, 164, 93, 0.25), 0 16px 34px rgba(2, 6, 16, 0.48);
}

.paid-doc-details {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(9, 14, 25, 0.68);
  overflow: hidden;
}

.paid-doc-details summary {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.paid-doc-details summary:hover {
  background: rgba(202, 164, 93, 0.08);
}

.paid-doc-count {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.paid-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.paid-doc-grid .field-group {
  margin-bottom: 0;
}

.paid-doc-full {
  grid-column: 1 / -1;
}

.paid-mdt-badge {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #86efac;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 7px 11px;
}

.paid-linked-banner {
  background: linear-gradient(135deg, rgba(202, 164, 93, 0.18) 0%, rgba(202, 164, 93, 0.07) 100%);
  border: 1px solid rgba(202, 164, 93, 0.48);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paid-linked-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: #faf0da;
}

.paid-linked-info span {
  font-size: 11.5px;
  color: var(--text-silver);
}

.paid-linked-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.84);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-box {
  background: linear-gradient(180deg, #141d31 0%, #0b111e 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  width: min(920px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(202, 164, 93, 0.15);
  animation: modalRise 0.2s ease;
}

@keyframes modalRise {
  from { transform: translateY(10px) scale(0.99); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 21, 0.8);
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 19px;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--accent-hover);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(8, 12, 21, 0.65);
}

.modal-doc-scroll {
  display: flex;
  justify-content: center;
  overflow: auto;
  padding: 4px;
}

.modal-doc-stage {
  width: 651px;
  height: 921px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.modal-doc-scale {
  width: 794px;
  height: 1123px;
  transform: scale(0.82);
  transform-origin: top left;
}

.modal-doc-stage.landscape {
  width: 778px;
  height: 438px;
}

.modal-doc-scale.landscape {
  width: 1024px;
  height: 576px;
  transform: scale(0.76);
  transform-origin: top left;
}

@media (max-width: 960px) {
  .modal-doc-stage.landscape {
    width: 594px;
    height: 334px;
  }
  .modal-doc-scale.landscape {
    transform: scale(0.58);
  }
}

.post-finalize-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.post-finalize-grid > * {
  min-width: 0;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: #131c30;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.2s ease;
}

.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }

@keyframes slideIn {
  from { transform: translateX(25px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 1240px) {
  .workspace-grid {
    grid-template-columns: 455px 1fr;
  }
}

@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .form-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
  .preview-panel {
    min-height: 640px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .btn-mobile-menu {
    display: inline-flex;
  }
  .topbar {
    padding: 12px 16px;
    gap: 12px;
  }
  .topbar::after {
    left: 16px;
    right: 16px;
  }
  .subtabs-bar {
    padding: 10px 16px;
  }
  .toolbar-divider {
    display: none;
  }
  .archive-view, .settings-view, .comm-view, .paid-view {
    padding: 18px 14px;
  }
  .post-finalize-grid {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal-box {
    width: 100%;
    max-height: 94vh;
    border-radius: 14px;
  }
  .modal-header, .modal-footer {
    padding: 14px 16px;
  }
  .modal-body {
    padding: 16px;
  }
  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 760px) {
  .modal-doc-stage {
    width: 445px;
    height: 629px;
  }
  .modal-doc-scale {
    transform: scale(0.56);
  }
  .modal-doc-stage.landscape {
    width: 451px;
    height: 253px;
  }
  .modal-doc-scale.landscape {
    transform: scale(0.44);
  }
}

@media (max-width: 640px) {
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .modal-doc-stage {
    width: 318px;
    height: 449px;
  }
  .modal-doc-scale {
    transform: scale(0.4);
  }
  .modal-doc-stage.landscape {
    width: 317px;
    height: 179px;
  }
  .modal-doc-scale.landscape {
    transform: scale(0.31);
  }
}

/* PRINT STYLES */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
  .sidebar, .sidebar-backdrop, .topbar, .subtabs-bar, .form-panel, .preview-controls, .toast-container, .modal-backdrop, .auth-overlay {
    display: none !important;
  }
  .app-shell, .main-area, .workspace-grid, .preview-panel, .preview-scroll {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
  .preview-scale-box, .preview-scale-wrapper {
    transform: none !important;
    width: 100% !important;
    height: auto !important;
  }
  .doc-sheet {
    box-shadow: none !important;
    margin: 0 !important;
  }
}

@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .auth-showcase {
    display: none;
  }
  .auth-card {
    padding: 28px 24px;
  }
}

