* {
  box-sizing: border-box;
}

:root {
  /* Paleta do escritório Walisson Euzebio */
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --bg-sidebar: #0d1b2a;
  --bg-header: #0d1b2a;
  --text-primary: #1b2838;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --accent: #c9a227;
  --accent-hover: #b8922a;
  --accent-secondary: #1a3a5c;
  --success: #059669;
  --danger: #dc2626;
  --gold: #c9a227;
  --gold-light: #d4af37;
  --navy: #0d1b2a;
  --navy-light: #1a3a5c;
  --radius: 8px;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header"
    "view";
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR TOGGLE (hamburger) — visível apenas no mobile
   ========================================================= */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sidebar-toggle:hover {
  border-color: var(--gold);
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.sidebar-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.sidebar-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

/* Overlay escuro atrás da sidebar no mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Sidebar drawer — mobile */
.sidebar-mobile-header {
  display: none;
}

.sidebar-close {
  display: none;
}

.app-header--workspace .sidebar-toggle {
  display: none;
}

body.app-sidebar-open {
  overflow: hidden;
}

/* =========================================================
   RESPONSIVO — Tablet (<=1024px)
   ========================================================= */
@media (max-width: 1024px) {
  .app-view {
    grid-template-columns: 240px 1fr;
  }

  .rubricas-table td.rubrica-nome {
    max-width: 140px;
  }
}

/* =========================================================
   RESPONSIVO — Mobile (<=768px)
   ========================================================= */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* --- Cabeçalho da plataforma (/app) --- */
  .app-header--workspace {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand menu"
      "nav nav";
    align-items: center;
    padding: 10px 14px 12px;
    gap: 10px 12px;
  }

  .app-header--workspace .header-brand {
    grid-area: brand;
    flex: none;
    min-width: 0;
  }

  .app-header--workspace .header-titles {
    display: none;
  }

  .app-header--workspace .sidebar-toggle {
    grid-area: menu;
    display: flex;
    flex-shrink: 0;
  }

  .app-header--workspace .header-right {
    grid-area: nav;
    flex: none;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
    overflow: hidden;
  }

  .app-header--workspace .app-global-nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 2px 0 4px;
  }

  .app-header--workspace .app-global-nav::-webkit-scrollbar {
    display: none;
  }

  /* --- Cabeçalho das demais páginas internas --- */
  .page-shell .app-header {
    flex-wrap: wrap;
    padding: 10px 14px 12px;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 80;
  }

  .page-shell .header-brand {
    flex: 1;
    min-width: 0;
  }

  .page-shell .header-titles {
    min-width: 0;
    padding-left: 10px;
  }

  .page-shell .header-subtitle {
    display: none;
  }

  .page-shell .header-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    overflow: hidden;
  }

  .page-shell .app-global-nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }

  .page-shell .app-global-nav::-webkit-scrollbar {
    display: none;
  }

  .app-nav-user {
    display: none !important;
  }

  .app-nav-link {
    padding: 8px 12px;
    font-size: 11px;
    flex-shrink: 0;
    width: auto;
    text-transform: none;
    letter-spacing: 0;
  }

  .app-header h1 {
    font-size: 15px;
  }

  /* --- Layout principal /app --- */
  .app-view {
    display: block !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 92vw);
    height: 100vh;
    height: 100dvh;
    z-index: 110;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
    padding-top: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--navy) 0%, #0a1520 100%);
    z-index: 1;
  }

  .sidebar-mobile-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
  }

  .sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  .sidebar-overlay {
    z-index: 100;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  .app-main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 14px;
    gap: 14px;
  }

  .main-toolbar {
    justify-content: stretch;
  }

  .toolbar-exports {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .toolbar-exports .btn-outline {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    font-size: 11px;
  }

  .table-panel {
    padding: 14px 10px;
    overflow: hidden;
  }

  .tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    margin: 0 -10px 14px;
    padding: 0 10px 2px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
  }

  .app-main .btn:not(.tab-button):not(.empty-state-action) {
    width: 100%;
    text-align: center;
  }

  .empty-state-action {
    width: auto;
    max-width: 100%;
  }

  .tab-actions {
    flex-direction: column;
    gap: 8px;
  }

  .tab-actions .btn {
    width: 100%;
  }

  .texto-bruto-container {
    height: min(50vh, 360px);
  }

  #texto-bruto-textarea,
  #validacao-textarea,
  #projef-textarea {
    min-height: 240px;
    font-size: 12px;
    padding: 12px;
  }

  .summary {
    padding: 14px;
  }

  .summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-item .value {
    font-size: 16px;
  }

  .empty-state {
    min-height: 240px;
  }

  .empty-icon {
    font-size: 44px;
  }

  .empty-state-content {
    padding: 32px 16px;
  }

  .empty-state-content h3 {
    font-size: 16px;
  }

  .empty-state-content p {
    font-size: 13px;
  }

  .history-list {
    max-height: none;
  }

  .history-item {
    padding: 12px;
  }

  .history-item-actions button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .upload-zone {
    padding: 20px 14px;
  }

  .time-filter {
    flex-wrap: wrap;
    gap: 8px;
  }

  .rubricas-table-wrap {
    margin: 0 -4px;
    border-radius: var(--radius);
  }

  .ano-header {
    font-size: 13px;
    padding: 10px 12px;
  }

  .beta-disclaimer {
    padding: 10px 12px;
  }

  .beta-disclaimer p {
    font-size: 12px;
  }

  .upload-loading,
  .upload-blocked-overlay {
    z-index: 200;
  }

  /* --- Páginas internas (perfil, org, assinatura…) --- */
  .page-content {
    padding: 14px;
    gap: 14px;
  }

  .org-admin-grid {
    grid-template-columns: 1fr;
  }

  .org-summary-card {
    position: static;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .info-grid dt {
    margin-top: 10px;
  }

  .info-grid dt:first-child {
    margin-top: 0;
  }

  .member-item {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .pricing-content {
    padding: 0 4px;
  }

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

@media (max-width: 480px) {
  .app-header--workspace,
  .page-shell .app-header {
    padding: 8px 10px 10px;
  }

  .app-header h1 {
    font-size: 14px;
  }

  .sidebar {
    width: min(300px, 94vw);
  }

  .app-main {
    padding: 12px 10px;
  }

  .table-panel {
    padding: 12px 8px;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 11px;
  }

  .toolbar-exports {
    grid-template-columns: 1fr;
  }
}

/* Header */
.app-header {
  grid-area: header;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #f8fafc;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid var(--gold);
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-logo-full {
  display: block;
  width: auto;
  height: auto;
  max-height: 44px;
  object-fit: contain;
}

.brand-logo-full--header {
  max-height: 48px;
}

.brand-logo-full--landing-header {
  max-height: 72px;
  max-width: min(340px, 72vw);
}

.brand-logo-full--auth {
  max-width: min(240px, 100%);
  max-height: 72px;
  margin: 0 auto;
}

.brand-logo-full--footer {
  max-height: 42px;
}

.brand-logo-full--legal {
  max-width: 200px;
  max-height: 56px;
  margin-bottom: 20px;
}

.brand-logo--lg {
  width: 56px;
  height: 56px;
}

.brand-logo--sm {
  width: 32px;
  height: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.header-brand-mark {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.header-brand-mark:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 10px;
}

.app-view {
  grid-area: view;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "sidebar main";
  min-height: 0;
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--gold);
  padding-left: 16px;
}

.app-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.header-subtitle {
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, var(--navy) 0%, #0a1520 100%);
  color: #e2e8f0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  border-right: 1px solid rgba(201, 162, 39, 0.2);
}

.sidebar-section {
  padding: 0 16px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}

/* O upload-zone abre o seletor de arquivo via click (usuarios com permissao). */

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(201, 162, 39, 0.08);
  border: 2px dashed rgba(201, 162, 39, 0.4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  gap: 8px;
}

.upload-zone:hover {
  background: rgba(201, 162, 39, 0.15);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.upload-zone-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.upload-zone-disabled:hover {
  transform: none;
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(201, 162, 39, 0.4);
}

.upload-zone-locked {
  opacity: 0.75;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.45);
}

.upload-zone-locked:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(100, 116, 139, 0.55);
  transform: none;
}

.upload-zone-locked .upload-text {
  color: #64748b;
}

.plan-notice-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  margin-left: 4px;
}

.profile-plan-actions {
  margin-top: 12px;
}

.plan-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #991b1b;
  font-size: 12px;
  line-height: 1.4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 27, 42, 0.55);
  cursor: pointer;
}

