/*
 * KitBay Design System — Phase 1 & 2
 * Visual foundation layer. Loaded after style.css so these rules
 * progressively override existing styling without breaking layout or functionality.
 * Phase 1: design tokens, typography, cards, buttons, inputs, global motion.
 * Phase 2: sidebar modernization (gradient bg, pill nav, depth, footer).
 */

/* ── Inter font ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-main:    #f5f7fb;
  --bg-surface: rgba(255, 255, 255, 0.82);

  /* Sidebar */
  --sidebar-width:    280px;
  --sidebar-bg-start: #070b14;
  --sidebar-bg-end:   #101827;
  --sidebar-pill-active-bg:   rgba(255, 122, 0, 0.16);  /* --kb-orange-bg    */
  --sidebar-pill-active-ring: rgba(255, 122, 0, 0.34);  /* --kb-orange-soft  */
  --sidebar-hover-bg:         rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #6b7280;

  /* Accent — KB Premium Orange, aligned to --kb-orange-* system */
  --accent:      #ff7a00;   /* --kb-orange-base */
  --accent-light: #ff8f1f;  /* --kb-orange-hot  */
  --accent-soft: rgba(255, 122, 0, 0.12);

  /* Borders */
  --border-soft: rgba(255, 255, 255, 0.5);

  /* Shadows */
  --shadow-soft:  0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 18px 45px rgba(15, 23, 42, 0.12);

  /* Radii */
  --radius-card:   20px;
  --radius-input:  12px;
  --radius-button: 12px;

  /* Transitions */
  --transition-fast:   0.2s ease;
  --transition-normal: 0.3s ease;
}


/* ── Base font ───────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ── App background ──────────────────────────────────────────────────────────
 * Two-layer canvas:
 * 1. A soft cool-grey base (warmer and richer than clinical white)
 * 2. Extremely faint atmospheric colour fields — the page echoes the sidebar
 *    palette without competing with it.  If you are unsure whether you can
 *    see the atmosphere, it is probably calibrated correctly.
 * background-attachment: fixed means the atmosphere stays anchored while
 * page content scrolls — maintains the "environment" feeling.
 * ─────────────────────────────────────────────────────────────────────────── */
body {
  background:
    /* Orange: upper-right warmth */
    radial-gradient(ellipse 55% 40% at 85% 8%,
      rgba(255, 122, 0, 0.10) 0%,
      transparent 70%),

    /* Purple: upper-left ambient */
    radial-gradient(ellipse 50% 35% at 18% 12%,
      rgba(124, 58, 237, 0.09) 0%,
      transparent 65%),

    /* Green: upper-right corner hint */
    radial-gradient(ellipse 35% 25% at 94% 5%,
      rgba(16, 185, 129, 0.055) 0%,
      transparent 58%),

    /* Base: rich mid-dark slate — halfway between light canvas and dashboard */
    linear-gradient(150deg, #1d2b3f 0%, #19253a 100%);

  background-attachment: fixed;
}

/* Ensure the gradient fills the whole viewport */
.main-content {
  background: transparent;
  min-height: 100vh;
}


/* ── Typography ──────────────────────────────────────────────────────────── */
.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Small labels and table headers */
table th,
.detail-label,
.equipment-category-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}


/* ── Glass card component ────────────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

/* Hover shadow on ALL glass-cards */
.glass-card:hover {
  box-shadow: var(--shadow-hover);
}

/* Lift effect only on interactive (link/button) glass-cards — not static containers */
a.glass-card:hover,
button.glass-card:hover {
  transform: translateY(-2px);
}


/* ── Card modernization ──────────────────────────────────────────────────── */

/* General .card */
.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

/* Dashboard stat / action cards */
.dashboard-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dashboard-card:hover,
.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Dashboard section containers */
.dashboard-section-card {
  background: rgba(255, 255, 255, 0.90);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* Summary cards (quick-actions area etc.) */
.summary-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

/* Upcoming job cards */
.upcoming-job-card {
  background: rgba(255, 255, 255, 0.90);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.upcoming-job-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.25);
}

/* Job list cards */
.job-card {
  background: rgba(255, 255, 255, 0.90);
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.job-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Remove the heavy 4px orange outline from action cards — replace with soft accent */
.dashboard-action-card {
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08) !important;
}

/* Dashboard section container (legacy .dashboard-section) */
.dashboard-section {
  background: rgba(255, 255, 255, 0.90);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}


/* ── Button system ───────────────────────────────────────────────────────── */

