:root {
  --bg: #060b14;
  --panel: rgba(10, 18, 32, 0.78);
  --panel-strong: rgba(13, 24, 42, 0.92);
  --line: rgba(106, 144, 190, 0.32);
  --line-bright: rgba(91, 190, 255, 0.58);
  --gold: #f2c14e;
  --gold-dark: #9b6716;
  --blue: #46b9ff;
  --green: #63d884;
  --red: #ff6d62;
  --purple: #b56aff;
  --text: #f4f8ff;
  --muted: #a7b3c7;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(70, 185, 255, 0.18), transparent 36rem),
    linear-gradient(135deg, #020710, #0b1220 55%, #05070d);
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 15, 28, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card img {
  max-width: 86px;
  max-height: 62px;
  object-fit: contain;
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card small,
.login-card p {
  color: var(--muted);
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 109, 98, 0.62);
  border-radius: 12px;
  color: #ffd2ce;
  background: rgba(255, 109, 98, 0.11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(3, 7, 14, 0.98), rgba(4, 10, 18, 0.78)),
    radial-gradient(circle at 65% 12%, rgba(70, 185, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 88%, rgba(242, 193, 78, 0.12), transparent 28rem),
    url("Orange.png") center / cover fixed,
    var(--bg);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.portal-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(7, 14, 25, 0.96), rgba(3, 8, 15, 0.98));
  border-right: 1px solid var(--line);
  box-shadow: 12px 0 50px rgba(0, 0, 0, 0.42);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 18px;
  min-width: 0;
}

.brand-mark {
  width: 58px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(242, 193, 78, 0.55);
}

.brand-mark img {
  max-width: 52px;
  max-height: 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand strong { font-size: 15px; }
.brand small { color: var(--muted); margin-top: 3px; }

.side-nav { display: grid; gap: 5px; }

.side-separator {
  display: block;
  height: 1px;
  margin: 9px 10px;
  background: linear-gradient(90deg, transparent, rgba(242, 193, 78, 0.78), transparent);
  box-shadow: 0 0 16px rgba(242, 193, 78, 0.22);
}

.side-separator.warranty-separator {
  height: 2px;
  margin: 10px 4px;
  background: linear-gradient(90deg, transparent 4%, rgba(242, 193, 78, 0.95) 22%, rgba(255, 235, 150, 0.95) 50%, rgba(242, 193, 78, 0.95) 78%, transparent 96%);
  box-shadow: 0 0 18px rgba(242, 193, 78, 0.5);
}

.side-group {
  display: grid;
  gap: 5px;
}

.side-group-toggle {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  color: #f1f6ff;
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: 10px;
  background: rgba(242, 193, 78, 0.08);
  font-weight: 800;
}

.side-group-toggle > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.side-group-caret {
  color: var(--gold);
  font-size: 17px;
  line-height: 1;
}

.side-group.collapsed .side-group-items { display: none; }

.side-group-items {
  display: grid;
  gap: 5px;
  padding-left: 6px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #dce8fb;
  text-decoration: none;
  border: 1px solid transparent;
}

.side-link:hover,
.side-link.active {
  border-color: rgba(242, 193, 78, 0.68);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.18), rgba(70, 185, 255, 0.09));
  box-shadow: 0 0 28px rgba(242, 193, 78, 0.12);
}

.side-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  border: 1px solid rgba(91, 190, 255, 0.42);
  color: var(--blue);
  font-size: 0;
  font-weight: 800;
}

.side-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-icon-blue {
  color: var(--blue);
  border-color: rgba(91, 190, 255, 0.5);
}

.side-icon-green {
  color: var(--green);
  border-color: rgba(99, 216, 132, 0.58);
}

.side-icon-gold {
  color: var(--gold);
  border-color: rgba(242, 193, 78, 0.68);
}

.side-icon-silver {
  color: #d9e3ef;
  border-color: rgba(217, 227, 239, 0.56);
}

.sidebar-help {
  margin-top: 145px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: block;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sidebar-help:hover {
  border-color: rgba(242, 193, 78, 0.76);
  background: rgba(242, 193, 78, 0.09);
  transform: translateY(-1px);
}

.sidebar-help strong,
.sidebar-help span { display: block; }
.sidebar-help span { color: var(--muted); margin-top: 4px; font-size: 13px; }

.main { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(0, max-content);
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 15, 28, 0.82);
  backdrop-filter: blur(18px);
}

.eyebrow {
  color: #54d8ff;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 26px; }
.topbar p { margin-bottom: 0; color: var(--muted); }

.topbar-integrations {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  min-width: max-content;
  gap: 7px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  min-width: 0;
  gap: 10px;
}

.global-search {
  display: flex;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 7, 14, 0.68);
}

.global-search input {
  width: clamp(170px, 18vw, 310px);
  background: transparent;
  border: 0;
  color: var(--text);
  outline: 0;
  padding: 9px 12px;
}

.global-search button,
.top-btn,
.logout-link,
.mobile-menu {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 13px;
  text-decoration: none;
}

.global-search button,
.primary-btn {
  border-color: rgba(242, 193, 78, 0.74);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.95), rgba(155, 103, 22, 0.95));
  color: #15110a;
  font-weight: 900;
}

.user-pill {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.user-pill span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
}

.content { padding: 22px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.8fr);
  gap: 18px;
}

.panel,
.stat-strip,
.hero-panel,
.ticket-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.hero-panel:before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle, rgba(70, 185, 255, 0.16), transparent 16rem),
    radial-gradient(circle at 70% 45%, rgba(242, 193, 78, 0.18), transparent 14rem);
  pointer-events: none;
}

.hero-panel > * { position: relative; }
.hero-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hero-actions {
  justify-content: flex-end;
  max-width: 520px;
}

.hero-panel h2 { font-size: clamp(24px, 2.35vw, 34px); line-height: 1.06; margin-bottom: 0; }
.hero-panel p { color: var(--muted); max-width: 650px; }

.quick-actions,
.stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-integrations {
  display: flex;
  align-items: center;
  gap: 8px;
}

.integration-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 2px solid rgba(214, 222, 230, 0.92);
  border-radius: 50%;
  text-decoration: none;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.75), transparent 18%),
    linear-gradient(145deg, rgba(232, 238, 246, 0.98), rgba(120, 131, 144, 0.95));
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.36),
    inset 0 -8px 16px rgba(0, 0, 0, 0.32),
    0 0 12px rgba(70, 185, 255, 0.24);
}

.integration-button strong,
.integration-button small,
.integration-button > span:not(.integration-logo) { display: none; }

.integration-button small {
  color: var(--muted);
  display: none;
}

.integration-logo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  text-transform: lowercase;
  background: transparent;
  box-shadow: none;
}

.integration-logo.qbo {
  color: #fff;
  font-size: 17px;
  letter-spacing: 0;
  background: #20a236;
  font-family: Arial, sans-serif;
}

