/* =========================================================
   STYLE.CSS  TEMA AZUL PREMIUM
   Constituio Financeira Pessoal
   Layout com menu lateral, cards modernos e imagens
========================================================= */

:root {
  --primary: #6d5efc;
  --primary-dark: #20143a;
  --primary-soft: #f2f0ff;
  --primary-accent: #a78bfa;
  --primary-accent-soft: rgba(167, 139, 250, 0.14);
 
  --navy: #20143a;
  --navy-light: #352b56;
 
  --cyan: #5eead4;
  --green: #10b981;
  --red: #ef5b5b;
  --orange: #f59e0b;
  --yellow: #facc15;
 
  --bg-page: linear-gradient(180deg, #f8f7ff 0%, #eef7ff 100%);
  --bg-card: #ffffff;
  --bg-soft: #f8f7ff;
  --panel-surface: rgba(255, 255, 255, 0.96);
  --panel-alt: #f6f4ff;
  --soft-line: rgba(109, 94, 252, 0.16);
 
  --text-main: #1d1634;
  --text-muted: #5f6882;
  --text-light: #f8f7ff;
 
  --border: rgba(109, 94, 252, 0.14);
 
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
 
  --shadow-sm: 0 18px 36px rgba(32, 20, 58, 0.08);
  --shadow-md: 0 26px 48px rgba(32, 20, 58, 0.12);
}
 
body.pf-theme {
  --primary: #6d5efc;
  --primary-dark: #20143a;
  --primary-soft: #f2f0ff;
  --primary-accent: #9bb8ff;
  --bg-page: linear-gradient(180deg, #f7f5ff 0%, #edf7ff 100%);
  --sidebar-start: rgba(19, 14, 34, 0.98);
  --sidebar-end: rgba(90, 73, 180, 0.95);
  --auth-gradient: linear-gradient(135deg, rgba(19, 14, 34, 0.98), rgba(109, 94, 252, 0.92));
}
 
body.pj-theme {
  --primary: #0ea5a4;
  --primary-dark: #0f3b3d;
  --primary-soft: #ebfffb;
  --primary-accent: #7ce8d9;
  --bg-page: linear-gradient(180deg, #f5fffd 0%, #ecfbf7 100%);
  --sidebar-start: rgba(8, 46, 47, 0.98);
  --sidebar-end: rgba(12, 126, 122, 0.95);
  --auth-gradient: linear-gradient(135deg, rgba(8, 46, 47, 0.98), rgba(14, 165, 164, 0.92));
}

/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(109, 94, 252, 0.10), transparent 24%),
    radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.08), transparent 28%),
    var(--bg-page);
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.6;
  background-attachment: fixed;
}
 
a {
  text-decoration: none;
}
 
/* =========================================================
   LANDING / SELEO DE AMBIENTE
========================================================= */
 
.landing-shell {
 min-height: 100vh;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 40px 20px;
 background:
   radial-gradient(circle at 15% 20%, rgba(109, 94, 252, 0.18), transparent 22%),
   radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.18), transparent 26%),
   linear-gradient(135deg, #f6f3ff 0%, #f0f7ff 40%, #eefdfb 100%);
}
 
.landing-page {
 width: min(1160px, 100%);
}
 
.landing-hero {
 background: linear-gradient(135deg, rgba(20, 14, 34, 0.96), rgba(88, 72, 196, 0.94), rgba(14, 165, 164, 0.88));
 border: 1px solid rgba(255,255,255,0.12);
 border-radius: 30px;
 padding: 38px 34px;
 margin-bottom: 26px;
 box-shadow: 0 24px 52px rgba(20, 14, 34, 0.18);
 position: relative;
 overflow: hidden;
}
 
.landing-hero::before {
 content: "";
 position: absolute;
 width: 320px;
 height: 320px;
 background: rgba(255,255,255,0.05);
 border-radius: 50%;
 top: -120px;
 right: -90px;
}
 