.modal.hidden {
  display: none;
}

.upload-blocked-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 27, 42, 0.55);
}

.upload-blocked-overlay.is-open {
  display: flex;
}

.upload-blocked-overlay .modal-card {
  margin: 0;
  cursor: default;
  pointer-events: auto;
}

.upload-loading {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 27, 42, 0.45);
}

.upload-loading.is-active {
  display: flex !important;
}

.upload-loading.hidden {
  display: none !important;
}

.upload-loading-card {
  min-width: min(100%, 320px);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
  border-top: 4px solid var(--gold);
}

.upload-loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid rgba(201, 162, 39, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: upload-spin 0.8s linear infinite;
}

.upload-loading-message {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
}

.upload-loading-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.upload-zone.is-loading {
  opacity: 0.65;
  cursor: wait;
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
  border-top: 4px solid var(--gold);
  cursor: default;
}

.modal-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.modal-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 20px;
}

.modal-card p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.modal-card .btn {
  width: 100%;
}

.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;
}

.upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.upload-text {
  font-weight: 600;
  font-size: 14px;
  color: #f8fafc;
}

.upload-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.time-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
}

.time-filter label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.time-filter input {
  width: 72px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.2);
  color: #f8fafc;
  font-size: 13px;
}

.time-filter input::placeholder {
  color: #64748b;
}

