/*
 * VoucherBeam Dashboard Style Sheet
 * v3.0 — Compact · Refined Colors · High Legibility
 */

:root {
  /* ── Backgrounds ── */
  --bg-primary:        #0f1012;
  --bg-secondary:      #161719;
  --bg-card:           #1c1d20;
  --bg-card-hover:     #222327;
  --bg-input:          #121315;

  /* ── Borders ── */
  --border-glass:       rgba(255, 255, 255, 0.07);
  --border-glass-bright: rgba(255, 255, 255, 0.12);

  /* ── Text ── */
  --text-primary:   #f0f6ff;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;

  /* ── Accents ── */
  --accent-cyan:   #0066ff;
  --accent-blue:   #3b8bff;
  --accent-gold:   #f0a020;
  --accent-pink:   #e83090;
  --accent-green:  #00c490;
  --accent-red:    #f04060;
  --accent-purple: #9b55e8;
  --accent-orange: #f97316;

  /* ── Gradients ── */
  --gradient-cyan:  linear-gradient(135deg, #0066ff 0%, #4facfe 100%);
  --gradient-pink:  linear-gradient(135deg, #e83090 0%, #f05050 100%);
  --gradient-gold:  linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --gradient-green: linear-gradient(135deg, #00c490 0%, #059669 100%);
  --gradient-blue:  linear-gradient(135deg, #3b8bff 0%, #1d4ed8 100%);
  --gradient-dark:  linear-gradient(135deg, #0d1124 0%, #111e38 100%);

  /* ── Radii ── */
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm:  7px;
  --radius-xs:  4px;

  /* ── Shadows ── */
  --shadow-glow:    0 0 16px rgba(0, 102, 255, 0.18), 0 4px 20px rgba(0,0,0,0.4);
  --shadow-glow-sm: 0 0 8px rgba(0, 102, 255, 0.12);
  --shadow-card:    0 4px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);

  /* ── Transitions ── */
  --transition:      all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ─── Body & Animated Background ─── */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 8% 8%,  rgba(0,102,255,0.055) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 88%, rgba(232,48,144,0.045) 0%, transparent 55%),
    radial-gradient(ellipse 45% 38% at 50% 50%, rgba(79,172,254,0.030) 0%, transparent 60%);
  animation: meshDrift 22s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,  transparent, transparent 60px, rgba(255,255,255,0.035) 60px, rgba(255,255,255,0.035) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255,255,255,0.035) 60px, rgba(255,255,255,0.035) 61px);
  pointer-events: none;
  z-index: 0;
}

@keyframes meshDrift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(1%,-1.2%) scale(0.988); }
  100% { transform: translate(-1.2%,0.8%) scale(1.012); }
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: rgba(0,0,0,0.18); }
::-webkit-scrollbar-thumb        { background: rgba(0,102,255,0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(0,102,255,0.45); }

/* ─── Sidebar ─── */
.volta-sidebar {
  width: 248px;
  background: linear-gradient(180deg, rgba(22,23,25,1.0) 0%, rgba(15,16,18,1.0) 100%);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  box-shadow: 3px 0 24px rgba(0,0,0,0.4), inset -1px 0 0 rgba(255,255,255,0.035);
}

.volta-sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-cyan) 40%, #4facfe 60%, transparent 100%);
  opacity: 0.45;
}

.sidebar-logo {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 18%; right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,102,255,0.3), transparent);
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--gradient-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #030a12;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.logo-text {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0px;
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-menu {
  flex: 1;
  padding: 8px 6px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12.5px;
  transition: var(--transition);
  position: relative;
}

.menu-item a svg {
  width: 16px;
  height: 16px;
  opacity: 0.65;
  flex-shrink: 0;
  transition: var(--transition);
}

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

.menu-item a:hover svg {
  opacity: 1;
  color: var(--accent-cyan);
  transform: translateX(1px);
}