/* Primary button — gradient amber */
.btn-primary,
.btn-unified.btn-unified-primary,
.btn-unified-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-button);
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-primary:hover,
.btn-unified.btn-unified-primary:hover,
.btn-unified-primary:hover {
  background: linear-gradient(135deg, #e08900 0%, #f59e0b 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.28);
  color: #fff;
}

/* Secondary button — modern soft grey */
.btn-secondary,
.btn-unified.btn-unified-secondary,
.btn-unified-secondary {
  background: rgba(241, 245, 249, 0.95);
  color: #374151;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: var(--radius-button);
  font-weight: 500;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover,
.btn-unified.btn-unified-secondary:hover,
.btn-unified-secondary:hover {
  background: rgba(226, 232, 240, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Danger button — stays red but softened */
.btn-danger,
.btn-unified.btn-unified-danger,
.btn-unified-danger {
  border-radius: var(--radius-button);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-danger:hover,
.btn-unified.btn-unified-danger:hover,
.btn-unified-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.18);
}

/* Success button */
.btn-success {
  border-radius: var(--radius-button);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.2);
}

/* Header pill buttons (Edit, Delete on detail pages) */
.btn-header {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(209, 213, 219, 0.8);
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-header:hover {
  background: rgba(243, 244, 246, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

/* Base .btn gets modern radius */
.btn {
  border-radius: var(--radius-button);
  letter-spacing: -0.01em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

/* Calendar navigation buttons */
.calendar-nav-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.calendar-nav-btn:hover {
  background: linear-gradient(135deg, #e08900 0%, #f59e0b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.28);
}


/* ── Input system ────────────────────────────────────────────────────────── */

.form-group input,
.form-group textarea,
.form-group select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="url"],
input[type="password"],
textarea,
select {
  border-radius: var(--radius-input);
  border: 1px solid rgba(203, 213, 225, 0.8);
  background: rgba(255, 255, 255, 0.90);
  padding: 11px 14px;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Remove default browser focus outline */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(255, 255, 255, 0.98);
}

/* Small bulk-add inputs stay compact */
.bulk-input {
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

/* Rate card crew grid inputs */
.crew-rate-row .col-rate input,
.crew-rate-row .col-qty input {
  border-radius: 7px;
  border: 1px solid rgba(209, 213, 219, 0.8);
}

.crew-rate-row .col-rate input:focus,
.crew-rate-row .col-qty input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


/* ── Sidebar — Phase 2 modernization ─────────────────────────────────────── */

/*
 * The sidebar width token is now 280px (defined in :root above).
 * Because style.css uses `width: var(--sidebar-width)` for .sidebar
 * and `margin-left: var(--sidebar-width)` for .main-content, both
 * update automatically — no layout rules needed here.
 */

/* ① Sidebar shell: deep cinematic navy + containment for atmosphere layer */
.sidebar {
  background:
    radial-gradient(ellipse 85% 28% at 50% 0%, rgba(65, 105, 200, 0.055), transparent 65%),
    linear-gradient(
      180deg,
      var(--sidebar-bg-start) 0%,
      var(--sidebar-bg-end)   100%
    );
  background-color: transparent;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.048),
    4px 0 28px rgba(0, 0, 0, 0.44);
  /* Contain the atmosphere layer — must not bleed into dashboard */
  overflow: hidden;
  isolation: isolate;
}

/* ── Atmospheric lighting layer ──────────────────────────────────────────────
 * Sits behind all sidebar content via z-index: 0.
 * Strongest near the logo (top ~25%), falls off through nav, near-zero by footer.
 * Colour hierarchy: purple dominant → orange warm accent → green tiny edge accent.
 * Adjustable entirely through the gradient stops / opacity values below.
 */
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    /* Purple: tight ambient key — restrained to upper-left quadrant only.
     * Small source + blur(28px) = soft haze that stays in place. */
    radial-gradient(ellipse 58% 32% at 40% 5%,
      rgba(124, 58, 237, 0.15) 0%,
      rgba(124, 58, 237, 0.07) 28%,
      rgba(124, 58, 237, 0.02) 54%,
      transparent 75%),

    /* Purple: whisper halo into upper nav — tight, very low opacity */
    radial-gradient(ellipse 46% 24% at 33% 30%,
      rgba(124, 58, 237, 0.04) 0%,
      rgba(124, 58, 237, 0.015) 34%,
      transparent 60%),

    /* Orange: primary bounce — wide horizontally, centred under logo.
     * Higher peak opacity so it reads as a distinct warm source. */
    radial-gradient(ellipse 88% 44% at 48% 26%,
      rgba(255, 122, 0, 0.24) 0%,
      rgba(255, 122, 0, 0.12) 22%,
      rgba(255, 122, 0, 0.04) 46%,
      transparent 68%),

    /* Orange: secondary warmth — sits right beneath the wordmark, left-of-centre */
    radial-gradient(ellipse 60% 30% at 38% 18%,
      rgba(255, 122, 0, 0.14) 0%,
      rgba(255, 122, 0, 0.06) 28%,
      transparent 58%),

    /* Orange: long soft tail — extremely low, reaches Equipment/Jobs as warm falloff */
    radial-gradient(ellipse 80% 55% at 42% 42%,
      rgba(255, 122, 0, 0.048) 0%,
      rgba(255, 122, 0, 0.020) 36%,
      transparent 72%),

    /* Green: practical above wordmark — opacity +25%, kept tight and high */
    radial-gradient(ellipse 36% 20% at 65% 4%,
      rgba(16, 185, 129, 0.20) 0%,
      rgba(16, 185, 129, 0.088) 28%,
      transparent 52%);

  /* Soften into volumetric haze */
  filter: blur(28px);

  /* Vertical falloff mask: slightly relaxed — faint through Equipment/Jobs,
   * still mostly gone by Roles & Rates / Invoice Settings */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,1)    0%,
    rgba(0,0,0,1)    16%,
    rgba(0,0,0,0.72) 30%,
    rgba(0,0,0,0.42) 52%,
    rgba(0,0,0,0.14) 72%,
    rgba(0,0,0,0.02) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,1)    0%,
    rgba(0,0,0,1)    16%,
    rgba(0,0,0,0.72) 30%,
    rgba(0,0,0,0.42) 52%,
    rgba(0,0,0,0.14) 72%,
    rgba(0,0,0,0.02) 100%
  );

  /* Very slow, barely perceptible drift — keeps it feeling alive, not static */
  animation: sidebarAtmosphereDrift 80s ease-in-out infinite;
  transform: translateZ(0);
}

@keyframes sidebarAtmosphereDrift {
  0%,  100% { transform: translate3d(  0px,  0px, 0) scale(1);     }
  50%        { transform: translate3d( -4px,  3px, 0) scale(1.015); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar::before { animation: none !important; }
}

/* ② Header area — let .sidebar-brand own the height/centering */
.sidebar-header {
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 100%
  );
}

/* ③ Logo brand area — tight-cropped asset (alpha>=90) so faint glow pixels
 *   are excluded; flex centering lands on the actual letterforms. */
.sidebar-brand {
  position: relative;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

/* All direct sidebar sections sit above the atmosphere ::before layer */
.sidebar-header,
.sidebar-brand,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

/* Nav menu also above atmosphere */
.nav-menu {
  position: relative;
  z-index: 1;
}

/* Logo wrap and subtitle also explicitly above atmosphere */
.sidebar-brand .sidebar-logo-wrap,
.sidebar-brand .sidebar-subtitle { position: relative; z-index: 1; }

/*
 * Logo wrapper — stacking context; no overflow:hidden so the logo's own
 * ambient glow/shadow isn't clipped.
 */
.sidebar-logo-wrap {
  display: block;
  position: relative;
  line-height: 0;
}

/* Logo: tight-cropped asset — faint glow pixels excluded, symmetric padding
 *   baked in. No transform nudge required. */
.sidebar-header .sidebar-logo {
  width: 280px;
  max-width: 94%;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 1;
}

/* ④ Subtitle: Inter, refined letter-spacing, softer opacity */
.sidebar-subtitle {
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  opacity: 1; /* override old 0.8 */
  max-width: 200px;
}

/* ⑤ Nav menu: tighter top gap, horizontal padding for pill inset */
.nav-menu {
  padding: 14px 0 20px;
}

/* ⑥ Nav links: pill shape via margin inset + border-radius */
.nav-menu li a {
  margin: 2px 12px;
  padding: 11px 16px;
  border-radius: 10px;
  border-left: none;
  color: rgba(255, 255, 255, 0.62);
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition:
    background  var(--transition-fast),
    color       var(--transition-fast),
    box-shadow  var(--transition-fast),
    transform   var(--transition-fast);
  /* Flex so icon sits inline with label */
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Nav icon — shared base */
.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(130, 158, 210, 0.58);
  transition:
    color   var(--transition-fast),
    filter  var(--transition-fast);
  /* Scale SVGs to fill the slot for ~15% size increase */
  line-height: 0;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

/* Hover: softer brightening */
.nav-menu li a:hover .nav-icon {
  color: rgba(185, 210, 240, 0.78);
}

/* Active: KB orange hot — only active icon glows */
.nav-menu li a.active .nav-icon {
  color: #ff8f1f;   /* --kb-orange-hot */
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(255, 95, 0, 0.90)) drop-shadow(0 0 4px rgba(255, 122, 0, 0.50));
}

/* ⑦ Hover: subtle brightness only — must NOT look like active */
.nav-menu li a:hover {
  background: var(--sidebar-hover-bg);   /* rgba(255,255,255,0.07) — neutral white tint */
  color: rgba(255, 255, 255, 0.88);
  border-left: none;
  transform: none;                        /* no slide — slides feel like selection */
  box-shadow: none;
}

/* ⑧ Active: glowing module — right-side KB orange bloom */
.nav-menu li a.active {
  background: var(--sidebar-pill-active-bg);
  color: #ff8f1f;  /* --kb-orange-hot */
  border-left: none;
  position: relative;
  box-shadow:
    3px 0 0 rgba(255, 122, 0, 0.84),            /* strong right-edge rim  [--kb-orange-border] */
    12px 0 28px rgba(255, 95, 0, 0.38),          /* right bloom extending outside pill          */
    0 0 0 1px var(--sidebar-pill-active-ring),   /* orange outline ring                         */
    0 0 28px rgba(255, 95, 0, 0.14),             /* overall ambient glow   [--kb-orange-haze]   */
    inset 0 1px 0 rgba(255, 180, 60, 0.16),      /* glossy top highlight                        */
    inset -18px 0 26px rgba(255, 95, 0, 0.11),   /* internal haze, strongest right              */
    inset 0 -1px 0 rgba(0, 0, 0, 0.14);          /* bottom depth shadow                         */
  font-weight: 600;
  transform: none;
}

/* Active hover — stay KB orange, slightly brighter */
.nav-menu li a.active:hover {
  background: rgba(255, 122, 0, 0.20);
  transform: none;
}

/* ⑨ Footer: subtle separator, refined spacing */
.sidebar-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

/* Footer logo — softer, smaller */
.sidebar-footer .sidebar-logo {
  max-width: 140px;
  opacity: 0.72;
  transition: opacity var(--transition-fast);
  margin: 0 auto;
  display: block;
}

.sidebar-footer .sidebar-logo:hover {
  opacity: 0.92;
}


/* ── Flash messages — soft modernized look ───────────────────────────────── */
.flash-message {
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
  font-weight: 500;
}

.flash-message.success {
  background: rgba(220, 252, 231, 0.95);
  color: #14532d;
  border-left: 4px solid #22c55e;
}

.flash-message.error {
  background: rgba(254, 226, 226, 0.95);
  color: #7f1d1d;
  border-left: 4px solid #ef4444;
}

.flash-message.warning {
  background: rgba(254, 243, 199, 0.95);
  color: #78350f;
  border-left: 4px solid #f59e0b;
}


/* ── Table refinements ───────────────────────────────────────────────────── */
table th {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

table tr:hover {
  background: rgba(248, 250, 252, 0.95);
}


/* ── Detail items (equipment detail page etc.) ───────────────────────────── */
.detail-item {
  background: rgba(248, 250, 252, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  transition: box-shadow var(--transition-fast);
}

.detail-item:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}


/* ── Global motion ───────────────────────────────────────────────────────── */

/* Smooth transitions for interactive elements not already covered */
a,
button,
[role="button"],
.stat-link,
.equipment-name,
.link-subtle,
.job-title-link,
.job-card-title-link,
.upcoming-job-card-link {
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

/* Dropdown / select elements */
select {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}


/* ── Dashboard Phase 3 — hero, two-column grid, empty state, ambient ─────── */

/* Position context so the ambient accent div can use absolute positioning */
.dashboard-container {
  position: relative;
}

/* Ambient radial glow — very subtle warm highlight top-right, dashboard-only */
.dashboard-ambient-accent {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 55%;
  height: 420px;
  background: radial-gradient(
    circle at top right,
    rgba(245, 158, 11, 0.10),
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

/* Hero card */
.dashboard-hero {
  position: relative;
  z-index: 1;
  padding: 36px 40px 28px;
  margin-bottom: 1.5rem;
}

/* Hero body: text left, buttons right */
.dashboard-hero-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.dashboard-hero-text {
  flex: 1 1 260px;
}

.dashboard-hero-greeting {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
}

.dashboard-hero-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.dashboard-hero-actions {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex-shrink: 0;
  padding-top: 4px;
}

/* Metric chips — compact indicators beneath the hero CTA row */
.dashboard-hero-metrics {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(226, 232, 240, 0.65);
}

.dashboard-metric-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.55rem 1.4rem;
  background: rgba(248, 250, 252, 0.90);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  text-decoration: none;
  min-width: 90px;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.dashboard-metric-chip:hover {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.10);
}

.metric-chip-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.metric-chip-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Two-column grid: 35 / 65 split */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 35fr 65fr;
  gap: 1.5rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Stack vertically on narrower screens */
@media (max-width: 920px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 28px 24px 22px;
  }

  .dashboard-hero-body {
    flex-direction: column;
    gap: 1.25rem;
  }

  .dashboard-hero-actions {
    width: 100%;
  }
}

/* Empty state — centered within the jobs card */
.dashboard-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 0.4rem;
}

.dashboard-empty-icon {
  color: rgba(203, 213, 225, 0.9);
  margin-bottom: 0.75rem;
  line-height: 1;
}

.dashboard-empty-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.dashboard-empty-body {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 210px;
  line-height: 1.55;
  margin: 0;
}

.dashboard-empty-cta {
  margin-top: 1rem;
}


/* ================================
   KitBay UI 2.0 Shared Components
   ================================
   CSS foundation only. No classes applied to templates in this pass.
   All tokens defined here; wire into page templates individually.
   Colour direction: dark cinematic chrome around clean floating work surfaces.
   Reference feel: Frame.io / DaVinci Resolve / Linear.
   ============================================================= */

/* ── UI 2.0 tokens ───────────────────────────────────────────────────────── */
:root {
  /* Panel / work surface — warm light grey, not clinical white */
  --kb2-panel-bg:          #f2efe9;
  --kb2-panel-bg-tinted:   #ebe7e1;
  --kb2-panel-border:      rgba(15, 23, 42, 0.10);
  --kb2-panel-radius:      20px;
  --kb2-panel-shadow:      0 1px 2px  rgba(15, 23, 42, 0.04),
                           0 4px 12px rgba(15, 23, 42, 0.06),
                           0 20px 48px rgba(15, 23, 42, 0.08);
  --kb2-panel-shadow-hover:0 2px 4px  rgba(15, 23, 42, 0.05),
                           0 8px 20px rgba(15, 23, 42, 0.08),
                           0 32px 64px rgba(15, 23, 42, 0.10);

  /* Page */
  --kb2-page-gap:          2rem;

  /* Table */
  --kb2-table-header-bg:   #f8f9fb;
  --kb2-table-header-text: #6b7280;
  --kb2-table-divider:     rgba(15, 23, 42, 0.07);
  --kb2-table-row-hover:   rgba(255, 122, 0, 0.035);
  --kb2-table-radius:      14px;

  /* Buttons */
  --kb2-btn-height:        40px;
  --kb2-btn-radius:        10px;
  --kb2-btn-font-size:     0.875rem;
  --kb2-btn-font-weight:   600;

  /* Inputs */
  --kb2-input-height:      42px;
  --kb2-input-radius:      10px;
  --kb2-input-border:      rgba(15, 23, 42, 0.14);
  --kb2-input-border-focus:var(--accent);
  --kb2-input-bg:          #ffffff;
  --kb2-input-shadow-focus:0 0 0 3px rgba(255, 122, 0, 0.14);

  /* Badges */
  --kb2-badge-radius:      6px;
  --kb2-badge-font-size:   0.72rem;

  /* Spacing helpers */
  --kb2-sp-sm:  0.5rem;
  --kb2-sp-md:  1rem;
  --kb2-sp-lg:  1.75rem;
}


/* ── 1. Page shell ───────────────────────────────────────────────────────── */

/* Outer wrapper — gives consistent horizontal padding and vertical rhythm */
.kb-page {
  padding: 2rem 2.25rem 3rem;
  max-width: 1280px;
}

/* Dark canvas: page header text must be light so it reads against the slate bg */
.kb-page-title {
  color: rgba(255, 255, 255, 0.92);
}

.kb-page-subtitle {
  color: rgba(255, 255, 255, 0.50);
}

.kb-page-title .kb-muted {
  color: rgba(255, 255, 255, 0.42);
}

/* Header row: title + optional actions */
.kb-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.kb-page-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

.kb-page-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
  font-weight: 400;
  line-height: 1.5;
}

.kb-page-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}


/* ── 2. Panels / work surfaces ───────────────────────────────────────────── */

/* Main content panel — white floating card */
.kb-panel {
  background: var(--kb2-panel-bg);
  border: 1px solid var(--kb2-panel-border);
  border-radius: var(--kb2-panel-radius);
  box-shadow: var(--kb2-panel-shadow);
  overflow: hidden;
}

/* Panel header: title row within a panel */
.kb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--kb2-panel-border);
  background: var(--kb2-panel-bg-tinted);
  flex-wrap: wrap;
}

