[x-cloak] { display: none !important; }
/* Fenix v3 — Design Tokens + Utility Classes | PLAN_007 */
:root {
  --fenix-gold: #C9A84C; --fenix-gold-light: #E4D5A0; --fenix-gold-dark: #9A7E2E;
  --fenix-ink: #1A1209; --fenix-paper: #FAF8F4; --fenix-cream: #F0EDE5;
  --fenix-text: #2D2010; --fenix-text-muted: #6B5E4A;
  --fenix-success: #1D9E75; --fenix-warning: #BA7517;
  --fenix-danger: #A32D2D; --fenix-info: #185FA5;
  --fenix-border: #E2D9CC;
  --fenix-radius: 0.5rem;
  --fenix-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --fenix-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.skip-link { position:absolute;top:-100%;left:0;padding:.5rem 1rem;background:var(--fenix-gold);color:#fff;z-index:9999;font-weight:600; }
.skip-link:focus { top:0; }
.btn-primary { display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:var(--fenix-radius);background:var(--fenix-gold);color:#fff;font-weight:500;font-size:.875rem;border:none;cursor:pointer;transition:background .15s; }
.btn-primary:hover { background:var(--fenix-gold-dark); }
.btn-primary:disabled { opacity:.6;cursor:not-allowed; }
.btn-secondary { display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:var(--fenix-radius);background:#fff;color:var(--fenix-text);border:1px solid var(--fenix-border);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s; }
.btn-secondary:hover { background:var(--fenix-cream); }
.btn-danger { display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:var(--fenix-radius);background:#fee2e2;color:var(--fenix-danger);border:1px solid #fecaca;font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s; }
.btn-danger:hover { background:#fecaca; }
.card { background:#fff;border-radius:var(--fenix-radius);border:1px solid var(--fenix-border);padding:1.25rem;box-shadow:var(--fenix-shadow); }
.card-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--fenix-border); }
.card-title { font-size:1rem;font-weight:600;color:var(--fenix-text); }
.table-fenix { width:100%;border-collapse:collapse;font-size:.875rem; }
.table-fenix th { text-align:left;padding:.625rem .875rem;background:var(--fenix-cream);color:var(--fenix-text-muted);font-weight:600;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid var(--fenix-border); }
.table-fenix td { padding:.75rem .875rem;border-bottom:1px solid var(--fenix-border); }
.table-fenix tr:last-child td { border-bottom:none; }
.table-fenix tr:hover td { background:var(--fenix-cream); }
.badge { display:inline-flex;align-items:center;padding:.2rem .6rem;border-radius:9999px;font-size:.75rem;font-weight:500; }
.badge-success { background:#d1fae5;color:#065f46; }
.badge-warning { background:#fef3c7;color:#92400e; }
.badge-danger  { background:#fee2e2;color:#991b1b; }
.badge-info    { background:#dbeafe;color:#1e40af; }
.badge-neutral { background:var(--fenix-cream);color:var(--fenix-text-muted); }
.form-label { display:block;font-size:.875rem;font-weight:500;color:var(--fenix-text);margin-bottom:.375rem; }
.form-input { width:100%;padding:.5rem .75rem;border:1px solid var(--fenix-border);border-radius:var(--fenix-radius);font-size:.875rem;background:#fff;color:var(--fenix-text);outline:none;transition:border-color .15s,box-shadow .15s; }
.form-input:focus { border-color:var(--fenix-gold);box-shadow:0 0 0 3px rgba(201,168,76,.15); }
.form-error { color:var(--fenix-danger);font-size:.8rem;margin-top:.25rem; }
.loading-spinner { display:inline-block;width:1rem;height:1rem;border:2px solid rgba(201,168,76,.3);border-top-color:var(--fenix-gold);border-radius:50%;animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Sidebar navigation links ─────────────────────────────────────────────── */
.fnav-link { display:flex; align-items:center; gap:.75rem; padding:.5rem .75rem; border-radius:.5rem; min-height:44px; color:var(--fenix-text); text-decoration:none; transition:background .12s, color .12s; font-size:.875rem; }
.fnav-link:hover { background:var(--fenix-cream); color:var(--fenix-ink); }
.fnav-active { background:var(--fenix-cream); color:var(--fenix-ink); font-weight:600; }
.fnav-active svg { color:var(--fenix-gold-dark); }
.fnav-label { white-space:nowrap; overflow:hidden; }

/* ═══════════════════════════════════════════════════════════════════
   FENIX V3 — FULL DESIGN SYSTEM (Layer 2)
   Teme: dark (default) + light. Komponente: card, btn, table,
   drawer, toast, modal, input, tabs, grid, badge, spinner, empty.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tema varijable ──────────────────────────────────────────────── */
:root {
  /* Primarni (Gold) */
  --primary:       #C9A84C;
  --primary-dark:  #9A7E2E;
  --primary-light: #E4D5A0;

  /* Sekundarni (Ink) */
  --secondary:      #1A1209;
  --secondary-light: #2D2010;

  /* Status */
  --success: #1D9E75;
  --error:   #A32D2D;
  --warning: #BA7517;
  --info:    #185FA5;

  /* Dark tema (default) */
  --bg:           #111827;
  --bg-card:      #1F2937;
  --bg-hover:     #374151;
  --border:       #374151;
  --text:         #F9FAFB;
  --text-muted:   #9CA3AF;

  /* Spacing (4px base) */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;    --sp-10: 2.5rem; --sp-12: 3rem;

  /* Typography */
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;

  /* Misc */
  --radius:    0.5rem;
  --radius-lg: 0.75rem;
  --shadow:    0 1px 3px rgba(0,0,0,.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4);
  --transition: 0.15s ease;
}

[data-theme="light"] {
  --bg:         #F9FAFB;
  --bg-card:    #FFFFFF;
  --bg-hover:   #F3F4F6;
  --border:     #E5E7EB;
  --text:       #111827;
  --text-muted: #6B7280;
}

/* ── fenix-card ──────────────────────────────────────────────────── */
.fenix-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.fenix-card-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.fenix-card-body  { padding: var(--sp-5); }
.fenix-card-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
}

/* ── fenix-btn (sve varijante) ───────────────────────────────────── */
.fenix-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm); font-weight: 500;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
  font-family: var(--font);
}
.fenix-btn:disabled { opacity: .5; cursor: not-allowed; }
.fenix-btn-primary   { background: var(--primary); color: #000; }
.fenix-btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.fenix-btn-secondary { background: var(--secondary-light); color: var(--text); }
.fenix-btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }
.fenix-btn-outline {
  background: transparent; border-color: var(--border); color: var(--text);
}
.fenix-btn-outline:hover:not(:disabled) { background: var(--bg-hover); }
.fenix-btn-danger { background: var(--error); color: #fff; }
.fenix-btn-danger:hover:not(:disabled) { filter: brightness(1.1); }
.fenix-btn-success { background: var(--success); color: #fff; }
.fenix-btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.fenix-btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.fenix-btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--text-xs); }
.fenix-btn-lg { padding: var(--sp-3) var(--sp-6); font-size: var(--text-base); }
.fenix-btn-icon { padding: var(--sp-2); border-radius: var(--radius); }
.fenix-btn-loading { position: relative; color: transparent !important; }
.fenix-btn-loading::after {
  content: ""; position: absolute;
  width: 14px; height: 14px;
  border: 2px solid currentColor; border-radius: 50%;
  border-top-color: transparent;
  animation: fenix-spin .6s linear infinite;
}

/* ── fenix-table ─────────────────────────────────────────────────── */
.fenix-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.fenix-table th, .fenix-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left; border-bottom: 1px solid var(--border);
}
.fenix-table th {
  font-weight: 600; background: var(--bg);
  color: var(--text-muted); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: .05em;
  position: sticky; top: 0; z-index: 1;
}
.fenix-table tbody tr:hover { background: var(--bg-hover); }
.fenix-table-actions { width: 80px; text-align: right !important; }
.fenix-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

/* ── fenix-drawer ────────────────────────────────────────────────── */
.fenix-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
}
.fenix-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 520px;
  background: var(--bg-card); z-index: 1001;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.4);
}
.fenix-drawer-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.fenix-drawer-header h3 { font-size: var(--text-lg); font-weight: 600; margin: 0; }
.fenix-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.25rem; padding: var(--sp-1);
  border-radius: var(--radius); transition: color var(--transition);
}
.fenix-drawer-close:hover { color: var(--text); background: var(--bg-hover); }
.fenix-drawer-body { flex: 1; padding: var(--sp-5); overflow-y: auto; }
.fenix-drawer-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  flex-shrink: 0;
}
@media (max-width: 640px) { .fenix-drawer { max-width: 100%; } }

/* ── fenix-toast ─────────────────────────────────────────────────── */
#fenix-toast-container {
  position: fixed; bottom: var(--sp-4); right: var(--sp-4);
  z-index: 1100; display: flex; flex-direction: column; gap: var(--sp-2);
  max-width: 380px; width: calc(100% - var(--sp-8));
}
.fenix-toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius); color: #fff;
  box-shadow: var(--shadow-md);
  animation: fenix-slide-in .3s ease;
  font-size: var(--text-sm); font-weight: 500;
}
.fenix-toast-success { background: var(--success); }
.fenix-toast-error   { background: var(--error); }
.fenix-toast-warning { background: var(--warning); }
.fenix-toast-info    { background: var(--info); }
.fenix-toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.fenix-toast-msg  { flex: 1; line-height: 1.4; }
.fenix-toast-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  cursor: pointer; padding: 0; font-size: 1rem; flex-shrink: 0;
}
.fenix-toast-close:hover { color: #fff; }

/* ── fenix-modal ─────────────────────────────────────────────────── */
.fenix-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.fenix-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: fenix-scale-in .2s ease;
}
.fenix-modal-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.fenix-modal-header h3 { font-size: var(--text-lg); font-weight: 600; margin: 0; }
.fenix-modal-body { padding: var(--sp-5); overflow-y: auto; flex: 1; }
.fenix-modal-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  flex-shrink: 0;
}

