/* =============================================================
   NihalSports — Design System
   Light default + Dark mode support
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700&display=swap');

/* ── CSS VARIABLES ───────────────────────────────────────────── */
:root {
  /* Primary palette */
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #a5b4fc;
  --primary-bg:    #eef2ff;

  /* Status colors */
  --success:     #10b981;
  --success-bg:  #d1fae5;
  --warning:     #f59e0b;
  --warning-bg:  #fef3c7;
  --danger:      #ef4444;
  --danger-bg:   #fee2e2;
  --info:        #3b82f6;
  --info-bg:     #dbeafe;

  /* Light theme surfaces */
  --bg-body:     #f1f5f9;
  --bg-card:     #ffffff;
  --bg-sidebar:  #0f172a;
  --bg-topbar:   #ffffff;
  --bg-hover:    #f8fafc;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* Sidebar specific */
  --sidebar-text:        #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover-bg:    rgba(255,255,255,0.06);
  --sidebar-active-bg:   rgba(99,102,241,0.85);
  --sidebar-icon:        #64748b;

  /* Borders */
  --border:       #e2e8f0;
  --border-focus: #6366f1;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  /* Layout */
  --sidebar-w:      240px;
  --topbar-h:       58px;
  --border-radius:  8px;
  --border-radius-sm: 5px;
  --border-radius-lg: 14px;
  --transition:     all 0.2s ease;
}

/* ── DARK THEME ──────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-body:     #0f172a;
  --bg-card:     #1e293b;
  --bg-sidebar:  #020617;
  --bg-topbar:   #1e293b;
  --bg-hover:    #334155;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --border:     #334155;
  --shadow:     0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg:  0 10px 15px rgba(0,0,0,0.4);

  --primary-bg: rgba(99,102,241,0.15);
  --success-bg: rgba(16,185,129,0.15);
  --warning-bg: rgba(245,158,11,0.15);
  --danger-bg:  rgba(239,68,68,0.15);
  --info-bg:    rgba(59,130,246,0.15);
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-body);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
  min-height: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  height: 100vh;
  /* Glassy gradient effect */
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(2, 6, 23, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-brand img { height: 38px; object-fit: contain; }
.sidebar-brand .brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
  letter-spacing: -0.3px;
}
.sidebar-brand .brand-sub {
  font-size: 0.7rem;
  color: var(--sidebar-icon);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-item i {
  width: 18px;
  font-size: 1rem;
  color: var(--sidebar-icon);
  transition: color 0.2s;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: #e2e8f0;
  border-left-color: rgba(99,102,241,0.5);
}

.nav-item:hover i { color: #a5b4fc; }

.nav-item.active {
  background: linear-gradient(90deg, rgba(99,102,241,0.25), rgba(99,102,241,0.08));
  color: #fff;
  border-left-color: var(--primary);
}

.nav-item.active i { color: #a5b4fc; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-user-info .name { font-size: 0.8rem; font-weight: 600; color: #e2e8f0; }
.sidebar-user-info .role-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-light);
}

/* ── TOPBAR ──────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100% - var(--sidebar-w));
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s;
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.25rem;
  padding: 6px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.topbar-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
}

.topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.topbar-outlet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

[data-theme="dark"] .topbar-outlet-badge { color: var(--primary-light); }

/* ── PAGE CONTENT ────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 18px 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.page-header-left h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.page-header-left p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transition: background 0.3s, border-color 0.3s;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { color: var(--primary); }

.card-body { padding: 18px 20px; }
.card-body-sm { padding: 12px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

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

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-bg); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.danger  { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.info    { background: var(--info-bg);     color: var(--info); }

.stat-info .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-family: 'Outfit', sans-serif;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.stat-info .stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── GRID SYSTEM ─────────────────────────────────────────────── */
.row {
  display: grid;
  gap: 18px;
}

.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-4 { grid-template-columns: repeat(4, 1fr); }
.col-6-4 { grid-template-columns: 3fr 2fr; }
.col-7-3 { grid-template-columns: 7fr 3fr; }

/* ── TABLES ──────────────────────────────────────────────────── */
.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--border-radius);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-hover);
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

table.data-table, table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

table.data-table thead, table.table thead {
  background: var(--bg-hover);
}

table.data-table th, table.table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}

table.data-table td, table.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  line-height: 1.4;
  font-size: 0.82rem;
}

table.data-table tbody tr:hover, table.table tbody tr:hover { background: var(--bg-hover); }
table.data-table tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: none; }

