:root {
  --brand-primary: #1d4ed8;
  --brand-secondary: #0f172a;
  --brand-surface: #f8fafc;
  --brand-border: #e2e8f0;
}

html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 35%, #ffffff 100%);
  color: #0f172a;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(37, 99, 235, .25);
}

.module-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .75rem 0;
}

.has-sidebar .app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: .8rem .75rem;
  background: linear-gradient(180deg, #25355a 0%, #273d66 45%, #1f2f4f 100%);
  color: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
  transform: translateX(0);
  transition: transform .25s ease, width .25s ease, padding .25s ease;
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  padding: .2rem .4rem .65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.sidebar-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.dih-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
  font-style: normal;
}

.dih-logo-login {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 1.35rem;
  letter-spacing: .03em;
}

.sidebar-search {
  padding: .1rem .4rem .25rem;
}

.sidebar-search .form-control {
  border-radius: .55rem;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .09);
  color: #f8fafc;
}

.sidebar-search .form-control::placeholder {
  color: rgba(226, 232, 240, .78);
}

.sidebar-search .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .2rem rgba(147, 197, 253, .2);
}

.sidebar-section-title {
  margin: .15rem .4rem 0;
  color: rgba(226, 232, 240, .72);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}

.sidebar-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.sidebar-section-chevron {
  display: none;
  font-size: .82rem;
  opacity: .9;
  transition: transform .2s ease;
}

.sidebar-section-toggle[aria-expanded="false"] .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: .2rem;
  padding: 0 .1rem;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: rgba(255, 255, 255, .86);
  border: 1px solid transparent;
  background: transparent;
  border-radius: .55rem;
  padding: .42rem .58rem .42rem .72rem;
  font-size: .9rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.sidebar-nav a i {
  width: 1rem;
  text-align: center;
  color: rgba(226, 232, 240, .82);
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}

.sidebar-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: .25rem;
  bottom: .25rem;
  width: 3px;
  border-radius: 99px;
  background: #facc15;
}

.sidebar-nav a.active i,
.sidebar-nav a:hover i {
  color: #facc15;
}

.sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: .7rem .3rem 0;
  font-size: .92rem;
}

.sidebar-mobile-profile,
.sidebar-mobile-quick-actions {
  display: none;
}

.sidebar-toggle-btn {
  position: fixed;
  top: .8rem;
  left: .8rem;
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(15, 23, 42, .25);
  background: #1e3a8a;
  transition: left .25s ease;
}

.sidebar-toggle-icon {
  display: inline-block;
  width: 14px;
  height: 2px;
  background: #fff;
  box-shadow: 0 -4px 0 #fff, 0 4px 0 #fff;
}

.sidebar-toggle-label {
  line-height: 1;
}

.has-sidebar .app-main {
  margin-left: 270px;
  min-height: 100vh;
  transition: margin-left .25s ease;
}

/* Sidebar completamente oculto (solo móvil) */
.has-sidebar.sidebar-hidden .app-sidebar {
  transform: translateX(-100%);
}

.has-sidebar.sidebar-hidden .app-main {
  margin-left: 0;
}

.has-sidebar.sidebar-hidden .sidebar-toggle-btn {
  left: .8rem;
}

/* Ocultar botón flotante cuando el sidebar está visible (completo o colapsado) */
.has-sidebar:not(.sidebar-hidden) .sidebar-toggle-btn,
.has-sidebar.sidebar-collapsed .sidebar-toggle-btn {
  opacity: 0;
  pointer-events: none;
}

/* ── Sidebar colapsado: modo sólo-iconos (escritorio) ── */
.has-sidebar.sidebar-collapsed .app-sidebar {
  width: 56px;
  padding-left: .3rem;
  padding-right: .3rem;
}

.has-sidebar.sidebar-collapsed .app-main {
  margin-left: 56px;
}

