/**
 * M-TUNED Portal Styles
 * Premium automotive-inspired design with dark theme and gold accents
 * Modern, clean, professional - Built for performance
 */

/* ============================================
   CSS Variables - Theme System
   ============================================ */
:root {
  /* Brand Colors */
  --color-gold: #ffc700;
  --color-gold-dark: #d4a500;
  --color-gold-light: #ffd740;

  /* Dark Theme Backgrounds */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #141414;
  --color-bg-tertiary: #1a1a1a;
  --color-bg-elevated: #1f1f1f;
  --color-bg-hover: #242424;

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #707070;
  --color-text-muted: #505050;

  /* Border Colors */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.12);
  --color-border-focus: var(--color-gold);

  /* Status Colors */
  --color-success: #00ff88;
  --color-success-bg: rgba(0, 255, 136, 0.1);
  --color-warning: #ffaa00;
  --color-warning-bg: rgba(255, 170, 0, 0.1);
  --color-error: #ff3366;
  --color-error-bg: rgba(255, 51, 102, 0.1);
  --color-info: #00aaff;
  --color-info-bg: rgba(0, 170, 255, 0.1);

  /* Typography */
  --font-heading: 'Orbitron', 'Rajdhani', sans-serif;
  --font-body: 'Inter', 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
}

/* ============================================
   Base Reset & Typography
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

h1 {
  font-size: 1.75rem;
  letter-spacing: 0.08em;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0.05em;
}

h4 {
  font-size: 0.9rem;
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

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

a:hover {
  color: var(--color-gold-light);
}

/* ============================================
   Portal Shell Layout
   ============================================ */
.portal-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 60px 1fr auto;
  grid-template-areas:
    "header header"
    "sidebar main"
    "sidebar footer";
  min-height: 100vh;
  background: var(--color-bg-primary);
}

.portal-shell.sidebar-collapsed {
  grid-template-columns: 70px 1fr;
}

/* Header */
.portal-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--color-bg-hover);
}

.hamburger-icon {
  width: 20px;
  height: 2px;
  background: var(--color-text-primary);
  position: relative;
  display: block;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  left: 0;
}

.hamburger-icon::before {
  top: -6px;
}

.hamburger-icon::after {
  bottom: -6px;
}

/* Logo */
.portal-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-image {
  height: 32px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.1em;
}

.logo-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--color-gold);
  color: var(--color-bg-primary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Notification Bell */
.notification-bell {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  position: relative;
  font-size: 1.125rem;
  transition: all var(--transition-fast);
}

.notification-bell:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-error);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Menu Trigger */
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.user-menu-trigger:hover {
  background: var(--color-bg-hover);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.user-name-header {
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.icon-chevron-down {
  color: var(--color-text-tertiary);
  font-size: 0.75rem;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
.portal-sidebar {
  grid-area: sidebar;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width var(--transition-normal);
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md) 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  margin: 2px 0;
}

.sidebar-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border-left-color: var(--color-border-light);
}

.sidebar-item.active {
  background: rgba(255, 199, 0, 0.08);
  color: var(--color-gold);
  border-left-color: var(--color-gold);
}

.sidebar-item i {
  font-size: 1.125rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.sidebar-item.active i {
  opacity: 1;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-md) var(--spacing-lg);
}

.sidebar-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}

.status-indicator.status-online {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* Collapsed Sidebar */
.sidebar-collapsed .portal-sidebar {
  width: 70px;
}

.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .logo-text,
.sidebar-collapsed .logo-badge,
.sidebar-collapsed .sidebar-footer,
.sidebar-collapsed .sidebar-divider {
  display: none;
}

.sidebar-collapsed .sidebar-item {
  justify-content: center;
  padding: var(--spacing-md);
}

.sidebar-collapsed .sidebar-item i {
  margin: 0;
}

/* ============================================
   Main Content Area
   ============================================ */
.portal-main {
  grid-area: main;
  background: var(--color-bg-primary);
  overflow-y: auto;
  min-height: 0;
}

.portal-content {
  padding: var(--spacing-xl);
  max-width: 1600px;
  margin: 0 auto;
}

/* ============================================
   Portal Footer
   ============================================ */
.portal-footer {
  grid-area: footer;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.footer-right {
  display: flex;
  gap: var(--spacing-lg);
}

.footer-right a {
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}

.footer-right a:hover {
  color: var(--color-gold);
}

/* ============================================
   Dropdowns
   ============================================ */
.notification-dropdown,
.user-menu-dropdown {
  position: fixed;
  top: 65px;
  right: var(--spacing-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  min-width: 320px;
  max-height: 480px;
  overflow: hidden;
}

.notification-header,
.user-menu-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h3,
.user-menu-header h3 {
  font-size: 0.875rem;
  margin: 0;
  font-weight: 600;
}

.notification-list {
  max-height: 350px;
  overflow-y: auto;
}

.notification-item {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--color-bg-hover);
}

.notification-item.unread {
  background: rgba(255, 199, 0, 0.05);
}

.notification-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-tertiary);
}

.notification-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.user-menu-header {
  display: flex;
  gap: var(--spacing-md);
}

.user-menu-header .user-info {
  flex: 1;
}

.user-menu-header .user-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.user-menu-header .user-email {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.user-menu-items {
  padding: var(--spacing-sm) 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.user-menu-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.user-menu-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-sm) 0;
}

/* ============================================
   Mobile Overlay
   ============================================ */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99;
  backdrop-filter: blur(4px);
}

/* ============================================
   Icon Placeholders (using text fallbacks)
   ============================================ */
.icon-bell::before { content: "🔔"; font-style: normal; }
.icon-dashboard::before { content: "📊"; font-style: normal; }
.icon-users::before { content: "👥"; font-style: normal; }
.icon-queue::before { content: "📋"; font-style: normal; }
.icon-chart::before { content: "📈"; font-style: normal; }
.icon-help::before { content: "❓"; font-style: normal; }
.icon-user::before { content: "👤"; font-style: normal; }
.icon-settings::before { content: "⚙️"; font-style: normal; }
.icon-logout::before { content: "🚪"; font-style: normal; }
.icon-chevron-down::before { content: "▼"; font-style: normal; font-size: 0.6em; }
.icon-calendar::before { content: "📅"; font-style: normal; }
.icon-shop::before { content: "🛒"; font-style: normal; }

/* ============================================
   Login Page
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-primary);
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.login-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 199, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 199, 0, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.login-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--color-bg-primary) 70%);
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: var(--spacing-lg);
}

.login-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-logo {
  height: 64px;
  margin-bottom: var(--spacing-md);
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
  letter-spacing: 0.15em;
}

.login-subtitle {
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  background: var(--color-bg-primary);
  border-radius: var(--radius-md);
  padding: 4px;
}

.form-tab {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.form-tab:hover {
  color: var(--color-text-secondary);
}

.form-tab.active {
  background: var(--color-bg-tertiary);
  color: var(--color-gold);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  padding: var(--spacing-md);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--color-text-secondary);
}

.form-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.demo-notice {
  background: rgba(255, 199, 0, 0.08);
  border: 1px solid rgba(255, 199, 0, 0.2);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  font-size: 0.8rem;
  color: var(--color-gold);
  line-height: 1.5;
}

.demo-notice strong {
  display: block;
  margin-bottom: var(--spacing-xs);
}

.login-form .btn-primary {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-md);
  font-size: 0.95rem;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.form-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}

.form-link a {
  color: var(--color-gold);
  font-weight: 500;
}

.login-footer {
  text-align: center;
  margin-top: var(--spacing-lg);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.login-footer p {
  margin: 0;
}

/* ============================================
   Modals
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

.modal-close,
.btn-close {
  background: transparent;
  border: none;
  color: var(--color-text-tertiary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover,
.btn-close:hover {
  color: var(--color-text-primary);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

/* Modal Overlay (alternative) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay .modal-dialog {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
}

/* Form Controls within Modals */
.form-textarea {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  transition: all var(--transition-fast);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
}

