/* ==========================================================================
   KaroAlert Admin Web Dashboard Stylesheet
   Theme: Top Navigation Bar Navbar + Modern Dark Glassmorphism
   ========================================================================== */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --bg-dark: #080c14;
  --bg-card: #111827;
  --bg-card-hover: #1f293d;
  --bg-navbar: #0d1322;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: #ff6d00;

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-orange: #ff6d00;
  --accent-orange-hover: #ff851a;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

.text-orange {
  color: var(--accent-orange) !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-danger {
  color: var(--accent-rose) !important;
}

.text-warning {
  color: var(--accent-amber) !important;
}

.text-success {
  color: var(--accent-emerald) !important;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.border-top {
  border-top: 1px solid var(--border-color);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-align {
  display: flex;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast-error {
  border-left: 4px solid var(--accent-rose);
}

.toast-info {
  border-left: 4px solid var(--accent-blue);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Auth Screen */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #172033 0%, #080c14 80%);
  padding: 20px;
}

.auth-card {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-brand .brand-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-orange), #ff9e40);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(255, 109, 0, 0.3);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label i {
  margin-right: 6px;
  color: var(--accent-orange);
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control.sm {
  padding: 7px 12px;
  font-size: 0.88rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 109, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 109, 0, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-orange);
}

.btn-danger {
  background: var(--accent-rose);
  color: #fff;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--text-primary);
}

/* ── LEFT SIDEBAR NAVIGATION & LAYOUT ───────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-main);
  overflow-x: hidden;
}

/* Left Sidebar */
.sidebar-nav {
  width: 250px;
  min-width: 250px;
  background: #0b111e;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 600;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: #ffffff;
}

.brand-tag {
  background: rgba(255, 109, 0, 0.2);
  color: var(--accent-orange);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mobile-sidebar-close {
  display: none;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  -webkit-overflow-scrolling: touch;
}

.nav-category {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 12px 4px;
  margin-top: 4px;
}

.nav-menu-vertical {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-menu-vertical .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.nav-menu-vertical .nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.nav-menu-vertical .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-menu-vertical .nav-item.active {
  background: linear-gradient(135deg, rgba(255, 109, 0, 0.22), rgba(255, 109, 0, 0.08));
  color: var(--accent-orange);
  border: 1px solid rgba(255, 109, 0, 0.35);
  box-shadow: var(--shadow-sm);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.admin-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-info .admin-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-info .admin-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Main Wrapper Layout */
.main-wrapper {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 250px);
}

.top-header-bar {
  height: 60px;
  background: var(--bg-navbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 400;
}

.mobile-toggle-btn {
  display: none;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.top-header-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-emerald);
}

color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.9rem;
}

.admin-name {
  font-weight: 600;
  font-size: 0.88rem;
}

/* Body Container */
.main-body {
  flex: 1;
  padding: 28px 24px;
}

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Metrics Cards ──────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.gradient-blue .metric-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.gradient-emerald .metric-icon {
  background: linear-gradient(135deg, #10b981, #047857);
}

.gradient-purple .metric-icon {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.gradient-amber .metric-icon {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.gradient-rose .metric-icon {
  background: linear-gradient(135deg, #f43f5e, #be123c);
}

.gradient-cyan .metric-icon {
  background: linear-gradient(135deg, #06b6d4, #0e7490);
}

.metric-info .metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-info .metric-value {
  font-size: 1.65rem;
  margin-top: 2px;
}

/* ── Cards & Tables ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 20px 22px;
}

.quick-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  padding-left: 40px;
  height: 38px;
}

/* Segmented Filter Control (Matching Mobile App) */
.segmented-control {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.segmented-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.segmented-btn:hover {
  color: var(--text-primary);
}

.segmented-btn.active {
  background: var(--accent-orange);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

/* Switch Toggle Button */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .2s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--accent-emerald);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* ── Modal Dialogs ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-dialog.modal-lg {
  max-width: 960px;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.modal-body {
  padding: 22px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border-color);
}

/* Authentic KaroAlert QR Sticker Card (Matching Mobile Component) */
.karo-sticker-card {
  background: linear-gradient(135deg, #111827, #1f293d);
  border: 2px solid var(--accent-orange);
  border-radius: 20px;
  padding: 24px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.sticker-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sticker-logo-box {
  width: 42px;
  height: 42px;
  background: var(--accent-orange);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.sticker-title-box {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.sticker-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
}

.sticker-tagline {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.sticker-qr-box {
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  width: 170px;
  height: 170px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-code-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 14px;
}

.sticker-code-badge code {
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--accent-orange);
  font-weight: 700;
}

.sticker-notice-box {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

/* Printable Batch Grid (Using Official Template Image karoalertpdf.png) */
.stickers-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 840px;
  margin: 0 auto;
}

.a4-print-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 14px;
  padding: 20px;
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.a4-page-header-label {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ea580c !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1.5px dashed #cbd5e1 !important;
}

.karo-pdf-template-card {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1774 / 887 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  box-sizing: border-box !important;
}

.karo-pdf-template-card.bike-format {
  aspect-ratio: 1 / 1 !important;
}

.stickers-grid.bike-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

.karo-pdf-template-card.bike-format {
  aspect-ratio: 1 / 1 !important;
}

.karo-pdf-template-card.bike-format .white-box-content {
  position: absolute !important;
  top: 44.8% !important;
  left: 57.7% !important;
  width: 18.6% !important;
  height: 18.6% !important;
  background: #ffffff !important;
  border-radius: 3px !important;
  padding: 1px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.karo-pdf-template-card.bike-format .white-box-content .box-header-title,
.karo-pdf-template-card.bike-format .white-box-content .box-header-sub {
  display: none !important;
}

.karo-pdf-template-card.bike-format .white-box-content .box-qr-wrap {
  width: 100% !important;
  height: 100% !important;
}

.a4-print-page.bike-page {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(5, 1fr) !important;
  gap: 6px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
}

.karo-pdf-template-card .card-bg-template {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  display: block !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.karo-pdf-template-card .white-box-content {
  position: absolute !important;
  top: 6.5% !important;
  left: 63.36% !important;
  width: 30.61% !important;
  height: 62.2% !important;
  background: #E0F2FE !important;
  border-top-left-radius: 6px !important;
  border-top-right-radius: 6px !important;
  padding: 4px 2px 2px 2px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.karo-pdf-template-card .white-box-content .box-header-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #ea580c !important;
  line-height: 1.1 !important;
  margin-bottom: 1px !important;
  letter-spacing: -0.2px !important;
}

.karo-pdf-template-card .white-box-content .box-header-sub {
  font-family: system-ui, sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
}

.karo-pdf-template-card .white-box-content .box-qr-wrap {
  width: 100% !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.karo-pdf-template-card .white-box-content .box-qr-wrap img,
.karo-pdf-template-card .white-box-content .box-qr-wrap canvas,
.karo-pdf-template-card .white-box-content .box-qr-wrap svg {
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
}

.karo-pdf-template-card .qr-id-overlay {
  display: none !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body * {
    visibility: hidden;
  }

  .no-print,
  header,
  .top-header-bar,
  .sidebar-nav,
  .modal-header,
  .modal-footer,
  .a4-page-header-label {
    display: none !important;
  }

  #modal-print-preview,
  #modal-print-preview * {
    visibility: visible;
  }

  #modal-print-preview {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 210mm !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .modal-dialog {
    max-width: 210mm !important;
    width: 210mm !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .modal-body {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .stickers-grid {
    display: block !important;
    width: 210mm !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .a4-print-page {
    display: grid !important;
    grid-template-columns: repeat(2, 105mm) !important;
    grid-template-rows: repeat(4, 74.25mm) !important;
    gap: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: none !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    overflow: hidden !important;
  }

  .a4-print-page:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .karo-pdf-template-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    width: 105mm !important;
    height: 74.25mm !important;
    max-height: 74.25mm !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ── COMPREHENSIVE RESPONSIVE STYLES ───────────────────────────────── */

/* Smooth Touch Scrolling */
.nav-menu,
.segmented-control,
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 109, 0, 0.4) rgba(0, 0, 0, 0.2);
}

.nav-menu::-webkit-scrollbar,
.segmented-control::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 4px;
}

.nav-menu::-webkit-scrollbar-thumb,
.segmented-control::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 4px;
}

/* Laptops & Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .navbar-container {
    padding: 0 16px;
  }

  .main-body {
    padding: 20px 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets & Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .navbar-container {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }

  .nav-brand {
    order: 1;
  }

  .nav-right {
    order: 2;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
  }

  .nav-item {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .metric-card {
    padding: 16px;
    gap: 12px;
  }

  .metric-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .metric-info .metric-value {
    font-size: 1.35rem;
  }

  .card-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-body {
    padding: 16px;
  }

  .search-box {
    width: 100%;
  }

  .filter-tabs-row,
  .action-bar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .segmented-control {
    width: 100%;
    max-width: 100%;
  }

  .selection-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  .modal-dialog {
    max-width: 95%;
    margin: 10px auto;
  }

  .auth-card {
    padding: 28px 20px;
  }
}

/* Small Smartphone Screens (max-width: 480px) */
@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .admin-name {
    display: none;
  }

  .brand-tag {
    display: none;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .karo-sticker-card {
    max-width: 280px;
    padding: 18px;
  }

  .sticker-qr-box {
    width: 140px;
    height: 140px;
  }

  .sticker-qr-box canvas,
  .sticker-qr-box img {
    width: 140px !important;
    height: 140px !important;
  }
}