/* ========================================================
   GARAGECORE — WORKSHOP PANEL STYLESHEET
   Automotive Operations & Workshop POS Design System
   ======================================================== */

:root {
  --panel-bg: #0b0f19;
  --panel-sidebar: #070a12;
  --panel-card: #131b2e;
  --panel-card-hover: #1a253d;
  --panel-border: #1e293b;
  --panel-border-light: #334155;
  --panel-primary: #38bdf8; /* Automotive Electric Cyan */
  --panel-primary-dark: #0284c7;
  --panel-accent: #f59e0b; /* Amber Alert */
  --panel-text: #f8fafc;
  --panel-muted: #94a3b8;
  --panel-dim: #64748b;
  --panel-success: #10b981;
  --panel-danger: #ef4444;
  --panel-radius: 8px;
  --panel-radius-lg: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--panel-bg);
  color: var(--panel-text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--panel-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: #7dd3fc;
}

/* Sidebar Navigation */
.panel-sidebar {
  width: 250px;
  background-color: var(--panel-sidebar);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.garage-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--panel-primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--panel-dim);
  padding: 8px 12px 4px;
  letter-spacing: 0.08em;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--panel-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--panel-radius);
  transition: all 0.15s ease;
  margin-bottom: 2px;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--panel-primary);
  border-left: 3px solid var(--panel-primary);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--panel-border);
  background: #050810;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Main Panel Layout */
.panel-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-header {
  height: 64px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.panel-container {
  padding: 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius-lg);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  border-color: var(--panel-border-light);
  transform: translateY(-2px);
}
.stat-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--panel-dim);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.stat-sub {
  font-size: 12px;
  color: var(--panel-muted);
  margin-top: 4px;
}

/* Data Tables */
.data-card {
  background: var(--panel-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.data-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table.panel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
table.panel-table th {
  background: rgba(7, 10, 18, 0.6);
  padding: 12px 18px;
  color: var(--panel-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--panel-border);
}
table.panel-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
  color: var(--panel-muted);
}
table.panel-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* Reg Plate Badge */
.reg-plate {
  display: inline-block;
  background: #fde047;
  color: #000;
  font-family: 'Arial Black', Impact, sans-serif;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #ca8a04;
  letter-spacing: 0.08em;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--panel-dim);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--panel-sidebar);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-control:focus {
  border-color: var(--panel-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--panel-radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  color: #fff;
}
.btn-secondary {
  background: var(--panel-border);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--panel-border-light);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 11px;
}
.btn-lg {
  padding: 12px 22px;
  font-size: 14px;
}

.alert {
  padding: 12px 18px;
  border-radius: var(--panel-radius);
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Notifications Bell Badge */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--panel-bg);
}

/* ========================================================
   PRINT STYLES FOR THERMAL RECEIPTS (58mm / 80mm) & A4
   ======================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .panel-sidebar, .panel-header, .no-print, .btn, .alert {
    display: none !important;
  }
  .panel-main {
    margin-left: 0 !important;
  }
  .panel-container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Thermal 80mm Receipt Print Specification */
  .thermal-80mm {
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #000 !important;
    padding: 2mm !important;
  }

  /* Thermal 58mm Receipt Print Specification */
  .thermal-58mm {
    width: 54mm !important;
    max-width: 54mm !important;
    margin: 0 auto !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    color: #000 !important;
    padding: 1mm !important;
  }

  /* Standard A4 Print */
  .print-a4 {
    width: 100% !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    font-size: 13px !important;
    color: #000 !important;
  }
}

/* Mobile responsive */
@media (max-width: 900px) {
  .panel-sidebar {
    transform: translateX(-100%);
  }
  .panel-sidebar.open {
    transform: translateX(0);
  }
  .panel-main {
    margin-left: 0;
  }
}