/* Ocultar texto e elementos no esenciales en modo colapsado */
.has-sidebar.sidebar-collapsed .sidebar-title,
.has-sidebar.sidebar-collapsed .sidebar-search,
.has-sidebar.sidebar-collapsed .sidebar-section-title,
.has-sidebar.sidebar-collapsed .sidebar-close-label,
.has-sidebar.sidebar-collapsed .sidebar-nav a span,
.has-sidebar.sidebar-collapsed .sidebar-user {
  display: none;
}

/* Centrar iconos en los enlaces */
.has-sidebar.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  padding: .5rem;
  gap: 0;
}

.has-sidebar.sidebar-collapsed .sidebar-nav a i {
  font-size: 1.15rem;
  width: auto;
}

/* Centrar el botón toggle en el header */
.has-sidebar.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding-left: .25rem;
  padding-right: .25rem;
}

.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
  flex: 0 0 auto;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1030;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.has-sidebar.sidebar-mobile-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 991.98px) {
  .has-sidebar {
    --mobile-sidebar-width: min(88vw, 360px);
  }

  .has-sidebar .app-main {
    margin-left: 0;
    padding-top: calc(4.1rem + env(safe-area-inset-top));
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .has-sidebar .app-sidebar {
    width: var(--mobile-sidebar-width);
    max-width: 100%;
    padding: calc(.85rem + env(safe-area-inset-top)) .85rem calc(.8rem + env(safe-area-inset-bottom));
    gap: .55rem;
    border-right: 1px solid rgba(255, 255, 255, .12);
    border-top-right-radius: 1.1rem;
    border-bottom-right-radius: 1.1rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .34);
    transform: translateX(-100%);
  }

  .sidebar-header {
    padding: .1rem .2rem .55rem;
    margin-bottom: .1rem;
  }

  .sidebar-title {
    font-size: 2rem;
    line-height: 1;
  }

  .sidebar-close-btn {
    border-radius: .72rem;
    padding: .38rem .6rem;
    min-height: 38px;
  }

  .sidebar-search {
    padding: .15rem .2rem .35rem;
  }

  .sidebar-search .form-control {
    min-height: 40px;
    border-radius: .72rem;
    font-size: .96rem;
    padding-left: .82rem;
    padding-right: .82rem;
    background: rgba(255, 255, 255, .14);
  }

  .sidebar-mobile-profile {
    display: flex;
    align-items: center;
    gap: .62rem;
    margin: .1rem .1rem .2rem;
    padding: .58rem .62rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .86rem;
    background: rgba(255, 255, 255, .08);
  }

  .sidebar-mobile-avatar {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .16);
    color: #e2e8f0;
    font-size: 1.1rem;
    flex: 0 0 auto;
  }

  .sidebar-mobile-name {
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    font-size: .94rem;
  }

  .sidebar-mobile-role {
    color: rgba(226, 232, 240, .84);
    font-size: .76rem;
    margin-top: .08rem;
    line-height: 1.1;
  }

  .sidebar-mobile-quick-actions {
    display: flex;
    gap: .42rem;
    margin: 0 .1rem .18rem;
  }

  .sidebar-mobile-quick-actions .btn {
    flex: 1 1 auto;
    border-radius: .72rem;
    min-height: 36px;
    font-size: .83rem;
    padding: .35rem .62rem;
  }

  .sidebar-section-title {
    margin: .15rem .2rem .08rem;
    font-size: .8rem;
    letter-spacing: .06em;
    cursor: pointer;
  }

  .sidebar-section-chevron {
    display: inline-block;
  }

  .sidebar-nav {
    gap: .32rem;
  }

  .sidebar-nav.sidebar-nav-collapsed {
    display: none;
  }

  .sidebar-nav a {
    min-height: 48px;
    border-radius: .8rem;
    padding: .58rem .74rem;
    font-size: 1rem;
    gap: .68rem;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
  }

  .sidebar-nav a i {
    font-size: 1.03rem;
    width: 1.1rem;
  }

  .sidebar-nav a.active {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .24);
  }

  .sidebar-user {
    display: none;
  }

  .sidebar-user .btn {
    min-height: 38px;
    border-radius: .72rem;
  }

  .has-sidebar.sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    left: .85rem;
    top: calc(.95rem + env(safe-area-inset-top));
    width: 42px;
    height: 42px;
    border-radius: 999px;
    justify-content: center;
    padding: 0;
    border-color: rgba(255, 255, 255, .18);
    background: linear-gradient(180deg, #2b4f93 0%, #1f3764 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .3);
    backdrop-filter: blur(6px);
  }

  .sidebar-toggle-label {
    display: none;
  }

  .sidebar-backdrop {
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(2px);
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1065;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: .35rem;
    padding: .4rem .45rem calc(.42rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(148, 163, 184, .28);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 -10px 26px rgba(15, 23, 42, .08);
    backdrop-filter: saturate(1.1) blur(10px);
    transition: transform .22s ease, opacity .2s ease;
  }

  .mobile-tabbar-hidden .mobile-tabbar {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-mobile-open .mobile-tabbar {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-tabbar-link {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 999px;
    padding: .28rem .2rem;
    font-size: .72rem;
    font-weight: 600;
    transition: transform .14s ease, background-color .18s ease, color .18s ease;
  }

  .mobile-tabbar-link i {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-tabbar-link.active {
    color: #1d4ed8;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .14);
  }

  .mobile-tabbar-link:active,
  .mobile-tabbar-link.is-tap-feedback {
    transform: scale(.95);
    background: #e2e8f0;
  }

  .mobile-tabbar-link.is-tap-feedback i {
    animation: mobile-tabbar-icon-pop .2s ease;
  }

  @keyframes mobile-tabbar-icon-pop {
    0% { transform: scale(1); }
    55% { transform: scale(1.12); }
    100% { transform: scale(1); }
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-tabbar-link,
    .mobile-tabbar-link i {
      transition: none;
      animation: none !important;
    }
  }
}

.navbar-brand {
  letter-spacing: .02em;
}

.app-shell .nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

.metric-card {
  border-radius: 1.25rem;
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  min-height: 156px;
}

.metric-sales { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.metric-deposits { background: linear-gradient(135deg, #0891b2, #0e7490); }
.metric-accounts { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.metric-inventory { background: linear-gradient(135deg, #ea580c, #c2410c); }

.metric-label {
  font-size: .9rem;
  opacity: .9;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.metric-value {
  font-size: clamp(1.8rem, 2vw, 2.7rem);
  font-weight: 700;
  margin-top: .4rem;
}

.metric-value-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: .55rem;
}

.metric-subtitle {
  margin-top: .5rem;
  opacity: .85;
}

.main-menu-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .95fr);
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 1.75rem;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, .16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, .16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .94));
  box-shadow: 0 22px 50px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.main-menu-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.main-menu-title {
  margin: .85rem 0 .5rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.02;
  color: #0f172a;
}

.main-menu-description {
  max-width: 50rem;
  margin-bottom: 1.35rem;
  color: #475569;
  font-size: 1.02rem;
}

.main-menu-user-card {
  display: inline-flex;
  align-items: center;
  gap: .95rem;
  padding: .9rem 1rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.main-menu-user-avatar {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #fff;
  font-size: 1.35rem;
}

.main-menu-user-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 700;
}

.main-menu-user-name {
  font-size: 1.06rem;
  font-weight: 700;
  color: #0f172a;
}

.main-menu-user-role {
  color: #475569;
  font-size: .92rem;
}

.main-menu-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .9rem;
  padding: 1.3rem;
  border-radius: 1.4rem;
  color: #fff;
  background: linear-gradient(160deg, #0f172a, #1e3a8a 58%, #0ea5e9 140%);
  box-shadow: 0 18px 42px rgba(30, 58, 138, .22);
}

.main-menu-hero-panel-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .72;
  font-weight: 700;
}

.main-menu-hero-panel-title {
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 800;
}

.main-menu-hero-panel-text {
  margin: 0;
  color: rgba(226, 232, 240, .9);
}

.main-menu-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.main-menu-hero-actions .btn {
  border-radius: .95rem;
  padding: .78rem 1.15rem;
}

.module-menu-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.55rem;
  border-radius: 1.6rem;
  color: #fff;
  min-height: 290px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
  transition: transform .18s ease, box-shadow .18s ease;
}

.module-admin { background: linear-gradient(135deg, #0f172a, #334155); }
.module-pos { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.module-reports { background: linear-gradient(135deg, #065f46, #059669); }
.module-students { background: linear-gradient(135deg, #7c3aed, #9333ea); }

.module-menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 54px rgba(15, 23, 42, .2);
}

.module-menu-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.module-menu-header h2 {
  margin: .5rem 0 0;
  font-size: 1.5rem;
}

.module-menu-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .14);
  font-size: 1.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.module-menu-badge {
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: .8rem;
  background: rgba(255, 255, 255, .08);
}

.module-menu-card p {
  color: rgba(255, 255, 255, .9);
  margin-bottom: 0;
}

.module-menu-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.module-menu-meta span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .95);
  font-size: .82rem;
}

.module-menu-card .btn {
  border-radius: .95rem;
  font-weight: 700;
}

.module-menu-links {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  flex: 1;
}

.module-menu-links a {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 1rem;
  padding: .85rem 1rem;
  background: rgba(255, 255, 255, .08);
}

.module-menu-links a:hover {
  background: rgba(255, 255, 255, .16);
}

@media (max-width: 991.98px) {
  .main-menu-hero {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }
}

@media (max-width: 575.98px) {
  .main-menu-user-card {
    width: 100%;
  }

  .main-menu-hero-panel {
    padding: 1.1rem;
  }

  .module-menu-card {
    min-height: auto;
  }
}


.modal .modal-body {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid var(--brand-border);
}
.summary-stack {
  display: grid;
  gap: .85rem;
}

.summary-chip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--brand-border);
}

.summary-chip span {
  color: #475569;
}

.summary-chip strong {
  font-size: 1.05rem;
}

.module-header {
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.25rem;
}

.module-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.module-link-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.module-link-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.08);
}

.module-link-card span {
  color: #64748b;
}

.admin-dashboard-panel {
  position: relative;
  overflow: hidden;
}

.admin-dashboard-panel::after {
  content: "";
  position: absolute;
  inset: auto -28px -34px auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .08);
}

.admin-panel-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .95rem;
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}

.admin-panel-icon-sales {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-panel-icon-stock {
  background: #fff7ed;
  color: #c2410c;
}

.admin-panel-icon-alerts {
  background: #fff7ed;
  color: #ea580c;
}

.admin-panel-icon-shortcuts {
  background: #ecfeff;
  color: #0891b2;
}

.admin-panel-icon-personnel {
  background: #eef2ff;
  color: #4338ca;
}

.admin-panel-icon-students {
  background: #eff6ff;
  color: #2563eb;
}

.admin-panel-icon-photos {
  background: #f5f3ff;
  color: #7c3aed;
}

.admin-summary-chip {
  position: relative;
  overflow: hidden;
}

.admin-summary-chip::before {
  content: "";
  width: .45rem;
  align-self: stretch;
  border-radius: 999px;
  margin-right: .85rem;
}

.admin-summary-chip-danger::before {
  background: #ef4444;
}

.admin-summary-chip-balance::before {
  background: #3b82f6;
}

.admin-summary-chip-warning::before {
  background: #f59e0b;
}

.admin-link-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-link-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -22px auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  opacity: .12;
}

.admin-link-card:hover,
.admin-link-card:focus-visible {
  transform: translateY(-4px);
}

.admin-link-card-icon {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .9rem;
  margin-bottom: .75rem;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.admin-link-card-personnel::after { background: #8b5cf6; }
.admin-link-card-students::after { background: #3b82f6; }
.admin-link-card-products::after { background: #f59e0b; }
.admin-link-card-settings::after { background: #14b8a6; }
.admin-link-card-menus::after { background: #22c55e; }
.admin-link-card-ticket::after { background: #ef4444; }

.admin-link-card-personnel .admin-link-card-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.admin-link-card-students .admin-link-card-icon {
  background: #eff6ff;
  color: #2563eb;
}

.admin-link-card-products .admin-link-card-icon {
  background: #fffbeb;
  color: #b45309;
}

.admin-link-card-settings .admin-link-card-icon {
  background: #f0fdfa;
  color: #0f766e;
}

.admin-link-card-menus .admin-link-card-icon {
  background: #f0fdf4;
  color: #15803d;
}

.admin-link-card-ticket .admin-link-card-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-surface-panel {
  position: relative;
  overflow: hidden;
}

.admin-surface-panel::after {
  content: "";
  position: absolute;
  inset: auto -30px -36px auto;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .08);
}

.admin-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.admin-summary-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  min-width: 118px;
  padding: .7rem .95rem;
  border-radius: .95rem;
  border: 1px solid transparent;
  position: relative;
  z-index: 1;
}

.admin-summary-chip span {
  color: #475569;
  font-size: .85rem;
}

.admin-summary-chip strong {
  font-size: 1rem;
}

.admin-summary-chip-success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.admin-summary-chip-muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.admin-summary-chip-neutral {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.admin-filter-shell {
  position: relative;
  z-index: 1;
  padding: .9rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.admin-filter-shell .form-control,
.admin-filter-shell .form-select {
  border-radius: .85rem;
}

.admin-table-shell {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 1;
  background: #fff;
}

.admin-table {
  margin-bottom: 0;
}

.admin-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #e2e8f0;
}

.admin-table tbody tr {
  transition: background-color .18s ease;
}

.admin-table tbody tr:hover {
  background: #f8fbff;
}

.admin-products-stock-badge {
  min-width: 3rem;
}

.admin-products-stock-form .form-control,
.admin-products-stock-form .btn {
  border-radius: .75rem;
}

.admin-list-status-badge {
  min-width: 4.5rem;
}

.prepago-operations-count {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

.prepago-operation-card,
.prepago-movements-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.prepago-operation-card::after,
.prepago-movements-panel::after {
  content: "";
  position: absolute;
  inset: auto -24px -28px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  opacity: .12;
}

.prepago-operation-card-deposit::after {
  background: #22c55e;
}

.prepago-operation-card-transfer::after {
  background: #3b82f6;
}

.prepago-operation-card-lost::after {
  background: #ef4444;
}

.prepago-operation-card-withdraw::after {
  background: #f59e0b;
}

.prepago-movements-panel::after {
  background: #6366f1;
}

.report-section .report-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.report-section .report-panel::after {
  content: "";
  position: absolute;
  inset: auto -26px -32px auto;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .08);
}

.report-filter-bar {
  padding: .55rem .65rem;
  border: 1px solid #dbeafe;
  border-radius: .95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-filter-bar .form-control,
.report-filter-bar .form-select {
  border-radius: .8rem;
}

.report-section .table-responsive {
  border: 1px solid #e2e8f0;
  border-radius: .95rem;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
}

.report-section .table {
  margin-bottom: 0;
}

.report-section .table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #e2e8f0;
}

.report-section .table tbody tr {
  transition: background-color .18s ease;
}

.report-section .table tbody tr:hover {
  background: #f8fbff;
}

.portal-dashboard-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border: 1px solid transparent;
}

.portal-dashboard-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: .16;
}

.portal-dashboard-card:hover,
.portal-dashboard-card:focus-visible {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.14);
}

.portal-dashboard-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .9rem;
  font-size: 1.15rem;
}

.portal-dashboard-card .text-primary {
  color: #1d4ed8 !important;
}

.portal-dashboard-card-balance::after {
  background: #34d399;
}

.portal-dashboard-card-balance .portal-dashboard-icon {
  background: #ecfdf5;
  color: #047857;
}

.portal-dashboard-card-monthly::after {
  background: #60a5fa;
}

.portal-dashboard-card-monthly .portal-dashboard-icon {
  background: #eff6ff;
  color: #1d4ed8;
}

.portal-dashboard-card-products::after {
  background: #f59e0b;
}

.portal-dashboard-card-products .portal-dashboard-icon {
  background: #fffbeb;
  color: #b45309;
}

.portal-dashboard-card-restricted::after {
  background: #f87171;
}

.portal-dashboard-card-restricted .portal-dashboard-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.portal-student-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border: 1px solid transparent;
}

.portal-student-card::after {
  content: "";
  position: absolute;
  inset: auto -22px -26px auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(59, 130, 246, .10);
}

.portal-student-card:hover,
.portal-student-card:focus-visible {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.12);
}

.portal-student-card-active {
  border-color: #93c5fd;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.12);
}

.portal-student-card-status {
  display: inline-flex;
  align-items: center;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.portal-student-card-active .portal-student-card-status {
  background: #dbeafe;
}

.portal-student-card-meta {
  position: relative;
  z-index: 1;
}

.portal-menu-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 1rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.portal-menu-card::after {
  content: "";
  position: absolute;
  inset: auto -26px -30px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .10);
}

.portal-menu-card-reserved {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.portal-menu-card-reserved::after {
  background: rgba(34, 197, 94, .12);
}

.portal-menu-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1.05rem;
}

.portal-menu-card-reserved .portal-menu-icon {
  background: #ecfdf5;
  color: #15803d;
}

.portal-menu-badge {
  display: inline-flex;
  align-items: center;
  padding: .38rem .7rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .78rem;
  font-weight: 700;
}

.portal-menu-section {
  position: relative;
  z-index: 1;
}

.portal-menu-section span {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1d4ed8;
  margin-bottom: .2rem;
}

.portal-menu-section p {
  margin-bottom: 0;
}

.portal-menu-form {
  position: relative;
  z-index: 1;
  margin-top: .25rem;
}

.portal-menu-check {
  border: 1px solid #dbeafe;
  border-radius: .9rem;
  background: rgba(239, 246, 255, .7);
  padding: .75rem 1rem;
}

.portal-menu-check .form-check-input {
  margin-top: .2rem;
}

/* Improve readability for table badges when theme/background makes white text low-contrast. */
.table .badge {
  color: #111827 !important;
}

.pos-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
}

