/* Lee+, Kumamotino — estilos de la aplicación.
   Los colores de marca se inyectan desde Configuración como variables --brand-* */
:root {
  --brand-primary: #009CDE;
  --brand-secondary: #FFEF00;
  --brand-accent: #E0040B;
  --sidebar-w: 264px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --ink-soft: #5b6676;
  --line: #e5eaf1;
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 0, 156, 222;
  --bs-link-color: #0079b0;
}
[data-bs-theme="dark"] {
  --surface: #161b22;
  --surface-2: #0d1117;
  --ink-soft: #9aa6b6;
  --line: #2a323d;
  --bs-link-color: #4cc2f5;
}
body { background: var(--surface-2); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.btn-primary { --bs-btn-bg: var(--brand-primary); --bs-btn-border-color: var(--brand-primary); --bs-btn-hover-bg: #0084bd; --bs-btn-hover-border-color: #0084bd; --bs-btn-active-bg: #0077aa; --bs-btn-color: #fff; }
.text-ink-soft { color: var(--ink-soft) !important; }

/* Estructura */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column; transition: transform .2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.sidebar-brand img { height: 44px; width: auto; }
.sidebar-brand strong { display: block; line-height: 1.1; font-size: 1.05rem; }
.sidebar-brand small { color: var(--ink-soft); font-size: .72rem; }
.sidebar-nav { padding: .9rem .75rem; overflow-y: auto; flex: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .85rem; margin-bottom: 2px; border-radius: 10px; color: var(--bs-body-color); text-decoration: none; font-weight: 500; font-size: .94rem; }
.sidebar-nav a i { font-size: 1.1rem; color: var(--ink-soft); }
.sidebar-nav a:hover { background: var(--surface-2); }
.sidebar-nav a.active { background: rgba(0, 156, 222, .12); color: #0079b0; }
[data-bs-theme="dark"] .sidebar-nav a.active { color: #4cc2f5; }
.sidebar-nav a.active i { color: inherit; }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1030; }
.content { padding: 1.5rem; max-width: 1320px; width: 100%; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-md); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
  .main { margin-left: 0; }
  .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
}

/* Tarjetas y estadísticas */
.card-soft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-card { padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(0,156,222,.12); color: #0079b0; flex: none; }
.stat-icon.warn { background: rgba(255,239,0,.28); color: #8a7a00; }
.stat-icon.danger { background: rgba(224,4,11,.1); color: var(--brand-accent); }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--ink-soft); font-size: .85rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft); }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: .5rem; opacity: .6; }
.flag-strip { height: 5px; background: linear-gradient(90deg, var(--brand-accent) 0 33%, #fff 33% 66%, var(--brand-accent) 66%); border-radius: 0 0 4px 4px; }

/* Login */
.guest-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .guest-wrap { grid-template-columns: 1.05fr 1fr; } }
.guest-hero { background: linear-gradient(155deg, #006fa0, var(--brand-primary) 55%, #34b6ea); color: #fff; padding: 3rem; display: none; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
@media (min-width: 992px) { .guest-hero { display: flex; } }
.guest-hero::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: rgba(255,255,255,.08); right: -160px; bottom: -180px; }
.guest-hero img { height: 150px; width: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,.25)); }
.guest-hero h1 { font-weight: 800; letter-spacing: -.02em; }
.guest-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: var(--surface-2); }
.guest-card { width: 100%; max-width: 420px; padding: 2rem; }

/* Accesibilidad */
:focus-visible { outline: 3px solid rgba(0,156,222,.55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 2000; }
.skip-link:focus { left: 0; }