.landing-eyebrow {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 8px 14px;
 border-radius: 999px;
 background: rgba(255,255,255,0.10);
 color: #e7e5ff;
 font-size: 12px;
 letter-spacing: 0.08em;
 text-transform: uppercase;
 font-weight: 900;
 border: 1px solid rgba(255,255,255,0.12);
}
 
.landing-hero h1 {
 font-size: clamp(2.4rem, 5vw, 4rem);
 margin-top: 18px;
 margin-bottom: 12px;
 line-height: 1.06;
 letter-spacing: -0.05em;
 color: #ffffff;
}
 
.landing-hero p {
 color: rgba(230, 234, 255, 0.92);
 font-size: 1.05rem;
 max-width: 720px;
 line-height: 1.7;
}
 
.choice-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 22px;
}
 
.choice-card {
 display: block;
 border-radius: 24px;
 padding: 28px 26px;
 border: 1px solid rgba(109,94,252,0.12);
 box-shadow: 0 16px 32px rgba(20, 14, 34, 0.08);
 transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
 background: rgba(255,255,255,0.96);
}
 
.choice-card:hover {
 transform: translateY(-4px);
 box-shadow: 0 22px 45px rgba(20, 14, 34, 0.12);
 border-color: rgba(109,94,252,0.25);
}
 
.choice-card .choice-icon {
 width: 66px;
 height: 66px;
 border-radius: 18px;
 display: flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 18px;
 background-size: cover;
 background-position: center;
 box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}
 
.choice-card.pf-choice .choice-icon {
 background-image: linear-gradient(135deg, rgba(109, 94, 252, 0.18), rgba(71, 143, 255, 0.12)), url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=500&q=80");
}
 
.choice-card.pj-choice .choice-icon {
 background-image: linear-gradient(135deg, rgba(14, 165, 164, 0.18), rgba(109, 94, 252, 0.12)), url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=500&q=80");
}
 
.choice-card h2 {
 font-size: 1.9rem;
 margin-bottom: 10px;
 color: var(--primary-dark);
}
 
.choice-card p {
 color: var(--text-muted);
 line-height: 1.7;
 margin-bottom: 18px;
}
 
.choice-card .choice-action {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 12px 18px;
 border-radius: 12px;
 font-weight: 800;
 width: 100%;
}
 
.pf-choice .choice-action {
 background: linear-gradient(135deg, var(--primary), var(--primary-dark));
 color: #ffffff;
}
 
.pj-choice .choice-action {
 background: linear-gradient(135deg, #0ea5a4, #0e3b3d);
 color: #ffffff;
}

@media (max-width: 760px) {
 .choice-grid {
   grid-template-columns: 1fr;
 }
 .landing-hero {
   padding: 24px 20px;
 }
 .auth-page {
   padding: 16px 12px;
 }
 .auth-card {
   grid-template-columns: 1fr;
   max-width: 100%;
   width: 100%;
 }
 .auth-header {
   padding: 24px 18px 20px;
   min-height: auto;
 }
 .auth-body {
   padding: 20px 18px 18px;
 }
 .auth-demo-box > div:last-child,
 .pj-demo-box > div:last-child {
   flex-direction: column;
 }
 .auth-demo-box .btn,
 .pj-demo-box .btn {
   width: 100%;
   flex-basis: 100%;
 }
 .auth-footer {
   font-size: 14px;
   line-height: 1.5;
 }
}

@media (max-width: 420px) {
 .auth-page {
   padding: 12px 10px;
 }
 .auth-card {
   border-radius: 18px;
 }
 .auth-header h1 {
   font-size: 1.7rem;
 }
 .auth-header p {
   font-size: 0.9rem;
 }
 .form-group label {
   font-size: 0.9rem;
 }
 input,
 select,
 textarea,
 button,
 .btn {
   font-size: 0.95rem;
   min-height: 44px;
 }
 .auth-demo-box,
 .pj-demo-box {
   padding: 0.8rem 0.75rem;
 }
}

/* =========================================================
   LAYOUT PRINCIPAL
========================================================= */

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  background: transparent;
  overflow-x: hidden;
}