.form-help {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin-top: var(--spacing-xs);
}

.required {
  color: var(--color-error);
}

.info-banner {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-info-bg);
  border: 1px solid rgba(0, 170, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-info);
  font-size: 0.8rem;
  margin-top: var(--spacing-md);
}

.info-banner svg {
  flex-shrink: 0;
}

.info-banner strong {
  display: block;
  margin-bottom: 2px;
}

.info-banner p {
  margin: 0;
  opacity: 0.8;
}

/* ============================================
   Responsive Portal Shell
   ============================================ */
@media (max-width: 1024px) {
  .portal-shell {
    grid-template-columns: 220px 1fr;
  }

  .portal-shell.sidebar-collapsed {
    grid-template-columns: 60px 1fr;
  }
}

@media (max-width: 768px) {
  .portal-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "footer";
  }

  .portal-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    z-index: 100;
    transition: transform var(--transition-normal);
  }

  .portal-sidebar.mobile-open {
    transform: translateX(0);
  }

  .portal-content {
    padding: var(--spacing-lg);
  }

  .user-name-header {
    display: none;
  }

  .logo-text,
  .logo-badge {
    display: none;
  }

  .notification-dropdown,
  .user-menu-dropdown {
    right: var(--spacing-sm);
    min-width: 280px;
  }
}

@media (max-width: 480px) {
  .portal-content {
    padding: var(--spacing-md);
  }

  .portal-header {
    padding: 0 var(--spacing-md);
  }
}

/* ============================================
   Page Header Component
   ============================================ */
.page-header {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 2px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p,
.page-header .subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   Card System - Premium Design
   ============================================ */
.content-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-light);
}

.content-card.elevated {
  background: var(--color-bg-tertiary);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-text-primary);
}

.card-body {
  color: var(--color-text-secondary);
}

/* ============================================
   Stats Display System
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

/* Status Color Variants */
.stat-card.success .stat-number {
  background: linear-gradient(135deg, var(--color-success) 0%, #00dd77 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card.warning .stat-number {
  background: linear-gradient(135deg, var(--color-warning) 0%, #ff9900 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card.error .stat-number {
  background: linear-gradient(135deg, var(--color-error) 0%, #ff2255 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stat Card Variants */
.stat-card.stat-urgent {
  border-color: var(--color-error);
}

.stat-card.stat-urgent .stat-number {
  background: linear-gradient(135deg, var(--color-error) 0%, #ff2255 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card.stat-highlight {
  border-color: var(--color-gold);
}

.stat-card.stat-highlight .stat-number {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card.stat-success {
  border-color: var(--color-success);
}

.stat-card.stat-success .stat-number {
  background: linear-gradient(135deg, var(--color-success) 0%, #00cc6a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Section Grouping
   ============================================ */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-border);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold) 0%, transparent 100%);
}

.section {
  margin-bottom: var(--spacing-xl);
}

.section + .section {
  margin-top: var(--spacing-2xl);
}

/* ============================================
   Tables - Modern Data Display
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: var(--spacing-lg);
}

.data-table thead {
  background: var(--color-bg-tertiary);
}

.data-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.data-table th:first-child {
  border-top-left-radius: var(--radius-md);
}

.data-table th:last-child {
  border-top-right-radius: var(--radius-md);
}

.data-table td {
  padding: 1rem 1.25rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.data-table tbody tr {
  transition: all var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:hover {
  background: var(--color-bg-hover);
  transform: scale(1.001);
}

.data-table tbody tr:hover td {
  color: var(--color-gold-light);
}

/* Table Cell Alignment */
.data-table .text-right {
  text-align: right;
}

.data-table .text-center {
  text-align: center;
}

/* Completed Row Styling */
.data-table tbody tr.row-completed {
  opacity: 0.6;
  background: rgba(0, 255, 0, 0.05);
}

.data-table tbody tr.row-completed td {
  text-decoration: line-through;
  text-decoration-color: var(--color-text-tertiary);
}

.data-table tbody tr.row-completed td:first-child,
.data-table tbody tr.row-completed td:last-child {
  text-decoration: none;
}

/* Checkbox Cell */
.checkbox-cell {
  text-align: center;
  width: 50px;
}

.order-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-gold);
}

/* Text Muted */
.text-muted {
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
}

/* Order Number */
.order-number {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Customer Email */
.customer-email {
  font-size: 0.75rem;
}

/* Order Total */
.order-total {
  font-weight: 600;
  color: var(--color-gold);
}

/* ============================================
   Status Badges - Pill-Shaped Indicators
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

/* Status Badge Variants */
.status-badge.in_review,
.status-badge.blue {
  background: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid var(--color-info);
}

.status-badge.waiting_log,
.status-badge.orange {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}

.status-badge.tune_sent,
.status-badge.green {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.status-badge.intake,
.status-badge.gray {
  background: rgba(112, 112, 112, 0.1);
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-text-tertiary);
}

.status-badge.pending {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border: 1px solid #ffd700;
}

.status-badge.completed {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.status-badge.error,
.status-badge.red {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

/* Status Badge with Indicator Dot */
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   Buttons - Premium Action Elements
   ============================================ */
.btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

/* Primary Button - Gold Gradient */
.btn-primary,
.action-btn.primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.3);
  border: 1px solid transparent;
}

.btn-primary:hover,
.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 199, 0, 0.5);
}

.btn-primary:active,
.action-btn.primary:active {
  transform: translateY(0);
}

/* Secondary Button - Transparent with Border */
.btn-secondary,
.action-btn.secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover,
.action-btn.secondary:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-gold);
  color: var(--color-gold);
  transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--color-error) 0%, #cc2952 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 51, 102, 0.5);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, var(--color-success) 0%, #00cc6a 100%);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
}

/* Small Button */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
}

/* Large Button */
.btn-lg {
  padding: 1rem 2rem;
  font-size: 0.9rem;
}

/* Block Button */
.btn-block {
  width: 100%;
}

/* Disabled State */
.btn:disabled,
.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Small Button Variant */
.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-small.btn-primary {
  background: var(--color-gold);
  color: var(--color-bg-primary);
  border: none;
  box-shadow: none;
}

.btn-small.btn-secondary {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-small:hover {
  transform: none;
}

/* Text Button */
.btn-text {
  background: transparent;
  border: none;
  color: var(--color-gold);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.btn-text:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* Link Button */
.btn-link {
  background: transparent;
  border: none;
  color: var(--color-gold);
  padding: 0;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.btn-link:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* ============================================
   Dashboard Page Container
   ============================================ */
.dashboard-page {
  width: 100%;
  max-width: 100%;
}

.page-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Full Width Card */
.full-width {
  grid-column: 1 / -1;
}

.content-card.full-width {
  grid-column: 1 / -1;
}

/* ============================================
   Dashboard Grid Layout
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.dashboard-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

/* ============================================
   Customer Grid (CRM)
   ============================================ */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.customer-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.customer-card:hover {
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-md);
}

.customer-header {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.customer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.customer-info {
  flex: 1;
  min-width: 0;
}

.customer-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-primary);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-vehicle {
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
  margin: 0;
}

.customer-stats {
  display: flex;
  gap: var(--spacing-lg);
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-md);
}

.mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
}

