/* ============================================================
   LK Tikket — Design System (Mobile-first)
   Monitores usan móvil 99% del tiempo. Contabilidad usa desktop.
   ============================================================ */

:root {
  --lk-red: #bd242e;
  --lk-red-dark: #9c1d25;
  --lk-red-darker: #7a161c;
  --lk-red-light: #fbeceb;
  --lk-red-soft: #fdf5f4;
  --lk-gold: #c8a14a;
  --lk-gold-light: #f4ead2;

  --ink-900: #1a1715;
  --ink-700: #3d3733;
  --ink-500: #6f6760;
  --ink-400: #948c84;
  --ink-300: #c2bbb4;
  --ink-200: #e5dfd9;
  --ink-100: #f1ece6;
  --ink-50:  #faf7f3;

  --bg:      #fbf9f6;
  --surface: #ffffff;

  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger:  #b91c1c;
  --danger-bg: #fee2e2;
  --info:    #1d4ed8;
  --info-bg: #dbeafe;

  --shadow-sm: 0 1px 2px rgba(26, 23, 21, 0.04);
  --shadow:    0 1px 3px rgba(26, 23, 21, 0.06), 0 4px 12px rgba(26, 23, 21, 0.04);
  --shadow-lg: 0 4px 12px rgba(26, 23, 21, 0.06), 0 24px 48px rgba(26, 23, 21, 0.08);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  /* Touch target mínimo (Apple HIG / Material) */
  --touch: 44px;

  /* Safe area insets para iPhone con notch */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

html {
  /* Evita el zoom en focus en iOS si los inputs son < 16px */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.018em;
  margin: 0;
}

a { color: var(--lk-red); text-decoration: none; }
a:hover { color: var(--lk-red-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   APP SHELL — Mobile first (bottom nav + topbar)
   Desktop (≥1024px): sidebar fija
   ============================================================ */

.lk-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Mobile topbar --- */
.lk-mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: rgba(251, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-200);
}

.lk-mobile-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lk-mobile-topbar__brand img {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.lk-mobile-topbar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.lk-mobile-topbar__brand-text strong {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lk-mobile-topbar__brand-text span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lk-icon-btn {
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  cursor: pointer;
  flex-shrink: 0;
}

.lk-icon-btn:active { background: var(--ink-100); }

/* --- Sidebar (desktop only) --- */
.lk-sidebar { display: none; }

/* --- Main content --- */
.lk-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lk-topbar { display: none; }

.lk-content {
  padding: 20px 16px;
  /* Espacio para el bottom nav en móvil + safe area */
  padding-bottom: calc(96px + var(--safe-bottom));
  width: 100%;
  max-width: 100%;
}

/* --- Bottom nav (mobile) --- */
.lk-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--ink-200);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  box-shadow: 0 -4px 16px rgba(26, 23, 21, 0.04);
}

.lk-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  min-height: var(--touch);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-500);
  border-radius: var(--radius-sm);
  text-align: center;
  position: relative;
}

.lk-bottom-nav__item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.lk-bottom-nav__item.is-active {
  color: var(--lk-red);
}

.lk-bottom-nav__item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--lk-red);
  border-radius: 0 0 3px 3px;
}

.lk-bottom-nav__item--fab {
  margin: -16px 4px 0;
  background: var(--lk-red);
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-self: center;
  box-shadow: 0 8px 20px rgba(189, 36, 46, 0.35);
}

.lk-bottom-nav__item--fab svg { width: 26px; height: 26px; stroke-width: 2.5; }

.lk-bottom-nav__item--fab:hover,
.lk-bottom-nav__item--fab:active {
  color: #fff;
  background: var(--lk-red-dark);
}

/* --- Drawer (mobile menu para perfil/logout) --- */
.lk-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 21, 0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lk-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lk-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--surface);
  z-index: 51;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.lk-drawer.is-open { transform: translateX(0); }

.lk-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink-100);
}

.lk-drawer__body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.lk-page-header {
  margin-bottom: 22px;
}

