/* ============================================================
   CONTOURLINE — DESIGN SYSTEM CANÔNICO
   Editorial premium · Navy + Blue · Nature Beauty + Inter
   Single source of truth. Importe em todas as páginas do portal.
   ============================================================ */

/* === CUSTOM FONTS — Axiforma (Kastelov) === */
@font-face {
  font-family: 'Axiforma';
  src: url('/assets/fonts/axiforma-regular.woff2') format('woff2'),
       url('/assets/fonts/axiforma-regular.woff')  format('woff'),
       url('/assets/fonts/axiforma-regular.ttf')   format('truetype'),
       url('/assets/fonts/axiforma-regular.otf')   format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Axiforma';
  src: url('/assets/fonts/axiforma-medium.woff2') format('woff2'),
       url('/assets/fonts/axiforma-medium.woff')  format('woff'),
       url('/assets/fonts/axiforma-medium.ttf')   format('truetype'),
       url('/assets/fonts/axiforma-medium.otf')   format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Axiforma';
  src: url('/assets/fonts/axiforma-semibold.woff2') format('woff2'),
       url('/assets/fonts/axiforma-semibold.woff')  format('woff'),
       url('/assets/fonts/axiforma-semibold.ttf')   format('truetype'),
       url('/assets/fonts/axiforma-semibold.otf')   format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Axiforma';
  src: url('/assets/fonts/axiforma-bold.woff2') format('woff2'),
       url('/assets/fonts/axiforma-bold.woff')  format('woff'),
       url('/assets/fonts/axiforma-bold.ttf')   format('truetype'),
       url('/assets/fonts/axiforma-bold.otf')   format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Axiforma';
  src: url('/assets/fonts/axiforma-light.woff2') format('woff2'),
       url('/assets/fonts/axiforma-light.woff')  format('woff'),
       url('/assets/fonts/axiforma-light.ttf')   format('truetype'),
       url('/assets/fonts/axiforma-light.otf')   format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* === DESIGN TOKENS === */
:root, [data-theme="light"] {
  /* Brand colors */
  --bg-cream: #FFFFFF;
  --bg-cream-dark: #f1f5fc;
  --navy: #10213d;
  --navy-soft: #1F324F;
  --gold: #2f6fe4;
  --gold-light: #4a8df0;
  --gold-soft: rgba(47,111,228,0.10);

  /* Text */
  --text-primary: #17233c;
  --text-secondary: #46506a;
  --text-muted: #6e7b91;
  --text-on-dark: #eef5ff;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-alt: #f7faff;
  --field-bg: #FFFFFF;
  --field-bg-alt: #fbfdff;

  /* Borders */
  --border: #e3e8f1;
  --border-strong: #d4dbe8;
  --border-focus: #2f6fe4;

  /* Status */
  --error: #A8453F;
  --error-bg: rgba(168, 69, 63, 0.08);
  --success: #5A7A5C;
  --success-bg: rgba(90, 122, 92, 0.08);
  --warning: #B7892C;
  --warning-bg: rgba(183, 137, 44, 0.10);
  --info: #4A6B8A;
  --info-bg: rgba(74, 107, 138, 0.08);

  /* Typography — Axiforma (Kastelov) é a fonte da marca
     --font-display: títulos hero/section/KPI (Axiforma SemiBold/Bold)
     --font-sans: corpo de texto e UI (Axiforma Regular/Medium)
     --font-serif: fallback editorial (Cormorant) caso queira serifado em algum lugar específico
  */
  --font-display: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;

  /* Spacing */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  /* Sizing */
  --container-max: 1280px;
  --container-narrow: 720px;
  --sidebar-w: 280px;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(20, 34, 57, 0.04), 0 4px 12px rgba(20, 34, 57, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(20, 34, 57, 0.08), 0 8px 24px rgba(20, 34, 57, 0.06);
  --shadow-focus: 0 0 0 3px rgba(38,114,184,0.25);
  --shadow-modal: 0 24px 64px rgba(20, 34, 57, 0.18);

  /* Motion */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === DARK MODE (opcional, ativado via [data-theme="dark"]) === */
[data-theme="dark"] {
  --bg-cream: #0F1622;
  --bg-cream-dark: #141C2B;
  --navy: #F2EAD9;
  --navy-soft: #E5DAC6;
  --gold: #4A8DC9;
  --gold-light: #6FA9D4;
  --gold-soft: rgba(74,141,201,0.12);

  --text-primary: #F2EAD9;
  --text-secondary: #B8B0A2;
  --text-muted: #7E7868;
  --text-on-dark: #142239;

  --surface: #141C2B;
  --surface-alt: #1A2334;
  --field-bg: #1A2334;
  --field-bg-alt: #243046;

  --border: #2A364E;
  --border-strong: #364263;
  --border-focus: #4A8DC9;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* === RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* === LAYOUT === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* === HEADER === */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
}

.brand-mark .brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-mark .brand-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.header-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.header-nav a:hover { color: var(--navy); }
.header-nav a.active { color: var(--gold); font-weight: 600; }

/* === HERO === */
.hero {
  padding: var(--space-xxl) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

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

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.hero-content h1,
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: var(--space-md);
}

.hero-content h1 .accent,
.page-title .accent {
  color: var(--gold);
  font-weight: 500;
}

.hero-content .lead,
.page-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  max-width: 36rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.meta-row::before {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--text-muted);
}

/* === SECTION TITLES === */
.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 50rem;
}

/* === CARDS GRID === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.cards-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.875rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gold);
  transform: translateY(-100%);
  transition: transform var(--transition);
}

.card:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card:hover::before { transform: translateY(0); }

.card-icon {
  font-size: 1.4rem;
  margin-bottom: 0.125rem;
  color: var(--gold);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.card-owner {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.card-footer .arrow {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.card-progress {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-progress.complete {
  color: var(--success);
  font-weight: 600;
}

/* === KPI CARDS (dashboards) === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
}

.kpi-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.kpi-delta {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.kpi-delta.positive { color: var(--success); }
.kpi-delta.negative { color: var(--error); }

/* === TABLES === */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

table.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

table.ds-table thead th {
  background: var(--bg-cream-dark);
  text-align: left;
  padding: 0.875rem 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

table.ds-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}

table.ds-table tbody tr:last-child td { border-bottom: none; }

table.ds-table tbody tr {
  transition: background var(--transition);
}

table.ds-table tbody tr:hover {
  background: var(--bg-cream-dark);
}

table.ds-table .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-cream-dark);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-error   { background: var(--error-bg);   color: var(--error);   border-color: transparent; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: transparent; }
.badge-gold    { background: var(--gold-soft);  color: var(--gold);    border-color: transparent; }