.pos-ticket-panel {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-ticket-panel .form-label {
  color: #334155;
}

.pos-main-panel {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 1rem;
}

.pos-actions-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: .45rem .75rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  font-size: .85rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: background .15s;
}

.pos-actions-toggle:hover {
  background: #f1f5f9;
}

.pos-actions-toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pos-actions-toggle[aria-expanded="true"] .pos-actions-chevron {
  transform: rotate(180deg);
}

.pos-actions-chevron {
  transition: transform .2s;
}

.pos-actions-body {
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 .75rem .75rem;
  padding: .65rem .75rem;
  background: #fff;
}

.pos-action-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  width: 100%;
  padding: .38rem .6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .6rem;
  font-size: .83rem;
  color: #374151;
  cursor: pointer;
  text-align: left;
  margin-bottom: .3rem;
  transition: background .12s, border-color .12s;
}

.pos-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pos-action-btn:last-child {
  margin-bottom: 0;
}

.pos-ticket-table-wrap {
  min-height: 360px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: .8rem;
}

.pos-total-box {
  border: 1px solid #cbd5e1;
  border-radius: .9rem;
  background: #f8fafc;
  padding: .75rem;
}

.pos-total-box > div {
  display: flex;
  justify-content: space-between;
  margin: .25rem 0;
}