.table-actions { display: flex; gap: 4px; align-items: center; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--border-radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-info { background: var(--info); color: #fff; border-color: var(--info); }
.btn-info:hover { background: #2563eb; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 5px 8px;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 4px 8px; font-size: 0.74rem; }
.btn-lg { padding: 9px 20px; font-size: 0.95rem; font-weight: 600; }
.btn-icon { padding: 5px; border-radius: var(--border-radius-sm); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }
.badge-success { background: var(--success-bg); color: #065f46; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger  { background: var(--danger-bg);  color: #991b1b; }
.badge-info    { background: var(--info-bg);    color: #1e40af; }
.badge-gray    { background: var(--bg-hover);   color: var(--text-secondary); border: 1px solid var(--border); }

[data-theme="dark"] .badge-success { color: #6ee7b7; }
[data-theme="dark"] .badge-warning { color: #fcd34d; }
[data-theme="dark"] .badge-danger  { color: #fca5a5; }
[data-theme="dark"] .badge-info    { color: #93c5fd; }
[data-theme="dark"] .badge-primary { color: var(--primary-light); }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 6px 10px;
  height: 35px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.7; cursor: not-allowed; background: var(--bg-hover); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-control-file {
  width: 100%;
  padding: 8px;
  border: 2px dashed var(--border);
  border-radius: var(--border-radius-sm);
  background: var(--bg-hover);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}
.form-control-file:hover { border-color: var(--primary); }

.form-grid { display: grid; gap: 0 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
  border-right: none;
  flex: 1;
}

.input-group .btn {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  border-left: none;
}

.input-addon {
  padding: 9px 13px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid;
}

.alert i { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert .alert-close { margin-left: auto; cursor: pointer; opacity: 0.7; background: none; border: none; font-size: 1rem; color: inherit; }
.alert .alert-close:hover { opacity: 1; }

.alert-success { background: var(--success-bg); color: #065f46; border-color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: #1e40af; border-color: var(--info); }

[data-theme="dark"] .alert-success { color: #a7f3d0; }
[data-theme="dark"] .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .alert-warning { color: #fde68a; }
[data-theme="dark"] .alert-info    { color: #bfdbfe; }

/* ── MODALS ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-lg { max-width: 760px; }
.modal-xl { max-width: 1000px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i { color: var(--primary); }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── TOAST NOTIFICATIONS ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-text { font-size: 0.875rem; color: var(--text-primary); flex: 1; }
.toast-close { color: var(--text-muted); cursor: pointer; background: none; border: none; font-size: 1rem; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── SEARCH & FILTER BAR ──────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

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

.search-box .form-control { padding-left: 36px; }

/* ── EMPTY STATE ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p  { font-size: 0.875rem; }

/* ── AVATAR ──────────────────────────────────────────────────── */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.2rem; }
.avatar-xl { width: 90px; height: 90px; font-size: 1.8rem; }

/* ── TABS ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── PROGRESS ─────────────────────────────────────────────────── */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.6s ease;
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ── ITEM PHOTO PREVIEW ──────────────────────────────────────── */
.photo-preview {
  width: 70px;
  height: 70px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.photo-preview:hover { transform: scale(1.05); }

/* ── POS / BILLING ───────────────────────────────────────────── */
.pos-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  gap: 18px;
  height: calc(100vh - var(--topbar-h) - 40px);
}

.pos-items-panel {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pos-bill-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  max-height: calc(100vh - var(--topbar-h) - 30px);
  overflow-y: auto;
}

.pos-bill-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.pos-bill-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.pos-bill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--border-radius-sm);
  border-bottom: 1px solid var(--border);
}

.pos-bill-item:last-child { border-bottom: none; }
.pos-bill-item-name { flex: 1; font-size: 0.8rem; font-weight: 500; }
.pos-bill-item-qty { display: flex; align-items: center; gap: 6px; }
.pos-qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}
.pos-qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pos-bill-item-price { font-weight: 600; font-size: 0.875rem; min-width: 70px; text-align: right; }

.pos-bill-footer {
  padding: 16px;
  border-top: 2px solid var(--border);
  background: var(--bg-hover);
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 3px 0;
  color: var(--text-secondary);
}

.pos-total-row.grand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}

/* ── PRINT BILL ──────────────────────────────────────────────── */
.bill-container {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  color: #000;
  padding: 40px;
  font-family: 'Inter', sans-serif;
}

.bill-header { text-align: center; margin-bottom: 24px; }
.bill-logo { height: 50px; }
.bill-title { font-size: 1.5rem; font-weight: 800; margin: 8px 0 4px; }
.bill-subtitle { color: #666; font-size: 0.85rem; }
.bill-divider { border: none; border-top: 2px dashed #ddd; margin: 16px 0; }
.bill-info-row { display: flex; justify-content: space-between; margin-bottom: 20px; font-size: 0.875rem; }
.bill-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.875rem; }
.bill-table th { background: #f1f5f9; padding: 10px 12px; text-align: left; font-size: 0.75rem; text-transform: uppercase; }
.bill-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; }
.bill-totals { float: right; width: 220px; margin-top: 16px; font-size: 0.875rem; }
.bill-total-row { display: flex; justify-content: space-between; padding: 4px 0; }
.bill-grand { font-weight: 700; font-size: 1rem; border-top: 2px solid #000; padding-top: 8px; }
.bill-footer { text-align: center; color: #888; font-size: 0.8rem; margin-top: 40px; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .main-content { margin: 0; }
  .topbar, .sidebar { display: none; }
  .page-content { padding: 0; }
  .bill-container { box-shadow: none; }
}

/* ── LOW STOCK ALERT ─────────────────────────────────────────── */
.low-stock-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.low-stock-item:last-child { border-bottom: none; }
.low-stock-bar { flex: 1; }
.low-stock-name { font-size: 0.8rem; font-weight: 500; }
.low-stock-count { font-size: 0.75rem; color: var(--danger); font-weight: 600; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.app-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-topbar);
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-danger    { color: var(--danger) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.text-bold      { font-weight: 700; }
.text-sm        { font-size: 0.8rem; }
.text-xs        { font-size: 0.72rem; }
.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.mb-0           { margin-bottom: 0; }
.mb-8           { margin-bottom: 8px; }
.mb-16          { margin-bottom: 16px; }
.mb-24          { margin-bottom: 24px; }
.mt-8           { margin-top: 8px; }
.mt-16          { margin-top: 16px; }
.mt-24          { margin-top: 24px; }
.p-0            { padding: 0; }
.w-100          { width: 100%; }
.hr             { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .col-2, .col-3, .col-4 { grid-template-columns: 1fr 1fr; }
  .col-6-4, .col-7-3 { grid-template-columns: 1fr; }
  .pos-wrapper { grid-template-columns: 1fr; height: auto; }
  .pos-bill-panel { height: auto; max-height: 500px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
  }
  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: flex; }

  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .col-2, .col-3, .col-4 { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { flex-direction: column; }
  .search-box { width: 100%; }



}

/* ── LOGIN PAGE ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.login-bg-orb-1 {
  width: 400px; height: 400px;
  background: #6366f1;
  top: -100px; left: -100px;
}

.login-bg-orb-2 {
  width: 300px; height: 300px;
  background: #8b5cf6;
  bottom: -80px; right: -60px;
}

.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
  position: relative;
  z-index: 10;
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: 50px; }
.login-logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 12px;
}
.login-logo p { color: #64748b; font-size: 0.875rem; margin-top: 4px; }

.login-form .form-label { color: #334155; text-transform: none; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; }
.login-form .form-control {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  padding: 11px 14px;
}
.login-form .form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.login-form .form-control::placeholder { color: #94a3b8; }

.login-pw-wrap { position: relative; }
.login-pw-wrap .form-control { padding-right: 44px; }

.login-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
}
.login-pw-toggle:hover { color: #94a3b8; }

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border: none;
  border-radius: var(--border-radius-sm);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.login-btn:hover { opacity: 0.92; }
.login-btn:active { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-footer { text-align: center; margin-top: 24px; font-size: 0.8rem; color: #475569; }

/* ── CHART CONTAINERS ────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
}

/* ── POS LAYOUT ──────────────────────────────────────────────── */
.pos-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  gap: 18px;
  align-items: start;
}

.pos-items-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.pos-bill-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  max-height: calc(100vh - var(--topbar-h) - 30px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.pos-bill-header {
  padding: 16px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pos-bill-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  min-height: 100px;
  max-height: 280px;
}

.pos-bill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.pos-bill-item-name { flex: 1; font-size: 0.8rem; font-weight: 500; }
.pos-bill-item-qty  { display: flex; align-items: center; gap: 6px; }
.pos-bill-item-price { font-size: 0.875rem; font-weight: 700; color: var(--primary); min-width: 70px; text-align: right; }

.pos-qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1;
}
.pos-qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.pos-bill-footer { padding: 16px; border-top: 1px solid var(--border); }
.pos-total-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 0.875rem; }
.pos-total-row.grand { font-size: 1.1rem; font-weight: 800; color: var(--primary); padding-top: 10px; border-top: 2px solid var(--border); }

/* ── BILL STYLES (Printable) ─────────────────────────────────── */
.bill-container {
  background: #fff;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  color: #1e293b;
}

.bill-header { text-align: center; margin-bottom: 24px; }
.bill-logo { height: 50px; margin-bottom: 8px; }
.bill-title { font-size: 1.5rem; font-weight: 800; color: #0f172a; font-family: 'Outfit', sans-serif; }
.bill-subtitle { font-size: 0.9rem; color: #64748b; margin-top: 2px; }
.bill-divider { border: none; border-top: 1px solid #e2e8f0; margin: 20px 0; }

.bill-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.bill-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.875rem;
}
.bill-table th {
  background: #f1f5f9;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.bill-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.bill-table tbody tr:last-child td { border-bottom: none; }

.bill-totals {
  min-width: 250px;
}
.bill-total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.875rem; }
.bill-grand { font-size: 1.1rem; font-weight: 800; color: #0f172a; border-top: 2px solid #0f172a; padding-top: 10px; margin-top: 4px; }

.bill-footer { text-align: center; color: #94a3b8; font-size: 0.8rem; padding-top: 20px; }

/* ── LOW STOCK ITEMS ─────────────────────────────────────────── */
.low-stock-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.low-stock-bar { flex: 1; }
.low-stock-name { font-size: 0.8rem; font-weight: 500; }
.low-stock-count { font-size: 0.8rem; font-weight: 700; color: var(--danger); min-width: 50px; text-align: right; }

/* ── AVATAR ──────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-sm  { width: 32px;  height: 32px;  font-size: 0.85rem; }
.avatar-md  { width: 44px;  height: 44px;  font-size: 1rem; }
.avatar-lg  { width: 56px;  height: 56px;  font-size: 1.25rem; }
.avatar-xl  { width: 80px;  height: 80px;  font-size: 2rem; }

/* ── SEARCH BOX ──────────────────────────────────────────────── */
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; z-index: 1; pointer-events: none; }
.search-box .form-control { padding-left: 36px; }

/* ── PHOTO PREVIEW ───────────────────────────────────────────── */
.photo-preview {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
}

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar { height: 100%; border-radius: 99px; transition: width 0.4s ease; }
.progress-bar.danger  { background: var(--danger); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.success { background: var(--success); }

/* ── HR DIVIDER ──────────────────────────────────────────────── */
.hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── UTILITY CLASSES ─────────────────────────────────────────── */
.mb-0  { margin-bottom: 0 !important; }
.mb-8  { margin-bottom: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-24 { margin-bottom: 24px !important; }
.mt-8  { margin-top: 8px !important; }
.mt-16 { margin-top: 16px !important; }
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-primary { color: var(--primary) !important; }
.text-warning { color: var(--warning) !important; }
.text-bold    { font-weight: 700 !important; }
.text-sm      { font-size: 0.8rem !important; }
.w-100        { width: 100% !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .pos-wrapper { grid-template-columns: 1fr 300px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .topbar-menu-btn { display: flex; }
  .col-6-4, .col-7-3 { grid-template-columns: 1fr; }
  .pos-wrapper { grid-template-columns: 1fr; }
  .pos-bill-panel { position: static; max-height: none; }
  .page-content { padding: 18px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .col-2, .col-3, .col-4 { grid-template-columns: 1fr; }
  .bill-info-row { grid-template-columns: 1fr; }
  .bill-container { padding: 20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
}

/* ── RESPONSIVE FILTERS ──────────────────────────────────────── */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  align-items: flex-end;
}
@media (max-width: 768px) {
  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-form > div, 
  .filter-form > select, 
  .filter-form > input, 
  .filter-form > button, 
  .filter-form > a {
    width: 100% !important;
  }
  table.data-table {
    min-width: 700px;
  }
}

body, html {
  overflow-x: hidden;
  max-width: 100%;
}
.main-content {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100% - var(--sidebar-w));
  min-width: 0;
}
.page-content, .card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