.time-filter-sep {
  color: #64748b;
  font-weight: 600;
}

/* History */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Removido max-height para ser responsivo ao tamanho da página */
}

.history-empty {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  padding: 12px 0;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid transparent;
}

.history-item:hover {
  background: rgba(255,255,255,0.1);
}

.history-item.active {
  border-color: rgba(201, 162, 39, 0.65);
  background: rgba(201, 162, 39, 0.15);
}

.history-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-person {
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.history-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.history-item-actions button {
  padding: 4px 8px;
  font-size: 11px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
}

.history-item-actions button:hover {
  background: rgba(255,255,255,0.18);
}

.history-item-actions button.delete {
  color: #f87171;
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.btn-secondary {
  background: rgba(201, 162, 39, 0.2);
  color: var(--gold-light);
  width: 100%;
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.btn-secondary:hover {
  background: rgba(201, 162, 39, 0.35);
  border-color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  width: 100%;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--gold-light);
  border-color: rgba(201, 162, 39, 0.3);
}

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Main */
.app-main {
  grid-area: main;
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Permite a coluna do grid encolher abaixo do min-content da tabela (evita vazamento lateral) */
  min-width: 0;
}

.main-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-exports {
  display: flex;
  gap: 8px;
}

.content-area.hidden {
  display: none !important;
}

.empty-state.hidden {
  display: none !important;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
}

.empty-state-content {
  text-align: center;
  padding: 48px 24px;
  max-width: 360px;
}

.empty-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}

.empty-state-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.empty-state-action {
  display: inline-flex;
  width: auto;
  margin-top: 18px;
  text-decoration: none;
  cursor: pointer;
}

/* Panel */
.table-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  flex: 1;
}

#result-summary {
  margin-bottom: 24px;
}

