/* ==============================================================================
   COMPUTER CARE (computercaregzb.com) — GLOBAL STYLESHEET
   Pure Vanilla CSS — Clean, modern, responsive, no external dependencies
   ============================================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #0f172a;
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: #0b1329;
  color: #fff;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  background: linear-gradient(135deg, #00d2ff, #7928ca);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-location {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.admin-link {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Layout Container
   -------------------------------------------------------------------------- */
.main-wrapper {
  max-width: 1000px;
  margin: 28px auto;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}

.page-header {
  margin-bottom: 24px;
}

.page-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.25;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Cards & Surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.form-label .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

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

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.status-new { background: #e0f2fe; color: #0284c7; }
.status-contacted { background: #fef3c7; color: #d97706; }
.status-quoted { background: #ede9fe; color: #7c3aed; }
.status-confirmed { background: #dcfce7; color: #15803d; }
.status-built { background: #ccfbf1; color: #0f766e; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.status-received { background: #e2e8f0; color: #475569; }
.status-diagnosing { background: #fef3c7; color: #d97706; }
.status-waiting_parts { background: #ffedd5; color: #c2410c; }
.status-repairing { background: #dbeafe; color: #1d4ed8; }
.status-ready { background: #dcfce7; color: #15803d; }

/* --------------------------------------------------------------------------
   Alerts & Notifications
   -------------------------------------------------------------------------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-success {
  background: var(--success-light);
  border: 1px solid var(--success-border);
  color: #065f46;
}

.alert-error {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: #991b1b;
}

.alert-info {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* --------------------------------------------------------------------------
   Repair Tracker Results
   -------------------------------------------------------------------------- */
.ticket-result-card {
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow-md);
}

.ticket-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-code-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.ticket-code-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--primary);
}

.ticket-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ticket-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.ticket-detail-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.ticket-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #047857;
}

/* --------------------------------------------------------------------------
   Admin Tabs & Panels
   -------------------------------------------------------------------------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -2px;
}

.admin-tab-btn:hover {
  color: var(--text-main);
}

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

.tab-pane {
  display: none;
}

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

.admin-action-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Data Tables
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
}

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

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover {
  background: #f8fafc;
}

.data-table .status-select {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}

.data-table .status-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   New Ticket Success Box
   -------------------------------------------------------------------------- */
.ticket-success-box {
  background: var(--success-light);
  border: 2px dashed #059669;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ticket-success-code {
  font-size: 1.5rem;
  font-family: monospace;
  font-weight: 800;
  color: #065f46;
  letter-spacing: 2px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 24px 20px;
  border-top: 1px solid #1e293b;
  text-align: center;
}

.site-footer a {
  color: #38bdf8;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive queries */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }
  .card {
    padding: 20px 16px;
  }
}