.kb-panel-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.kb-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Card grid — responsive masonry-free grid */
.kb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Individual card — nested inside grid or standalone */
.kb-card {
  background: var(--kb2-panel-bg);
  border: 1px solid var(--kb2-panel-border);
  border-radius: 16px;
  box-shadow: var(--kb2-panel-shadow);
  padding: 1.375rem 1.5rem;
  transition:
    box-shadow var(--transition-fast),
    transform  var(--transition-fast);
}

.kb-card:hover {
  box-shadow: var(--kb2-panel-shadow-hover);
  transform: translateY(-2px);
}


/* ── 3. Tables ───────────────────────────────────────────────────────────── */

.kb-table-wrap {
  overflow-x: auto;
  border-radius: var(--kb2-table-radius);
}

.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.kb-table th {
  background: var(--kb2-table-header-bg);
  color: var(--kb2-table-header-text);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--kb2-table-divider);
}

.kb-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--kb2-table-divider);
  vertical-align: middle;
  line-height: 1.5;
}

.kb-table tbody tr:last-child td {
  border-bottom: none;
}

.kb-table tbody tr {
  transition: background var(--transition-fast);
}

.kb-table tbody tr:hover {
  background: var(--kb2-table-row-hover);
}

/* Clickable table rows — used for list pages */
.kb-table-row-link {
  cursor: pointer;
}