.mini-stat-label {
  font-size: 0.7rem;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.customer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.last-activity {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

/* ============================================
   Case Items (Dashboard)
   ============================================ */
.case-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.case-item:hover {
  border-color: var(--color-gold);
  background: var(--color-bg-hover);
}

.case-main {
  flex: 1;
  min-width: 0;
}

.case-customer {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.case-vehicle {
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}

.case-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.case-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   Activity Timeline
   ============================================ */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.activity-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-message {
  font-size: 0.875rem;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   Toolbar
   ============================================ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.6rem 1rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--color-border-light);
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-gold);
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.toolbar-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* ============================================
   Spinner
   ============================================ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
  margin-right: var(--spacing-xs);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Notification Styles
   ============================================ */
.notification {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: 1100;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-success {
  border-color: var(--color-success);
  color: var(--color-success);
}

.notification-error {
  border-color: var(--color-error);
  color: var(--color-error);
}

.notification-info {
  border-color: var(--color-info);
  color: var(--color-info);
}

/* ============================================
   Forms - Modern Input Styling
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
  background: var(--color-bg-secondary);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

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

/* ============================================
   Utility Classes
   ============================================ */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-muted { color: var(--color-text-muted); }
.text-gold { color: var(--color-gold); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* ============================================
   Additional Components
   ============================================ */

/* Alert/Notice Boxes */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
}

.alert-info {
  background: var(--color-info-bg);
  border-color: var(--color-info);
  color: var(--color-info);
}

.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-error {
  background: var(--color-error-bg);
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Loading Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-2xl);
  text-align: center;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-xl) 0;
}

/* Badge (General) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(255, 199, 0, 0.15);
  color: var(--color-gold);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-error {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--color-text-tertiary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.empty-state-message {
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-lg);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .dashboard-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.125rem;
  }

  h3 {
    font-size: 0.95rem;
  }

  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
  }

  .stat-number {
    font-size: 2rem;
  }

  .dashboard-grid,
  .dashboard-grid-2,
  .dashboard-grid-3,
  .dashboard-grid-4 {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: var(--spacing-md);
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.25rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: var(--spacing-md);
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .btn,
  .action-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem;
    font-size: 0.75rem;
  }
}

/* ============================================
   Services Grid
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
}

.service-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.service-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-image {
  height: 180px;
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-image.placeholder {
  color: var(--color-text-muted);
}

.service-content {
  padding: var(--spacing-lg);
}

.service-name {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
}

.service-tagline {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.service-duration {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.service-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
}

.service-description {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

.service-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* ============================================
   Products Grid
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-lg);
}

.product-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-image {
  height: 200px;
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  color: var(--color-text-muted);
}

.image-placeholder.large {
  padding: var(--spacing-xl);
}

.sale-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--color-error);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.out-of-stock-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--color-text-muted);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.product-content {
  padding: var(--spacing-lg);
}

.product-name {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

.product-tag {
  display: inline-block;
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  margin-right: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.product-price {
  margin: var(--spacing-md) 0;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
}

.price-original {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-right: var(--spacing-sm);
}

.price-sale {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-error);
}

.product-price-large .price-current,
.product-price-large .price-sale {
  font-size: 1.75rem;
}

.product-actions {
  margin-top: var(--spacing-md);
}

/* Product Detail Modal */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.product-detail-gallery .main-image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.thumbnail-row {
  display: flex;
  gap: var(--spacing-sm);
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.thumbnail:hover {
  opacity: 1;
}

.product-detail-info .product-sku {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: var(--spacing-sm) 0;
}

.product-tags {
  margin: var(--spacing-md) 0;
}

.product-description h4 {
  margin-bottom: var(--spacing-sm);
}

.product-stock {
  margin-top: var(--spacing-md);
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
}

.stock-status.in-stock {
  color: var(--color-success);
}

.stock-status.out-of-stock {
  color: var(--color-error);
}

/* Availability Slots */
.availability-dates {
  max-height: 300px;
  overflow-y: auto;
}

.date-group {
  margin-bottom: var(--spacing-lg);
}

.date-header {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--color-border);
}

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.time-slot {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-slot:hover {
  border-color: var(--color-gold);
  background: var(--color-bg-hover);
}

.time-slot.selected {
  background: rgba(255, 199, 0, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Booking Summary */
.booking-summary {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row.total {
  font-weight: 700;
  color: var(--color-gold);
  font-size: 1.1rem;
  padding-top: var(--spacing-md);
}

/* Form Sections */
.form-section {
  margin-bottom: var(--spacing-xl);
}

.form-section h3 {
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

/* Filter Buttons */
.filter-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--color-border-light);
  color: var(--color-text-primary);
}

.filter-btn.active {
  background: rgba(255, 199, 0, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Success/Error States */
.success-state,
.error-state,
.loading-state {
  text-align: center;
  padding: var(--spacing-xl);
}

.success-state svg,
.error-state svg {
  margin-bottom: var(--spacing-md);
}

.success-state h3 {
  color: var(--color-success);
  margin-bottom: var(--spacing-sm);
}

.booking-details {
  background: var(--color-bg-tertiary);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
}

/* Responsive Services/Products */
@media (max-width: 768px) {
  .services-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  .content-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .btn,
  .action-btn {
    display: none;
  }
}

/* ============================================================================
   PORTAL V2 — customer order workspace
   ----------------------------------------------------------------------------
   Everything below is namespaced `pv2-` so it can't collide with the legacy SPA
   rules above it. Palette matches dyno-style.css (the site's visual identity):
   carbon black, championship gold #ffc700, success green #00ff87.

   Touch targets are >= 44px throughout — this gets used on a phone, standing
   next to a running car, in a garage.
   ============================================================================ */

:root {
  --pv2-black: #0a0a0a;
  --pv2-midnight: #121212;
  --pv2-chrome: #1a1a1a;
  --pv2-gunmetal: #2d2d2d;
  --pv2-line: rgba(255, 255, 255, 0.07);
  --pv2-line-gold: rgba(255, 199, 0, 0.16);
  --pv2-text: #e5e5e5;
  --pv2-dim: #a3a3a3;
  --pv2-faint: #6f6f6f;
  --pv2-gold: #ffc700;
  --pv2-green: #00ff87;
  --pv2-blue: #00e5ff;
  --pv2-amber: #ff8c00;
  --pv2-red: #ef4444;
  --pv2-tap: 44px;
}

/* ---------- shared primitives ---------- */

.pv2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--pv2-tap);
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  border: 1px solid transparent;
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}
.pv2-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pv2-btn:not(:disabled):active { transform: translateY(1px); }

.pv2-btn--gold {
  background: linear-gradient(135deg, var(--pv2-gold), #ff9500);
  color: #0a0a0a;
}
.pv2-btn--gold:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(255, 199, 0, 0.28); }

.pv2-btn--ghost {
  background: transparent;
  border-color: rgba(255, 199, 0, 0.4);
  color: var(--pv2-gold);
}
.pv2-btn--ghost:hover:not(:disabled) { background: rgba(255, 199, 0, 0.1); }

.pv2-btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.66rem;
}

.pv2-muted { color: var(--pv2-faint); }

.pv2-hint {
  color: var(--pv2-faint);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.pv2-notice {
  margin-top: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.pv2-notice--success { background: rgba(0, 255, 135, 0.1); border: 1px solid rgba(0, 255, 135, 0.3); color: var(--pv2-green); }
.pv2-notice--warn    { background: rgba(255, 140, 0, 0.1);  border: 1px solid rgba(255, 140, 0, 0.3);  color: var(--pv2-amber); }
.pv2-notice--error   { background: rgba(239, 68, 68, 0.1);  border: 1px solid rgba(239, 68, 68, 0.3);  color: var(--pv2-red); }

/* ---------- loading / empty / error states ---------- */

.pv2-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--pv2-dim);
}
.pv2-state-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--pv2-line-gold);
  color: var(--pv2-gold);
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
}
.pv2-state-title { font-size: 0.98rem; color: var(--pv2-text); }
.pv2-state-detail { font-size: 0.86rem; color: var(--pv2-faint); max-width: 42ch; line-height: 1.5; }
.pv2-state--error .pv2-state-icon { border-color: rgba(239, 68, 68, 0.45); color: var(--pv2-red); }
.pv2-state--error .pv2-state-title { color: var(--pv2-red); }

.pv2-spinner {
  width: 30px; height: 30px;
  border: 2px solid rgba(255, 199, 0, 0.15);
  border-top-color: var(--pv2-gold);
  border-radius: 50%;
  animation: pv2-spin 0.85s linear infinite;
}
@keyframes pv2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pv2-spinner { animation-duration: 2.5s; }
}