/* === SIDEBAR LAYOUT === */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

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

.sidebar {
  background: var(--surface-alt);
  border-right: 1px solid var(--border);
  padding: var(--space-md);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand-mark {
  margin-bottom: var(--space-lg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border-left: 2px solid transparent;
}

.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--navy);
}

.sidebar-nav a.active {
  background: var(--surface);
  color: var(--navy);
  border-left-color: var(--gold);
  font-weight: 600;
}

.sidebar-section-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs) 0.875rem;
}

.app-main {
  padding: var(--space-lg);
  min-width: 0;
}

/* === FORMS === */
.form-page {
  padding: var(--space-xl) 0;
}

.form-header {
  margin-bottom: var(--space-xl);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--navy);
  border-color: var(--gold);
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.field {
  margin-bottom: var(--space-md);
}

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

.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.field .required-mark { color: var(--error); }

.field .helper {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.field .examples {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-cream-dark);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.field .examples-title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.field .examples-list {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.field .examples-list li {
  padding: 0.25rem 0;
  font-style: italic;
}

.field .examples-list li::before { content: '"'; color: var(--gold); margin-right: 0.25rem; }
.field .examples-list li::after  { content: '"'; color: var(--gold); margin-left: 0.25rem; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field input[type="date"],
.field input[type="search"],
.field textarea,
.field select,
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--field-bg);
  transition: var(--transition);
}

.field textarea,
.textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.field input::placeholder,
.field textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--error); }

.field .error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.375rem;
  display: none;
}

.field.has-error .error-message { display: block; }

/* === LIST FIELD (repeater) === */
.field-list { margin-top: 0.5rem; }
.list-items { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }

.list-item {
  background: var(--field-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
  transition: var(--transition);
}

.list-item:hover { border-color: var(--border-strong); }
.list-item:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }

.list-item-header { margin-bottom: 0.75rem; padding-right: 2rem; }