.kb-table-row-link:hover td {
  color: var(--accent);
}


/* ── 4. Buttons ──────────────────────────────────────────────────────────── */

/* Base button — all variants extend this */
.kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  height: var(--kb2-btn-height);
  padding: 0 1.125rem;
  border-radius: var(--kb2-btn-radius);
  font-family: 'Inter', sans-serif;
  font-size: var(--kb2-btn-font-size);
  font-weight: var(--kb2-btn-font-weight);
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background    var(--transition-fast),
    box-shadow    var(--transition-fast),
    transform     var(--transition-fast),
    color         var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.kb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kb-btn:active {
  transform: scale(0.975);
}

/* Primary — KB orange gradient, slightly restrained for light pages */
.kb-btn-primary {
  background: linear-gradient(135deg, #ff8f1f 0%, #ff6800 100%);
  color: #ffffff;
  box-shadow:
    0 1px 3px rgba(255, 104, 0, 0.30),
    0 4px 12px rgba(255, 104, 0, 0.18);
}

.kb-btn-primary:hover {
  background: linear-gradient(135deg, #ff9b35 0%, #ff7510 100%);
  box-shadow:
    0 2px 6px rgba(255, 104, 0, 0.36),
    0 8px 20px rgba(255, 104, 0, 0.22);
  color: #ffffff;
  text-decoration: none;
}

/* Secondary — outlined, neutral */
.kb-btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.kb-btn-secondary:hover {
  background: #f8f9fb;
  border-color: rgba(15, 23, 42, 0.22);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.09);
  color: var(--text-primary);
  text-decoration: none;
}

/* Danger — red destructive actions */
.kb-btn-danger {
  background: #ffffff;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.06);
}

.kb-btn-danger:hover {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.40);
  color: #b91c1c;
  text-decoration: none;
}