/* ---------- shop status banner ---------- */

.pv2-shop {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(18, 18, 18, 0.95));
  border: 1px solid var(--pv2-line);
}
.pv2-shop--open   { border-color: rgba(0, 255, 135, 0.3); }
.pv2-shop--closed { border-color: rgba(255, 140, 0, 0.35); }

.pv2-shop-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
}
.pv2-shop--open .pv2-shop-dot {
  background: var(--pv2-green);
  box-shadow: 0 0 0 4px rgba(0, 255, 135, 0.15);
}
.pv2-shop--closed .pv2-shop-dot {
  background: var(--pv2-amber);
  box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.15);
}

.pv2-shop-body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 260px; }
.pv2-shop-state {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.pv2-shop--open .pv2-shop-state   { color: var(--pv2-green); }
.pv2-shop--closed .pv2-shop-state { color: var(--pv2-amber); }
.pv2-shop-text { color: var(--pv2-text); font-size: 0.95rem; line-height: 1.4; }

.pv2-shop-meta {
  display: flex; flex-direction: column; gap: 0.15rem;
  font-size: 0.8rem; color: var(--pv2-faint); text-align: right;
}
.pv2-shop-meta strong { color: var(--pv2-gold); font-family: 'Orbitron', monospace; }
.pv2-shop-meta a { color: var(--pv2-dim); text-decoration: none; }
.pv2-shop-meta a:hover { color: var(--pv2-gold); }
@media (max-width: 640px) {
  .pv2-shop-meta { text-align: left; flex-direction: row; gap: 1rem; flex-wrap: wrap; }
}

/* ---------- workspace shell ---------- */

.pv2-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--pv2-line-gold);
}
.pv2-topbar-title {
  font-family: 'Orbitron', monospace;
  color: var(--pv2-gold);
  font-size: 1.25rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: left;
  margin: 0 0 0.2rem;
}
.pv2-topbar-sub { color: var(--pv2-dim); font-size: 0.88rem; }

.pv2-section { margin-bottom: 2rem; }
.pv2-section-title {
  font-family: 'Orbitron', monospace;
  color: var(--pv2-gold);
  font-size: 0.92rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.pv2-card {
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) { .pv2-card { padding: 1.1rem; border-radius: 13px; } }

.pv2-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: 'Orbitron', monospace;
  color: var(--pv2-gold);
  font-size: 0.82rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.pv2-card-title-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pv2-faint);
}
.pv2-count-badge {
  background: var(--pv2-green);
  color: #0a0a0a;
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 1px;
}

.pv2-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.pv2-columns > .pv2-card { margin-bottom: 0; }
@media (max-width: 860px) {
  .pv2-columns { grid-template-columns: 1fr; gap: 0; }
  .pv2-columns > .pv2-card { margin-bottom: 1.25rem; }
}

/* ---------- status badges ---------- */

.pv2-badge {
  display: inline-block;
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
}
.pv2-badge--wait  { background: rgba(255, 255, 255, 0.07); color: var(--pv2-dim); }
.pv2-badge--go    { background: rgba(0, 255, 135, 0.14);  color: var(--pv2-green); }
.pv2-badge--work  { background: rgba(255, 199, 0, 0.14);  color: var(--pv2-gold); }
.pv2-badge--ready { background: rgba(0, 229, 255, 0.14);  color: var(--pv2-blue); }
.pv2-badge--done  { background: rgba(0, 255, 135, 0.2);   color: var(--pv2-green); }
.pv2-badge--dead  { background: rgba(239, 68, 68, 0.14);  color: var(--pv2-red); }

/* ---------- order list ---------- */

.pv2-order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.pv2-order-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  border-radius: 14px;
  padding: 1.25rem;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.12s ease;
}
.pv2-order-card:hover { border-color: var(--pv2-line-gold); transform: translateY(-2px); }
.pv2-order-card:focus-visible { outline: 2px solid var(--pv2-gold); outline-offset: 2px; }

.pv2-order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.pv2-order-id {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pv2-gold);
  letter-spacing: 1px;
}
.pv2-order-card-items { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; color: var(--pv2-text); }
.pv2-order-card-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 0.75rem; border-top: 1px solid var(--pv2-line);
  font-size: 0.85rem; color: var(--pv2-faint);
}
.pv2-order-total { font-family: 'Orbitron', monospace; font-size: 1rem; color: var(--pv2-text); }

/* ---------- order detail header ---------- */

.pv2-order-head { margin-bottom: 1.5rem; }
.pv2-back {
  background: none; border: none;
  color: var(--pv2-dim);
  font-family: 'Orbitron', monospace;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  min-height: var(--pv2-tap);
  padding: 0 0.15rem;
  cursor: pointer;
}
.pv2-back:hover { color: var(--pv2-gold); }

.pv2-order-head-main {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pv2-line-gold);
}
.pv2-order-head-id {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  font-family: 'Orbitron', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pv2-gold);
  letter-spacing: 1.5px;
}
.pv2-order-head-meta { display: flex; align-items: baseline; gap: 1.25rem; color: var(--pv2-faint); font-size: 0.88rem; }
.pv2-order-head-total { font-family: 'Orbitron', monospace; font-size: 1.15rem; color: var(--pv2-text); }

/* ---------- line items ---------- */

.pv2-items { list-style: none; }
.pv2-item { padding: 0.85rem 0; border-bottom: 1px dashed var(--pv2-line); }
.pv2-item:last-child { border-bottom: none; padding-bottom: 0; }
.pv2-item-main { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.pv2-item-name { font-family: 'Orbitron', monospace; font-size: 0.86rem; font-weight: 600; color: var(--pv2-text); }
.pv2-item-price { font-family: 'Orbitron', monospace; font-size: 0.86rem; color: var(--pv2-dim); white-space: nowrap; }
.pv2-item-meta { margin-top: 0.35rem; font-size: 0.82rem; color: var(--pv2-faint); }
.pv2-item-meta strong { color: var(--pv2-gold); font-family: 'Orbitron', monospace; letter-spacing: 0.5px; }
.pv2-item-notes { line-height: 1.5; }

/* ---------- timeline ---------- */

.pv2-timeline { list-style: none; position: relative; padding-left: 1.35rem; }
.pv2-timeline::before {
  content: '';
  position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: var(--pv2-line);
}
.pv2-timeline-row { position: relative; padding: 0.55rem 0; }
.pv2-timeline-dot {
  position: absolute; left: -1.35rem; top: 0.85rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--pv2-gunmetal);
  border: 2px solid var(--pv2-chrome);
}
.pv2-timeline-row.is-current .pv2-timeline-dot {
  background: var(--pv2-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 135, 0.18);
}
.pv2-timeline-body { display: flex; flex-direction: column; gap: 0.1rem; }
.pv2-timeline-label { color: var(--pv2-text); font-size: 0.94rem; text-transform: capitalize; }
.pv2-timeline-row.is-current .pv2-timeline-label { color: var(--pv2-green); font-weight: 600; }
.pv2-timeline-when { font-size: 0.78rem; color: var(--pv2-faint); }

/* ---------- vehicle profile + upload ---------- */

.pv2-profile {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.pv2-profile-line { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pv2-profile-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pv2-faint);
}
.pv2-profile-summary { color: var(--pv2-text); font-size: 0.9rem; }

.pv2-vehicle-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-radius: 12px;
}