.menu-item.active a {
  color: var(--accent-cyan);
  background: linear-gradient(90deg, rgba(0,102,255,0.12) 0%, rgba(0,102,255,0.025) 100%);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.menu-item.active a svg {
  opacity: 1;
  color: var(--accent-cyan);
}

.menu-item.active a::after {
  content: '';
  position: absolute;
  right: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* ─── Sidebar Footer ─── */
.sidebar-footer {
  padding: 9px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── Main Content ─── */
.volta-main {
  flex: 1;
  margin-left: 248px;
  padding: 16px 20px;
  min-width: 0;
}

/* ─── Header ─── */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.header-title h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0px;
  margin-bottom: 2px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-title p {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

/* ─── Connection Status ─── */
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 30px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border-glass-bright);
  font-size: 12.5px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  letter-spacing: 0.15px;
  transition: var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  opacity: 0;
  animation: ringPulse 2.2s ease-out infinite;
}

.status-dot.connected          { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.status-dot.connected::after   { background: var(--accent-green); }
.status-dot.disconnected       { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }
.status-dot.disconnected::after { background: var(--accent-red); }

@keyframes ringPulse {
  0%   { transform: scale(0.8); opacity: 0.7; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-slow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 70px; height: 70px;
  border-radius: 0 var(--radius-lg) 0 70px;
  pointer-events: none;
  opacity: 0.55;
}

.stat-card.cyan::before  { background: linear-gradient(90deg, transparent, rgba(0,102,255,0.45), transparent); }
.stat-card.pink::before  { background: linear-gradient(90deg, transparent, rgba(232,48,144,0.45), transparent); }
.stat-card.gold::before  { background: linear-gradient(90deg, transparent, rgba(240,160,32,0.45), transparent); }
.stat-card.green::before { background: linear-gradient(90deg, transparent, rgba(0,196,144,0.45), transparent); }

.stat-card.cyan::after   { background: radial-gradient(circle at top right, rgba(0,102,255,0.09) 0%, transparent 70%); }
.stat-card.pink::after   { background: radial-gradient(circle at top right, rgba(232,48,144,0.09) 0%, transparent 70%); }
.stat-card.gold::after   { background: radial-gradient(circle at top right, rgba(240,160,32,0.09) 0%, transparent 70%); }
.stat-card.green::after  { background: radial-gradient(circle at top right, rgba(0,196,144,0.09) 0%, transparent 70%); }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08);
  background: var(--bg-card-hover);
}

.stat-card.cyan:hover  { box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 16px rgba(0,102,255,0.10); }
.stat-card.pink:hover  { box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 16px rgba(232,48,144,0.10); }
.stat-card.gold:hover  { box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 16px rgba(240,160,32,0.10); }
.stat-card.green:hover { box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 16px rgba(0,196,144,0.10); }

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.22);
}

.stat-card.cyan  .stat-card-icon { background: linear-gradient(135deg,rgba(0,102,255,0.16) 0%,rgba(0,102,255,0.05) 100%); color: var(--accent-cyan);   border: 1px solid rgba(0,102,255,0.18); }
.stat-card.pink  .stat-card-icon { background: linear-gradient(135deg,rgba(232,48,144,0.16) 0%,rgba(232,48,144,0.05) 100%); color: var(--accent-pink);   border: 1px solid rgba(232,48,144,0.18); }
.stat-card.gold  .stat-card-icon { background: linear-gradient(135deg,rgba(240,160,32,0.16) 0%,rgba(240,160,32,0.05) 100%); color: var(--accent-gold);   border: 1px solid rgba(240,160,32,0.18); }
.stat-card.green .stat-card-icon { background: linear-gradient(135deg,rgba(0,196,144,0.16) 0%,rgba(0,196,144,0.05) 100%); color: var(--accent-green);  border: 1px solid rgba(0,196,144,0.18); }

.stat-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.stat-card-label {
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── General Card ─── */
.volta-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 15px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.volta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,102,255,0.18), transparent);
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  padding-bottom: 9px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0px;
}

.card-title svg {
  opacity: 0.65;
  color: var(--accent-cyan);
}

/* ─── Forms ─── */
.form-group {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.18);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.form-control:hover {
  border-color: rgba(255,255,255,0.22);
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.25), inset 0 2px 4px rgba(0,0,0,0.18);
  background: rgba(0,102,255,0.035);
}

select.form-control option,
.form-control option,
select option {
  background-color: #080c18 !important;
  color: #ffffff !important;
}

/* ─── Buttons ─── */
@keyframes shimmerSweep {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.btn-volta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: auto;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.15px;
}

.btn-volta.primary {
  background: var(--gradient-cyan);
  color: #020a10;
  box-shadow: 0 3px 14px rgba(0,102,255,0.22), 0 2px 5px rgba(0,0,0,0.2);
}

