/* ============================================================
   EXPATRIATUS — Inteligência Jurisdicional
   Design System
   ============================================================ */

/* 1. Variables */
:root {
  --black: #0d0d0d;
  --white: #ffffff;
  --gold: #c4a052;
  --gold-light: #edd899;
  --gold-dark: #9b7b35;

  --gray-50: #fafaf8;
  --gray-100: #f4f3ef;
  --gray-200: #e8e7e2;
  --gray-300: #d4d2cb;
  --gray-400: #a8a7a2;
  --gray-500: #7d7b76;
  --gray-600: #57554f;
  --gray-700: #3d3b36;
  --gray-800: #2a2825;
  --gray-900: #1a1917;

  --ok: #2d6b3e;
  --ok-bg: #ebf7ee;
  --warn: #d4820a;
  --warn-bg: #fef5e7;
  --err: #c0392b;
  --err-bg: #fcecea;
  --info: #1b5e9b;
  --info-bg: #e8f3fc;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;

  --container: 1200px;
  --pad: 24px;
  --nav-h: 96px;
  --sidebar-w: 256px;
}

/* 2. Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}
ul,
ol {
  list-style: none;
}
input,
select,
textarea {
  font: inherit;
}

/* 3. Typography */
h1,
h2,
h3,
h4,
h5 {
  font-family: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.375rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}
h4 {
  font-size: 1.125rem;
}
p {
  line-height: 1.75;
}
.lead {
  font-size: 1.0625rem;
  color: var(--gray-600);
  line-height: 1.8;
}
.text-muted {
  color: var(--gray-500);
}
.text-gold {
  color: var(--gold);
}
.text-white {
  color: var(--white);
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.8125rem;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}

/* 4. Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section {
  padding: 80px 0;
}
.section-sm {
  padding: 48px 0;
}
.section-lg {
  padding: 120px 0;
}
.section-dark {
  background: var(--black);
  color: var(--white);
}
.section-light {
  background: var(--gray-100);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 16px;
}
.gap-3 {
  gap: 24px;
}
.gap-4 {
  gap: 32px;
}

.text-center {
  text-align: center;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mt-6 {
  margin-top: 48px;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}
.w-full {
  width: 100%;
}

body:not(.panel-body):not(.auth-body) {
  padding-top: var(--nav-h);
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover {
  background: var(--gray-800);
  border-color: var(--gray-800);
}
.btn-secondary {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn-danger {
  background: var(--err);
  color: var(--white);
  border-color: var(--err);
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-sm {
  padding: 7px 16px;
  font-size: 0.75rem;
}
.btn-lg {
  padding: 15px 40px;
  font-size: 0.9375rem;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* 6. Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.navbar-brand img {
  height: 80px;
  width: auto;
  filter: brightness(0) invert(1);
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.navbar-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}
.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--white);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-toggle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm, 4px);
  padding: 5px 9px;
  transition: color 0.15s, border-color 0.15s;
}
.lang-toggle:hover {
  color: var(--white);
  border-color: var(--white);
}
.navbar-actions .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}
.navbar-actions .btn-secondary:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.navbar-actions .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
}
.navbar-actions .btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.drawer-overlay,
.mobile-drawer {
  display: none;
}
.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

/* 7. Hero */
.hero {
  background: #0f0f0f;
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px 80px
    max(var(--pad), calc((100vw - var(--container)) / 2 + var(--pad)));
  position: relative;
  z-index: 2;
}
.hero-image {
  position: relative;
  aspect-ratio: 2358 / 1792;
  max-height: 760px;
  overflow: hidden;
  z-index: 3;
}
.hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(to bottom, transparent, #0f0f0f 70%);
  pointer-events: none;
  z-index: 4;
}
.hero-image::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 260px;
  height: 100px;
  background: linear-gradient(to top left, #0f0f0f, transparent);
  pointer-events: none;
  z-index: 4;
}
.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 28%, black 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 28%, black 82%, transparent 100%);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(196, 160, 82, 0.4);
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 28px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
  max-width: 720px;
}
.hero .lead {
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  margin-bottom: 44px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-item span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* 8. Section header */
.section-header {
  margin-bottom: 56px;
}
.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.section-header h2 {
  margin-bottom: 14px;
}
.section-header .lead {
  max-width: 560px;
}
.section-header.center {
  text-align: center;
}
.section-header.center .lead {
  margin: 0 auto;
}

/* 9. Cards */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}
.card-sm {
  padding: 20px 24px;
}
.card-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 20px;
}
.card h3 {
  margin-bottom: 10px;
}
.card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* 10. Steps */
.step {
  position: relative;
  padding-left: 76px;
}
.step + .step {
  margin-top: 40px;
}
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
}
.step-num-gold {
  background: var(--gold);
}
.step h3 {
  margin-bottom: 8px;
}
.step p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}
.step-connector {
  width: 1px;
  background: var(--gray-200);
  height: 32px;
  margin: 8px 0 8px 25px;
}