/* ── fenix-input / form ──────────────────────────────────────────── */
.fenix-field { margin-bottom: var(--sp-4); }
.fenix-label {
  display: block; margin-bottom: var(--sp-2);
  font-size: var(--text-sm); font-weight: 500; color: var(--text);
}
.fenix-label.required::after { content: " *"; color: var(--error); }
.fenix-input, .fenix-select, .fenix-textarea {
  width: 100%; padding: var(--sp-2) var(--sp-3);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: var(--text-sm); font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.fenix-input:focus, .fenix-select:focus, .fenix-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201,168,76,.2);
}
.fenix-input.error, .fenix-select.error { border-color: var(--error); }
.fenix-input:disabled, .fenix-select:disabled { opacity: .6; cursor: not-allowed; }
.fenix-error { display: block; margin-top: var(--sp-1); font-size: var(--text-xs); color: var(--error); }
.fenix-hint  { display: block; margin-top: var(--sp-1); font-size: var(--text-xs); color: var(--text-muted); }
.fenix-textarea { resize: vertical; min-height: 80px; }
.fenix-input-group { position: relative; display: flex; }
.fenix-input-group .fenix-input { border-radius: var(--radius) 0 0 var(--radius); }
.fenix-input-group .fenix-btn  { border-radius: 0 var(--radius) var(--radius) 0; }
.fenix-input-icon { position: relative; }
.fenix-input-icon .fenix-input { padding-left: 2.25rem; }
.fenix-input-icon .icon {
  position: absolute; left: var(--sp-3); top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  font-size: var(--text-sm); pointer-events: none;
}