/* Ghost — text-only, no border/bg */
.kb-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0 0.75rem;
}

.kb-btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-primary);
  text-decoration: none;
}


/* ── 5. Inputs / filters ─────────────────────────────────────────────────── */

.kb-input {
  display: block;
  width: 100%;
  height: var(--kb2-input-height);
  padding: 0 0.875rem;
  background: var(--kb2-input-bg);
  border: 1px solid var(--kb2-input-border);
  border-radius: var(--kb2-input-radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition:
    border-color  var(--transition-fast),
    box-shadow    var(--transition-fast);
  outline: none;
}

.kb-input::placeholder {
  color: #9ca3af;
}

.kb-input:focus {
  border-color: var(--kb2-input-border-focus);
  box-shadow: var(--kb2-input-shadow-focus);
}

/* Search — with an inner icon slot (icon lives in template markup) */
.kb-search {
  position: relative;
  display: flex;
  align-items: center;
}

.kb-search .kb-input {
  padding-left: 2.5rem;
}

.kb-search-icon {
  position: absolute;
  left: 0.875rem;
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Filter row — horizontal strip of controls */
.kb-filter-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* Filter pills — compact toggle selectors */
.kb-filter-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 0.875rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition:
    background    var(--transition-fast),
    color         var(--transition-fast),
    border-color  var(--transition-fast),
    box-shadow    var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.kb-filter-pill:hover {
  border-color: rgba(255, 122, 0, 0.38);
  color: var(--accent);
  background: rgba(255, 122, 0, 0.04);
  text-decoration: none;
}

.kb-filter-pill.active {
  background: var(--accent-soft);
  border-color: rgba(255, 122, 0, 0.40);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 122, 0, 0.18);
}


/* ── 6. Status badges ────────────────────────────────────────────────────── */

.kb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2em 0.65em;
  border-radius: var(--kb2-badge-radius);
  font-size: var(--kb2-badge-font-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}

.kb-badge-success {
  background: rgba(16, 185, 129, 0.10);
  color: #065f46;
}

.kb-badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.kb-badge-danger {
  background: rgba(220, 38, 38, 0.10);
  color: #991b1b;
}

.kb-badge-muted {
  background: rgba(107, 114, 128, 0.10);
  color: #4b5563;
}


/* ── 7. Empty states ─────────────────────────────────────────────────────── */

.kb-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 0.875rem;
}

.kb-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.kb-empty-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.kb-empty-copy {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.6;
  margin: 0;
}


/* ── 8. Utility classes ──────────────────────────────────────────────────── */

/* Muted text */
.kb-muted {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Horizontal divider */
.kb-divider {
  border: none;
  border-top: 1px solid var(--kb2-panel-border);
  margin: 0;
}

/* Vertical flex stack with consistent gap */
.kb-stack {
  display: flex;
  flex-direction: column;
  gap: var(--kb2-sp-md);
}

/* Horizontal inline cluster */
.kb-inline {
  display: flex;
  align-items: center;
  gap: var(--kb2-sp-sm);
  flex-wrap: wrap;
}

/* Spacers */
.kb-spacer-sm { height: var(--kb2-sp-sm); }
.kb-spacer-md { height: var(--kb2-sp-md); }
.kb-spacer-lg { height: var(--kb2-sp-lg); }


/* ── Print guard — exclude UI 2.0 components from print context ──────────── */
@media print {
  .kb-panel,
  .kb-card {
    background: white !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .kb-btn-primary {
    background: var(--accent) !important;
    box-shadow: none !important;
  }
}


/* ── Dark glass panel — for premium inner pages (Equipment, Jobs, etc.) ──────
 * Visual language matches the dashboard glass cards exactly.
 * Use .kb-glass-panel instead of .kb-panel on dark-canvas pages.
 * ─────────────────────────────────────────────────────────────────────────── */

.kb-glass-panel {
  background: rgba(18, 26, 48, 0.74);
  backdrop-filter: blur(32px) saturate(1.55);
  -webkit-backdrop-filter: blur(32px) saturate(1.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-card);
  box-shadow:
    /* top rim — brighter edge highlight */
    0  1px 0   rgba(255, 255, 255, 0.22) inset,
    /* left rim */
    1px 0  0   rgba(255, 255, 255, 0.07) inset,
    /* inner blue/purple ambient depth */
    0  0  72px rgba(60, 92, 220, 0.07) inset,
    /* base drop shadow */
    0 32px 64px rgba(0, 0, 0, 0.55),
    0  6px 20px rgba(0, 0, 0, 0.40),
    /* outer edge definition */
    0  0   0   1px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: box-shadow 260ms ease-out;
}

.kb-glass-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.028);
  flex-wrap: wrap;
}

.kb-glass-panel-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.90);
  margin: 0;
}


/* ── Dark table — premium data surface for dark glass panels ─────────────── */

.kb-table-dark {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
}

.kb-table-dark th {
  background: rgba(255, 255, 255, 0.042);
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.695rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  padding: 0.875rem 1.375rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kb-table-dark td {
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  vertical-align: middle;
  line-height: 1.5;
}

.kb-table-dark tbody tr:last-child td {
  border-bottom: none;
}

.kb-table-dark tbody tr {
  transition: background 150ms ease, box-shadow 150ms ease;
}

.kb-table-dark tbody tr:hover {
  background: rgba(255, 122, 0, 0.052);
  box-shadow: inset 3px 0 0 rgba(255, 122, 0, 0.38);
}

.kb-table-dark .kb-muted {
  color: rgba(255, 255, 255, 0.58);
}

.kb-table-dark a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 500;
}