.btn-volta.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,102,255,0.32), 0 2px 6px rgba(0,0,0,0.22);
}

.btn-volta.primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-volta.gold {
  background: var(--gradient-gold);
  color: #050a02;
  box-shadow: 0 3px 14px rgba(240,160,32,0.22);
}

.btn-volta.gold:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(240,160,32,0.32);
}

.btn-volta.danger {
  background: var(--gradient-pink);
  color: #fff;
  box-shadow: 0 3px 14px rgba(232,48,144,0.18);
}

.btn-volta.danger:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(232,48,144,0.28);
}

.btn-volta.outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-volta.outline:hover {
  background: rgba(255,255,255,0.045);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0,102,255,0.10);
  transform: translateY(-1px);
}

/* ─── Button Loading Spinner ─── */
.btn-volta.loading,
.btn.loading,
button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-volta.loading *,
.btn.loading *,
button.loading * {
  opacity: 0 !important;
}

.btn-volta.loading::after,
.btn.loading::after,
button.loading::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: auto;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: button-loading-spinner 0.85s linear infinite;
}

.btn-volta.primary.loading::after,
.btn-volta.gold.loading::after,
.btn.primary.loading::after,
.btn.gold.loading::after,
button.primary.loading::after,
button.gold.loading::after {
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #000;
}

@keyframes button-loading-spinner {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Table ─── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.volta-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.volta-table th {
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,102,255,0.055) 0%, rgba(0,0,0,0.18) 100%);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid rgba(0,102,255,0.10);
}

.volta-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.volta-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.volta-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.038);
  font-size: 12.5px;
  vertical-align: middle;
}

.volta-table tbody tr { transition: background 0.14s ease; }

.volta-table tbody tr:hover {
  background: rgba(0,102,255,0.038);
  box-shadow: inset 2px 0 0 rgba(0,102,255,0.28);
}

.volta-table tbody tr:hover td { color: var(--text-primary); }

/* ─── User Badge ─── */
.user-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.065);
}

/* ─── Vouchers ─── */
.vouchers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.voucher-card {
  background: white;
  color: #1e293b;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 10px -2px rgba(0,0,0,0.08), 0 1px 4px -1px rgba(0,0,0,0.04);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px dashed #cbd5e1;
  padding-bottom: 7px;
  margin-bottom: 8px;
}