.integration-logo.web {
  color: #1c1f25;
  font-size: 11px;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, transparent 21%, #1c1f25 22% 24%, transparent 25% 48%, #1c1f25 49% 51%, transparent 52% 75%, #1c1f25 76% 78%, transparent 79%),
    linear-gradient(180deg, transparent 25%, #1c1f25 26% 29%, transparent 30% 69%, #1c1f25 70% 73%, transparent 74%),
    #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  text-transform: uppercase;
}

.integration-logo.fb {
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 27px;
  background:
    radial-gradient(circle at 32% 23%, rgba(255, 255, 255, 0.48), transparent 19%),
    linear-gradient(145deg, #4c96ff, #0f259b);
}

.integration-logo.ig { color: #fff0fb; font-size: 13px; }
.integration-logo.tk {
  position: relative;
  color: #fff;
  font-size: 0;
  background: #050505;
}

.integration-logo.tk:before,
.integration-logo.tk:after {
  content: "\266A";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 950;
}

.integration-logo.tk:before { color: #21f4ef; transform: translate(-2px, 1px); }
.integration-logo.tk:after { color: #ff315f; transform: translate(2px, -1px); }

.integration-logo.tk span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 950;
}

.integration-logo.social { color: #ffffff; font-size: 15px; }

.dashboard-command-grid {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) minmax(220px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

.dashboard-mini-calendar,
.dashboard-alert-box,
.dashboard-note-board {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(2, 8, 16, 0.48);
  padding: 14px;
}

.dashboard-mini-calendar {
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.dashboard-mini-calendar strong {
  font-size: 48px;
  line-height: 1;
  color: var(--green);
}

.dashboard-mini-calendar small,
.storage-due-row span {
  color: var(--muted);
}

.storage-due-row {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: rgba(242, 193, 78, 0.07);
}

.dashboard-note-board {
  display: grid;
  gap: 9px;
}

.dashboard-note-board textarea {
  min-height: 118px;
}

.action-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.action-btn.primary { border-color: rgba(242, 193, 78, 0.74); color: #15110a; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); font-weight: 900; }
.action-btn.blue { border-color: rgba(70, 185, 255, 0.7); color: #dff4ff; background: rgba(70, 185, 255, 0.12); }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0;
  margin: 10px 0 14px;
  overflow: hidden;
}

.stat-card {
  padding: 12px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.stat-card:last-child { border-right: 0; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 4px; font-size: 26px; }
.stat-card.open strong { color: var(--blue); }
.stat-card.closed strong { color: var(--green); }
.stat-card.warranty strong { color: var(--gold); }
.stat-card.emergency strong { color: var(--red); }
.stat-card.archived strong { color: var(--purple); }

.panel { padding: 16px; }
.panel-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.panel-header h2 { margin: 0; }
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.muted { color: var(--muted); }
.settings-message {
  grid-column: 1 / -1;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.settings-message-success {
  border: 1px solid rgba(99, 230, 154, 0.46);
  color: #bcf8d2;
  background: rgba(99, 230, 154, 0.1);
}
.settings-message-error {
  border: 1px solid rgba(255, 109, 98, 0.62);
  color: #ffd2ce;
  background: rgba(255, 109, 98, 0.11);
}

.collapsible-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  list-style: none;
  cursor: pointer;
}

.collapsible-panel summary::-webkit-details-marker { display: none; }
.collapsible-panel summary strong { display: block; margin-top: 4px; font-size: 22px; }
.collapsible-panel[open] summary { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.customer-add-toggle {
  flex: 0 0 clamp(72px, 20%, 150px);
  justify-content: center;
  text-align: center;
}
.compact-form-header { margin-bottom: 12px; }
.compact-form-header p { margin: 0; }

.list { display: grid; gap: 10px; }
.row-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(3, 9, 18, 0.45);
}

.row-item small { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
}
.pill.Open { color: var(--blue); border-color: rgba(70, 185, 255, 0.7); }
.pill.Closed { color: var(--green); border-color: rgba(99, 216, 132, 0.7); }
.pill.Warranty { color: var(--gold); border-color: rgba(242, 193, 78, 0.7); }
.pill.Emergency { color: var(--red); border-color: rgba(255, 109, 98, 0.7); }
.pill.Unpaid { color: #fff; border-color: rgba(255, 109, 98, 0.85); background: rgba(255, 109, 98, 0.18); }

.chart {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 8px;
  padding: 16px 12px 18px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(70, 185, 255, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(70, 185, 255, 0.05), rgba(70, 185, 255, 0.015)),
    rgba(2, 8, 16, 0.34);
  isolation: isolate;
}

.bar {
  min-height: 8px;
  max-height: 104px;
  align-self: end;
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(180deg, var(--blue), rgba(70, 185, 255, 0.12));
  box-shadow: 0 0 18px rgba(70, 185, 255, 0.25);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.form-grid .wide { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }

label { display: grid; gap: 6px; color: #dbe8fa; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(1, 7, 14, 0.64);
  padding: 11px 12px;
  outline: 0;
}

textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--line-bright); box-shadow: 0 0 0 3px rgba(70, 185, 255, 0.12); }

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.calendar-field-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(242, 193, 78, 0.72);
  border-radius: 10px;
  color: #15110a;
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.96), rgba(155, 103, 22, 0.96));
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.mini-plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  border: 1px solid rgba(242, 193, 78, 0.72);
  border-radius: 10px;
  color: #15110a;
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.98), rgba(155, 103, 22, 0.96));
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.secondary-appointment-toggle {
  display: flex;
  justify-content: flex-start;
}

.secondary-appointment {
  padding: 12px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.24);
}

.secondary-appointment-actions {
  display: flex;
  align-items: end;
}

.ticket-card { padding: 16px; }
.ticket-card.ticket-warranty {
  border-color: rgba(242, 193, 78, 0.72);
  box-shadow: var(--shadow), inset 4px 0 0 rgba(242, 193, 78, 0.78), 0 0 22px rgba(242, 193, 78, 0.12);
}

.ticket-card.ticket-emergency {
  border-color: rgba(255, 109, 98, 0.82);
  box-shadow: var(--shadow), inset 4px 0 0 rgba(255, 109, 98, 0.86), 0 0 24px rgba(255, 109, 98, 0.14);
}

.ticket-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ticket-title { font-size: 18px; font-weight: 900; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.ticket-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-toolbar label {
  min-width: 190px;
}

.dashboard-ticket-body.collapsed { display: none; }

.panel-toggle {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.attention-list .row-item {
  border-color: rgba(255, 109, 98, 0.32);
}

.warranty-addon {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(242, 193, 78, 0.55);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.12), rgba(70, 185, 255, 0.06)),
    rgba(4, 9, 18, 0.72);
  box-shadow: 0 0 28px rgba(242, 193, 78, 0.1);
}

.warranty-addon.active { display: block; }

.warranty-addon h3 { margin-bottom: 6px; }

.rv-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(242, 193, 78, 0.68);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.1), rgba(70, 185, 255, 0.04)),
    rgba(2, 8, 16, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 235, 150, 0.12);
}

.rv-detail-grid {
  display: grid;
  grid-template-columns: 0.55fr 1fr 1.35fr;
  gap: 12px;
}

.panel-header.compact {
  margin-bottom: 12px;
}

.ticket-invoice-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(70, 185, 255, 0.34);
  border-radius: 14px;
  background: rgba(2, 8, 16, 0.46);
}