.kb-table-dark a:hover {
  color: #ff8f1f;
}

/* ── Inventory status badges ─────────────────────────────────────────────── */
.kb-status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.kb-status-available {
  background: rgba(39, 174, 96, 0.13);
  color: rgba(72, 210, 133, 0.92);
  border: 1px solid rgba(39, 174, 96, 0.26);
}
.kb-status-limited {
  background: rgba(243, 156, 18, 0.12);
  color: rgba(243, 175, 72, 0.92);
  border: 1px solid rgba(243, 156, 18, 0.26);
}
.kb-status-booked {
  background: rgba(220, 53, 69, 0.12);
  color: rgba(240, 100, 110, 0.92);
  border: 1px solid rgba(220, 53, 69, 0.26);
}


/* ── Buttons for dark surfaces ───────────────────────────────────────────── */

/* Glass outline — secondary action on dark */
.kb-btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.kb-btn-glass:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

/* Glass danger — destructive action on dark */
.kb-btn-glass-danger {
  background: rgba(220, 38, 38, 0.10);
  color: rgba(255, 115, 115, 0.90);
  border: 1px solid rgba(220, 38, 38, 0.34);
  box-shadow: none;
}

.kb-btn-glass-danger:hover {
  background: rgba(220, 38, 38, 0.18);
  color: rgba(255, 135, 135, 0.98);
  border-color: rgba(220, 38, 38, 0.50);
  text-decoration: none;
}


/* ── Empty state on dark panels ──────────────────────────────────────────── */

.kb-glass-panel .kb-empty-state { }

.kb-glass-panel .kb-empty-icon {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.28);
}

.kb-glass-panel .kb-empty-title {
  color: rgba(255, 255, 255, 0.82);
}

.kb-glass-panel .kb-empty-copy {
  color: rgba(255, 255, 255, 0.38);
}


/* ── Jobs page dark premium components ───────────────────────────────────── */

/* Unified toolbar strip — search + filter pills in one glass band */
.kb-toolbar-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background: rgba(18, 26, 48, 0.68);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 20px 48px rgba(0, 0, 0, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(0, 0, 0, 0.22);
  flex-wrap: wrap;
  margin-bottom: 1.125rem;
}

.kb-toolbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  width: 260px;
}

.kb-search-input {
  width: 100%;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 0 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.kb-search-input::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

.kb-search-input:focus {
  border-color: rgba(255, 122, 0, 0.48);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.10);
}

.kb-search-clear {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.40);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: color 140ms ease;
}

.kb-search-clear:hover {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

/* Toolbar divider */
.kb-toolbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}

/* Filter pills row — sits inside the toolbar strip */
.kb-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.kb-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.044);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.kb-filter-pill:hover {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.80);
  border-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.kb-filter-pill-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.32);
  font-weight: 400;
}

/* Active pill — All (restrained glass outline, not solid orange) */
.kb-filter-pill--active {
  background: rgba(255, 122, 0, 0.08);
  color: rgba(255, 143, 31, 0.90);
  border-color: rgba(255, 122, 0, 0.28);
}
.kb-filter-pill--active .kb-filter-pill-count { color: rgba(255, 143, 31, 0.52); }
.kb-filter-pill--active:hover {
  background: rgba(255, 122, 0, 0.13);
  color: #ff8f1f;
  border-color: rgba(255, 122, 0, 0.40);
}

/* Active pill — Enquiry (blue) */
.kb-filter-pill--active-enquiry {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.34);
}
.kb-filter-pill--active-enquiry .kb-filter-pill-count { color: rgba(147, 197, 253, 0.55); }
.kb-filter-pill--active-enquiry:hover {
  background: rgba(59, 130, 246, 0.20);
  color: #bfdbfe;
}

/* Active pill — Pencil (amber) */
.kb-filter-pill--active-pencil {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.34);
}
.kb-filter-pill--active-pencil .kb-filter-pill-count { color: rgba(252, 211, 77, 0.55); }
.kb-filter-pill--active-pencil:hover {
  background: rgba(245, 158, 11, 0.20);
  color: #fde68a;
}

/* Active pill — Booked (green) */
.kb-filter-pill--active-booked {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.34);
}
.kb-filter-pill--active-booked .kb-filter-pill-count { color: rgba(110, 231, 183, 0.55); }
.kb-filter-pill--active-booked:hover {
  background: rgba(16, 185, 129, 0.20);
  color: #a7f3d0;
}

/* Active pill — Completed (gray) */
.kb-filter-pill--active-completed {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}
.kb-filter-pill--active-completed .kb-filter-pill-count { color: rgba(203, 213, 225, 0.50); }
.kb-filter-pill--active-completed:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

/* Toolbar spacer — pushes create button to far right */
.kb-toolbar-spacer { flex: 1 1 auto; }


/* ── Job cards grid ───────────────────────────────────────────────────────── */

.kb-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.kb-job-card {
  display: flex;
  flex-direction: column;
  background: rgba(18, 26, 48, 0.66);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    1px 0 0 rgba(255, 255, 255, 0.055) inset,
    0 0 48px rgba(60, 92, 220, 0.05) inset,
    0 20px 48px rgba(0, 0, 0, 0.48),
    0 4px 14px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition:
    box-shadow   240ms ease-out,
    transform    240ms ease-out,
    border-color 240ms ease-out;
  position: relative;
}

.kb-job-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    1px 0 0 rgba(255, 255, 255, 0.07) inset,
    0 0 56px rgba(60, 92, 220, 0.07) inset,
    0 28px 60px rgba(0, 0, 0, 0.52),
    0 6px 20px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 0, 0, 0.28);
}

/* Status left-edge accent bar */
.kb-job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 14px 0 0 14px;
  background: var(--kb-job-accent, rgba(255, 255, 255, 0.10));
  transition: opacity 240ms ease;
}

/* Per-status accent colors */
.kb-job-card--enquiry  { --kb-job-accent: rgba(59, 130, 246, 0.70); }
.kb-job-card--pencil   { --kb-job-accent: rgba(245, 158, 11, 0.70); }
.kb-job-card--booked   { --kb-job-accent: rgba(16, 185, 129, 0.70); }
.kb-job-card--completed{ --kb-job-accent: rgba(148, 163, 184, 0.42); }


/* Card header */
.kb-job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.375rem 1.375rem 0.875rem;
}