/* MENU LATERAL */
.sidebar {
  width: 290px;
  min-width: 290px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-main);
  padding: 18px 18px 20px;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 2;
  box-shadow: 12px 0 28px rgba(20, 14, 34, 0.08);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
  min-height: 100vh;
}
 
body.pf-theme .sidebar {
  background: linear-gradient(180deg, rgba(18, 14, 31, 0.98), rgba(84, 70, 174, 0.95));
  color: #ffffff;
  border-right-color: rgba(255,255,255,0.08);
}
 
body.pj-theme .sidebar {
  background: linear-gradient(180deg, rgba(8, 46, 47, 0.98), rgba(14, 165, 164, 0.95));
  color: #ffffff;
  border-right-color: rgba(255,255,255,0.08);
}
 
.sidebar-logo {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}
 
.sidebar-logo span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
 
.sidebar-user {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 12px 12px 10px;
  margin-bottom: 14px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
 
.sidebar-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
 
.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
  font-size: 13px;
}
 
.sidebar-user-label {
  font-size: 9px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 4px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
 
.sidebar-user-name {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 2px;
  color: #ffffff;
}
 
.sidebar-user-email,
.sidebar-user-age {
  font-size: 11px;
  color: rgba(255,255,255,0.76);
  word-break: break-all;
  margin-bottom: 3px;
}
 
.sidebar-state {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
 
.sidebar-state-label {
  font-size: 10px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 3px;
}
 
.sidebar-state-value {
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
}
 
.state-normal {
  color: #86efac;
}
 
.state-danger {
  color: #fca5a5;
}
 
.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  justify-content: flex-start;
}
 
.sidebar-nav a {
  color: rgba(255,255,255,0.82);
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13px;
  transition: all 0.2s ease;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
 
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05));
  color: #ffffff;
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
 
.sidebar-nav a.logout-link {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}
 
.sidebar-nav a.logout-link:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fff1f2;
}

/* CONTEDO PRINCIPAL */
.main-content {
  flex: 1;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 30px 20px 42px;
}

/* =========================================================
   CABEALHOS E HERO
========================================================= */

.page-header {
  margin-bottom: 26px;
}

.page-header h1 {
  font-size: 34px;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 16px;
}

.constitution-hero,
.dashboard-hero {
  background: linear-gradient(135deg, rgba(20, 14, 34, 0.98), rgba(93, 79, 205, 0.94), rgba(14, 165, 164, 0.85));
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 26px;
  box-shadow: 0 26px 56px rgba(20, 14, 34, 0.16);
  position: relative;
  overflow: hidden;
}

.constitution-hero::after,
.dashboard-hero::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  right: -80px;
  top: -90px;
}

.constitution-hero h1,
.dashboard-hero h1 {
  font-size: 38px;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
  position: relative;
  z-index: 2;
}

.constitution-hero p,
.dashboard-hero p {
  color: rgba(230, 234, 255, 0.92);
  line-height: 1.7;
  font-size: 16px;
  max-width: 850px;
  position: relative;
  z-index: 2;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

/* =========================================================
   CARDS
========================================================= */

.card,
.constitution-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(247,245,255,0.98));
  border: 1px solid rgba(109, 94, 252, 0.12);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 16px 28px rgba(32,20,58,0.04);
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.constitution-section:hover {
  box-shadow: 0 20px 36px rgba(32,20,58,0.07);
  transform: translateY(-2px);
  border-color: rgba(109, 94, 252, 0.18);
}

.card h2,
.constitution-section h2 {
  color: var(--primary-dark);
  margin-bottom: 14px;
  font-size: 24px;
}