/* 11. CTA section */
.cta-band {
  background: var(--black);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 {
  color: var(--white);
  margin-bottom: 14px;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.55);
  max-width: 500px;
  margin: 0 auto 36px;
}

/* 12. WhatsApp Widget */
.whatsapp-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(196,160,82,0.35);
  transition: all 0.25s ease;
  overflow: hidden;
}
.whatsapp-widget:hover {
  background: var(--gold-dark);
  border-radius: 50px;
  width: auto;
  padding: 0 20px 0 16px;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(196,160,82,0.45);
}
.whatsapp-label {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.25s ease;
}
.whatsapp-widget:hover .whatsapp-label {
  max-width: 160px;
}

/* 13. Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo {
  display: block;
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 32px;
}
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
  max-width: 260px;
}
.footer-col h5 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 16px;
}
.footer-col li + li {
  margin-top: 8px;
}
.footer-col a {
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--white);
}
.footer-offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
  gap: 24px;
  border-top: 1px solid var(--gray-700);
  padding-top: 40px;
  margin-top: 48px;
  margin-bottom: 32px;
}
.footer-office-city {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.footer-office-addr {
  display: block;
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.7;
}
.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}
.footer-bottom .gold {
  color: var(--gold);
  font-weight: 600;
}

/* 13. Forms */
.form-group {
  margin-bottom: 18px;
}
.phone-input-group {
  display: flex;
  gap: 8px;
}
.phone-country {
  position: relative;
  flex: 0 0 96px;
}
.phone-country-trigger {
  width: 100%;
  text-align: left;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  font: inherit;
}
.phone-country-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 50;
}
.phone-country-list[hidden] {
  display: none;
}
.phone-country-group {
  padding: 8px 14px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.phone-country-option {
  padding: 8px 14px;
  font-size: 0.875rem;
  color: var(--gray-700);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition);
}
.phone-country-option:hover {
  background: var(--gray-100);
}
.phone-number-input {
  flex: 1;
  min-width: 0;
}
@media (max-width: 480px) {
  .phone-input-group {
    flex-direction: column;
  }
  .phone-country-select {
    flex: 1;
  }
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--black);
  background: var(--white);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.07);
}
.form-control::placeholder {
  color: var(--gray-400);
}
textarea.form-control {
  resize: vertical;
  min-height: 110px;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4.5L11 1' stroke='%237D7B76' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-error {
  font-size: 0.8rem;
  color: var(--err);
  margin-top: 4px;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* 14. Alerts */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
  border-left: 4px solid;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-success {
  background: var(--ok-bg);
  color: #1a5b2d;
  border-color: var(--ok);
}
.alert-error {
  background: var(--err-bg);
  color: #7b1e15;
  border-color: var(--err);
}
.alert-warning {
  background: var(--warn-bg);
  color: #7a4d0a;
  border-color: var(--warn);
}
.alert-info {
  background: var(--info-bg);
  color: #0f3e6b;
  border-color: var(--info);
}

/* 15. Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-pending {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-active {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-review {
  background: var(--info-bg);
  color: var(--info);
}
.badge-completed {
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge-cancelled {
  background: var(--err-bg);
  color: var(--err);
}
.badge-paid {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-overdue {
  background: var(--err-bg);
  color: var(--err);
}

/* 16. Tables */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}
.table tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover td {
  background: var(--gray-50);
}
.table-actions {
  display: flex;
  gap: 8px;
}

/* 17. Panel layout */
.panel-body {
  padding-top: 0;
  background: var(--gray-50);
  min-height: 100vh;
}
.panel-layout {
  display: flex;
  min-height: 100vh;
}

.panel-sidebar {
  width: var(--sidebar-w);
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 200;
  transition: transform var(--transition);
}
.panel-sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.panel-sidebar-brand img {
  height: 40px;
  max-width: 100%;
  filter: brightness(0) invert(1);
}

.panel-nav {
  flex: 1;
  padding: 12px 0;
}
.panel-nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 16px 20px 6px;
}
.panel-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.panel-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}
.panel-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--gold);
}
.panel-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

.panel-sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.panel-sidebar-user .name {
  font-size: 0.8375rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 2px;
}
.panel-sidebar-user .role {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.panel-sidebar-user a {
  font-size: 0.75rem;
  color: var(--gray-500);
  transition: color var(--transition);
}
.panel-sidebar-user a:hover {
  color: var(--white);
}

.panel-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.panel-topbar {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}
.panel-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.panel-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--gray-600);
}
.panel-content {
  padding: 28px 28px 48px;
  flex: 1;
}