.pv2-field { display: flex; flex-direction: column; gap: 0.35rem; }
.pv2-field--wide { margin-top: 1rem; }
.pv2-field-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pv2-gold);
}
.pv2-field input,
.pv2-field select,
.pv2-field textarea,
.pv2-compose textarea {
  width: 100%;
  min-height: var(--pv2-tap);
  background: var(--pv2-black);
  border: 1px solid rgba(255, 199, 0, 0.16);
  border-radius: 9px;
  color: var(--pv2-text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
}
.pv2-field textarea, .pv2-compose textarea { resize: vertical; line-height: 1.5; }
.pv2-field input:focus,
.pv2-field select:focus,
.pv2-field textarea:focus,
.pv2-compose textarea:focus {
  outline: none;
  border-color: var(--pv2-gold);
  box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.15);
}
.pv2-field-hint { font-size: 0.76rem; color: var(--pv2-faint); }
.pv2-field-hint.is-over { color: var(--pv2-red); }

.pv2-check {
  display: flex; align-items: center; gap: 0.6rem;
  min-height: var(--pv2-tap);
  margin-top: 0.85rem;
  color: var(--pv2-dim);
  font-size: 0.88rem;
  cursor: pointer;
}
.pv2-check input { width: 20px; height: 20px; accent-color: var(--pv2-gold); flex-shrink: 0; }

.pv2-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.35rem;
  padding: 2.25rem 1rem;
  border: 2px dashed rgba(255, 199, 0, 0.28);
  border-radius: 14px;
  background: rgba(255, 199, 0, 0.03);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pv2-drop:hover, .pv2-drop:focus-visible, .pv2-drop.is-over {
  border-color: var(--pv2-gold);
  background: rgba(255, 199, 0, 0.08);
  outline: none;
}
.pv2-drop.is-busy { opacity: 0.5; pointer-events: none; }
.pv2-drop-icon { font-size: 1.6rem; color: var(--pv2-gold); line-height: 1; }
.pv2-drop-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pv2-text);
}
.pv2-drop-sub { font-size: 0.83rem; color: var(--pv2-faint); }

.pv2-progress { margin-top: 1.1rem; }
.pv2-progress-head {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.84rem; color: var(--pv2-dim); margin-bottom: 0.45rem;
}
.pv2-progress-track { height: 7px; border-radius: 4px; background: var(--pv2-gunmetal); overflow: hidden; }
.pv2-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--pv2-gold), #ff9500);
  border-radius: 4px;
  transition: width 0.25s ease;
}
.pv2-progress-bar.is-upload { background: linear-gradient(90deg, var(--pv2-green), var(--pv2-blue)); }

/* ---------- virtual dyno ---------- */

.pv2-beta {
  display: flex; align-items: flex-start; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(255, 140, 0, 0.07);
  border: 1px solid rgba(255, 140, 0, 0.25);
}
.pv2-beta-tag {
  font-family: 'Orbitron', monospace;
  font-size: 0.58rem; letter-spacing: 1.6px;
  background: var(--pv2-amber); color: #0a0a0a;
  padding: 0.2rem 0.45rem; border-radius: 4px;
  flex-shrink: 0; margin-top: 0.1rem;
}
.pv2-beta-text { flex: 1 1 240px; font-size: 0.83rem; line-height: 1.5; color: var(--pv2-dim); margin: 0; }
.pv2-beta-link {
  background: none; border: none;
  color: var(--pv2-amber);
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem; letter-spacing: 1.2px; text-transform: uppercase;
  text-decoration: underline;
  min-height: var(--pv2-tap);
  padding: 0 0.2rem;
  cursor: pointer;
}
.pv2-beta-link:hover { color: var(--pv2-gold); }

.pv2-chart {
  min-height: 240px;
  border-radius: 12px;
  background: var(--pv2-black);
  border: 1px solid var(--pv2-line);
  overflow-x: auto;
}
.pv2-chart svg { display: block; width: 100%; height: auto; min-width: 560px; }
.pv2-chart .pv2-state { min-width: 0; }

/* ---------- power progress ---------- */

.pv2-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.pv2-stat {
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-radius: 11px;
  padding: 0.85rem;
  text-align: center;
}
.pv2-stat-label {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 0.58rem; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pv2-faint);
  margin-bottom: 0.35rem;
}
.pv2-stat-value {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem; font-weight: 700;
  color: var(--pv2-gold);
}
.pv2-stat-value em { font-style: normal; font-size: 0.6rem; margin-left: 0.25rem; color: var(--pv2-faint); }
.pv2-stat-value--up   { color: var(--pv2-green); }
.pv2-stat-value--down { color: var(--pv2-red); }

.pv2-progress-chart { border-radius: 12px; background: var(--pv2-black); border: 1px solid var(--pv2-line); overflow-x: auto; }
.pv2-progress-chart svg { display: block; width: 100%; height: auto; min-width: 420px; font-family: 'Orbitron', monospace; }

/* ---------- datalogs ---------- */

.pv2-logs { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.pv2-log {
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
}
.pv2-log-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.pv2-log-pick {
  display: flex; align-items: center; gap: 0.6rem;
  min-height: var(--pv2-tap);
  min-width: 0; flex: 1 1 200px;
  cursor: pointer;
}
.pv2-log-pick.is-disabled { cursor: not-allowed; opacity: 0.65; }
.pv2-log-pick input { width: 20px; height: 20px; accent-color: var(--pv2-green); flex-shrink: 0; }
.pv2-log-name {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--pv2-text);
  word-break: break-all;
}
.pv2-chip {
  font-family: 'Orbitron', monospace;
  font-size: 0.58rem; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 0.28rem 0.6rem; border-radius: 20px; white-space: nowrap;
}
.pv2-chip--ok      { background: rgba(0, 255, 135, 0.14); color: var(--pv2-green); }
.pv2-chip--skipped { background: rgba(255, 140, 0, 0.14); color: var(--pv2-amber); }
.pv2-chip--failed  { background: rgba(239, 68, 68, 0.14); color: var(--pv2-red); }

.pv2-log-meta {
  display: flex; gap: 0.9rem; flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: 0.78rem; color: var(--pv2-faint);
}
.pv2-grade { color: var(--pv2-gold); }
.pv2-log-peaks {
  display: flex; gap: 1.25rem;
  margin-top: 0.6rem;
  font-size: 0.85rem; color: var(--pv2-dim);
}
.pv2-log-peaks strong { font-family: 'Orbitron', monospace; font-size: 1.05rem; color: var(--pv2-green); }
.pv2-log-reason { margin-top: 0.6rem; font-size: 0.85rem; line-height: 1.5; color: var(--pv2-amber); }
.pv2-log-notes  { margin-top: 0.6rem; font-size: 0.85rem; line-height: 1.5; color: var(--pv2-dim); }
.pv2-log-actions { margin-top: 0.8rem; }

/* ---------- tune health ---------- */

.pv2-health-hero {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding-bottom: 1.1rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--pv2-line);
}
.pv2-health-grade {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 86px; height: 86px; flex-shrink: 0;
  border-radius: 16px;
  border: 2px solid var(--grade-color, var(--pv2-gold));
  background: rgba(255, 255, 255, 0.02);
}
.pv2-health-letter {
  font-family: 'Orbitron', monospace;
  font-size: 2rem; font-weight: 900; line-height: 1;
  color: var(--grade-color, var(--pv2-gold));
}
.pv2-health-score { font-size: 0.75rem; color: var(--pv2-faint); margin-top: 0.2rem; }
.pv2-health-summary { flex: 1 1 220px; }
.pv2-health-remarks { color: var(--pv2-text); font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.6rem; }
.pv2-health-tally { display: flex; gap: 1rem; font-family: 'Orbitron', monospace; font-size: 0.66rem; letter-spacing: 1.2px; text-transform: uppercase; }
.pv2-health-tally .is-pass { color: var(--pv2-green); }
.pv2-health-tally .is-warn { color: var(--pv2-amber); }
.pv2-health-tally .is-fail { color: var(--pv2-red); }