/* ── fenix-tabs ──────────────────────────────────────────────────── */
.fenix-tabs { }
.fenix-tabs-header {
  display: flex; gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
  overflow-x: auto; scrollbar-width: none;
}
.fenix-tabs-header::-webkit-scrollbar { display: none; }
.fenix-tabs-header button {
  padding: var(--sp-2) var(--sp-4);
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); cursor: pointer; font-size: var(--text-sm);
  white-space: nowrap; transition: all var(--transition);
  font-family: var(--font); font-weight: 500;
}
.fenix-tabs-header button:hover { color: var(--text); }
.fenix-tabs-header button.active {
  color: var(--primary); border-bottom-color: var(--primary);
}

/* ── fenix-grid ──────────────────────────────────────────────────── */
.fenix-grid         { display: grid; gap: var(--sp-4); }
.fenix-grid-1       { grid-template-columns: repeat(1, 1fr); }
.fenix-grid-2       { grid-template-columns: repeat(2, 1fr); }
.fenix-grid-3       { grid-template-columns: repeat(3, 1fr); }
.fenix-grid-4       { grid-template-columns: repeat(4, 1fr); }
.fenix-grid-auto    { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1024px) {
  .fenix-grid-3, .fenix-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fenix-grid-2, .fenix-grid-3, .fenix-grid-4 { grid-template-columns: 1fr; }
}