.invoice-settings-strip,
.billing-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.invoice-settings-strip {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.billing-tax-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tax-rate-list {
  display: grid;
  gap: 10px;
}

.tax-rate-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.35fr) auto;
  gap: 10px;
  align-items: end;
}

.invoice-lines-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 10px;
}

.invoice-line-list {
  display: grid;
  gap: 10px;
}

.invoice-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 0.18fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.invoice-line-main,
.invoice-line-labor {
  display: grid;
  gap: 10px;
  align-items: end;
}

.invoice-line-main {
  grid-template-columns: minmax(190px, 1.4fr) minmax(110px, 0.7fr) minmax(80px, 0.42fr) minmax(112px, 0.65fr) minmax(98px, 0.45fr);
}

.invoice-line-labor {
  grid-template-columns: minmax(112px, 0.5fr) minmax(150px, 0.7fr) minmax(105px, 0.45fr);
}

.invoice-line-notes {
  grid-column: 1 / -1;
}

.invoice-line-notes textarea {
  min-height: 58px;
}

.invoice-tax-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
}

.invoice-tax-check input {
  width: auto;
}

.invoice-line-total {
  display: grid;
  gap: 6px;
  align-content: end;
}

.invoice-line-total strong {
  font-size: 1.05rem;
}

.invoice-total-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.invoice-total-bar span {
  padding: 8px 10px;
  border: 1px solid rgba(214, 222, 230, 0.12);
  border-radius: 10px;
  background: rgba(1, 7, 14, 0.44);
}

.invoice-grand-total {
  color: var(--gold-2);
}

.ghost-btn.danger {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffd2d2;
}

.catalog-entry-row,
.parts-catalog-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.parts-catalog-entry {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.7fr) minmax(120px, 0.45fr) auto;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.catalog-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.catalog-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.09);
}

.catalog-chip button {
  border: 0;
  color: #ffd2d2;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.catalog-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
}

.catalog-table th,
.catalog-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.warranty-standalone {
  max-width: 1220px;
}

.warranty-gold-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(232, 190, 82, 0.78);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 226, 142, 0.34), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(214, 166, 43, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(70, 45, 12, 0.88), rgba(17, 18, 22, 0.94) 48%, rgba(10, 12, 17, 0.98)),
    #11151d;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.48),
    0 0 42px rgba(214, 166, 43, 0.2),
    inset 0 1px 0 rgba(255, 244, 198, 0.26);
}

.warranty-gold-panel:before {
  content: "";
  position: absolute;
  inset: -80% auto -80% -40%;
  width: 42%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 246, 205, 0.18), transparent);
  animation: warrantyShimmer 4.2s infinite;
  pointer-events: none;
}

