/* =====================================================================
   THEME: Voucher & Ticket Management App style
   Deep blue primary, rounded icon-badge cards, dark sidebar, bottom nav
   ===================================================================== */

:root {
  --primary: #1565C0;
  --primary-dark: #0D47A1;
  --primary-light: #1E88E5;
  --sidebar-bg: #17212B;
  --sidebar-bg-active: #1565C0;
  --success: #2E7D32;
  --warning: #F57C00;
  --danger: #E53935;
  --purple: #6A1B9A;
  --card-radius: 16px;
  --body-bg: #F0F4F9;
}

body {
  background: var(--body-bg);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { text-decoration: none; }

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 600; }

/* ---------------- Cards ---------------- */
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(20, 30, 60, 0.06);
}
.card-header { background: transparent; border-bottom: 1px solid #eef1f6; font-weight: 600; border-radius: var(--card-radius) var(--card-radius) 0 0 !important; }

/* ---------------- Stat cards (dashboard icon-badge style) ---------------- */
.stat-card { border-radius: var(--card-radius); border: none; box-shadow: 0 2px 12px rgba(20, 30, 60, 0.06); height: 100%; }
.stat-card .card-body { display: flex; align-items: center; gap: 14px; padding: 1.1rem; }
.stat-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1.1; margin: 0; }
.stat-label { color: #8a94a6; font-size: .8rem; margin: 0; }

.bg-icon-blue   { background: var(--primary); }
.bg-icon-green  { background: var(--success); }
.bg-icon-orange { background: var(--warning); }
.bg-icon-purple { background: var(--purple); }
.bg-icon-red    { background: var(--danger); }
.bg-icon-teal   { background: #00897B; }

/* Status badges (Draft / Printed / Cancelled style) */
.badge-status { border-radius: 20px; padding: .35em .8em; font-weight: 600; font-size: .72rem; }

/* ---------------- Dark sidebar (desktop) ---------------- */
.app-sidebar {
  background: var(--sidebar-bg);
  min-height: 100vh;
  width: 250px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
}
.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .25rem 1.5rem;
}
.brand .brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.72);
  border-radius: 10px;
  margin-bottom: 4px;
  padding: .65rem .9rem;
  display: flex; align-items: center; gap: .75rem;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--sidebar-bg-active); color: #fff; }
.sidebar-nav .nav-link.text-danger { color: #ff8a80 !important; }
.sidebar-nav .nav-link.text-danger:hover { background: rgba(255,138,128,.12); }
.badge.soon { background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); font-weight: 500; }

/* Mobile offcanvas drawer reuses the same dark theme */
#mobileSidebar { background: var(--sidebar-bg); width: 260px; }
#mobileSidebar .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.08); }

/* ---------------- Top bar ---------------- */
.app-topbar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(20,30,60,.05);
  padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.app-topbar h5 { margin: 0; font-weight: 700; }
.app-topbar .user-chip { display: flex; align-items: center; gap: .6rem; }
.app-topbar .user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}

/* ---------------- Mobile bottom nav ---------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(20,30,60,.08);
  display: flex; justify-content: space-around;
  padding: .5rem 0 .35rem;
  z-index: 1030;
}
.bottom-nav a { color: #8a94a6; text-align: center; font-size: .68rem; flex: 1; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav i { display: block; font-size: 1.25rem; margin-bottom: 2px; }

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}
@media (max-width: 767.98px) {
  .app-sidebar { display: none; }
  body { padding-bottom: 74px; }
  .app-topbar h5 { font-size: 1rem; }
}

/* ---------------- Login / auth pages ---------------- */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.auth-card { border-radius: 20px; border: none; box-shadow: 0 15px 45px rgba(0,0,0,.25); overflow: hidden; }
.auth-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem;
  margin: 0 auto 1rem;
}

/* Auto-dismiss alerts fade */
.alert { border-radius: 12px; border: none; }
