/* ============================================
   IDGEN PRODUCTS Admin - Custom Styles
   ============================================ */

:root {
  --primary: #0A4293;
  --primary-dark: #072F5F;
  --primary-light: #4A7FC4;
  --secondary: #06b6d4;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #0A4293;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --topbar-bg: #ffffff;
  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --sidebar-width: 260px;
  --topbar-height: 65px;
  --transition: all 0.25s ease;
  --shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
}

/* ---- Reset & Base ---- */
.admin-body, .admin-body *, .admin-body *::before, .admin-body *::after { box-sizing: border-box; }

.admin-body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: var(--body-bg);
  color: var(--text-dark);
  margin: 0;
  overflow-x: hidden;
}

.admin-body a { text-decoration: none; }

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  min-height: var(--topbar-height);
}
.brand-icon {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.brand-sub  { color: var(--sidebar-text); font-size: .72rem; letter-spacing: .04em; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.nav-section-title {
  color: var(--sidebar-text);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 12px 20px 6px;
  display: block;
}

.nav-item { list-style: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--sidebar-text);
  border-radius: 0;
  transition: var(--transition);
  font-size: .875rem;
  font-weight: 500;
  position: relative;
  white-space: nowrap;
}
.nav-link i { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-link:hover {
  color: #fff;
  background: var(--sidebar-hover);
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(10,66,147,.35) 0%, rgba(10,66,147,.15) 100%);
  border-left: 3px solid var(--primary);
}
.nav-link.active i { color: var(--primary-light); }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.sidebar-user .user-info .name { color: #fff; font-size: .82rem; font-weight: 600; }
.sidebar-user .user-info .role { color: var(--sidebar-text); font-size: .7rem; }

/* ============================================
   MAIN WRAPPER
   ============================================ */
#main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* ============================================
   TOPBAR
   ============================================ */
#topbar {
  position: sticky; top: 0;
  background: var(--topbar-bg);
  height: var(--topbar-height);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* Toggle btn */
#sidebarToggle {
  background: none; border: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}
#sidebarToggle:hover { background: var(--body-bg); color: var(--text-dark); }

/* Search */
.topbar-search {
  position: relative;
  flex: 1; max-width: 360px;
}
.topbar-search i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem;
}
.topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--body-bg);
  font-size: .85rem;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; }

/* Icon buttons */
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  background: none; border: none;
}
.icon-btn:hover { background: var(--body-bg); color: var(--text-dark); }
.icon-btn .badge-dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* Topbar avatar */
.topbar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .82rem;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-avatar:hover { opacity: .85; }

/* Page title breadcrumb */
.page-title-area { display: flex; flex-direction: column; }
.page-main-title { font-size: .9rem; font-weight: 600; color: var(--text-dark); line-height: 1.2; }
.page-breadcrumb { font-size: .72rem; color: var(--text-muted); }

/* ============================================
   CONTENT
   ============================================ */
#content {
  flex: 1;
  padding: 24px;
}