.lk-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lk-red);
  margin-bottom: 8px;
}

.lk-page-header h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.15;
}

.lk-page-header p {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0;
  max-width: 640px;
}

.lk-page-header__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.lk-page-header__actions .lk-btn { width: 100%; }

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

.lk-card {
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lk-card--accent { border-top: 3px solid var(--lk-red); }

.lk-card__header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lk-card__header h2,
.lk-card__header h3 {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 0;
}

.lk-card__body { padding: 18px; }
.lk-card__body--flush { padding: 0; }

/* ============================================================
   STATS — 2 cols en móvil, auto en desktop
   ============================================================ */

.lk-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.lk-stat {
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.lk-stat__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  font-weight: 500;
  margin-bottom: 4px;
}

.lk-stat__value {
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.1;
}

.lk-stat__hint {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 4px;
  display: none; /* en móvil ocultamos para densidad */
}

/* ============================================================
   BUTTONS — touch friendly
   ============================================================ */

.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.lk-btn:focus-visible {
  outline: 3px solid var(--lk-red-light);
  outline-offset: 1px;
}

.lk-btn--primary,
.lk-btn-primary {
  background: var(--lk-red);
  color: #fff;
  border-color: var(--lk-red);
}

.lk-btn--primary:hover,
.lk-btn--primary:active,
.lk-btn-primary:hover {
  background: var(--lk-red-dark);
  border-color: var(--lk-red-dark);
  color: #fff;
}

.lk-btn--ghost {
  background: var(--surface);
  color: var(--ink-700);
  border-color: var(--ink-200);
}

.lk-btn--ghost:hover,
.lk-btn--ghost:active {
  background: var(--ink-50);
  border-color: var(--ink-300);
  color: var(--ink-900);
}

.lk-btn--success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.lk-btn--success:hover,
.lk-btn--success:active { background: #166534; border-color: #166534; }

.lk-btn--danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--ink-200);
}

.lk-btn--danger:hover,
.lk-btn--danger:active {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.lk-btn--sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.lk-btn--lg {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 16px;
}

.lk-btn--block { width: 100%; }

/* ============================================================
   FORMS — full width inputs en móvil
   ============================================================ */

.lk-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.lk-form-grid--single { grid-template-columns: 1fr; }

.lk-field { display: flex; flex-direction: column; }
.lk-field--full { grid-column: 1 / -1; }

.lk-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 8px;
}

.lk-field input:not([type="radio"]):not([type="checkbox"]),
.lk-field select,
.lk-field textarea {
  width: 100%;
  font-family: inherit;
  /* 16px previene zoom automático en iOS */
  font-size: 16px;
  color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  min-height: var(--touch);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Radios y checkboxes: apariencia nativa, ancho automático,
   tamaño cómodo para tocar en móvil. */
.lk-field input[type="radio"],
.lk-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--lk-red);
  flex-shrink: 0;
}

.lk-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6760' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}

.lk-field input:hover,
.lk-field select:hover,
.lk-field textarea:hover {
  border-color: var(--ink-300);
}

.lk-field input:focus,
.lk-field select:focus,
.lk-field textarea:focus {
  border-color: var(--lk-red);
  box-shadow: 0 0 0 3px var(--lk-red-light);
}

.lk-field input.is-invalid,
.lk-field select.is-invalid,
.lk-field textarea.is-invalid {
  border-color: #fca5a5;
  background: #fff7f7;
  box-shadow: 0 0 0 3px var(--danger-bg);
}

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

.lk-field__hint {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 6px;
}

.lk-field__error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}

.lk-form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-100);
}

.lk-form-actions .lk-btn { width: 100%; }

/* Footer del formulario — en flujo normal para que el usuario pueda
   scrollear hasta el fondo sin que la CTA tape el resto del contenido
   (antes era sticky y causaba que parte del form quedara oculta
   detrás del propio footer + la bottom-nav móvil). */