#rubricas-container {
  min-width: 0;
  max-width: 100%;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.summary-item .label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-item .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-item .value.rendimento {
  color: var(--success);
}

.summary-item .value.desconto {
  color: var(--danger);
}

.ano-section {
  margin-bottom: 32px;
  min-width: 0;
  max-width: 100%;
}

/* Scroll horizontal só da tabela; cabeçalho do ano permanece alinhado ao painel */
.rubricas-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ano-header {
  background: var(--bg-sidebar);
  color: #fff;
  padding: 12px 20px;
  margin: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 14px;
  font-weight: 600;
}

.rubricas-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.rubricas-table thead {
  background: #f8fafc;
}

.rubricas-table th {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 11px;
}

.rubricas-table th:first-child {
  width: 40px;
  text-align: center;
}

.rubricas-table th:nth-child(2) {
  text-align: left;
  min-width: 140px;
}

.rubricas-table th:nth-child(3) {
  width: 100px;
}

.rubricas-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 11px;
}

.rubricas-table td:first-child {
  text-align: center;
}

.rubricas-table td.rubrica-nome {
  text-align: left;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.rubricas-table td.tipo-select {
  padding: 4px;
}

.rubricas-table td.tipo-select select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: #fff;
  cursor: pointer;
}

.rubricas-table td.tipo-select select.rendimento {
  color: var(--success);
  border-color: var(--success);
}

.rubricas-table td.tipo-select select.desconto {
  color: var(--danger);
  border-color: var(--danger);
}

.rubricas-table td.mes-valor {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.rubricas-table td.mes-valor.zero {
  color: #94a3b8;
}

.rubricas-table td.total-valor {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
}

.rubricas-table tbody tr:hover {
  background: #f8fafc;
}

.rubricas-table tbody tr.entra {
  background: rgba(5, 150, 105, 0.06);
}

.rubricas-table tbody tr.nao-entra {
  background: rgba(220, 38, 38, 0.06);
  opacity: 0.85;
}

.rubricas-table tbody tr.nao-entra td {
  text-decoration: line-through;
  color: #94a3b8;
}

.rubricas-table tbody tr.nao-entra td:first-child,
.rubricas-table tbody tr.nao-entra td.tipo-select {
  text-decoration: none;
}

.rubricas-table tbody tr.total-row {
  background: var(--bg-sidebar);
  color: #fff;
  font-weight: bold;
}

.rubricas-table tbody tr.total-row td {
  border-top: 2px solid #1e293b;
  padding: 10px 8px;
  white-space: nowrap;
}

.rubricas-table tbody tr.total-row td.total-label {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  padding-left: 12px;
}

.rubricas-table tbody tr.total-row td.total-mes-valor,
.rubricas-table tbody tr.total-row td.total-geral-valor {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  text-align: right;
}

.rubricas-table tbody tr.percentual-row {
  background: #1e293b;
  color: #fff;
  font-weight: bold;
}

.rubricas-table tbody tr.percentual-row td {
  border-top: 1px solid #334155;
  padding: 8px;
  white-space: nowrap;
}

.rubricas-table tbody tr.percentual-row td.percentual-label {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  padding-left: 12px;
  color: #fbbf24;
}

.rubricas-table tbody tr.percentual-row td.percentual-mes-valor,
.rubricas-table tbody tr.percentual-row td.percentual-geral-valor {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  background: rgba(251, 191, 36, 0.12);
  text-align: right;
  color: #fbbf24;
}

.error {
  color: var(--danger);
  padding: 16px;
  background: rgba(220, 38, 38, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(220, 38, 38, 0.2);
  margin: 0 0 8px;
}

.error-support {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.error-support a,
.modal-support a {
  color: var(--navy-light);
  font-weight: 600;
  text-decoration: underline;
}

.pricing-includes a,
.benefits-list a {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: underline;
}

.error-support a:hover,
.modal-support a:hover {
  color: var(--gold);
}

.pricing-includes a:hover,
.benefits-list a:hover {
  color: #fff;
}

.beta-disclaimer {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.12) 0%, rgba(26, 58, 92, 0.06) 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-left: 4px solid var(--gold);
}

.beta-disclaimer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.beta-disclaimer strong {
  color: var(--navy);
}

.modal-support {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--border);
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: -3px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tab-button:hover {
  color: var(--navy);
  background: rgba(201, 162, 39, 0.1);
}

.tab-button.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
  background: rgba(201, 162, 39, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.texto-bruto-container {
  width: 100%;
  height: 520px;
}

#texto-bruto-textarea,
#validacao-textarea,
#projef-textarea {
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 16px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  resize: vertical;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.hidden {
  display: none !important;
}

/* Auth & account pages */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--navy) 0%, #0a1520 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border-top: 4px solid var(--gold);
}

.auth-brand {
  text-align: center;
}

.auth-brand-mark {
  display: inline-flex;
  margin: 0 auto 12px;
  line-height: 0;
}

.auth-brand-mark .brand-logo--lg {
  margin: 0 auto;
}

.auth-brand h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 24px;
}