/* Page header */
.page-header {
  margin-bottom: 24px;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.page-header h2 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-dark); margin: 0;
}
.page-header p { color: var(--text-muted); margin: 4px 0 0; font-size: .875rem; }

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.stat-icon.blue   { background: #eff6ff; color: #3b82f6; }
.stat-icon.green  { background: #f0fdf4; color: var(--success); }
.stat-icon.yellow { background: #fffbeb; color: var(--warning); }
.stat-icon.purple { background: #f5f3ff; color: var(--primary); }
.stat-icon.cyan   { background: #ecfeff; color: var(--secondary); }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }

.stat-number {
  font-size: 1.9rem; font-weight: 700;
  color: var(--text-dark); line-height: 1;
  margin-bottom: 4px;
}
.stat-label { color: var(--text-muted); font-size: .8rem; font-weight: 500; }
.stat-change {
  margin-top: 10px;
  font-size: .75rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============================================
   CARDS
   ============================================ */
.admin-body .card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.admin-body .card-header {
  background: none;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.admin-body .card-header h5 { font-size: .95rem; font-weight: 700; margin: 0; color: var(--text-dark); }
.admin-body .card-body { padding: 20px; }

/* ============================================
   TABLE
   ============================================ */
.table-wrapper { overflow-x: auto; }
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}
.custom-table th {
  background: var(--body-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.custom-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  vertical-align: middle;
}
.custom-table tr:last-child td { border-bottom: none; }
.custom-table tbody tr { transition: var(--transition); }
.custom-table tbody tr:hover { background: #f8fafc; }

/* ============================================
   BADGES
   ============================================ */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem; font-weight: 600;
}
.badge-status::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-active  { background: #f0fdf4; color: var(--success); }
.badge-pending { background: #fffbeb; color: var(--warning); }
.badge-expired { background: #fef2f2; color: var(--danger); }
.badge-inactive{ background: #f8fafc; color: var(--text-muted); }
.badge-trial   { background: #f5f3ff; color: var(--primary); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-custom:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,66,147,.4); color: #fff; }

.btn-outline-custom {
  background: none;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-custom:hover { background: var(--primary); color: #fff; }

.btn-sm-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.btn-sm-icon:hover { background: var(--body-bg); }
.btn-sm-icon.edit:hover  { color: var(--primary); border-color: var(--primary); }
.btn-sm-icon.del:hover   { color: var(--danger);  border-color: var(--danger); }
.btn-sm-icon.view:hover  { color: var(--success); border-color: var(--success); }

/* ============================================
   AVATAR
   ============================================ */
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem; color: #fff;
  flex-shrink: 0;
}

/* ============================================
   CHART AREA
   ============================================ */
.chart-container { position: relative; }

/* ============================================
   MINI PROGRESS
   ============================================ */
.mini-progress { height: 6px; border-radius: 3px; background: var(--border-color); overflow: hidden; }
.mini-progress .fill { height: 100%; border-radius: 3px; transition: width .6s ease; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(10,66,147,.3) 0%, transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(6,182,212,.2) 0%, transparent 60%);
}
.login-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 25px 50px rgba(0,0,0,.4);
  position: relative; z-index: 1;
}
.login-logo-centered {
  text-align: center;
  margin-bottom: 30px;
}
.login-logo-img {
  height: 48px;
  width: auto;
  max-width: 100%;
}
.login-logo-centered .sub {
  font-size: .72rem;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 8px;
}
.login-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.login-sub   { font-size: .875rem; color: var(--text-muted); margin-bottom: 28px; }

.form-label-custom {
  font-size: .8rem; font-weight: 600;
  color: var(--text-dark);
  display: block; margin-bottom: 6px;
}
.input-wrapper { position: relative; }
.input-wrapper i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem;
}
.input-custom {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text-dark);
  background: #fff;
  outline: none;
  transition: var(--transition);
}
.input-custom:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,66,147,.1); }
.input-custom.has-toggle { padding-right: 42px; }
.toggle-password {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: .9rem; padding: 4px;
}
.toggle-password:hover { color: var(--text-dark); }
.remember-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 20px;
}
.check-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .83rem; color: var(--text-muted); cursor: pointer;
}
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(10,66,147,.45); }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--text-muted); font-size: .78rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border-color);
}
.login-footer-text { text-align: center; font-size: .78rem; color: var(--text-muted); margin-top: 22px; }
.login-error {
  background: #fef2f2; color: var(--danger);
  border: 1px solid #fecaca; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .82rem; font-weight: 600;
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.login-success {
  background: #f0fdf4; color: var(--success);
  border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .82rem; font-weight: 600;
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.forgot-password-link { text-align: right; margin: -6px 0 14px; }
.forgot-password-link a { font-size: .8rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.forgot-password-link a:hover { text-decoration: underline; }

/* ============================================
   CARD TEMPLATE GRID
   ============================================ */
.template-card-item {
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  background: #fff;
}
.template-card-item:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.template-card-item.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,66,147,.2); }
.template-preview {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.id-card-mock {
  width: 200px; height: 120px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0A4293, #072F5F);
  padding: 14px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  position: relative; overflow: hidden;
}
.id-card-mock::after {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
}
.id-card-mock .card-chip {
  width: 28px; height: 22px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  border-radius: 4px; margin-bottom: 8px;
}
.id-card-mock .card-name { font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.id-card-mock .card-num  { font-size: .62rem; letter-spacing: .12em; opacity: .8; margin-top: 4px; }
.template-info { padding: 12px 16px 14px; }
.template-info h6 { font-weight: 700; font-size: .875rem; margin: 0 0 4px; }
.template-info p  { font-size: .75rem; color: var(--text-muted); margin: 0; }

/* ============================================
   SETTINGS
   ============================================ */
.settings-tabs .nav-link {
  color: var(--text-muted);
  border: none; border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 18px;
  font-weight: 600; font-size: .85rem;
}
.settings-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }
.settings-section-title {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 16px; margin-top: 20px;
}

/* Toggle Switch */
.toggle-switch { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.toggle-switch:last-child { border-bottom: none; }
.toggle-switch label { font-size: .88rem; font-weight: 600; color: var(--text-dark); margin: 0; cursor: pointer; }
.toggle-switch small  { font-size: .75rem; color: var(--text-muted); }
.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: #e2e8f0;
  border-radius: 24px; cursor: pointer;
  transition: var(--transition);
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============================================
   MEDIA UPLOAD (Products / Packages)
   ============================================ */
.existing-media-item { position: relative; width: 74px; height: 74px; }
.existing-media-item img,
.existing-media-item video { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); }
.existing-media-item .remove-media-btn {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; border: 2px solid #fff;
  font-size: .7rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}

/* Specifications/Options rows (EditProduct/Edit package forms) reuse .existing-media-item for its
   chip look, but hold variable-length text rather than a fixed-size image/video - the 74x74 box
   and corner-badge remove button above clip and overlap that content. These overrides (same
   specificity, later in source order, so they win without !important) turn the row back into a
   normal auto-height flex row and put the remove button back in normal flow instead of absolute. */
.existing-media-item.spec-row,
.existing-media-item.option-row {
  width: 100%;
  height: auto;
  position: static;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}
.existing-media-item.spec-row .remove-media-btn,
.existing-media-item.option-row .remove-media-btn {
  position: static;
  flex-shrink: 0;
}

/* ============================================
   PRINTER CONFIG
   ============================================ */
.printer-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  background: #fff;
}
.printer-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.printer-card.active-printer { border-color: var(--success); background: #f0fdf4; }
.printer-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 12px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--primary);
  margin-bottom: 12px;
}
.printer-card.active-printer .printer-icon-wrap { background: #dcfce7; color: var(--success); }

/* ============================================
   RESPONSIVE SIDEBAR COLLAPSE
   ============================================ */
.sidebar-collapsed #sidebar   { width: 70px; }
.sidebar-collapsed .brand-name,
.sidebar-collapsed .brand-sub,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .nav-badge,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .sidebar-footer .user-info { display: none !important; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 22px 15px; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 13px; }
.sidebar-collapsed .sidebar-user { justify-content: center; }
.sidebar-collapsed #main-wrapper { margin-left: 70px; }

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
  #sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    z-index: 1060;
  }
  #sidebar.show { transform: translateX(0); }
  #sidebar.show + .sidebar-overlay { display: block; }
  #main-wrapper { margin-left: 0 !important; }
  .sidebar-collapsed #sidebar { transform: translateX(-100%); }

  #content { padding: 16px; }
  .stat-number { font-size: 1.5rem; }
  .login-card { padding: 30px 24px; }
}

@media (max-width: 575.98px) {
  .page-header { flex-direction: column; }
  .topbar-search { display: none; }
  .id-card-mock { width: 170px; height: 100px; }
  .login-card { padding: 26px 18px; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary-custom { color: var(--primary) !important; }
.text-success-custom { color: var(--success) !important; }
.text-warning-custom { color: var(--warning) !important; }
.text-danger-custom  { color: var(--danger)  !important; }
.bg-body-custom      { background: var(--body-bg) !important; }
.rounded-custom      { border-radius: var(--radius) !important; }
.font-weight-700     { font-weight: 700 !important; }

/* Scrollbar */
.admin-body::-webkit-scrollbar { width: 6px; height: 6px; }
.admin-body::-webkit-scrollbar-track { background: var(--body-bg); }
.admin-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.admin-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .4s ease both; }
.fade-in-up-1 { animation-delay: .05s; }
.fade-in-up-2 { animation-delay: .1s; }
.fade-in-up-3 { animation-delay: .15s; }
.fade-in-up-4 { animation-delay: .2s; }