/* 18. Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
}
.stat-gold .stat-value {
  color: var(--gold);
}

/* 19. Page header (panel) */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header-text h2 {
  font-size: 1.375rem;
  margin-bottom: 2px;
}
.page-header-text p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* 20. Login page */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 20px;
  transition: color var(--transition);
}
.auth-back-home:hover {
  color: var(--black);
}
.auth-logo {
  margin-bottom: 28px;
}
.auth-logo img {
  height: 72px;
}
.auth-card h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.auth-card .lead {
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* 21. Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 32px;
  margin: 20px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-close {
  font-size: 1.25rem;
  color: var(--gray-400);
  transition: color var(--transition);
  line-height: 1;
}
.modal-close:hover {
  color: var(--black);
}

/* 22. Upload zone */
.upload-zone {
  display: block;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--black);
  background: var(--gray-100);
}
.upload-zone input[type="file"] {
  display: none;
}
.upload-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* 23. Empty state */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--gray-500);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}

/* 24. Divider */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 24px 0;
}

/* 25. Info list (key-value pairs) */
.info-list {
}
.info-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.info-item:last-child {
  border-bottom: none;
}
.info-key {
  width: 160px;
  flex-shrink: 0;
  color: var(--gray-500);
  font-weight: 500;
}
.info-val {
  color: var(--black);
}

/* 26. Panel mobile toggle */
.panel-mob-toggle {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-radius: 0;
  background: transparent;
  color: var(--black);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 300;
  border-right: 1px solid var(--gray-200);
}

/* 27. Responsive */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid > :first-child {
    grid-column: 1/-1;
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .navbar-nav,
  .navbar-actions {
    display: none;
  }
  .navbar-toggle {
    display: flex;
  }

  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 1050;
  }
  .drawer-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 82vw;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition);
  }
  .mobile-drawer.open {
    transform: translateX(0);
  }
  .mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-drawer-head img {
    height: 48px;
  }
  .drawer-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
  }
  .drawer-close:hover {
    color: var(--black);
  }
  .mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mobile-drawer-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
  }
  .mobile-drawer-nav a:hover,
  .mobile-drawer-nav a.active {
    color: var(--black);
  }
  .mobile-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
  }
  .mobile-drawer-actions .lang-toggle {
    align-self: flex-start;
  }
  body.drawer-open {
    overflow: hidden;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-content {
    padding: 60px var(--pad);
  }
  .hero-image {
    max-height: 320px;
  }
  .hero-stat {
    gap: 28px;
    flex-wrap: wrap;
  }
  .section {
    padding: 56px 0;
  }
  .panel-sidebar {
    transform: translateX(-100%);
  }
  .panel-sidebar.open {
    transform: translateX(0);
  }
  .panel-main {
    margin-left: 0;
  }
  .panel-content {
    padding: 16px 16px 40px;
  }
  .panel-topbar {
    padding: 0 16px;
  }
  .panel-mob-toggle {
    display: flex;
  }
  .panel-topbar {
    padding-left: 60px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .auth-page {
    padding: 0;
    background: var(--white);
    align-items: flex-start;
  }
  .auth-card {
    padding: 32px 20px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    min-height: 100vh;
  }
}

/* ── AI Analysis ── */
.analise-main { display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.analise-body { display:flex; flex:1; overflow:hidden; }
.analise-context { width:260px; flex-shrink:0; border-right:1px solid var(--gray-200); overflow-y:auto; background:var(--gray-50); }
.chat-area { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.chat-messages { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:14px; }
.chat-bubble { max-width:76%; padding:12px 16px; border-radius:14px; font-size:.875rem; line-height:1.65; word-break:break-word; }
.chat-bubble.user { background:var(--black); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.chat-bubble.assistant { background:var(--gray-100); color:var(--gray-800); align-self:flex-start; border-bottom-left-radius:4px; }
.chat-loading { display:flex; gap:5px; padding:14px 18px; background:var(--gray-100); border-radius:14px; border-bottom-left-radius:4px; align-self:flex-start; }
.chat-loading span { width:7px; height:7px; background:var(--gray-400); border-radius:50%; animation:chat-bounce 1.1s infinite; }
.chat-loading span:nth-child(2) { animation-delay:.2s; }
.chat-loading span:nth-child(3) { animation-delay:.4s; }
@keyframes chat-bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-7px)} }
.chat-input-area { border-top:1px solid var(--gray-200); padding:14px 20px; display:flex; gap:10px; align-items:flex-end; background:#fff; }
.chat-input { flex:1; border:1px solid var(--gray-300); border-radius:10px; padding:10px 14px; font-size:.875rem; resize:none; min-height:40px; max-height:140px; overflow-y:auto; font-family:inherit; line-height:1.5; }
.chat-input:focus { outline:none; border-color:var(--black); }
