/**
 * Yaguarete Software — tema unificado
 * Sidebar oscura navy, acento verde hoja.
 */

/* ===== VARIABLES ===== */
:root {
  --primary:        #56ad38;
  --primary-hover:  #48972f;
  --primary-dark:   #3d8228;
  --primary-light:  rgba(86, 173, 56, 0.12);

  --sidebar-w:          248px;
  --sidebar-bg:         #0a1628;
  --sidebar-head-bg:    #000814;
  --sidebar-txt:        rgba(255,255,255,0.60);
  --sidebar-txt-hover:  rgba(255,255,255,0.90);
  --sidebar-txt-active: #ffffff;
  --sidebar-active-bg:  rgba(86, 173, 56, 0.14);
  --sidebar-active-bdr: #56ad38;
  --sidebar-divider:    rgba(255,255,255,0.07);

  --topbar-h:     60px;
  --topbar-bg:    #ffffff;
  --content-bg:   #f0f4f8;
  --card-bg:      #ffffff;
  --card-shadow:  0 2px 8px rgba(15,23,42,0.06);

  --text:           #1e293b;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  --radius:    10px;
  --radius-sm: 6px;

  /* Alias para código legado */
  --app-accent:        var(--primary);
  --app-accent-hover:  var(--primary-hover);
  --app-radius:        var(--radius);
  --app-radius-sm:     var(--radius-sm);
  --app-glass:         var(--card-bg);
  --app-glass-border:  var(--border);
  --app-shadow:        var(--card-shadow);
  --app-text:          var(--text);
  --app-text-secondary:var(--text-secondary);
  --app-border:        var(--border);
  --app-border-strong: var(--border-strong);
  /* Alias Notion para post-its */
  --notion-text:          var(--text);
  --notion-text-secondary:var(--text-secondary);
  --notion-border:        var(--border);
  --notion-border-strong: var(--border-strong);
  --notion-accent:        var(--primary);
  --notion-hover:         rgba(15,23,42,0.04);
  --notion-radius:        var(--radius-sm);
}

/* ===== RESET ===== */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== DASHBOARD LAYOUT ===== */
body.app-dashboard {
  background: var(--content-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Sidebar --- */
.app-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1030;
  overflow: hidden;
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
  background: var(--sidebar-head-bg);
  height: var(--topbar-h);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  min-width: 0;
}

.sidebar-brand .brand-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: 0.06em;
}
.sidebar-brand .brand-sub {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.25;
  margin-top: 0.2rem;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

.sidebar-group { margin-bottom: 0.35rem; }
.sidebar-group:last-child { margin-bottom: 0.25rem; }

.sidebar-group-label {
  padding: 0.75rem 1.15rem 0.35rem;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.32);
}

.sidebar-section { padding: 0 0.55rem; }

.sidebar-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-txt);
  text-decoration: none;
  font-size: 0.8125rem; font-weight: 500;
  line-height: 1.25;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  border-left: 3px solid transparent;
  margin-bottom: 2px;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.07);
  color: var(--sidebar-txt-hover);
  border-left-color: rgba(86, 173, 56, 0.35);
}
.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-txt-active);
  border-left-color: var(--sidebar-active-bdr);
  font-weight: 600;
}
.sidebar-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}
.sidebar-lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
  opacity: 0.88;
}
.sidebar-lucide--brand {
  width: 20px;
  height: 20px;
  color: #fff;
  opacity: 1;
}
.sidebar-link.active .sidebar-lucide {
  opacity: 1;
  color: var(--primary);
}
.sidebar-link-label {
  flex: 1;
  min-width: 0;
}
.sidebar-badge {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.22em 0.45em;
  border-radius: 999px;
  flex-shrink: 0;
}
.sidebar-badge--primary {
  background: var(--primary);
  color: #fff;
}
.sidebar-badge--danger {
  background: #dc2626;
  color: #fff;
}

.sidebar-divider { height: 1px; background: var(--sidebar-divider); margin: 0.45rem 1.25rem; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--sidebar-divider);
  flex-shrink: 0;
}
.sidebar-time { font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.sidebar-date { font-size: 0.73rem; color: rgba(255,255,255,0.45); margin-top: 0.15rem; text-transform: capitalize; }
.sidebar-status { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.sidebar-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 5px rgba(86, 173, 56, 0.45);
}
.sidebar-status span { font-size: 0.7rem; color: rgba(255,255,255,0.38); }

/* Mobile overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 1025;
}
.sidebar-overlay.show { display: block; }

/* --- Main wrapper --- */
.app-main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  display: flex; flex-direction: column;
  flex: 1; min-width: 0;
}

/* --- Topbar --- */
.app-topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  width: 100%;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 0.75rem;
  z-index: 900;
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
  flex-shrink: 0;
}