.warranty-gold-panel > * {
  position: relative;
  z-index: 1;
}

@keyframes warrantyShimmer {
  0% { left: -48%; }
  48%, 100% { left: 128%; }
}

.warranty-section-title {
  margin: 18px 0 10px;
  color: #fff2bc;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.warranty-parts-grid {
  display: grid;
  gap: 10px;
}

.warranty-part-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(220px, 1.45fr) minmax(74px, 0.5fr) minmax(110px, 0.7fr) minmax(120px, 0.75fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255, 226, 125, 0.72);
  border-left: 7px solid var(--gold);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.52);
}

.warranty-part-row .wide {
  grid-column: span 1;
}

.warranty-part-row .full {
  grid-column: 1 / -2;
}

.warranty-part-row textarea {
  min-height: 58px;
}

.warranty-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
}

.warranty-check-row input {
  width: auto;
}

.warranty-part-actions {
  display: grid;
  gap: 6px;
  min-width: 94px;
}

.qit-payout-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 149, 56, 0.75);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 149, 56, 0.18), rgba(242, 193, 78, 0.1)),
    rgba(3, 8, 16, 0.58);
}

.qit-payout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.qit-payout-tile {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.54);
}

.qit-payout-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.qit-payout-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.qit-payout-source {
  border-color: rgba(255, 149, 56, 0.86) !important;
  background: linear-gradient(135deg, rgba(255, 149, 56, 0.24), rgba(255, 197, 82, 0.12)) !important;
  box-shadow: 0 0 24px rgba(255, 149, 56, 0.14);
}

.qit-payout-tile.total strong {
  color: var(--green);
}

.warranty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.warranty-actions .muted {
  flex: 1 1 240px;
}

.qit-submit-btn {
  border-color: rgba(242, 193, 78, 0.74);
  color: #fff3c2;
  background: rgba(242, 193, 78, 0.13);
}

.warranty-submit-bottom {
  margin-left: auto;
}

.qit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.qit-modal-panel {
  width: min(720px, 94vw);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(242, 193, 78, 0.42);
  border-radius: 14px;
  background: rgba(8, 15, 27, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.customer-picker-panel {
  width: min(820px, 94vw);
}

.customer-picker-search {
  margin-bottom: 12px;
}

.modal-customer-grid {
  margin: 12px 0;
}

.customer-picker-list {
  display: grid;
  gap: 8px;
}

.customer-picker-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  background: rgba(2, 8, 16, 0.66);
  text-align: left;
  cursor: pointer;
}

.customer-picker-row:hover {
  border-color: rgba(242, 193, 78, 0.62);
}

.customer-picker-row span {
  color: var(--muted);
  font-size: 13px;
}

.qit-terms-panel p {
  color: #d9e3f1;
  line-height: 1.55;
}

.modal-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
}