.kb-job-card-title-block {
  flex: 1;
  min-width: 0;
}

.kb-job-card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  line-height: 1.35;
  display: block;
  margin: 0 0 0.2rem;
  transition: color 140ms ease;
}

.kb-job-card-title:hover {
  color: #ff8f1f;
  text-decoration: none;
}

.kb-job-card-client {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.56);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Quick-status select — dark surface */
.kb-status-select {
  height: 28px;
  padding: 0 1.6rem 0 0.6rem;
  font-size: 0.775rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.38)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 140ms ease;
  flex-shrink: 0;
}

.kb-status-select:focus {
  border-color: rgba(255, 122, 0, 0.50);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.10);
}

/* Status-specific select colors */
.kb-status-select.status-enquiry {
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.28);
}
.kb-status-select.status-pencil {
  background-color: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.28);
}
.kb-status-select.status-booked {
  background-color: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.28);
}
.kb-status-select.status-completed {
  background-color: rgba(148, 163, 184, 0.10);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.22);
}


/* Card body — meta info */
.kb-job-card-body {
  flex: 1;
  padding: 0 1.375rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kb-job-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.52);
}

.kb-job-card-meta-icon {
  color: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.kb-job-card-meta-value {
  color: rgba(255, 255, 255, 0.70);
}

/* Divider between body and footer */
.kb-job-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 1.375rem;
}

/* Card footer — actions */
.kb-job-card-footer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.375rem;
}

.kb-job-card-footer .kb-btn {
  flex: 1;
}

/* View button inside cards — slightly attenuated so it doesn't overpower */
.kb-job-card-footer .kb-btn-primary {
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.82) 0%, rgba(220, 80, 0, 0.78) 100%);
  box-shadow:
    0 1px 0 rgba(255, 180, 80, 0.22) inset,
    0 4px 12px rgba(255, 95, 0, 0.22);
}

.kb-job-card-footer .kb-btn-primary:hover {
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.92) 0%, rgba(230, 90, 0, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 180, 80, 0.28) inset,
    0 6px 16px rgba(255, 95, 0, 0.30);
}


/* ── Job status badge — standalone text label ─────────────────────────────── */

.kb-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kb-status-dot--enquiry  { background: #60a5fa; box-shadow: 0 0 6px rgba(59,130,246,0.55); }
.kb-status-dot--pencil   { background: #fbbf24; box-shadow: 0 0 6px rgba(245,158,11,0.55); }
.kb-status-dot--booked   { background: #34d399; box-shadow: 0 0 6px rgba(16,185,129,0.55); }
.kb-status-dot--completed{ background: #94a3b8; box-shadow: none; }


/* ── Jobs responsive ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .kb-jobs-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 680px) {
  .kb-jobs-grid {
    grid-template-columns: 1fr;
  }
  .kb-toolbar-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
  }
  .kb-toolbar-search {
    width: 100%;
  }
  .kb-toolbar-divider {
    display: none;
  }
  .kb-filter-pills {
    gap: 0.3rem;
  }
}


/* ── Jobs empty state in dark glass ──────────────────────────────────────── */

.kb-jobs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(18, 26, 48, 0.62);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.44), 0 4px 12px rgba(0, 0, 0, 0.28);
}

.kb-jobs-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 1.125rem;
}

.kb-jobs-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 0.4rem;
}

.kb-jobs-empty-copy {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0 0 1.25rem;
  max-width: 340px;
}

.kb-jobs-empty-actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  justify-content: center;
}


/* ── Invoice Archive dark components ─────────────────────────────────────── */

/* 1. Search input — force dark glass over any light-mode input resets */
.dashboard-premium-page .kb-search-input {
  background: rgba(8, 10, 16, 0.50) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.90) !important;
}
.dashboard-premium-page .kb-search-input::placeholder {
  color: rgba(255, 255, 255, 0.34) !important;
}
.dashboard-premium-page .kb-search-input:focus {
  background: rgba(8, 10, 16, 0.62) !important;
  border-color: rgba(243, 156, 18, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.13) !important;
  outline: none !important;
}

/* 2. Toolbar breathing room — slightly more generous on invoice page */
.dashboard-premium-page .kb-toolbar-strip {
  gap: 1rem;
  padding: 0.9375rem 1.25rem;
}

/* 4. View button — slightly brighter rim, more presence */
.kb-btn-invoice-view {
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: rgba(255, 255, 255, 0.82) !important;
}
.kb-btn-invoice-view:hover {
  border-color: rgba(255, 255, 255, 0.42) !important;
  background: rgba(255, 255, 255, 0.11) !important;
  color: rgba(255, 255, 255, 0.98) !important;
}

/* 5. Row padding — scoped to invoice tables only, does not affect Equipment */
.kb-invoice-table .kb-table-dark td {
  padding: 1.25rem 1.375rem;
}


/* Status badge — dark overrides scoped to the premium dark page
 * The partial renders .invoice-status-pill + .invoice-status-{status}
 * We override the light-mode colours only on dark-canvas pages.           */
.dashboard-premium-page .invoice-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
}

.dashboard-premium-page .invoice-status-draft {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(203, 213, 225, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
}

.dashboard-premium-page .invoice-status-sent {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.26);
}

.dashboard-premium-page .invoice-status-paid {
  background: rgba(16, 185, 129, 0.13);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.28);
}

.dashboard-premium-page .invoice-status-overdue {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(252, 165, 165, 0.90);
  border-color: rgba(239, 68, 68, 0.28);
}


/* Invoice filter pill active variants */
.kb-filter-pill--active-draft {
  background: rgba(148, 163, 184, 0.11);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.26);
}
.kb-filter-pill--active-draft .kb-filter-pill-count { color: rgba(203, 213, 225, 0.48); }
.kb-filter-pill--active-draft:hover {
  background: rgba(148, 163, 184, 0.17);
  color: #e2e8f0;
}

.kb-filter-pill--active-sent {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.28);
}
.kb-filter-pill--active-sent .kb-filter-pill-count { color: rgba(147, 197, 253, 0.50); }
.kb-filter-pill--active-sent:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

