/*
 * Volta WiFi Dashboard Style Sheet
 * Sleek Dark Mode Glassmorphism & Micro-animations
 */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #111a30;
  --bg-card: rgba(20, 31, 58, 0.7);
  --border-glass: rgba(255, 255, 255, 0.07);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #00f2fe;
  --accent-blue: #0076ff;
  --accent-gold: #f59e0b;
  --accent-pink: #ff007f;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  
  --gradient-cyan: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-pink: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
  --gradient-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --gradient-green: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-dark: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-glow: 0 4px 20px rgba(0, 242, 254, 0.15);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  background-image: radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(248, 87, 166, 0.04) 0%, transparent 40%);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Sidebar Layout */
.volta-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #05050a;
  box-shadow: var(--shadow-glow);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

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

.sidebar-menu {
  flex: 1;
  padding: 20px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.menu-item.active a {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
}

.menu-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

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

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-glass);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Main Container */
.volta-main {
  flex: 1;
  margin-left: 260px;
  padding: 30px;
  min-width: 0; /* Prevents overflow inside flex parent */
}

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

.header-title h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.header-title p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Glow Status Indicator */
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  font-size: 12.5px;
  font-weight: 600;
}

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

.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  opacity: 0.4;
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: var(--accent-green);
}
.status-dot.connected::after {
  background: var(--accent-green);
}

.status-dot.disconnected {
  background: var(--accent-red);
}
.status-dot.disconnected::after {
  background: var(--accent-red);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Dashboard Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 1px var(--accent-cyan);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card.cyan .stat-card-icon { background: rgba(0, 242, 254, 0.1); color: var(--accent-cyan); }
.stat-card.pink .stat-card-icon { background: rgba(248, 87, 166, 0.1); color: var(--accent-pink); }
.stat-card.gold .stat-card-icon { background: rgba(245, 158, 11, 0.1); color: var(--accent-gold); }
.stat-card.green .stat-card-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }

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

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-card-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

/* Glassmorphism General Card */
.volta-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Interactive Forms styling */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: rgba(10, 15, 29, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

/* Interactive Buttons */
.btn-volta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: auto;
}

.btn-volta.primary {
  background: var(--gradient-cyan);
  color: #05050a;
  box-shadow: var(--shadow-glow);
}

.btn-volta.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-volta.gold {
  background: var(--gradient-gold);
  color: #05050a;
}

.btn-volta.gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-volta.danger {
  background: var(--gradient-pink);
  color: white;
}

.btn-volta.danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

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

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

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.volta-table th {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-glass);
}

.volta-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 13.5px;
  vertical-align: middle;
}

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

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

.user-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
}

/* Vouchers Grid & Print */
.vouchers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

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

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

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

.voucher-price {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  color: #0d9488;
}

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

.voucher-qr {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.voucher-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
}

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

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

/* Alert Notification Banner */
.volta-alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}

.volta-alert.success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.volta-alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .volta-sidebar {
    width: 70px;
  }
  .sidebar-logo {
    padding: 16px;
    justify-content: center;
  }
  .logo-text,
  .menu-item span,
  .sidebar-footer {
    display: none;
  }
  .volta-main {
    margin-left: 70px;
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .volta-main {
    padding: 16px;
  }
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Print vouchers styling override */
@media print {
  body {
    background: white !important;
    background-image: none !important;
    color: black !important;
    padding: 0 !important;
    margin: 0 !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: 15px !important;
    page-break-inside: avoid;
  }
  .voucher-card {
    border: 1px solid #000 !important;
    page-break-inside: avoid;
  }
}