.modal-check-row input {
  width: auto;
  margin-top: 3px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.warranty-print-sheet {
  display: none;
}

@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body.warranty-print-mode .portal-shell,
  body.warranty-print-mode .sidebar,
  body.warranty-print-mode .topbar,
  body.warranty-print-mode .mobile-menu {
    display: none !important;
  }

  body.warranty-print-mode .warranty-print-sheet {
    display: block !important;
  }

  body.warranty-print-mode {
    margin: 0 !important;
  }

  .warranty-print-page {
    width: 100%;
    max-width: 7.75in;
    min-height: 0;
    margin: 0 auto;
    padding: 0.18in;
    color: #111;
    background: #fff;
    font: 10px Arial, sans-serif;
  }

  .warranty-print-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid #c79223;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }

  .warranty-print-header h1 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.05;
  }

  .warranty-print-header p,
  .warranty-print-grid p,
  .warranty-print-ccc p,
  .warranty-print-notes p {
    margin: 0;
    line-height: 1.25;
  }

  .warranty-print-title {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 3px;
    min-width: 150px;
    text-transform: uppercase;
  }

  .warranty-print-title strong {
    font-size: 17px;
  }

  .warranty-print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 9px;
  }

  .warranty-print-grid h2 {
    margin: 0 0 4px;
    font-size: 12px;
    color: #5d420c;
  }

  .warranty-print-ccc {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 9px;
  }

  .warranty-print-ccc > div,
  .warranty-print-notes {
    border: 1px solid #d7dce4;
    border-radius: 4px;
    padding: 6px;
    min-height: 46px;
  }

  .warranty-print-ccc strong,
  .warranty-print-notes strong {
    display: block;
    margin-bottom: 3px;
    color: #5d420c;
  }

  .warranty-print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
  }

  .warranty-print-table th,
  .warranty-print-table td {
    border-bottom: 1px solid #d7dce4;
    padding: 5px 4px;
    text-align: left;
    vertical-align: top;
  }

  .warranty-print-table th {
    background: #f5f0df;
    font-size: 9px;
    text-transform: uppercase;
  }

  .warranty-print-table .num {
    text-align: right;
    white-space: nowrap;
  }

  .warranty-print-totals {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
  }

  .warranty-print-totals div {
    min-width: 92px;
    border: 1px solid #d7dce4;
    border-radius: 4px;
    padding: 6px;
    text-align: right;
  }

  .warranty-print-totals span {
    display: block;
    color: #5b6472;
    font-size: 8px;
    text-transform: uppercase;
  }

  .warranty-print-totals strong {
    font-size: 12px;
  }

  .warranty-print-notes {
    margin-top: 8px;
  }

  .sidebar,
  .topbar,
  .mobile-menu,
  .panel-actions,
  .quick-actions,
  .warranty-actions,
  .qit-modal-overlay {
    display: none !important;
  }

  .portal-shell {
    display: block !important;
  }

  .content {
    padding: 0 !important;
    background: #fff !important;
  }

  .warranty-standalone {
    max-width: none !important;
  }

  .warranty-gold-panel {
    border: 1px solid #b98b22 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
  }

  .warranty-gold-panel:before {
    display: none !important;
  }

  .warranty-gold-panel label,
  .warranty-gold-panel .muted,
  .warranty-section-title {
    color: #111 !important;
  }

  .warranty-gold-panel input,
  .warranty-gold-panel textarea {
    color: #111 !important;
    border-color: #888 !important;
    background: #fff !important;
  }
}

.inventory-compact { padding: 10px 12px; }
.inventory-compact .ticket-top { margin-bottom: 4px; }
.inventory-compact .ticket-title { font-size: 15px; }
.inventory-compact .ticket-meta { gap: 10px; font-size: 12px; }
.inventory-compact p { margin: 5px 0 0; font-size: 13px; }
.inventory-compact .ticket-actions { margin-top: 8px; }
.inventory-compact .ghost-btn { min-height: 32px; padding: 6px 10px; }

.storage-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.storage-card { padding: 10px; }

.storage-card-focused {
  border-color: rgba(241, 181, 52, 0.9);
  box-shadow:
    0 0 0 1px rgba(241, 181, 52, 0.35),
    0 0 28px rgba(241, 181, 52, 0.22),
    var(--shadow);
}

.storage-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px auto;
  align-items: center;
  gap: 10px;
}

.storage-card-main { min-width: 0; }

.storage-card-actions {
  justify-content: flex-end;
  align-items: center;
  margin-top: 0;
}

.storage-status-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.storage-status-button {
  min-width: 86px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(4, 10, 18, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.consignment-star {
  width: 78px;
  height: 74px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 0;
  color: #1f1600;
  font-weight: 950;
  font-size: 10px;
  text-align: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.78), transparent 24%),
    linear-gradient(135deg, #fff0a6, #f4bf3b 42%, #af6d10);
  clip-path: polygon(50% 0%, 61% 32%, 95% 21%, 73% 49%, 98% 72%, 64% 67%, 50% 100%, 36% 67%, 2% 72%, 27% 49%, 5% 21%, 39% 32%);
  filter: drop-shadow(0 0 18px rgba(242, 193, 78, 0.55));
  animation: starShimmer 2.8s ease-in-out infinite;
}

@keyframes starShimmer {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(242, 193, 78, 0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 235, 150, 0.78)); transform: scale(1.03); }
}

.storage-status-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 9;
  display: none;
  min-width: 150px;
  transform: translateX(-50%);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.96);
  box-shadow: var(--shadow);
}

.storage-status-menu.open {
  display: grid;
  gap: 6px;
}

.storage-status-menu button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.storage-status-menu button:hover {
  border-color: rgba(242, 193, 78, 0.68);
  background: rgba(242, 193, 78, 0.12);
}