.card h3,
.constitution-section h3 {
  color: var(--text-main);
  margin-top: 16px;
  margin-bottom: 8px;
}

.card p,
.constitution-section p,
.constitution-section li {
  color: var(--text-muted);
  line-height: 1.7;
}

.constitution-section ul {
  margin-left: 22px;
}

/* =========================================================
   GRID E ESTATSTICAS
========================================================= */

.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 22px;
}

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

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

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

.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,242,255,0.98));
  border-radius: 20px;
  border: 1px solid rgba(109, 94, 252, 0.12);
  padding: 22px 20px 18px;
  box-shadow: 0 16px 28px rgba(32,20,58,0.04);
  position: relative;
  overflow: hidden;
}
 
.stat-card::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  background: rgba(109, 94, 252, 0.08);
  border-radius: 50%;
  right: -30px;
  top: -30px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 700;
}

.stat-value {
  color: var(--primary);
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.stat-helper {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.5;
}

/* =========================================================
   CARDS COM IMAGEM
========================================================= */

.image-card {
  position: relative;
  min-height: 210px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-card img {
  display: none;
}

.image-card-content {
  position: static;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--text-main);
}

.image-card-content h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.image-card-content p {
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 14px;
}

/* Cards visuais sem imagem */
.visual-card {
  background: linear-gradient(180deg, #ffffff, #f8f7ff);
  border-radius: var(--radius-md);
  padding: 23px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.2s ease;
}
 
.visual-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
 
.visual-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #ebe6ff, #d9f8f5);
  color: #312e81;
}
 
.pf-visual-card {
  border-left: 4px solid #6d5efc;
}
 
.pf-visual-icon {
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.15), rgba(94, 234, 212, 0.18));
  color: var(--primary-dark);
}
 
.pf-feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,244,255,0.98));
  border-radius: 22px;
  border: 1px solid rgba(109,94,252,0.14);
  padding: 24px;
  box-shadow: 0 16px 32px rgba(20,14,34,0.08);
}
 
.pf-feature-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
  color: var(--text-main);
}
 
.pf-feature-card p {
  color: var(--text-muted);
  line-height: 1.7;
}
 
.pf-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.14), rgba(94, 234, 212, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--primary-dark);
}

.pf-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  color: #e2e8f0;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pf-stat-card {
  border-top: 4px solid #2563eb;
}

.pf-card {
  border-left: 4px solid #2563eb;
}

.visual-card h3 {
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 18px;
}

.visual-card p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14px;
}

/* =========================================================
   FORMULRIOS
========================================================= */

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  font-size: 15px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(37, 99, 235, 0.4);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.section-helper,
.field-hint {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 6px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-section {
  padding: 26px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
}

.form-section h2 {
  font-size: 1.45rem;
  margin: 0;
}

/* =========================================================
BOTES
========================================================= */
.btn,
button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s ease;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.10);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.pf-auth .btn-primary,
body.pf-theme .btn-primary {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.20);
}

.pj-auth .btn-primary,
body.pj-theme .btn-primary {
  background: linear-gradient(135deg, #1a7f5a, #0d3b2c);
  box-shadow: 0 14px 28px rgba(26, 127, 90, 0.22);
}

.btn-secondary {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.22);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: #eff6ff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: white;
}

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

/* =========================================================
   ALERTAS, STATUS E BADGES
========================================================= */

.alert,
.status-box {
  padding: 17px;
  border-radius: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
  font-weight: 650;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
}

.alert-success,
.emergency-inactive {
  background: #dcfce7;
  color: #166534;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-danger,
.emergency-active {
  background: #fee2e2;
  color: #991b1b;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-gold {
  background: #fef3c7;
  color: #d97706;
}

/* =========================================================
   TABELAS
========================================================= */

.table-container {
  width: 100%;
  overflow-x: auto;
  background: rgba(255,255,255,0.96);
  border-radius: 20px;
  border: 1px solid var(--soft-line);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  font-size: 14px;
}

th {
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  color: var(--primary-dark);
  font-weight: 900;
}

td {
  color: var(--text-main);
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}

/* =========================================================
   LOGIN / CADASTRO
========================================================= */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.10), transparent 26%),
    linear-gradient(135deg, #f8fafc 0%, #eef4ff 42%, #f0fdf4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 18px;
}