.voucher-brand  { font-weight: 800; font-size: 13px; color: #0f172a; }

.voucher-price {
  background: linear-gradient(135deg, #e0f7fa, #e8f5e9);
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 11.5px;
  color: #0d9488;
  border: 1px solid rgba(13,148,136,0.15);
}

.voucher-body   { display: flex; gap: 10px; align-items: center; }

.voucher-qr {
  width: 58px; height: 58px;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}

.voucher-details { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.voucher-label {
  font-size: 9.5px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.voucher-value {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  font-family: monospace;
}

.voucher-limits {
  margin-top: 8px;
  border-top: 1.5px dashed #e2e8f0;
  padding-top: 5px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #475569;
  font-weight: 600;
}

/* ─── Alert Banners ─── */
.volta-alert {
  padding: 9px 13px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-left: 3px solid;
  backdrop-filter: blur(8px);
}

.volta-alert.success {
  background: rgba(0,196,144,0.07);
  color: #2dd4b0;
  border-color: rgba(0,196,144,0.12);
  border-left-color: var(--accent-green);
}

.volta-alert.success svg {
  color: var(--accent-green);
  filter: drop-shadow(0 0 3px rgba(0,196,144,0.35));
}

.volta-alert.error {
  background: rgba(240,64,96,0.07);
  color: #f87186;
  border-color: rgba(240,64,96,0.12);
  border-left-color: var(--accent-red);
}

.volta-alert.error svg {
  color: var(--accent-red);
  filter: drop-shadow(0 0 3px rgba(240,64,96,0.35));
}

/* ─── Hamburger (mobile only) ─── */
.sidebar-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  order: -1;
}

.sidebar-burger:hover {
  background: rgba(0,102,255,0.10);
  border-color: rgba(0,102,255,0.25);
  color: var(--accent-cyan);
}

/* ─── Responsive ─── */
/* Tablet: 1024px */
@media (max-width: 1024px) {
  .volta-sidebar { width: 64px; }
  .sidebar-logo  { padding: 14px; justify-content: center; }
  .logo-text, .menu-item span, .sidebar-footer-text,
  .router-selector-wrap, .logo-upload-wrap { display: none; }
  .volta-main    { margin-left: 64px; padding: 14px 16px; }
  .menu-item a   { justify-content: center; padding: 10px; }
  .menu-item.active a::after { display: none; }
  .sidebar-footer { padding: 8px; }
  .sidebar-footer > div:first-child > div:last-child { display: none; }
  .sidebar-footer > div:last-child span { display: none; }
}

/* Tablet portrait: 768px */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .volta-main { padding: 12px 14px; }
  .main-header { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 8px; }
  .volta-card { padding: 12px 14px; }
  .stat-card-value { font-size: 22px; }
  .header-title h1 { font-size: 18px; }
  .connection-status { font-size: 11px; padding: 5px 10px; }
  .vouchers-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Make tables scroll horizontally */
  .volta-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Mobile: 480px — sidebar becomes a drawer */
@media (max-width: 480px) {
  .volta-sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
  }
  .volta-sidebar.sidebar-open {
    transform: translateX(0);
  }
  .volta-main {
    margin-left: 0;
    padding: 10px 12px;
  }
  .sidebar-burger {
    display: flex !important;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    z-index: 199;
    animation: fadeIn 0.2s ease;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .logo-text, .menu-item span, .sidebar-footer-text { display: block; }
  .router-selector-wrap, .logo-upload-wrap { display: block; }
  .volta-sidebar .sidebar-logo { padding: 12px 14px; justify-content: flex-start; }
  .menu-item a { justify-content: flex-start; padding: 7px 10px; }
  .menu-item.active a::after { display: block; }
  .sidebar-footer { padding: 9px 12px; }
  .sidebar-footer > div:first-child > div:last-child { display: block; }
  .sidebar-footer > div:last-child span { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
  .connection-status .status-label { display: none; }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .main-header { margin-bottom: 10px; }
  .header-title h1 { font-size: 16px; }
  .vouchers-grid { grid-template-columns: 1fr; }
  .volta-modal-content { max-width: 100%; margin: 0; border-radius: var(--radius-md); }
}

/* ─── Print ─── */
@media print {
  body { background: white !important; background-image: none !important; color: black !important; padding: 0 !important; margin: 0 !important; }
  body::before, body::after { display: none !important; }
  .volta-sidebar, .main-header, .volta-card:not(.print-container), .btn-volta, footer { display: none !important; }
  .volta-main { margin-left: 0 !important; padding: 0 !important; }
  .print-container { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  .vouchers-grid  { grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; page-break-inside: avoid; }
  .voucher-card   { border: 1px solid #000 !important; page-break-inside: avoid; }
}

/* ─── Modal ─── */
.volta-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(3,7,18,0.82);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.22s ease;
  padding: 16px;
  box-sizing: border-box;
}

.volta-modal-content {
  background: linear-gradient(145deg, #030810 0%, #02050c 100%);
  border: 1px solid rgba(255,255,255,0.085);
  border-top: 1px solid rgba(0,102,255,0.13);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 22px 55px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.035);
  animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: -40px; right: 0;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  z-index: 1010;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(240,64,96,0.14);
  color: var(--accent-red);
  border-color: rgba(240,64,96,0.28);
}

/* ─── Role Badges ─── */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.role-badge.admin    { background: rgba(0,102,255,0.11);  color: var(--accent-cyan);   border: 1px solid rgba(0,102,255,0.18); }
.role-badge.operator { background: rgba(155,85,232,0.11); color: var(--accent-purple); border: 1px solid rgba(155,85,232,0.18); }
.role-badge.manager  { background: rgba(240,160,32,0.11); color: var(--accent-gold);   border: 1px solid rgba(240,160,32,0.18); }

/* ─── Utility ─── */
.no-print { }
@media print { .no-print { display: none !important; } }

/* ─── Pulse border (batch success) ─── */
@keyframes pulse-border {
  0%   { box-shadow: 0 0 0 0 rgba(0,196,144,0.32); }
  70%  { box-shadow: 0 0 0 7px rgba(0,196,144,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,196,144,0); }
}