.inventory-shelf-grid,
.inventory-unit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.inventory-shelf-column,
.inventory-unit-column {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 8, 16, 0.38);
}

.inventory-unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(242, 193, 78, 0.28);
  color: var(--gold);
}

.inventory-shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--text);
}

.inventory-unit-head span,
.inventory-shelf-head span {
  min-width: 28px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  border: 1px solid rgba(70, 185, 255, 0.45);
}

.inventory-shelf-row {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.inventory-unassigned {
  grid-column: 1 / -1;
}

.inventory-shelf-item .ticket-title {
  font-size: 13px;
  line-height: 1.25;
}

.customer-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.customer-card-focused {
  border-color: rgba(241, 181, 52, 0.9);
  box-shadow:
    0 0 0 1px rgba(241, 181, 52, 0.35),
    0 0 28px rgba(241, 181, 52, 0.22),
    var(--shadow);
}

.customer-subpanel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(70, 185, 255, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(70, 185, 255, 0.05), rgba(70, 185, 255, 0.015)),
    rgba(2, 8, 16, 0.28);
}

.customer-subpanel h3 {
  margin: 0;
  font-size: 17px;
}

.customer-notes-grid {
  margin-top: 14px;
}

.rv-row-grid {
  display: grid;
  gap: 10px;
}

.customer-rv-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.customer-rvs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.customer-rv-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(70, 185, 255, 0.48);
  border-radius: 999px;
  color: #dbeeff;
  background: rgba(70, 185, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.customer-ticket-history {
  margin-top: 10px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 10px;
  background: rgba(2, 8, 16, 0.24);
}

.customer-ticket-history summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #dbe8fa;
  font-weight: 900;
  list-style: none;
}

.customer-ticket-history summary::-webkit-details-marker {
  display: none;
}

.customer-ticket-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.customer-ticket-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.customer-ticket-row span {
  color: var(--muted);
  font-size: 12px;
}

.followup-editor {
  margin-top: 16px;
}

.followup-row-grid {
  display: grid;
  gap: 10px;
}

.customer-followup-row {
  display: grid;
  grid-template-columns: 150px 160px minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid rgba(70, 185, 255, 0.12);
}

.customer-followup-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.customer-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.customer-followup-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(99, 216, 132, 0.45);
  border-radius: 999px;
  color: #d7ffe1;
  background: rgba(99, 216, 132, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.settings-integration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.business-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.business-profile-grid .wide {
  grid-column: 1 / -1;
}

.settings-integration-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 8, 16, 0.38);
}

.schedule-calendar-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
}

.schedule-date-card {
  min-height: 210px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(99, 216, 132, 0.4);
  border-radius: 18px;
  background: rgba(99, 216, 132, 0.08);
}

.schedule-date-card strong {
  font-size: 72px;
  line-height: 1;
  color: var(--green);
}

.schedule-panel {
  display: grid;
  gap: 14px;
}

.schedule-actions,
.schedule-view-tabs,
.schedule-month-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.schedule-view-tabs .active {
  border-color: rgba(242, 193, 78, 0.74);
  color: #15110a;
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.95), rgba(155, 103, 22, 0.95));
}

.schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(70, 185, 255, 0.16);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.24);
}

.schedule-selected-summary {
  color: var(--muted);
  font-weight: 800;
}

.schedule-view {
  display: none;
}

.schedule-view.active {
  display: grid;
  gap: 14px;
}

.schedule-weekdays,
.schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.schedule-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.schedule-day-cell {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 10px;
  color: var(--text);
  background: rgba(2, 8, 16, 0.36);
  text-align: left;
  cursor: pointer;
}

.schedule-day-cell.empty {
  cursor: default;
  opacity: 0.35;
  background: rgba(2, 8, 16, 0.16);
}

.schedule-day-cell.today {
  border-color: rgba(99, 216, 132, 0.54);
  box-shadow: inset 0 0 0 1px rgba(99, 216, 132, 0.14);
}

.schedule-day-cell.selected {
  border-color: rgba(242, 193, 78, 0.82);
  box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.28), 0 0 18px rgba(242, 193, 78, 0.12);
}

.schedule-day-cell strong {
  font-size: 18px;
}

.schedule-day-cell small {
  color: var(--muted);
  font-weight: 800;
}