.lk-form-footer {
  margin: 22px -18px -18px;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--ink-200);
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.lk-form-footer .lk-btn { width: 100%; }

/* ============================================================
   TABLES — En móvil se transforman en lista de cards
   ============================================================ */

.lk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.lk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* En móvil ocultamos la tabla y mostramos las card-rows en su lugar */
@media (max-width: 767px) {
  .lk-table-mobile-cards .lk-table { display: none; }
  .lk-table-mobile-cards .lk-card-list { display: flex; flex-direction: column; }
}

@media (min-width: 768px) {
  .lk-card-list { display: none; }
}

.lk-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  padding: 12px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
}

.lk-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700);
  vertical-align: middle;
}

.lk-table tbody tr:last-child td { border-bottom: none; }
.lk-table tbody tr:hover { background: var(--ink-50); }

.lk-table td.num {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink-900);
}

.lk-table td.muted { color: var(--ink-500); }

/* Card-row (sustituye filas de tabla en móvil) */
.lk-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ink-100);
  min-height: 72px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}

.lk-card-row:last-child { border-bottom: none; }
.lk-card-row:active { background: var(--ink-50); }

.lk-card-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lk-red-light);
  color: var(--lk-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.lk-card-row__main {
  flex: 1;
  min-width: 0;
}

.lk-card-row__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lk-card-row__meta {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lk-card-row__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lk-card-row__amount {
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lk-card-row__chevron {
  color: var(--ink-300);
  flex-shrink: 0;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */

.lk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid;
  white-space: nowrap;
}

.lk-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lk-badge--draft     { background: var(--ink-50);    color: var(--ink-500);   border-color: var(--ink-200); }
.lk-badge--submitted { background: var(--warning-bg); color: var(--warning);   border-color: #fde68a; }
.lk-badge--review    { background: var(--info-bg);    color: var(--info);      border-color: #bfdbfe; }
.lk-badge--returned  { background: #ffedd5;           color: #c2410c;          border-color: #fed7aa; }
.lk-badge--approved  { background: var(--success-bg); color: var(--success);   border-color: #86efac; }
.lk-badge--rejected  { background: var(--danger-bg);  color: var(--danger);    border-color: #fca5a5; }

.lk-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}

.lk-brand-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lk-red);
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.lk-flash {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  border: 1px solid;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lk-flash--success { background: var(--success-bg); color: var(--success); border-color: #86efac; }
.lk-flash--error   { background: var(--danger-bg);  color: var(--danger);  border-color: #fca5a5; }

/* ============================================================
   AUTH LAYOUT — Centrado en móvil, split en desktop
   ============================================================ */

.lk-auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.lk-auth__brand {
  background: linear-gradient(155deg, #9c1d25 0%, #bd242e 50%, #7a161c 100%);
  color: #fff;
  padding: calc(28px + var(--safe-top)) 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lk-auth__brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(200, 161, 74, 0.18), transparent 45%);
  pointer-events: none;
}

.lk-auth__brand > * { position: relative; }

.lk-auth__logo img { height: 44px; width: auto; }

.lk-auth__hero { margin-top: 18px; }

.lk-auth__hero h2 {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.lk-auth__hero p {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 460px;
  margin: 0 auto;
}

.lk-auth__footer { display: none; }

.lk-auth__form {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  background: var(--bg);
}

.lk-auth__form-inner {
  width: 100%;
  max-width: 420px;
}

.lk-auth__form-inner h1 {
  font-family: "Inter", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}

.lk-auth__form-inner > p {
  font-size: 14px;
  color: var(--ink-500);
  margin-bottom: 22px;
}

.lk-auth__form-inner form { display: flex; flex-direction: column; gap: 16px; }
.lk-auth__form-inner .lk-btn { width: 100%; }

.lk-auth__altlink {
  font-size: 14px;
  text-align: center;
  color: var(--ink-500);
  margin-top: 22px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.lk-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-500);
  font-size: 14px;
}

.lk-meta { font-size: 13px; color: var(--ink-500); }
.lk-meta strong { color: var(--ink-900); font-weight: 600; }

.lk-section-stack > * + * { margin-top: 18px; }

.lk-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.lk-grid-show {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ============================================================
   DESKTOP (≥1024px) — Sidebar layout para contabilidad
   ============================================================ */

@media (min-width: 1024px) {

  .lk-app {
    flex-direction: row;
  }

  /* Ocultamos elementos móviles */
  .lk-mobile-topbar { display: none; }
  .lk-bottom-nav { display: none; }
  .lk-drawer-overlay,
  .lk-drawer { display: none; }

  /* Mostramos sidebar */
  .lk-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--ink-200);
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .lk-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 24px 20px;
    border-bottom: 1px solid var(--ink-100);
  }

  .lk-sidebar__brand img { height: 36px; width: auto; }

  .lk-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  .lk-sidebar__brand-text strong {
    font-family: "Inter", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-900);
  }

  .lk-sidebar__brand-text span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-400);
    margin-top: 2px;
  }

  .lk-nav { flex: 1; padding: 18px 14px; overflow-y: auto; }

  .lk-nav__group {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-400);
    padding: 14px 12px 8px;
  }

  .lk-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-700);
    transition: all 0.12s ease;
    margin-bottom: 2px;
    min-height: auto;
  }

  .lk-nav__item:hover { background: var(--ink-50); color: var(--ink-900); }

  .lk-nav__item.is-active {
    background: var(--lk-red-light);
    color: var(--lk-red-dark);
    font-weight: 600;
  }

  .lk-sidebar__footer { padding: 16px; border-top: 1px solid var(--ink-100); }

  .lk-version-tag {
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--ink-400, #948c84);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    user-select: none;
  }

  .lk-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--ink-50);
  }

  .lk-user-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lk-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
  }

  .lk-user-card__info { flex: 1; min-width: 0; }

  .lk-user-card__info strong {
    display: block;
    font-size: 13px;
    color: var(--ink-900);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lk-user-card__info span {
    display: block;
    font-size: 11px;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1px;
  }

  .lk-logout-btn {
    background: transparent;
    border: none;
    color: var(--ink-400);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lk-logout-btn:hover { color: var(--lk-red); background: var(--lk-red-light); }

  /* Desktop topbar */
  .lk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 36px;
    background: rgba(251, 249, 246, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ink-200);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .lk-topbar__title {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-900);
  }

  .lk-content {
    padding: 32px 36px 64px;
    max-width: 1280px;
  }

  /* Page header desktop */
  .lk-page-header h1 { font-size: 32px; }
  .lk-page-header p { font-size: 15px; }
  .lk-page-header__actions {
    flex-direction: row;
    margin-top: 0;
  }
  .lk-page-header__actions .lk-btn { width: auto; }

  /* Stats: auto-fit con más espacio */
  .lk-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }
  .lk-stat { padding: 18px 20px; }
  .lk-stat__label { font-size: 12px; }
  .lk-stat__value { font-size: 28px; }
  .lk-stat__hint { display: block; }

  /* Cards: padding más amplio */
  .lk-card__header { padding: 20px 24px 18px; }
  .lk-card__body { padding: 22px 24px; }

  /* Forms: 2 columnas */
  .lk-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .lk-form-grid--single { grid-template-columns: 1fr; }

  .lk-form-actions {
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 22px;
  }
  .lk-form-actions .lk-btn { width: auto; }

  .lk-form-footer {
    position: static;
    margin: 22px 0 0;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    flex-direction: row;
  }
  .lk-form-footer .lk-btn { width: auto; }

  /* En desktop ocultamos card-list, mostramos table */
  .lk-table-mobile-cards .lk-table { display: table; }
  .lk-table-mobile-cards .lk-card-list { display: none; }

  /* Show grid en desktop */
  .lk-grid-show {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 24px;
  }

  /* Page header puede ir en línea */
  .lk-page-header__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
}