.pf-auth {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 24%),
    linear-gradient(135deg, #f8fafc 0%, #edf4ff 32%, #f4f7fb 100%);
}

.pj-auth {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 24%),
    linear-gradient(135deg, #f5fff8 0%, #edfdf5 35%, #f9fbff 100%);
}

.auth-card {
  width: min(100%, 980px);
  max-width: 980px;
  background: rgba(255, 255, 255, 0.99);
  border-radius: 26px;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.10);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.pj-auth-card {
  max-width: 980px;
}
.pf-auth-card {
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.pj-auth-card {
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.auth-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.96));
  color: #ffffff;
  padding: 34px 28px 30px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.pf-auth-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(37, 99, 235, 0.94));
}

.pj-auth-header {
  background: linear-gradient(135deg, rgba(7, 58, 42, 0.98), rgba(26, 127, 90, 0.94));
}

.auth-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 10px;
  letter-spacing: -0.05em;
  position: relative;
  z-index: 1;
}

.auth-header p {
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.auth-card {
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  transform: translate(-35%, -30%);
}

.pj-register-banner,
.pf-register-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.pj-banner-pill,
.pf-banner-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ecfeff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pj-banner-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ecfeff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-body {
  padding: 30px 28px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.97));
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  color: #64748b;
  font-size: 15px;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 900;
}

.auth-demo-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pj-demo-box {
  background: rgba(21, 128, 61, 0.06);
  border-color: rgba(21, 128, 61, 0.2);
}

.pj-demo-box strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #052e16;
}

.pj-demo-box > div:nth-child(2) {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #1f2937;
}

.pj-demo-box > div:last-child {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.pj-demo-box .btn {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  flex: 1 1 160px;
}

.auth-demo-box > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-demo-box .btn {
  flex: 1 1 160px;
  min-width: 0;
}

.pj-auth .auth-demo-box .btn-outline {
  background: rgba(21, 128, 61, 0.05);
  border-color: rgba(21, 128, 61, 0.25);
  color: #052e16;
}

.pj-auth .auth-demo-box .btn-outline:hover {
  background: rgba(21, 128, 61, 0.09);
}

.auth-message {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-weight: 700;
  line-height: 1.5;
  border: 1px solid transparent;
}

.auth-message.success {
  display: block;
  background: linear-gradient(180deg, rgba(220,252,231,0.9), rgba(187,247,208,0.9));
  border-color: rgba(34,197,94,0.2);
  color: #166534;
}

.auth-message.error {
  display: block;
  background: linear-gradient(180deg, rgba(254,226,226,0.9), rgba(254,202,202,0.9));
  border-color: rgba(220,38,38,0.12);
  color: #991b1b;
}

/* LINK SOBRE O SISTEMA NA PGINA DE LOGIN */
.auth-info-link {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(219, 234, 254, 0.3);
}

.info-link {
  display: inline-block;
  color: #dbeafe !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(219, 234, 254, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.info-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(219, 234, 254, 0.6);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =========================================================
ESTILO ESPECIAL PJ
========================================================= */

.pj-page {
  background: linear-gradient(180deg, rgba(26, 127, 90, 0.04), rgba(7, 58, 42, 0.08));
}

.pj-sidebar {
  background:
linear-gradient(180deg, rgba(7, 58, 42, 0.97), rgba(26, 127, 90, 0.98)),
url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
}

.pj-hero {
  background:
linear-gradient(135deg, rgba(7, 58, 42, 0.96), rgba(26, 127, 90, 0.94), rgba(19, 78, 74, 0.88)),
url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  margin-bottom: 26px;
  color: #ffffff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
  position: relative;
  overflow: hidden;
}

.pj-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  right: -75px;
  top: -70px;
}

.pj-hero h1 {
  font-size: 38px;
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.pj-hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.85);
  max-width: 760px;
  line-height: 1.7;
}