.schedule-day-preview {
  display: grid;
  gap: 4px;
}

.schedule-day-preview span {
  overflow: hidden;
  padding: 4px 6px;
  border: 1px solid rgba(70, 185, 255, 0.14);
  border-radius: 7px;
  color: #dbe8fa;
  background: rgba(70, 185, 255, 0.07);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day-detail,
.schedule-map-list {
  padding: 14px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.24);
}

.schedule-job-list {
  display: grid;
  gap: 10px;
}

.schedule-job-list .ticket-card {
  padding: 12px;
}

.schedule-job-list .ticket-title {
  font-size: 15px;
}

.schedule-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 14px;
}

.schedule-map-frame-wrap,
.schedule-map-empty {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.28);
}

.schedule-map-frame {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.schedule-map-empty {
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.ghost-btn.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.page-placeholder {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.search-page-form {
  min-width: min(520px, 48vw);
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.search-result-row,
.team-member-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  color: var(--text);
  text-decoration: none;
  background: rgba(3, 9, 18, 0.48);
}

.search-result-row strong,
.search-result-row span,
.team-member-card strong,
.team-member-card span {
  display: block;
}

.search-result-row span,
.team-member-card span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 13px;
}

.team-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.team-check-row {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-check-row input {
  width: auto;
}

.team-seat-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 193, 78, 0.34);
  border-radius: 12px;
  background: rgba(242, 193, 78, 0.08);
}

.team-seat-banner strong,
.team-seat-banner span {
  display: block;
}

.team-seat-banner span {
  color: var(--muted);
}

.team-seat-full {
  border-color: rgba(255, 109, 98, 0.55);
  background: rgba(255, 109, 98, 0.09);
}

.team-editor-actions,
.team-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.team-row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mobile-menu { display: none; }

@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .top-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .global-search {
    flex: 1 1 auto;
    min-width: 260px;
  }

  .global-search input {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; }
  .topbar-integrations { flex-wrap: nowrap; min-width: 0; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .search-results-grid { grid-template-columns: 1fr; }
  .team-editor-grid { grid-template-columns: 1fr 1fr; }
  .inventory-unit-grid,
  .customer-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-settings-strip,
  .billing-settings-grid,
  .business-profile-grid,
  .invoice-line-row,
  .invoice-line-main,
  .invoice-line-labor,
  .rv-detail-grid,
  .parts-catalog-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-rv-row,
  .customer-followup-row { grid-template-columns: 1fr 1fr; }
  .schedule-map-shell { grid-template-columns: 1fr; }
  .schedule-day-cell { min-height: 104px; }
}

@media (max-width: 820px) {
  .portal-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 20;
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    width: min(300px, 86vw);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-help { margin-top: 28px; }
  .mobile-menu { display: inline-flex; }
  .topbar { align-items: flex-start; grid-template-columns: 1fr; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .hero-topline { display: grid; }
  .hero-actions { justify-content: flex-start; max-width: none; }
  .global-search { width: 100%; }
  .global-search input { width: 100%; }
  .content { padding: 14px; }
  .hero-panel { padding: 22px; min-height: 260px; }
  .stat-strip { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .row-item { grid-template-columns: 1fr; }
  .warranty-part-row,
  .qit-payout-grid,
  .storage-card-grid,
  .storage-grid-two,
  .inventory-unit-grid,
  .customer-card-grid,
  .customer-rv-row,
  .customer-followup-row,
  .invoice-settings-strip,
  .invoice-line-row,
  .invoice-line-main,
  .invoice-line-labor,
  .billing-settings-grid,
  .rv-detail-grid,
  .catalog-entry-row,
  .parts-catalog-entry,
  .inventory-shelf-grid,
  .settings-integration-grid,
  .business-profile-grid,
  .dashboard-integrations,
  .team-editor-grid,
  .dashboard-command-grid,
  .schedule-calendar-shell { grid-template-columns: 1fr; }
  .schedule-weekdays { display: none; }
  .schedule-month-grid { grid-template-columns: 1fr; }
  .schedule-day-cell.empty { display: none; }
  .schedule-actions,
  .schedule-month-controls { width: 100%; }
  .warranty-part-row .full { grid-column: auto; }
  .storage-card-actions { justify-content: flex-start; }
  .consignment-star { width: 78px; height: 74px; }
}