.kb-filter-pill--active-paid {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.28);
}
.kb-filter-pill--active-paid .kb-filter-pill-count { color: rgba(110, 231, 183, 0.50); }
.kb-filter-pill--active-paid:hover {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

.kb-filter-pill--active-overdue {
  background: rgba(239, 68, 68, 0.11);
  color: rgba(252, 165, 165, 0.88);
  border-color: rgba(239, 68, 68, 0.26);
}
.kb-filter-pill--active-overdue .kb-filter-pill-count { color: rgba(252, 165, 165, 0.46); }
.kb-filter-pill--active-overdue:hover {
  background: rgba(239, 68, 68, 0.17);
  color: rgba(252, 165, 165, 0.98);
}

/* Additional status dots for invoice statuses */
.kb-status-dot--draft    { background: #94a3b8; box-shadow: none; }
.kb-status-dot--sent     { background: #60a5fa; box-shadow: 0 0 5px rgba(59,130,246,0.50); }
.kb-status-dot--paid     { background: #34d399; box-shadow: 0 0 5px rgba(16,185,129,0.50); }
.kb-status-dot--overdue  { background: #f87171; box-shadow: 0 0 5px rgba(239,68,68,0.55); }


/* Month navigation strip */
.kb-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.125rem;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.20), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.kb-month-nav-label {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  flex: 1;
}

.kb-month-nav-side {
  flex: 0 0 auto;
  min-width: 130px;
}

.kb-month-nav-side--right {
  text-align: right;
}

/* Pagination strip inside glass panel */
.kb-pagination-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.375rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}

.kb-pagination-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

/* Search result count label */
.kb-search-result-label {
  font-size: 0.8375rem;
  color: rgba(255, 255, 255, 0.46);
  padding: 0 0 0.875rem;
}


/* ── Invoice Settings dark form components ────────────────────────────────── */

/* Dark glass inputs — scoped so other forms keep their current styling */
.dashboard-premium-page .kb-settings-input,
.dashboard-premium-page .kb-settings-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.058);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 0.625rem 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
  box-sizing: border-box;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dashboard-premium-page .kb-settings-input::placeholder,
.dashboard-premium-page .kb-settings-textarea::placeholder {
  color: rgba(255, 255, 255, 0.26);
}

.dashboard-premium-page .kb-settings-input:focus,
.dashboard-premium-page .kb-settings-textarea:focus {
  border-color: rgba(243, 156, 18, 0.52);
  background: rgba(8, 10, 16, 0.60);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.11);
  outline: none;
}

/* Settings form labels */
.kb-settings-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.4rem;
}

/* Form hint / helper copy */
.kb-form-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.32);
  margin-top: 0.4rem;
  line-height: 1.55;
}

/* Settings field group */
.kb-form-group {
  margin-bottom: 1.125rem;
}

/* Two-column form row */
.kb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .kb-form-row { grid-template-columns: 1fr; }
}

/* Settings section title — used inside .kb-settings-panel-header */
.kb-settings-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
  margin: 0;
  padding: 0;
}

/* Full-bleed panel header bar — sits at the top of kb-glass-panel,
   separated by a bottom border. Integrates cleanly with overflow:hidden. */
.kb-settings-panel-header {
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.022);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Settings panel body — padding for form fields inside the panel */
.kb-settings-panel-body {
  padding: 1.5rem 1.875rem;
}

/* Dark scrollbars for textarea on premium dark pages */
.dashboard-premium-page .kb-settings-textarea::-webkit-scrollbar {
  width: 5px;
}
.dashboard-premium-page .kb-settings-textarea::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.dashboard-premium-page .kb-settings-textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}
.dashboard-premium-page .kb-settings-textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Dark upload dropzone */
.kb-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.375rem 1.5rem;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease;
  user-select: none;
}
.kb-dropzone:hover {
  border-color: rgba(243, 156, 18, 0.42);
  background: rgba(243, 156, 18, 0.035);
}
.kb-dropzone.dragover {
  border-color: rgba(243, 156, 18, 0.60);
  background: rgba(243, 156, 18, 0.06);
}
.kb-dropzone input[type="file"] { display: none; }
.kb-dropzone-icon { color: rgba(255, 255, 255, 0.28); }
.kb-dropzone-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
}
.kb-dropzone-hint {
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.30);
}

/* Existing logo preview card (server-rendered) */
.kb-logo-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  margin-top: 0.875rem;
}
.kb-logo-preview-img {
  max-height: 68px;
  max-width: 200px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.kb-logo-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.kb-logo-preview-filename {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* New-file JS-created preview (dark green success feel) */
.logo-preview {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.125rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.20);
  border-radius: 10px;
  margin-top: 0.875rem;
}
.logo-preview img {
  max-height: 48px;
  max-width: 150px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.logo-preview-name {
  flex: 1;
  font-size: 0.8rem;
  color: rgba(110, 231, 183, 0.78);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logo-preview-remove {
  font-size: 0.8rem;
  color: rgba(252, 165, 165, 0.78);
  cursor: pointer;
  text-decoration: underline;
  flex-shrink: 0;
}

/* Info panel — quieter secondary glass block below main table */

/* Manage Rates — outlined orange: primary intent without flooding every row */
.kb-btn-manage {
  background: rgba(243, 156, 18, 0.07);
  color: #F39C12;
  border: 1px solid rgba(243, 156, 18, 0.42);
  box-shadow: none;
}
.kb-btn-manage:hover {
  background: rgba(243, 156, 18, 0.15);
  border-color: rgba(243, 156, 18, 0.68);
  color: #f5a523;
  box-shadow: 0 0 12px rgba(243, 156, 18, 0.12);
}

/* Billing unit badge — dark muted pill */
.kb-billing-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Info panel — quieter secondary glass block below main table */
.kb-info-panel {
  background: rgba(255, 255, 255, 0.020);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top-color: rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  margin-top: 1.5rem;
}

.kb-info-panel-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
  margin: 0 0 0.75rem;
}

.kb-info-panel-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.42);
}


/* ── End KitBay UI 2.0 Shared Components ─────────────────────────────────── */


/* ── Print safety — do NOT apply design system visuals to print ──────────── */
@media print {
  body {
    background: white !important;
    font-family: 'DM Sans', sans-serif !important;
  }

  .glass-card,
  .card,
  .dashboard-card,
  .dashboard-section-card,
  .summary-card,
  .upcoming-job-card,
  .job-card,
  .dashboard-section {
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
  }

  .btn-primary,
  .btn-unified-primary {
    background: #F39C12 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  input,
  select,
  textarea {
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