/* ── fenix-badge ─────────────────────────────────────────────────── */
.fenix-badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: .125rem var(--sp-2);
  border-radius: 9999px; font-size: var(--text-xs); font-weight: 600;
}
.fenix-badge-success { background: rgba(29,158,117,.15); color: var(--success); }
.fenix-badge-error   { background: rgba(163,45,45,.15);  color: var(--error); }
.fenix-badge-warning { background: rgba(186,117,23,.15); color: var(--warning); }
.fenix-badge-info    { background: rgba(24,95,165,.15);  color: var(--info); }
.fenix-badge-neutral { background: var(--bg-hover); color: var(--text-muted); }
.fenix-badge-gold    { background: rgba(201,168,76,.15); color: var(--primary); }
.fenix-badge-dot::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}

/* ── fenix-spinner ───────────────────────────────────────────────── */
.fenix-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: fenix-spin .7s linear infinite;
}
.fenix-spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.fenix-spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.fenix-loading-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  border-radius: inherit; z-index: 10;
}

/* ── fenix-empty ─────────────────────────────────────────────────── */
.fenix-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-12) var(--sp-6);
  text-align: center; color: var(--text-muted);
  gap: var(--sp-3);
}
.fenix-empty-icon { font-size: 3rem; opacity: .4; }
.fenix-empty-title { font-size: var(--text-lg); font-weight: 600; color: var(--text); }
.fenix-empty-desc  { font-size: var(--text-sm); max-width: 320px; line-height: 1.6; }

/* ── HTMX indikatori ─────────────────────────────────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; align-items: center; gap: var(--sp-2); }
.htmx-request.htmx-indicator  { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes fenix-spin {
  to { transform: rotate(360deg); }
}
@keyframes fenix-slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fenix-scale-in {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes fenix-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Utility klase ───────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.text-lg      { font-size: var(--text-lg); }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only      { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }
.divide-y > * + * { border-top: 1px solid var(--border); }
.cursor-pointer { cursor: pointer; }
.animate-fade   { animation: fenix-fade-in .2s ease; }

/* ── Nav groups (sidebar) ─────────────────────────────────────────────────── */
.fnav-group-label {
  padding: .625rem .75rem .25rem;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fenix-text-muted);
  user-select: none;
}
.fnav-group-open { color: var(--fenix-gold-dark); font-weight: 600; }
.fnav-submenu { padding-left: .5rem; margin-top: .125rem; }
.fnav-sub {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem .375rem 1rem;
  border-radius: .375rem;
  font-size: .8125rem;
  color: var(--fenix-text-muted);
  text-decoration: none;
  transition: background .12s, color .12s;
  min-height: 36px;
}
.fnav-sub:hover { background: var(--fenix-cream); color: var(--fenix-ink); }
.fnav-sub.fnav-active { background: var(--fenix-cream); color: var(--fenix-ink); font-weight: 600; }