.list-item-number {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.list-item-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  border-radius: 50%;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.list-item-remove:hover {
  color: var(--error);
  background: rgba(168, 69, 63, 0.08);
  border-color: rgba(168, 69, 63, 0.2);
}

.list-item-remove:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.list-item-fields { display: grid; gap: 0.75rem; align-items: stretch; }
.list-subfield { display: flex; flex-direction: column; }
.list-subfield input,
.list-subfield textarea,
.list-subfield select { margin-top: auto; }

.list-item-fields.cols-2 { grid-template-columns: 1fr 1fr; }
.list-item-fields.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.list-item-fields.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 700px) {
  .list-item-fields.cols-2,
  .list-item-fields.cols-3,
  .list-item-fields.cols-4 { grid-template-columns: 1fr; }
}

.list-subfield label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.list-subfield input,
.list-subfield select,
.list-subfield textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--field-bg);
  transition: var(--transition);
}

.list-subfield input:focus,
.list-subfield select:focus,
.list-subfield textarea:focus { outline: none; border-color: var(--border-focus); }
.list-subfield textarea { resize: vertical; min-height: 60px; line-height: 1.4; }

.list-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
}

.list-add-btn:hover { border-color: var(--gold); border-style: solid; background: var(--gold-soft); }
.list-add-btn .plus { font-size: 1.125rem; line-height: 1; }

.list-empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-style: italic;
  background: var(--field-bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy);
  color: var(--bg-cream);
}

.btn-primary:hover {
  background: var(--navy-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 34, 57, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--gold); color: var(--navy); }

.btn-tertiary {
  background: transparent;
  color: var(--gold);
  padding: 0.5rem 0;
}

.btn-tertiary:hover { color: var(--navy); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(38,114,184,0.3);
}

.btn-danger {
  background: var(--error);
  color: var(--bg-cream);
}

.btn-danger:hover { background: #8E3A35; }

.btn-large { padding: 1.125rem 2.5rem; font-size: 0.9375rem; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn-icon-only { padding: 0.75rem; width: 44px; height: 44px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* === ACTIONS BAR === */
.actions-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-strong);
  padding: var(--space-md) 0;
  z-index: 10;
  margin-top: var(--space-lg);
  box-shadow: 0 -4px 16px rgba(20, 34, 57, 0.04);
}

[data-theme="dark"] .actions-bar { background: rgba(15, 22, 34, 0.95); }

.actions-bar .container {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.actions-bar .progress-info { font-size: 0.875rem; color: var(--text-secondary); }
.actions-bar .progress-info strong { color: var(--navy); font-weight: 600; }
.actions-bar .actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 34, 57, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-md);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--space-lg);
  box-shadow: var(--shadow-modal);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.modal-content {
  background: var(--bg-cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  justify-content: flex-end;
}

/* === ALERTS === */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  border-left: 3px solid;
}

.alert-info    { background: var(--gold-soft);  border-color: var(--gold);    color: var(--text-secondary); }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.alert-error   { background: var(--error-bg);   border-color: var(--error);   color: var(--error); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  background: var(--navy);
  color: var(--bg-cream);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(20, 34, 57, 0.3);
  font-size: 0.9375rem;
  z-index: 200;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

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

/* === LOGIN CARD (centralizado) === */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--bg-cream-dark);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.auth-brand .brand-logo {
  height: 56px;
  margin: 0 auto var(--space-sm);
}

.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.025em;
}

.auth-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 0.375rem;
}

/* === EMPTY STATES === */
.empty-state {
  padding: var(--space-xxl) var(--space-md);
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  opacity: 0.6;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.empty-state-text {
  font-size: 0.9375rem;
  max-width: 32rem;
  margin: 0 auto;
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--space-lg) 0;
}

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: var(--space-lg) 0;
}

/* === THEME TOGGLE === */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

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

/* === FOOTER === */
.site-footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--surface);
}

/* === UTILITIES === */
.text-muted   { color: var(--text-muted); }
.text-gold    { color: var(--gold); }
.text-navy    { color: var(--navy); }
.text-error   { color: var(--error); }
.text-success { color: var(--success); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-serif   { font-family: var(--font-serif); }
.text-mono    { font-family: var(--font-mono); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-xs      { gap: var(--space-xs); }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }

.hidden { display: none !important; }
.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;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-cream-dark); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }
