/* ==========================================================================
   OFFSET WRAP — Work Progress Tracking & Customer Notification System
   Design System: Carbon Fiber Dark Luxury & Racing Performance
   ========================================================================== */

:root {
  --bg-main: #09090b;
  --bg-card: #121217;
  --bg-card-hover: #181822;
  --bg-input: #1a1a24;
  --bg-secondary: #0d0d12;
  
  --red-primary: #ff1e27;
  --red-dark: #cc0f17;
  --red-light: #ff474f;
  --red-glow: rgba(255, 30, 39, 0.4);
  --red-glow-subtle: rgba(255, 30, 39, 0.12);

  --cyan-accent: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);

  --green-accent: #10b981;
  --green-glow: rgba(16, 185, 129, 0.35);

  --yellow-accent: #f59e0b;
  --line-green: #06c755;
  --fb-blue: #0084ff;

  --text-main: #f4f4f8;
  --text-muted: #9ca3af;
  --text-dark: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 30, 39, 0.5);

  --font-heading: 'Chakra Petch', sans-serif;
  --font-body: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 12px 36px -8px rgba(0, 0, 0, 0.75);
  --shadow-red: 0 8px 24px -4px rgba(255, 30, 39, 0.4);
  --shadow-glow: 0 0 25px rgba(255, 30, 39, 0.25);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CSS Carbon Fiber Pattern Background */
.carbon-bg {
  background: 
    radial-gradient(circle at 50% 0%, rgba(255, 30, 39, 0.09), transparent 45%),
    linear-gradient(27deg, #111116 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, #111116 5px, transparent 5px) 10px 0px,
    linear-gradient(27deg, #16161d 5px, transparent 5px) 0px 10px,
    linear-gradient(207deg, #16161d 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, #0a0a0d 10px, transparent 10px),
    linear-gradient(#08080a 25%, #050507 25%, #050507 50%, #08080a 50%, #08080a 75%, #050507 75%, #050507 100%);
  background-size: 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
  background-attachment: fixed;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.text-red { color: var(--red-primary) !important; }
.text-cyan { color: var(--cyan-accent) !important; }
.text-green { color: var(--green-accent) !important; }
.text-yellow { color: var(--yellow-accent) !important; }
.text-muted { color: var(--text-muted) !important; }

.gradient-text-red {
  background: linear-gradient(135deg, #ffffff 20%, #ff474f 60%, #ff1e27 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #ffffff 20%, #38bdf8 60%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* License Plate Display Badge */
.plate-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111116;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.plate-badge .plate-num {
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.plate-badge .plate-prov {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
  font-family: var(--font-body);
}

.plate-badge.gold-plate {
  background: linear-gradient(135deg, #fef08a, #facc15, #ca8a04);
  border-color: #eab308;
  color: #000;
}

/* Navigation Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
  color: #ffffff;
  border-color: rgba(255, 30, 39, 0.4);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--red-light), var(--red-primary));
  box-shadow: 0 0 20px var(--red-glow);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-outline-red {
  background: transparent;
  color: var(--red-primary);
  border-color: rgba(255, 30, 39, 0.4);
}

.btn-outline-red:hover {
  background: var(--red-glow-subtle);
  border-color: var(--red-primary);
  color: #fff;
}

.btn-line {
  background: var(--line-green);
  color: #fff;
  border-color: rgba(6, 199, 85, 0.4);
}

.btn-line:hover {
  background: #05b34c;
  box-shadow: 0 0 16px rgba(6, 199, 85, 0.4);
}

.btn-messenger {
  background: var(--fb-blue);
  color: #fff;
  border-color: rgba(0, 132, 255, 0.4);
}

.btn-messenger:hover {
  background: #0073e6;
  box-shadow: 0 0 16px rgba(0, 132, 255, 0.4);
}

.btn-icon-only {
  padding: 0.55rem;
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-pill.received {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.25);
}
.status-pill.received::before { background: #94a3b8; }

.status-pill.wash_prep, .status-pill.disassembly {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.status-pill.wash_prep::before, .status-pill.disassembly::before { background: #f59e0b; }

.status-pill.wrapping {
  background: rgba(255, 30, 39, 0.15);
  color: #ff474f;
  border-color: rgba(255, 30, 39, 0.4);
  box-shadow: 0 0 10px rgba(255, 30, 39, 0.2);
}
.status-pill.wrapping::before { 
  background: #ff1e27; 
  box-shadow: 0 0 8px #ff1e27;
  animation: pulse-dot 1.6s infinite;
}

.status-pill.inspection, .status-pill.finishing {
  background: rgba(0, 240, 255, 0.12);
  color: #38bdf8;
  border-color: rgba(0, 240, 255, 0.3);
}
.status-pill.inspection::before, .status-pill.finishing::before { background: #00f0ff; }

.status-pill.ready, .status-pill.delivered {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}
.status-pill.ready::before, .status-pill.delivered::before { 
  background: #10b981; 
  box-shadow: 0 0 8px #10b981;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Container */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Metric / Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--border-color);
  transition: var(--transition-fast);
}

.stat-card.stat-red::after { background: var(--red-primary); }
.stat-card.stat-green::after { background: var(--green-accent); }
.stat-card.stat-cyan::after { background: var(--cyan-accent); }
.stat-card.stat-yellow::after { background: var(--yellow-accent); }

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info .stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-top: 4px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
}

/* Controls Toolbar */
.toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
}

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

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 12px var(--red-glow-subtle);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--red-primary);
  color: #fff;
  border-color: var(--red-primary);
  box-shadow: var(--shadow-red);
}

/* Jobs Grid */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.25rem;
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.job-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 30, 39, 0.35);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.85), 0 0 20px var(--red-glow-subtle);
}

.job-card-header {
  padding: 1.15rem 1.25rem 0.85rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.job-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.car-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

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

.job-card-body {
  padding: 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  gap: 0.5rem;
}

.detail-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-value {
  font-weight: 600;
  color: #fff;
  text-align: right;
}

/* Progress Bar Component */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0.35rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: #1e1e28;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #cc0f17, #ff1e27, #ff474f);
  box-shadow: 0 0 10px rgba(255, 30, 39, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-fill.completed {
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.job-card-footer {
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-actions-left {
  display: flex;
  gap: 0.4rem;
}

.card-actions-right {
  display: flex;
  gap: 0.4rem;
}

/* Customer Public Tracking Page Styling */
.customer-tracking-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1rem 6rem;
}

.customer-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.customer-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red-primary), var(--cyan-accent));
}

.customer-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  gap: 1rem;
}

.customer-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.customer-hero-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-live-banner {
  background: rgba(255, 30, 39, 0.08);
  border: 1px solid rgba(255, 30, 39, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.live-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red-primary);
  box-shadow: 0 0 10px var(--red-primary);
  animation: pulse-dot 1.5s infinite;
}

/* Customer Live Tracking Tabbed Navigation */
.track-tab-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(18, 18, 24, 0.95);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  gap: 6px;
  margin: 1.25rem 0;
  position: sticky;
  top: 12px;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.track-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-align: center;
}

.track-tab-btn i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.track-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.track-tab-btn.active {
  background: linear-gradient(180deg, rgba(255, 30, 39, 0.22) 0%, rgba(180, 15, 25, 0.38) 100%);
  border-color: rgba(255, 30, 39, 0.6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 30, 39, 0.25);
}

.track-tab-btn.active i {
  color: var(--red-light);
  transform: scale(1.1);
}

.track-tab-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--red-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.track-tab-badge.badge-amber {
  background: #f59e0b;
  color: #000;
}

.track-tab-badge.badge-green {
  background: #10b981;
  color: #fff;
}

.track-tab-content {
  margin-top: 1rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeInTab 0.3s ease-out;
}

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

/* Stepper Component */
.stepper-container {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stepper-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -16px;
  width: 2px;
  background: #272733;
}

.step-item.completed:not(:last-child)::after {
  background: var(--green-accent);
}

.step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #181822;
  border: 2px solid #333342;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  flex-shrink: 0;
  z-index: 2;
  transition: var(--transition-fast);
}

.step-item.completed .step-node {
  background: var(--green-accent);
  border-color: var(--green-accent);
  color: #fff;
  box-shadow: 0 0 12px var(--green-glow);
}

.step-item.active .step-node {
  background: var(--red-primary);
  border-color: #ff474f;
  color: #fff;
  box-shadow: 0 0 16px var(--red-glow);
  animation: pulse-dot 2s infinite;
}

.step-content {
  flex: 1;
  padding-top: 5px;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Timeline Feed */
.timeline-section {
  margin-top: 1.75rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.timeline-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.timeline-card-header {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-card-body {
  padding: 1.25rem;
}

.timeline-caption {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

/* Media Gallery */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.media-thumbnail {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.media-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-thumbnail:hover img {
  transform: scale(1.05);
}

.media-thumbnail .zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  pointer-events: none;
}

/* Video Player Card */
.video-card-player {
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-top: 0.85rem;
}

.video-card-player video {
  width: 100%;
  max-height: 480px;
  display: block;
}

/* Fixed Mobile Sticky Footer */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  z-index: 99;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label .req {
  color: var(--red-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 10px var(--red-glow-subtle);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
}

.upload-dropzone:hover {
  border-color: var(--red-primary);
  background: var(--red-glow-subtle);
}

.upload-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.thumb-preview-item {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.thumb-preview-item img, .thumb-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-preview-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(255, 30, 39, 0.9);
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkbox Toggle */
.checkbox-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.checkbox-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red-primary);
  cursor: pointer;
}

/* Notification Preview Box */
.notif-preview-box {
  background: #000;
  border: 1px solid rgba(255, 30, 39, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  border-left: 4px solid var(--red-primary);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-modal img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Print CSS for A4 QR Sheet */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .app-header, .toolbar, .header-actions, .mobile-bottom-bar, .no-print {
    display: none !important;
  }
  .print-page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* Pre-Intake Inspection Checklist Styles */
.inspection-card-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.checklist-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-item.has-defect {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.06);
}

.chk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chk-title-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chk-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.chk-defect-input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  outline: none;
  margin-top: 4px;
}

.chk-defect-input:focus {
  border-color: var(--yellow-accent);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.defect-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.defect-photo-card {
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
}

.defect-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
}

.defect-photo-card .photo-caption-input {
  width: 100%;
  padding: 4px 6px;
  background: #111;
  border: none;
  border-top: 1px solid var(--border-color);
  color: #e2e8f0;
  font-size: 0.72rem;
  outline: none;
}

.defect-photo-card .btn-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 30, 39, 0.85);
  color: #fff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Per-Item Defect Photo Upload Styles */
.chk-item-media {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(245, 158, 11, 0.25);
}

.chk-item-photo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-item-camera {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-item-camera:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.chk-photo-counter {
  font-size: 0.72rem;
  color: var(--yellow-accent);
  font-weight: 600;
}

.chk-item-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.chk-thumb-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.chk-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.chk-thumb-card .btn-remove-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(255, 30, 39, 0.85);
  color: #fff;
  border: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  z-index: 2;
}

/* Custom Defects Wrap */
.custom-defects-wrap {
  margin-top: 1rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
}

.custom-defect-item {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(245, 158, 11, 0.06);
}

.btn-remove-custom-item {
  background: rgba(255, 30, 39, 0.15);
  border: 1px solid rgba(255, 30, 39, 0.3);
  color: #ff474f;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-remove-custom-item:hover {
  background: var(--red-primary);
  color: #fff;
}

/* Customer View: Item Defect Photos */
.customer-item-defect-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.customer-defect-photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: #000;
  cursor: pointer;
}

.customer-defect-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.customer-defect-photo-thumb:hover img {
  transform: scale(1.08);
}

/* Customer View Inspection Report Styles */
.inspection-report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-card);
}

.inspection-stats-banner {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0.85rem 0;
}

.inspection-tag-good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.inspection-tag-defect {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .brand-name {
    font-size: 1rem;
  }
  .jobs-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .checklist-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .track-tab-nav {
    gap: 4px;
    padding: 4px;
  }
  .track-tab-btn {
    padding: 8px 2px;
    font-size: 0.72rem;
    gap: 2px;
  }
  .track-tab-btn i {
    font-size: 1rem;
  }
  .track-tab-badge {
    top: 1px;
    right: 2px;
    font-size: 0.58rem;
    padding: 1px 4px;
  }
}

/* ========================================================================= */
/* Admin Login Overlay & Security                                            */
/* ========================================================================= */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 25%, rgba(255, 30, 39, 0.15), transparent 70%), #07070b;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 30, 39, 0.18);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff1e27, #ff6b72, #ff1e27);
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo-badge {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 30, 39, 0.25), rgba(0, 0, 0, 0.6));
  border: 1px solid rgba(255, 30, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  font-size: 1.75rem;
  color: var(--red-light);
  box-shadow: 0 0 20px rgba(255, 30, 39, 0.35);
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-input {
  padding-right: 44px;
}

.btn-toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pw:hover {
  color: #fff;
}

.login-error-alert {
  background: rgba(255, 30, 39, 0.15);
  border: 1px solid rgba(255, 30, 39, 0.4);
  color: #ff6b72;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login-submit {
  margin-top: 1.25rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dark);
  line-height: 1.5;
}