.pj-hero-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 900;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.pj-stat-card {
  border-top: 4px solid #1a7f5a;
}

.pj-card {
  border-top: 4px solid #1a7f5a;
}

.pj-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pj-section-header h2,
.pj-section-header h3 {
  margin: 0;
}

.pj-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.pj-badge-success {
  background: #d1fae5;
  color: #065f46;
}

.pj-badge-info {
  background: #dcfce7;
  color: #166534;
}

.pj-badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.pj-company-summary {
  background: linear-gradient(135deg, rgba(26, 127, 90, 0.10), rgba(34, 197, 94, 0.08));
  border: 1px solid rgba(26, 127, 90, 0.18);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.pj-company-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-main);
  font-size: 18px;
}

.pj-company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.pj-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

.pj-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.65;
}

.pj-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  color: #0f766e;
  font-size: 28px;
  line-height: 1;
}

.module-hero {
  background:
    linear-gradient(135deg, rgba(8, 47, 66, 0.96), rgba(15, 118, 110, 0.9), rgba(30, 64, 175, 0.88)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
  border-radius: 28px;
  padding: 32px 30px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
  color: #ffffff;
}

.module-hero::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -75px;
  top: -85px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.module-hero h1,
.module-hero p,
.module-hero .hero-tags,
.module-hero .pj-hero-badge {
  position: relative;
  z-index: 1;
}

.module-hero h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 14px;
  letter-spacing: -0.05em;
}

.module-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  margin-bottom: 18px;
}

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

.metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241, 245, 249, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  border-top: 4px solid #0f766e;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.06);
}