.pos-student-card {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  border-radius: 1rem;
  padding: .85rem;
}

.pos-cancel-sale-details {
  border-top: 1px solid #e5e7eb;
  margin-top: .25rem;
  padding-top: .6rem;
}

.pos-cancel-sale-details ul {
  padding-left: 1rem;
}

.pos-student-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.pos-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: .75rem;
}

.pos-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.pos-category-btn {
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.pos-subcategory-btn {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.pos-subcategory-btn.active {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}

.pos-category-btn.active {
  background: #1d4ed8;
  color: #fff;
}

.pos-product-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .8rem;
}

.pos-product-grid.active {
  display: grid;
}

.pos-product-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  min-height: 88px;
  border-radius: .9rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.pos-product-btn small {
  color: #64748b;
}

.pos-product-btn:hover {
  border-color: #60a5fa;
}

.pos-product-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.pos-product-btn:disabled small {
  color: #94a3b8;
}

.pos-product-subcategory {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(180deg, #fffaf0 0%, #f8fafc 100%);
}

.pos-product-subcategory:hover {
  border-color: #f59e0b;
}

@media (max-width: 1200px) {
  .pos-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .pos-shell {
    display: flex;
    flex-direction: column;
  }

  .pos-main-panel {
    order: 1;
  }

  .pos-ticket-panel {
    order: 2;
  }

  .pos-ticket-selection {
    order: 1;
  }

  .pos-ticket-checkout {
    order: 2;
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: #fff;
    padding-top: .6rem;
    padding-bottom: calc(.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -10px 18px rgba(15, 23, 42, .08);
  }

  .pos-ticket-table-wrap {
    min-height: 260px;
    max-height: 260px;
  }
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--brand-border);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.alert-sm {
  padding: .25rem .4rem;
}


.quick-action-icon {
  font-size: 1.5rem;
}

.glass-card,
.card {
  border-radius: 1.25rem;
}

.student-photo-preview {
  width: 148px;
  height: 148px;
  border-radius: 1.25rem;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

.table-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
}

.avatar-lg {
  width: 74px;
  height: 74px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: .9rem;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .16);
  margin-top: .3rem;
}

.report-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.report-shortcuts a {
  text-decoration: none;
  color: var(--brand-primary);
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: .65rem 1rem;
}

.menu-section {
  margin-bottom: .9rem;
}

.menu-section span {
  display: block;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: .2rem;
}

.menu-section p {
  margin-bottom: 0;
}

.min-vh-75 {
  min-height: 75vh;
}

.footer-app {
  border-top: 1px solid rgba(148, 163, 184, .25);
}

.mobile-tabbar {
  display: none;
}

.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(1.5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.is-page-loading .page-loading-overlay {
  opacity: 1;
  pointer-events: auto;
}

.page-loading-card {
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .95rem 1.1rem;
  border-radius: .9rem;
  border: 1px solid #dbeafe;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
}

.page-loading-card .spinner-border {
  width: 1.15rem;
  height: 1.15rem;
  border-width: .16em;
}

.page-loading-text {
  font-weight: 600;
  color: #0f172a;
}

.success-modal-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 1.45rem;
}

@media (max-width: 767.98px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive > .table {
    min-width: 100%;
    white-space: normal;
  }

  .admin-table-shell > .table,
  .report-section .table-responsive > .table,
  .pos-ticket-table-wrap > .table {
    min-width: 680px;
    white-space: nowrap;
  }

  .table-responsive.table-mobile-medium > .table {
    min-width: 560px;
  }

  .table-responsive.table-mobile-wide > .table {
    min-width: 760px;
    white-space: nowrap;
  }
}