/* ── Mobile layout shift fix ──────────────────────────────────────────────── */
@media (max-width: 1023px) {
  main#main-content { padding-bottom: 4.5rem; }
}

/* ── Toast variants ───────────────────────────────────────────────────────── */
.fenix-toast {
  padding: .75rem 1rem;
  border-radius: var(--fenix-radius);
  font-size: .875rem;
  font-weight: 500;
  border-left: 4px solid;
  background: #fff;
  box-shadow: var(--fenix-shadow-md);
  animation: slideIn .2s ease;
}
.fenix-toast-success { border-color: var(--fenix-success); color: #065f46; background: #f0fdf4; }
.fenix-toast-error, .fenix-toast-danger { border-color: var(--fenix-danger); color: #991b1b; background: #fef2f2; }
.fenix-toast-warning { border-color: var(--fenix-warning); color: #92400e; background: #fffbeb; }
.fenix-toast-info { border-color: var(--fenix-info); color: #1e40af; background: #eff6ff; }
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ── Dashboard module grid ────────────────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.module-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--fenix-border);
  border-radius: .75rem;
  text-decoration: none;
  color: var(--fenix-text);
  transition: box-shadow .15s, border-color .15s, transform .1s;
  box-shadow: var(--fenix-shadow);
}
.module-card:hover { box-shadow: var(--fenix-shadow-md); border-color: var(--fenix-gold-light); transform: translateY(-1px); }
.module-card-icon { font-size: 1.75rem; line-height: 1; }
.module-card-title { font-weight: 600; font-size: .9375rem; color: var(--fenix-ink); }
.module-card-desc { font-size: .8rem; color: var(--fenix-text-muted); line-height: 1.4; }
.module-card-badge { align-self: flex-start; }

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1.5rem;
  background: var(--fenix-paper);
  border-bottom: 1px solid var(--fenix-border);
  font-size: .8125rem;
  color: var(--fenix-text-muted);
}
.breadcrumb-bar a { color: var(--fenix-text-muted); text-decoration: none; }
.breadcrumb-bar a:hover { color: var(--fenix-gold-dark); text-decoration: underline; }
.breadcrumb-bar .bc-sep { opacity: .4; }
.breadcrumb-bar .bc-current { color: var(--fenix-ink); font-weight: 500; }

/* ── Page header row ──────────────────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--fenix-ink); margin: 0; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ── Language switcher ───────────────────────────────────────────────────── */
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: .1875rem .3125rem;
  border-radius: .375rem; opacity: .45; transition: opacity .15s, background .15s;
}
.lang-btn:hover { opacity: 1; background: var(--fenix-cream); }
.lang-active    { opacity: 1; }

/* ── Language dropdown (Alpine) ────────────────────────────────────────────── */
.lang-dd {
  position: absolute;
  right: 0;
  top: calc(100% + .25rem);
  background: #fff;
  border: 1px solid var(--fenix-cream);
  border-radius: .5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
  padding: .25rem 0;
  z-index: 200;
  min-width: 10rem;
  transform-origin: top right;
}
.lang-dd-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  text-align: left;
  padding: .4375rem .875rem;
  font-size: .875rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fenix-ink);
  transition: background .1s;
  white-space: nowrap;
}
.lang-dd-item:hover   { background: var(--fenix-cream); }
.lang-dd-cur          { font-weight: 600; color: var(--fenix-gold-dark); }
.lang-dd-check        { margin-left: auto; color: var(--fenix-gold-dark); font-weight: 700; }

/* ── Alpine dropdown transitions (lang-dd) ─────────────────────────────────── */
.lang-t-enter { transition: opacity .1s ease-out, transform .1s ease-out; }
.lang-t-leave { transition: opacity .075s ease-in, transform .075s ease-in; }
.lang-t-from  { opacity: 0; transform: scale(.95) translateY(-.25rem); }
.lang-t-to    { opacity: 1; transform: scale(1)   translateY(0); }