.metric-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.metric-value {
  color: var(--primary-dark);
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.metric-helper {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 24px;
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.pj-list-tight {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.pj-list-tight li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.pj-list-tight li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.callout {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-left: 4px solid #0f766e;
  border-radius: 18px;
  padding: 18px 20px;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 20px;
}

.timeline {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-left: 2px solid rgba(15, 118, 110, 0.18);
  padding-left: 18px;
  margin-left: 8px;
}

.timeline-step {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  margin-left: -30px;
  box-shadow: 0 12px 20px rgba(15, 118, 110, 0.2);
}

.timeline-content h4 {
  margin-bottom: 5px;
  font-size: 1.12rem;
  color: var(--primary-dark);
}

.timeline-content p {
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .metrics-grid {
     grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page {
     flex-direction: column;
  }

  .sidebar {
     width: 100%;
     min-width: 100%;
     min-height: auto;
     border-right: none;
     border-bottom: 1px solid var(--border);
     position: relative;
     box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  }

  .metrics-grid,
  .feature-grid {
     grid-template-columns: 1fr;
  }

  .module-hero {
     padding: 24px 20px;
  }

  .auth-page {
     padding: 18px 12px;
  }

  .auth-card {
     grid-template-columns: 1fr;
     max-width: 560px;
  }

  .auth-header {
     padding: 28px 20px 24px;
  }

  .auth-body {
     padding: 24px 18px 20px;
  }

  .auth-demo-box {
     padding: 0.8rem 0.9rem;
  }

  .auth-demo-box > div:last-child {
     flex-direction: column;
  }

  .auth-demo-box .btn {
     width: 100%;
     flex-basis: 100%;
  }
}

.auth-page-pj {
  background:
linear-gradient(135deg, rgba(15, 118, 110, 0.88), rgba(12, 19, 33, 0.92)),
url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1500&q=80");
  background-size: cover;
  background-position: center;
}

.pj-auth-card {
  border: 2px solid rgba(15, 118, 110, 0.20);
  box-shadow: 0 28px 60px rgba(5, 23, 34, 0.25);
}

.pj-context .auth-card {
  border: 2px solid rgba(15, 118, 110, 0.2);
}

.auth-header-pj {
  background: linear-gradient(135deg, #0f766e, #134e4a, #1d4ed8);
}

.pj-context .auth-header {
  background: linear-gradient(135deg, #0f766e, #134e4a, #1d4ed8);
}

.pj-context .auth-card .btn-primary {
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

/* =========================================================
PLUGIN DE CADASTRO RPIDO
========================================================= */

.finance-plugin {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.finance-plugin-toggle {
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.24);
  color: white;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.finance-plugin-toggle:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.28);
}

.finance-plugin-modal {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(390px, calc(100vw - 28px));
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.finance-plugin-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.finance-plugin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.finance-plugin-header h3 {
  color: var(--text-main);
  font-size: 22px;
  margin: 0;
}

.finance-plugin-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
}

.finance-plugin-form {
  display: grid;
  gap: 14px;
}

.finance-plugin-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-plugin-form input,
.finance-plugin-form select,
.finance-plugin-form textarea {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.45);
  background: rgba(248,250,252,0.8);
  padding: 11px 12px;
  font-size: 14px;
}

.finance-plugin-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.finance-plugin-actions .btn {
  flex: 1;
}

/* =========================================================
RESPONSIVO
========================================================= */

@media (max-width: 1000px) {
  .sidebar {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    padding: 16px 18px 18px;
  }

  .sidebar-user {
    margin-bottom: 14px;
  }

  .sidebar-nav {
    gap: 6px;
    justify-content: flex-start;
  }

  .sidebar-nav a {
    padding: 10px 12px;
    font-size: 13px;
    white-space: normal;
  }

  .main-content {
    width: 100%;
    padding: 22px 18px 28px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .constitution-hero h1,
  .dashboard-hero h1 {
    font-size: 29px;
  }
}

@media (max-width: 720px) {
  .sidebar {
    padding: 14px 14px 16px;
  }

  .sidebar-logo {
    font-size: 18px;
  }

  .sidebar-user-header {
    align-items: flex-start;
  }

  .sidebar-user-name {
    font-size: 15px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .sidebar-nav a {
    text-align: center;
    width: 100%;
  }

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

@media (max-width: 600px) {
  body {
    overflow-x: hidden;
  }

  .page {
    overflow-x: hidden;
  }

  .sidebar {
    padding: 12px 12px 14px;
  }

  .sidebar-logo {
    font-size: 17px;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .sidebar-nav a {
    width: 100%;
    text-align: center;
    padding: 11px 12px;
  }

  .main-content {
    padding: 16px 10px 24px;
  }

  .card,
  .constitution-section,
  .stat-card,
  .pf-feature-card,
  .form-section {
    padding: 18px 16px;
  }

  .dashboard-hero,
  .constitution-hero,
  .module-hero {
    padding: 22px 18px;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tag {
    font-size: 11px;
  }

  .actions {
    flex-direction: column;
  }

  .btn,
  button {
    width: 100%;
  }

  .auth-page {
    padding: 14px;
  }

  .auth-card {
    max-width: 100%;
    border-radius: 22px;
  }

  .auth-header {
    padding: 24px 18px 20px;
  }

  .auth-body {
    padding: 20px 18px 18px;
  }

  .auth-header h1 {
    font-size: 2rem;
  }

  .auth-header p {
    font-size: 14px;
  }

  .auth-demo-box {
    padding: 14px 12px !important;
  }

  .auth-demo-box > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .auth-demo-box .btn {
    width: 100%;
  }

  .form-group {
    margin-bottom: 14px;
  }

  input,
  select,
  textarea {
    padding: 12px 13px;
    font-size: 15px;
  }

  .table-container {
    border-radius: 16px;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 12px;
  }
}