.pv2-health-flags {
  list-style: none;
  margin-bottom: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.pv2-health-flags li { color: var(--pv2-red); font-size: 0.88rem; line-height: 1.5; }
.pv2-health-flags li + li { margin-top: 0.35rem; }

.pv2-health-systems {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.pv2-health-system {
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}
.pv2-health-system.is-pass { border-left-color: var(--pv2-green); }
.pv2-health-system.is-warn { border-left-color: var(--pv2-amber); }
.pv2-health-system.is-fail { border-left-color: var(--pv2-red); }
.pv2-health-system-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.pv2-health-system-name { font-family: 'Orbitron', monospace; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--pv2-text); }
.pv2-health-system-grade { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; color: var(--pv2-gold); }
.pv2-health-system-note { margin-top: 0.35rem; font-size: 0.82rem; line-height: 1.45; color: var(--pv2-faint); }

.pv2-health-actions { margin-top: 1.25rem; }
.pv2-health-rerun {
  margin-top: 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 11px;
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
}
.pv2-health-rerun p { font-size: 0.88rem; line-height: 1.5; color: var(--pv2-dim); margin-bottom: 0.75rem; }
.pv2-health-rerun strong { color: var(--pv2-gold); }

/* ---------- tune files ---------- */

.pv2-complete {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(0, 255, 135, 0.08);
  border: 1px solid rgba(0, 255, 135, 0.3);
}
.pv2-complete-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--pv2-green); color: #0a0a0a;
  font-weight: 700;
}
.pv2-complete strong {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pv2-green);
  margin-bottom: 0.2rem;
}
.pv2-complete span { font-size: 0.87rem; line-height: 1.45; color: var(--pv2-dim); }

.pv2-tunes { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.pv2-tune {
  background: var(--pv2-midnight);
  border: 1px solid var(--pv2-line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.pv2-tune.is-new { border-color: rgba(0, 255, 135, 0.35); background: rgba(0, 255, 135, 0.04); }
.pv2-tune-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pv2-tune-titles { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1 1 200px; }
.pv2-tune-rev {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem; letter-spacing: 1px;
  color: var(--pv2-text);
}
.pv2-new, .pv2-final {
  font-size: 0.55rem; letter-spacing: 1.4px;
  padding: 0.18rem 0.45rem; border-radius: 4px;
}
.pv2-new   { background: var(--pv2-green); color: #0a0a0a; }
.pv2-final { background: rgba(255, 199, 0, 0.18); color: var(--pv2-gold); }
.pv2-tune-file { font-size: 0.82rem; color: var(--pv2-faint); word-break: break-all; }
.pv2-tune-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.78rem; color: var(--pv2-faint); }
.pv2-tune-notes {
  margin-top: 0.7rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--pv2-line);
  font-size: 0.88rem; line-height: 1.55; color: var(--pv2-dim);
}

/* ---------- messages ---------- */

.pv2-thread {
  display: flex; flex-direction: column; gap: 0.85rem;
  max-height: 460px; overflow-y: auto;
  padding-right: 0.25rem;
}
.pv2-msg { max-width: 82%; border-radius: 12px; padding: 0.75rem 0.95rem; }
.pv2-msg--theirs { align-self: flex-start; background: var(--pv2-midnight); border: 1px solid var(--pv2-line-gold); }
.pv2-msg--mine   { align-self: flex-end;   background: rgba(0, 255, 135, 0.06); border: 1px solid rgba(0, 255, 135, 0.2); }
.pv2-msg-head { display: flex; justify-content: space-between; gap: 0.9rem; margin-bottom: 0.35rem; }
.pv2-msg-who {
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--pv2-gold);
}
.pv2-msg--mine .pv2-msg-who { color: var(--pv2-green); }
.pv2-msg-when { font-size: 0.7rem; color: var(--pv2-faint); white-space: nowrap; }
.pv2-msg-body { font-size: 0.94rem; line-height: 1.55; color: var(--pv2-text); overflow-wrap: anywhere; }
@media (max-width: 640px) { .pv2-msg { max-width: 94%; } }

.pv2-compose { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--pv2-line); }
.pv2-compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.6rem; }

/* ---------- feedback modal ---------- */

.pv2-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.pv2-modal {
  width: 100%; max-width: 520px;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line-gold);
  border-radius: 16px;
  max-height: 92vh; overflow-y: auto;
}
.pv2-modal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--pv2-line);
}
.pv2-modal-head h3 {
  font-family: 'Orbitron', monospace;
  font-size: 0.82rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pv2-gold);
}
.pv2-modal-close {
  background: none; border: none;
  color: var(--pv2-dim);
  font-size: 1.7rem; line-height: 1;
  min-width: var(--pv2-tap); min-height: var(--pv2-tap);
  cursor: pointer;
}
.pv2-modal-close:hover { color: var(--pv2-gold); }
.pv2-modal-body { padding: 1.35rem; display: flex; flex-direction: column; gap: 1rem; }
.pv2-modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.pv2-alert {
  padding: 0.7rem 0.9rem; border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--pv2-red);
  font-size: 0.88rem;
}

/* Neutral banner used when the shop-status fetch fails outright. */
.pv2-shop--unknown { border-color: rgba(255, 255, 255, 0.14); }
.pv2-shop--unknown .pv2-shop-dot { background: var(--pv2-faint); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.pv2-shop--unknown .pv2-shop-state { color: var(--pv2-dim); }


/* ============================================================
   Workspace width
   ------------------------------------------------------------
   The order workspace carries a dyno chart, stat tiles, a datalog
   table and a message thread. The site-wide .container is capped at
   1180px for marketing pages, which leaves ~360px of dead space each
   side on a 1920 monitor and squeezes the chart.

   Widen the container only while the workspace is on screen; the auth
   screen stays narrow and centred, which is right for a login form.
   ============================================================ */

/* show()/hide() toggle the INLINE display: hidden => "display: none",
   visible => "" (empty, falling back to the stylesheet). So match on the
   absence of "none" rather than the presence of "block". */
.container:has(> #workspaceView:not([style*="none"])) {
    max-width: min(1600px, 96vw);
}

/* Give the dyno chart room to breathe once there's width to use. */
@media (min-width: 1400px) {
    .pv2-chart svg { max-height: 620px; }
}


/* ============================================================
   Upload control
   ------------------------------------------------------------
   The file input is visually hidden rather than display:none or
   [hidden]. A <label for> pointing at a display:none input is
   unreliable across browsers; a clipped-but-rendered input is the
   robust pattern and keeps the label working with no JS at all.
   ============================================================ */

.pv2-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pv2-drop-btn {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    background: var(--championship-gold, #ffc700);
    color: #0a0a0a;
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: filter 0.15s ease, transform 0.15s ease;
    /* Comfortably above the 44px touch-target minimum for a phone in a garage. */
    min-height: 44px;
    line-height: 1.6;
}

.pv2-drop-btn:hover { filter: brightness(1.1); }
.pv2-drop-btn:active { transform: translateY(1px); }

.pv2-drop:focus-within .pv2-drop-btn,
.pv2-drop-btn:focus-visible {
    outline: 2px solid var(--championship-gold, #ffc700);
    outline-offset: 3px;
}


/* ============================================================================
   PORTAL V2 — full tune health report  (`pv2-dt-` = detail)
   ----------------------------------------------------------------------------
   Rendered by portal/js/health-detail.js, into a modal over the order
   workspace. Same carbon/gold/green identity as the rest of the portal.

   Phone first: the modal is full-bleed under 640px, every table scrolls inside
   its own box rather than pushing the page sideways, and nothing relies on
   hover to be discoverable.
   ============================================================================ */

/* ---------- expandable subsystem rows on the summary card ---------- */

.pv2-health-system-more { width: 100%; }
.pv2-health-system-more > summary {
  cursor: pointer;
  list-style: none;
  min-height: var(--pv2-tap);
  align-items: center;
}
.pv2-health-system-more > summary::-webkit-details-marker { display: none; }
.pv2-health-system-more > summary:focus-visible {
  outline: 2px solid var(--pv2-gold);
  outline-offset: 2px;
  border-radius: 6px;
}

.pv2-health-chevron {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  margin-left: 0.15rem;
  border-right: 2px solid var(--pv2-faint);
  border-bottom: 2px solid var(--pv2-faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}
.pv2-health-system-more[open] .pv2-health-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.pv2-health-system-detail { padding-top: 0.6rem; }

.pv2-health-meter,
.pv2-dt-meter {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 0.15rem 0 0.5rem;
}
.pv2-health-meter > span,
.pv2-dt-meter > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--pv2-faint);
}
.is-pass .pv2-health-meter > span, .is-pass .pv2-dt-meter > span { background: var(--pv2-green); }
.is-warn .pv2-health-meter > span, .is-warn .pv2-dt-meter > span { background: var(--pv2-amber); }
.is-fail .pv2-health-meter > span, .is-fail .pv2-dt-meter > span { background: var(--pv2-red); }

.pv2-health-system-meta,
.pv2-dt-system-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-faint);
}