.auth-brand p {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

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

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-form input,
.auth-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-forgot-link {
  align-self: flex-end;
  margin-top: -4px;
  color: var(--navy-light);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot-link:hover {
  color: var(--gold);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 14px;
}

.auth-links-centered {
  justify-content: center;
}

.auth-register-btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-links a:not(.btn) {
  color: var(--navy-light);
  text-decoration: none;
}

.auth-links a:not(.btn):hover {
  color: var(--gold);
}

.auth-error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
  min-height: 1.2em;
}

.auth-error-visible {
  display: block;
}

.auth-message {
  margin: 0;
  font-size: 13px;
  min-height: 1.2em;
}

.auth-message-success {
  color: var(--success);
}

.auth-message-error {
  color: var(--danger);
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.org-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  align-items: start;
}

.org-summary-card {
  position: sticky;
  top: 92px;
}

.panel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border-top: 4px solid var(--gold);
}

.panel-card h2 {
  margin: 0 0 16px;
  color: var(--navy);
}

.panel-meta {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.info-grid dt {
  color: var(--text-muted);
  font-weight: 600;
}

.info-grid dd {
  margin: 0;
  color: var(--text-primary);
}

.auth-form-inline {
  max-width: 480px;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

.app-nav-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid rgba(248, 250, 252, 0.2);
  flex-shrink: 0;
}

.app-nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.app-nav-user-org {
  font-size: 11px;
  color: var(--gold-light);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-global-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-global-nav::-webkit-scrollbar {
  display: none;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(248, 250, 252, 0.92);
  text-decoration: none;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.app-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
  color: #fff;
}

.app-nav-link.is-current {
  background: rgba(201, 162, 39, 0.22);
  border-color: var(--gold);
  color: var(--gold-light);
  cursor: default;
}

.app-nav-logout {
  margin-left: 2px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-info span {
  font-size: 13px;
  color: var(--text-secondary);
}

.member-info small {
  font-size: 11px;
  color: var(--text-muted);
}

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

.member-role {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.platform-orgs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.platform-admin-page .platform-content {
  max-width: 1100px;
}

.platform-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.platform-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.platform-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.platform-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.platform-panel-head h2 {
  margin-bottom: 4px;
}

.platform-search input {
  min-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.platform-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.platform-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.platform-empty strong {
  display: block;
  color: var(--navy);
  margin-bottom: 6px;
}

.platform-empty p {
  margin: 0;
}

.platform-empty-quiet {
  margin-bottom: 16px;
}

.platform-org {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.platform-org-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}

.platform-org-title h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 18px;
}

.platform-org-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.platform-org-meta code {
  background: #eef2f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

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

.platform-org-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.platform-org-section:last-child {
  border-bottom: none;
}

.platform-section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.platform-plan-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f8fafc;
}

.platform-plan-group .plan-action {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}

.platform-plan-group .plan-action:last-child {
  border-right: none;
}

.platform-plan-group .plan-action:hover {
  background: #eef2f7;
  color: var(--navy);
}

.platform-plan-group .plan-action.is-active {
  background: var(--navy);
  color: #fff;
}

.platform-status-btn {
  margin-top: 12px;
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--danger);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.platform-status-btn:hover {
  color: #991b1b;
}

.platform-users {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-user-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}

.platform-user-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.platform-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.platform-user-info strong {
  color: var(--navy);
}

.platform-user-info span {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
}

.platform-user-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.platform-user-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.platform-control-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.platform-control-label select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
  min-width: 130px;
}

.platform-members {
  margin-top: 8px;
}

.platform-admin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
}

.platform-admin-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge-active {
  background: #dcfce7;
  color: #166534;
}

.status-badge-suspended {
  background: #fee2e2;
  color: #991b1b;
}

.plan-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.plan-badge-free {
  background: #f1f5f9;
  color: #475569;
}

.plan-badge-trial {
  background: #fef3c7;
  color: #92400e;
}

.plan-badge-subscription {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 768px) {
  .org-admin-grid {
    grid-template-columns: 1fr;
  }

  .org-summary-card {
    position: static;
  }

  .platform-panel-head {
    flex-direction: column;
  }

  .platform-search input {
    width: 100%;
    min-width: 0;
  }

  .platform-org-header {
    flex-direction: column;
  }

  .platform-user-row {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-user-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-plan-group {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .platform-plan-group .plan-action {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .platform-plan-group .plan-action:last-child {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .auth-card {
    padding: 24px 20px;
  }
}

/* =========================================================
   Página de assinatura / pricing
   ========================================================= */
.pricing-page .pricing-content {
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.pricing-banner-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.pricing-banner-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.pricing-hero {
  text-align: center;
  margin-bottom: 28px;
}

.pricing-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}

.pricing-hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy);
  line-height: 1.25;
}

.pricing-hero-lead {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.pricing-account-status {
  display: inline-flex;
  margin: 16px auto 0;
  padding: 8px 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  background: #fffdf5;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.pricing-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pricing-tab.active {
  border-color: var(--gold);
  color: var(--navy);
  background: #fffdf5;
}

.pricing-tab-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy-light);
  color: #fff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.pricing-card-featured {
  border-top: 4px solid var(--gold);
}

.pricing-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.pricing-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.35rem;
}

.pricing-card-desc {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.pricing-amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.pricing-amount-list {
  font-size: 18px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.pricing-amount-final {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.pricing-amount-period {
  font-size: 16px;
  color: var(--text-secondary);
}

.pricing-amount-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pricing-amount-recurring {
  margin: -4px 0 10px;
  font-size: 14px;
  color: var(--navy-light);
  font-weight: 600;
}

.pricing-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.pricing-coupon-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.pricing-coupon-row input,
.pricing-cpf-label input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.pricing-coupon-msg,
.pricing-subscribe-msg {
  margin: 0 0 12px;
  font-size: 13px;
  min-height: 1.2em;
}

.pricing-coupon-msg {
  color: var(--success);
}

.pricing-coupon-msg.is-error {
  color: var(--danger);
}

.pricing-subscribe-msg {
  color: var(--danger);
}

.pricing-cta {
  width: 100%;
  margin-bottom: 8px;
}

.pricing-includes {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pricing-includes li {
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.pricing-includes li:first-child {
  border-top: none;
}

.pricing-benefits {
  background: var(--navy);
  color: #e8edf4;
  border-radius: 12px;
  padding: 28px 24px;
}

.pricing-benefits h3 {
  margin: 0 0 20px;
  color: var(--gold);
  font-size: 1.15rem;
}

.benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.benefits-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.benefit-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.benefits-list strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
  font-size: 14px;
}

.benefits-list p {
  margin: 0;
  font-size: 13px;
  color: #b8c5d6;
  line-height: 1.45;
}

.pricing-coming-soon {
  text-align: center;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  max-width: 520px;
  margin: 0 auto;
}

.pricing-coming-soon h3 {
  margin: 0 0 12px;
  color: var(--navy);
}

.pricing-coming-soon p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.pricing-coming-soon-hint {
  margin: 16px 0 24px;
}

.pricing-faq {
  margin-top: 32px;
}

.faq-list dt {
  font-weight: 600;
  color: var(--navy);
  margin-top: 16px;
}

.faq-list dd {
  margin: 6px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

/* =========================================================
   Landing page (rubrikas.com.br)
   ========================================================= */
.landing-body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #0b1f3a;
  background: #f5f6f8;
}

.landing-container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(11, 31, 58, 0.95);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.landing-mobile-nav {
  display: none;
}

.landing-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 20px;
}

.landing-brand {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.landing-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
}

.landing-footer-brand strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-nav a:not(.btn) {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.landing-nav .landing-nav-btn-outline {
  background: #fff;
  color: var(--navy);
  border: 2px solid #fff;
  text-decoration: none;
}

.landing-nav .landing-nav-btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.landing-nav .landing-nav-btn-primary {
  color: var(--navy);
  text-decoration: none;
}

.landing-nav .landing-nav-btn-primary:hover {
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.landing-hero {
  background: radial-gradient(circle at top right, #15325b 0%, #0b1f3a 45%, #0b1f3a 100%);
  color: #fff;
  padding: 84px 0 76px;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.landing-kicker {
  margin: 0 0 12px;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.14;
}

.landing-hero p {
  margin: 18px 0 0;
  color: #d9e1ec;
  font-size: 1.05rem;
  line-height: 1.65;
}

.landing-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-actions .btn {
  min-width: 190px;
  text-decoration: none;
}

.landing-hero-visual {
  display: block;
  margin-right: -42px;
}

.landing-hero-visual img {
  display: block;
  width: min(660px, 54vw);
  max-width: none;
  height: auto;
  border-radius: 22px;
  filter: drop-shadow(0 24px 46px rgba(0, 0, 0, 0.34));
}

.landing-hero .landing-hero-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.landing-hero .landing-hero-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.landing-hero .landing-hero-btn-outline:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.landing-mockup {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.landing-mockup-bar {
  height: 30px;
  background: #eef2f8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}

.landing-mockup-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c2cde0;
}

.landing-mockup-content {
  display: grid;
  grid-template-columns: 32% 1fr;
  min-height: 260px;
}

.landing-mockup-sidebar {
  background: #102947;
}

.landing-mockup-main {
  background: #fafbfd;
  padding: 18px;
}

.landing-mockup-row {
  height: 56px;
  background: #dfe7f4;
  border-radius: 10px;
  margin-bottom: 12px;
}

.landing-mockup-row.short {
  width: 62%;
}

.landing-section {
  padding: 78px 0;
}

.landing-section.alt {
  background: #fff;
}

.landing-section h2 {
  margin: 0 0 26px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #0b1f3a;
}

.landing-cards {
  display: grid;
  gap: 14px;
}

.landing-cards.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-cards.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-card {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  min-height: 110px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.landing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.12);
  border-color: #d4af37;
}

.landing-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.landing-card-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.12);
  color: #8a6a09;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-steps {
  margin: 0;
  padding-left: 22px;
  color: #1f3656;
  font-size: 1.02rem;
  line-height: 1.8;
}

.landing-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-feature-list li {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-left: 4px solid #d4af37;
  border-radius: 10px;
  padding: 13px 14px;
  font-weight: 600;
}

.landing-video-placeholder {
  border: 2px dashed #d0d9e8;
  border-radius: 14px;
  background: #f8fbff;
  text-align: center;
  padding: 40px 18px;
  color: #37557d;
}

.landing-video-placeholder p {
  margin: 0 0 10px;
}

.landing-video-placeholder p:last-child {
  margin-bottom: 0;
}

.landing-final-cta {
  background: #0b1f3a;
  color: #fff;
  text-align: center;
  padding: 72px 0;
}

.landing-final-cta h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.landing-footer {
  background: #061426;
  color: #cbd6e4;
  padding: 30px 0;
}

.landing-footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-footer strong {
  color: #fff;
}

.landing-footer p {
  margin: 8px 0 0;
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.landing-footer a {
  color: #fff;
  text-decoration: none;
}

.landing-mobile-cta {
  display: none;
}

.legal-body {
  margin: 0;
  background: #f5f6f8;
  color: #0b1f3a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.legal-container {
  width: min(760px, calc(100% - 40px));
  margin: 72px auto;
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 12px;
  padding: 28px;
  line-height: 1.65;
}

.legal-container h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.legal-container .legal-updated {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.legal-container h2 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  color: var(--navy);
}

.legal-container p,
.legal-container li {
  color: var(--text-secondary);
  font-size: 15px;
}

.legal-container ul,
.legal-container ol {
  padding-left: 22px;
}

.legal-container a {
  color: var(--navy-light);
  font-weight: 600;
}

.legal-container .legal-actions {
  margin-top: 28px;
}

@media (max-width: 1024px) {
  .landing-cards.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .landing-header {
    position: static;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .landing-hero-visual {
    margin: 8px auto 0;
  }

  .landing-hero-visual img {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .landing-hero {
    padding: 58px 0 52px;
  }

  .landing-section {
    padding: 58px 0;
  }

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

  .landing-feature-list {
    grid-template-columns: 1fr;
  }

  .landing-footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .landing-container {
    width: min(1120px, calc(100% - 28px));
  }

  .landing-header-inner {
    justify-content: center;
  }

  .landing-brand {
    margin: 0 auto;
  }

  .landing-nav {
    display: none;
  }

  .brand-logo-full--header {
    max-height: 38px;
  }

  .brand-logo-full--landing-header {
    max-height: 56px;
    max-width: min(280px, 78vw);
  }

  .brand-logo-full--auth {
    max-height: 60px;
  }

  .landing-mobile-nav {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    background: #102947;
    border-bottom: 1px solid rgba(212, 175, 55, 0.24);
  }

  .landing-mobile-nav a {
    flex: 0 0 auto;
    text-decoration: none;
    color: #fff;
    font-size: 0.85rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 999px;
    padding: 7px 12px;
  }

  .landing-hero {
    padding: 34px 0 34px;
  }

  .landing-kicker {
    font-size: 0.68rem;
  }

  .landing-hero h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .landing-hero p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .landing-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .landing-hero-btn-primary,
  .landing-final-cta .btn {
    display: none;
  }

  .landing-actions .btn {
    width: 100%;
    min-width: auto;
    justify-content: center;
  }

  .landing-mockup-content {
    min-height: 210px;
  }

  .landing-section {
    padding: 44px 0;
  }

  .landing-section h2 {
    margin-bottom: 20px;
    font-size: 1.35rem;
  }

  .landing-cards.four,
  .landing-cards.five {
    grid-template-columns: 1fr;
  }

  .landing-card {
    min-height: auto;
    padding: 16px 14px;
  }

  .landing-steps {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .landing-feature-list li {
    font-size: 0.94rem;
  }

  .landing-video-placeholder {
    padding: 24px 14px;
    font-size: 0.92rem;
  }

  .landing-final-cta {
    padding: 44px 0 100px;
  }

  .landing-final-cta h2 {
    margin-bottom: 0;
  }

  .landing-footer {
    padding-bottom: 86px;
  }

  .landing-mobile-cta {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    text-decoration: none;
    background: #d4af37;
    color: #0b1f3a;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25);
  }
}