.topbar-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  font-size: 1.15rem; transition: all 0.12s;
  flex-shrink: 0;
}
.topbar-toggle:hover { background: #f1f5f9; color: var(--text); }

.topbar-title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  font-size: 1.05rem; transition: all 0.12s;
  position: relative;
}
.topbar-icon-btn:hover { background: #f1f5f9; color: var(--text); }
.topbar-icon-btn:disabled { opacity: 0.45; cursor: default; }
a.topbar-icon-btn { text-decoration: none; color: var(--text-secondary); }

.topbar-user {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer; color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}
.topbar-user:hover { background: #f1f5f9; color: var(--text); }
.topbar-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.82rem;
  flex-shrink: 0;
}
.topbar-user .user-name { font-size: 0.82rem; font-weight: 600; line-height: 1.2; }
.topbar-user .user-role { font-size: 0.68rem; color: var(--text-secondary); line-height: 1.2; }

/* --- Content area --- */
.app-content { flex: 1; padding: 1.5rem; background: var(--content-bg); }

@media (max-width: 575.98px) {
  .app-content { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ===== CARDS & PANELS ===== */
.app-card, .app-panel, .card-glass {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.app-card .card-head {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 0.92rem;
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text);
}
.app-card .card-body, .app-panel .card-body { padding: 1.25rem; }

/* Stat cards */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}
.stat-card .stat-num { font-size: 1.55rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Page header */
.page-header { margin-bottom: 1.25rem; }
.page-header h1, .page-header h2, .page-header .page-heading {
  font-weight: 700; color: var(--text); font-size: 1.25rem; margin-bottom: 0.15rem;
}
.page-header .page-lead { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* ===== FILTERS ===== */
.filters-wrap, .filtros-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.filters-wrap .filters-title {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 0.65rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.filters-wrap .filters-title i { color: var(--primary); }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.filters .btn { font-size: 0.82rem; padding: 0.3rem 0.75rem; }

/* ===== FORMS ===== */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem; color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(86, 173, 56, 0.18);
}
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.3rem; }

.form-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
}

/* ===== BUTTONS ===== */
.btn { border-radius: var(--radius-sm); font-weight: 500; font-size: 0.88rem; }
.btn-primary, .btn-success {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.btn-primary:hover,.btn-primary:focus,
.btn-success:hover,.btn-success:focus {
  background: var(--primary-hover); border-color: var(--primary-hover); color: #fff;
}
.btn-outline-success { color: var(--primary); border-color: var(--primary); }
.btn-outline-success:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== AUTH PAGES (login, bienvenida) ===== */
body.app-auth {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--content-bg);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.auth-split {
  display: flex;
  flex-wrap: nowrap;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

/* Panel izquierdo — marca / descripción comercial */
.auth-split-brand {
  flex: 1 1 50%;
  background: linear-gradient(165deg, #0a1628 0%, #000814 100%);
  color: #fff;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}
.auth-split-brand-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 28rem;
}
.auth-split-headline {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.auth-split-lead {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 1.25rem;
}
.auth-split-features {
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}
.auth-split-brand-foot { min-height: 1.5rem; }
.auth-split-help {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.12s;
}
.auth-split-help:hover { color: var(--primary); }

/* Panel derecho — formulario */
.auth-split-form {
  flex: 1 1 50%;
  background: var(--content-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right))
           max(1.25rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
  min-width: 0;
  box-sizing: border-box;
}
.auth-card {
  max-width: 400px;
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}
.auth-card .auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.auth-card .auth-brand-logo {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
}
.auth-card .auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-align: left;
  margin-bottom: 0.35rem;
}
.auth-card .auth-lead {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
  line-height: 1.45;
}
.auth-card .auth-alert { font-size: 0.875rem; }
.auth-card .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.auth-card .form-control {
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
}
.auth-password-wrap { position: relative; }
.auth-password-input { padding-right: 2.5rem; }
.auth-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.auth-password-toggle:hover { color: var(--text-secondary); background: #f1f5f9; }
.auth-submit {
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 0.25rem;
  border-radius: var(--radius-sm);
}
.auth-split-foot {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 400px;
  width: 100%;
  line-height: 1.45;
  padding: 0 0.25rem;
  box-sizing: border-box;
}
.auth-card a { color: var(--primary); }

/* Tablet y móvil: columna, formulario primero */
@media (max-width: 991.98px) {
  .auth-split {
    flex-direction: column;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .auth-split-form {
    order: 1;
    flex: 0 0 auto;
    justify-content: flex-start;
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: 1rem;
    width: 100%;
  }
  .auth-split-brand {
    order: 2;
    flex: 0 0 auto;
    padding: 1.25rem 1.25rem 1.5rem;
    gap: 0.75rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  .auth-split-brand-center {
    flex: none;
    max-width: none;
    justify-content: flex-start;
  }
  .auth-split-headline {
    font-size: clamp(1.35rem, 4.5vw, 1.65rem);
    margin-bottom: 0.5rem;
  }
  .auth-split-lead {
    font-size: 0.875rem;
    margin-bottom: 0.65rem;
  }
  .auth-split-features {
    font-size: 0.85rem;
  }
  .auth-split-brand-foot {
    display: block;
    min-height: 0;
    margin-top: 0.5rem;
  }
  .auth-card {
    max-width: 440px;
  }
}

/* Teléfonos */
@media (max-width: 575.98px) {
  .auth-split-form {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .auth-card {
    padding: 1.35rem 1.15rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
  }
  .auth-card .auth-brand-logo {
    max-width: 128px;
  }
  .auth-card .auth-title {
    font-size: 1.2rem;
  }
  .auth-card .auth-lead {
    font-size: 0.8125rem;
    margin-bottom: 1.1rem;
  }
  .auth-card .form-control {
    font-size: 16px;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
  }
  .auth-password-input {
    padding-right: 2.75rem;
  }
  .auth-password-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }
  .auth-submit {
    min-height: 44px;
    font-size: 1rem;
  }
  .auth-split-brand {
    padding: 1rem 1rem 1.25rem;
  }
  .auth-split-foot {
    font-size: 0.72rem;
    margin-top: 1rem;
  }
}

/* Pantallas muy bajas (landscape móvil) */
@media (max-height: 520px) and (max-width: 991.98px) {
  .auth-split-form {
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
  }
  .auth-card .auth-brand {
    margin-bottom: 0.65rem;
  }
  .auth-card .auth-brand-logo {
    max-width: 100px;
  }
  .auth-card .auth-lead {
    margin-bottom: 0.85rem;
  }
  .auth-split-brand {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .auth-split-headline {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
  }
  .auth-split-lead,
  .auth-split-features {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }
}

/* Escritorio ancho: mitades equilibradas */
@media (min-width: 992px) {
  .auth-split-brand,
  .auth-split-form {
    flex: 1 1 50%;
    max-width: 50%;
  }
}

.welcome-card {
  max-width: 420px; width: 100%;
  background: #fff; border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}
.welcome-card .brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: transparent;
  width: auto;
  height: auto;
}
.welcome-card h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.welcome-card .sub { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.75rem; }

/* Welcome buttons */
.btn-welcome-primary {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.7rem 1rem;
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600;
  text-decoration: none; transition: background 0.12s;
  margin-bottom: 0.5rem;
}
.btn-welcome-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-welcome-secondary {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.7rem 1rem;
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 500;
  text-decoration: none; transition: background 0.12s;
  margin-bottom: 0.5rem;
}
.btn-welcome-secondary:hover { background: #f1f5f9; color: var(--text); }

/* WhatsApp button */
.whatsapp-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(37,211,102,0.08); border: 1px solid rgba(37,211,102,0.3);
  border-radius: var(--radius-sm); color: #16a34a; text-decoration: none;
  font-weight: 500; font-size: 0.9rem;
}
.whatsapp-link:hover { background: rgba(37,211,102,0.15); color: #15803d; }
.whatsapp-link svg { width: 18px; height: 18px; }

/* ===== TABLES ===== */
.app-table { font-size: 0.88rem; }
.app-table th { font-weight: 600; color: var(--text-secondary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.app-table td { vertical-align: middle; }

/* ===== BADGES ===== */
.badge-status { border-radius: 20px; padding: 0.3em 0.7em; font-size: 0.75rem; font-weight: 600; }

/* ===== CARD-LIST (entregados) ===== */
.card-list {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--card-shadow); border: 1px solid var(--border); overflow: hidden;
}
.card-list .card-header { font-weight: 700; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); background: #f8fafc; }

/* ===== NAVBAR-APP (compatibilidad) ===== */
.navbar-app, .nav-admin-strip {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 0.5rem 1rem;
}
.navbar-app .navbar-brand,.nav-admin-strip .navbar-brand { font-weight: 700; color: var(--text); margin-right: 1rem; }
.navbar-app .nav-link,.nav-admin-strip .nav-link { color: var(--text-secondary); font-weight: 500; border-radius: var(--radius-sm); padding: 0.4rem 0.75rem; }
.navbar-app .nav-link:hover,.nav-admin-strip .nav-link:hover { background: #f1f5f9; color: var(--text); }
.navbar-app .nav-link.active,.nav-admin-strip .nav-link.active { color: var(--primary); background: var(--primary-light); }
.navbar-app .dropdown-menu,.nav-admin-strip .dropdown-menu { border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ===== MOBILE ===== */
@media (max-width: 991px) {
  .app-sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); transition: transform 0.25s ease; }
  .app-sidebar.sidebar-open { transform: translateX(0); }
  .app-main { margin-left: 0; width: 100%; }
}
@media (min-width: 992px) { .topbar-toggle { display: none; } }