.pv2-health-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* ---------- summary hero doubles as the way in ---------- */

.pv2-health-hero--go {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--pv2-line);
  border-radius: 14px;
  padding: 0.9rem;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.pv2-health-hero--go:hover { border-color: var(--pv2-line-gold); background: rgba(255, 199, 0, 0.04); }
.pv2-health-hero--go:focus-visible { outline: 2px solid var(--pv2-gold); outline-offset: 2px; }

.pv2-health-cta {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--pv2-gold);
}

/* ---------- the full-screen report ---------- */

body.pv2-dt-locked { overflow: hidden; }

.pv2-fs {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  background: var(--pv2-black);
}

.pv2-fs-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem clamp(0.85rem, 3vw, 2rem);
  background: var(--pv2-chrome);
  border-bottom: 1px solid var(--pv2-line-gold);
}

.pv2-fs-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--pv2-tap);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 199, 0, 0.4);
  background: transparent;
  color: var(--pv2-gold);
  font-family: 'Orbitron', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  cursor: pointer;
}
.pv2-fs-back:hover { background: rgba(255, 199, 0, 0.1); }
.pv2-fs-back:focus-visible { outline: 2px solid var(--pv2-gold); outline-offset: 2px; }

.pv2-fs-titles { flex: 1 1 auto; min-width: 0; }
.pv2-fs-titles h2 {
  font-family: 'Michroma', 'Orbitron', monospace;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pv2-gold);
  line-height: 1.4;
}
.pv2-fs-logname {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--pv2-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv2-fs-grade {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--grade-color, #ffc700);
  font-family: 'Orbitron', monospace;
  line-height: 1;
}
.pv2-fs-grade strong { font-size: 1rem; font-weight: 900; color: var(--grade-color, #ffc700); }
.pv2-fs-grade em { font-style: normal; font-size: 0.62rem; color: var(--pv2-faint); }

.pv2-fs-pdf { flex: 0 0 auto; }

.pv2-fs-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pv2-fs-scroll:focus { outline: none; }

.pv2-fs-inner {
  padding: clamp(1rem, 2.5vw, 2rem) clamp(0.85rem, 3vw, 2rem) 3rem;
}

@media (max-width: 640px) {
  .pv2-fs-bar { flex-wrap: wrap; gap: 0.5rem 0.7rem; }
  .pv2-fs-titles { order: 3; flex-basis: 100%; }
  .pv2-fs-titles h2 { font-size: 0.7rem; }
  /* Two rows of header is the most a phone can spare — the same PDF button
     lives at the foot of the report. */
  .pv2-fs-pdf { display: none; }
}

.pv2-dt { display: flex; flex-direction: column; gap: 1.1rem; }

/* Grade + explanation sit side by side once there's room for them to. */
.pv2-dt-top { display: grid; gap: 1.1rem; align-items: start; }
.pv2-dt-top-main,
.pv2-dt-top-side { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }

@media (min-width: 1000px) {
  .pv2-dt-top { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr); }
}

/* Two columns of detail sections on a desktop, one on a phone. */
.pv2-dt-sections { display: grid; gap: 0.55rem; align-items: start; }
@media (min-width: 1100px) {
  .pv2-dt-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv2-dt-section + .pv2-dt-section { margin-top: 0; }
}

/* ---------- hero ---------- */

.pv2-dt-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem;
  border-radius: 14px;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  align-self: start;
}
.pv2-dt-grade {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 3px solid var(--grade-color, #ffc700);
  box-shadow: 0 0 22px -6px var(--grade-color, #ffc700);
}
.pv2-dt-grade-letter {
  font-family: 'Orbitron', monospace;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  color: var(--grade-color, #ffc700);
}
.pv2-dt-grade-score { font-size: 0.7rem; color: var(--pv2-faint); margin-top: 0.25rem; }

.pv2-dt-hero-body { flex: 1 1 240px; min-width: 0; }
.pv2-dt-remarks { color: var(--pv2-text); font-size: 0.95rem; line-height: 1.55; margin-bottom: 0.65rem; }
.pv2-dt-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.64rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pv2-faint);
}
.pv2-dt-tally strong { font-size: 0.95rem; margin-right: 0.2rem; }
.pv2-dt-tally .is-pass strong { color: var(--pv2-green); }
.pv2-dt-tally .is-warn strong { color: var(--pv2-amber); }
.pv2-dt-tally .is-fail strong { color: var(--pv2-red); }

/* ---------- critical flags ---------- */

.pv2-dt-critical {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.pv2-dt-critical-tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pv2-red);
}
.pv2-dt-critical ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.pv2-dt-critical li { color: #ffb4b4; font-size: 0.92rem; line-height: 1.5; }

/* ---------- "why is my grade this" ---------- */

.pv2-dt-why {
  padding: 1rem;
  border-radius: 14px;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  border-left: 4px solid var(--pv2-faint);
}
.pv2-dt-why.is-pass { border-left-color: var(--pv2-green); }
.pv2-dt-why.is-warn { border-left-color: var(--pv2-amber); }
.pv2-dt-why.is-fail { border-left-color: var(--pv2-red); }

.pv2-dt-why-title {
  font-family: 'Michroma', 'Orbitron', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--pv2-gold);
  margin-bottom: 0.55rem;
}
.pv2-dt-why-lead { color: var(--pv2-text); font-size: 0.94rem; line-height: 1.6; }

.pv2-dt-notes { list-style: none; margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
.pv2-dt-note {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--pv2-faint);
}
.pv2-dt-note.is-warn { border-left-color: var(--pv2-amber); }
.pv2-dt-note.is-fail { border-left-color: var(--pv2-red); }
.pv2-dt-note.is-pass { border-left-color: var(--pv2-green); }

.pv2-dt-note-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.66rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-text);
}
.pv2-dt-note-text { font-size: 0.9rem; line-height: 1.55; color: var(--pv2-dim); }
.pv2-dt-note-channels { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.2rem; }
.pv2-dt-note-channels-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.58rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-faint);
  width: 100%;
}
.pv2-dt-note-channels code,
.pv2-dt-para code,
.pv2-dt-hint code {
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 199, 0, 0.1);
  border: 1px solid var(--pv2-line-gold);
  color: var(--pv2-gold);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

/* ---------- coverage strip ---------- */

.pv2-dt-coverage { display: flex; flex-direction: column; gap: 0.45rem; }
.pv2-dt-coverage-bar { display: flex; gap: 3px; }
.pv2-dt-coverage-cell {
  flex: 1 1 0;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}
.pv2-dt-coverage-cell.is-pass { background: var(--pv2-green); }
.pv2-dt-coverage-cell.is-fail { background: var(--pv2-red); }
.pv2-dt-coverage-text {
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--pv2-faint);
}

/* ---------- generic blocks ---------- */

.pv2-dt-block { display: flex; flex-direction: column; gap: 0.7rem; }
.pv2-dt-heading {
  font-family: 'Michroma', 'Orbitron', monospace;
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pv2-gold);
}
.pv2-dt-sub {
  margin-top: 0.9rem;
  font-family: 'Orbitron', monospace;
  font-size: 0.63rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pv2-dim);
}
.pv2-dt-para { font-size: 0.92rem; line-height: 1.6; color: var(--pv2-text); margin-bottom: 0.6rem; }
.pv2-dt-para.is-pass { color: var(--pv2-green); }
.pv2-dt-para.is-warn { color: var(--pv2-amber); }
.pv2-dt-para.is-fail { color: #ffb4b4; }
.pv2-dt-hint { font-size: 0.82rem; line-height: 1.55; color: var(--pv2-faint); margin: 0.5rem 0; }

.pv2-dt-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin: 0.5rem 0; }
.pv2-dt-bullets li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--pv2-dim);
}
.pv2-dt-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pv2-gold);
}

/* ---------- subsystem cards ---------- */

.pv2-dt-systems {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.7rem;
}
.pv2-dt-system {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  border-left: 3px solid var(--pv2-faint);
}
.pv2-dt-system.is-pass { border-left-color: var(--pv2-green); }
.pv2-dt-system.is-warn { border-left-color: var(--pv2-amber); }
.pv2-dt-system.is-fail { border-left-color: var(--pv2-red); }
.pv2-dt-system-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.pv2-dt-system-name {
  font-family: 'Orbitron', monospace;
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-text);
}
.pv2-dt-system-note { margin-top: 0.5rem; font-size: 0.85rem; line-height: 1.5; color: var(--pv2-dim); }

/* ---------- grade badge ---------- */

.pv2-dt-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  border: 1px solid var(--dt-color, #6f6f6f);
  background: rgba(255, 255, 255, 0.03);
  font-family: 'Orbitron', monospace;
  line-height: 1;
}
.pv2-dt-badge strong { font-size: 0.86rem; font-weight: 700; color: var(--dt-color, #ffc700); }
.pv2-dt-badge em { font-style: normal; font-size: 0.6rem; color: var(--pv2-faint); }

/* ---------- collapsible detail sections ---------- */

.pv2-dt-section {
  border-radius: 12px;
  background: var(--pv2-chrome);
  border: 1px solid var(--pv2-line);
  overflow: hidden;
}
.pv2-dt-section + .pv2-dt-section { margin-top: 0.55rem; }

.pv2-dt-section-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  min-height: var(--pv2-tap);
  cursor: pointer;
  list-style: none;
}
.pv2-dt-section-head::-webkit-details-marker { display: none; }
.pv2-dt-section-head:hover { background: rgba(255, 199, 0, 0.05); }
.pv2-dt-section-head:focus-visible { outline: 2px solid var(--pv2-gold); outline-offset: -2px; }

.pv2-dt-section-title {
  flex: 1 1 auto;
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pv2-text);
}
.pv2-dt-chevron {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--pv2-faint);
  border-bottom: 2px solid var(--pv2-faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}
.pv2-dt-section[open] .pv2-dt-chevron { transform: rotate(225deg) translate(-2px, -2px); }

.pv2-dt-section-body {
  padding: 0.9rem 0.95rem 1rem;
  border-top: 1px solid var(--pv2-line);
}

/* ---------- fact grid ---------- */

.pv2-dt-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  margin: 0.6rem 0;
}
.pv2-dt-fact {
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--pv2-line);
}
.pv2-dt-fact dt {
  font-family: 'Orbitron', monospace;
  font-size: 0.56rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-faint);
  margin-bottom: 0.25rem;
}
.pv2-dt-fact dd { font-size: 0.95rem; font-weight: 600; color: var(--pv2-text); overflow-wrap: anywhere; }
.pv2-dt-fact.is-pass dd { color: var(--pv2-green); }
.pv2-dt-fact.is-warn dd { color: var(--pv2-amber); }
.pv2-dt-fact.is-fail dd { color: var(--pv2-red); }

/* ---------- tables ---------- */

.pv2-dt-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.6rem 0;
  border-radius: 9px;
  border: 1px solid var(--pv2-line);
}
.pv2-dt-tablewrap:focus-visible { outline: 2px solid var(--pv2-gold); outline-offset: 2px; }

.pv2-dt-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.pv2-dt-table th {
  padding: 0.5rem 0.7rem;
  background: var(--pv2-gunmetal);
  font-family: 'Orbitron', monospace;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pv2-dim);
  text-align: left;
  white-space: nowrap;
}
.pv2-dt-table td {
  padding: 0.5rem 0.7rem;
  border-top: 1px solid var(--pv2-line);
  color: var(--pv2-text);
  white-space: nowrap;
}
.pv2-dt-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.pv2-dt-table td.is-pass { color: var(--pv2-green); }
.pv2-dt-table td.is-warn { color: var(--pv2-amber); }
.pv2-dt-table td.is-fail { color: var(--pv2-red); }

/* ---------- charts ---------- */

.pv2-dt-chart {
  width: 100%;
  aspect-ratio: 12 / 5;
  min-height: 190px;
  margin-top: 0.7rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pv2-black);
}
.pv2-dt-chart svg { display: block; width: 100%; height: 100%; }

/* ---------- notices + actions ---------- */

.pv2-dt-notice {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 0.95rem;
  border-radius: 11px;
  font-size: 0.9rem;
  line-height: 1.55;
  background: rgba(255, 140, 0, 0.1);
  border: 1px solid rgba(255, 140, 0, 0.3);
  color: var(--pv2-amber);
}
.pv2-dt-notice strong { color: var(--pv2-text); }
.pv2-dt-notice span { color: var(--pv2-dim); }

/* Deliberately NOT sticky: the header bar already keeps Back and the PDF
   download in reach, and a pinned action bar eats a third of a phone screen
   and covers the report underneath it. */
.pv2-dt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1.1rem;
  margin-top: 0.3rem;
  border-top: 1px solid var(--pv2-line);
}

@media (prefers-reduced-motion: reduce) {
  .pv2-dt-chevron, .pv2-health-chevron { transition: none; }
}


/* ============================================================
   "Waiting on base map" notice
   ------------------------------------------------------------
   The tuning process starts with Mike. Until a base map exists
   the customer has nothing to log, so the uploader is pushed
   back visually and this explains why.
   ============================================================ */

.pv2-await {
    background: linear-gradient(135deg, rgba(255,199,0,0.10), rgba(255,199,0,0.04));
    border: 1px solid rgba(255, 199, 0, 0.35);
    border-left: 4px solid var(--championship-gold, #ffc700);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.4rem;
}

.pv2-await-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--championship-gold, #ffc700);
    margin-bottom: 0.55rem;
}

.pv2-await-body {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--platinum, #e5e5e5);
}

.pv2-await-foot {
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 199, 0, 0.18);
    font-size: 0.8rem;
    color: var(--silver, #a3a3a3);
}

/* De-emphasised uploader while waiting — still usable, just not the CTA. */
.pv2-drop.is-secondary,
.pv2-drop-wrap.is-secondary .pv2-drop {
    opacity: 0.55;
    filter: saturate(0.6);
    transition: opacity 0.2s ease, filter 0.2s ease;
}
.pv2-drop.is-secondary:hover,
.pv2-drop-wrap.is-secondary .pv2-drop:hover,
.pv2-drop.is-secondary:focus-within {
    opacity: 1;
    filter: none;
}


/* Auth pane helper links (e.g. "Reset with your order number") */
.auth-alt {
    margin-top: 1.1rem;
    text-align: center;
    font-size: 0.86rem;
    color: var(--silver, #a3a3a3);
}
.auth-alt a { color: var(--boost-blue, #00d4ff); }
.auth-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--championship-gold, #ffc700);
    font-family: inherit;
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.auth-link:hover { filter: brightness(1.15); }

/* Three tabs no longer fit side by side on a narrow phone. */
@media (max-width: 460px) {
    .auth-tabs { flex-wrap: wrap; }
    .auth-tab { flex: 1 1 45%; font-size: 0.66rem; letter-spacing: 1px; }
}
