: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: 26px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(70, 185, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 76% 20%, rgba(242, 193, 78, 0.18), transparent 23rem),
    linear-gradient(135deg, #020710, #0b1220 56%, #05070d);
  overflow-x: hidden;
}

.login-card {
  position: relative;
  width: min(620px, 100%);
  display: grid;
  gap: 13px;
  padding: 24px 28px;
  border: 1px solid rgba(91, 190, 255, 0.38);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(12, 23, 40, 0.92), rgba(5, 10, 19, 0.94)),
    rgba(8, 15, 28, 0.9);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.58),
    0 0 45px rgba(70, 185, 255, 0.11);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.12), transparent 28%, transparent 72%, rgba(242, 193, 78, 0.1)),
    radial-gradient(circle at 50% 0%, rgba(70, 185, 255, 0.16), transparent 18rem);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.login-brand-row img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 54px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.login-brand-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #58c8ff;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 900;
}

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

.login-card h1 {
  color: #fff;
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 950;
  white-space: nowrap;
}

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

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

.login-card label {
  color: #dfefff;
}

.login-card input {
  min-height: 44px;
  border-color: rgba(91, 190, 255, 0.3);
  background: rgba(1, 6, 12, 0.72);
}

.login-submit {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 226, 135, 0.86);
  border-radius: 14px;
  color: #171006;
  background:
    linear-gradient(115deg, rgba(255, 244, 171, 0.95) 0%, rgba(242, 193, 78, 1) 34%, rgba(196, 128, 23, 1) 72%, rgba(255, 221, 104, 0.98) 100%);
  box-shadow:
    0 14px 28px rgba(242, 193, 78, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-weight: 950;
  overflow: hidden;
}

.login-submit::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -35%;
  width: 32%;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, 0.42);
  filter: blur(8px);
  transition: left 0.42s ease;
}

.login-submit:hover::after {
  left: 104%;
}

.login-byline {
  justify-self: end;
  color: #58c8ff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.login-byline:hover {
  color: #a7e7ff;
}

.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(280px, 1fr) auto minmax(420px, 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);
}

.topbar > .mobile-menu { grid-column: 1; grid-row: 1; }
.topbar > div:first-of-type {
  grid-column: 1;
  min-width: 0;
  justify-self: start;
}
.topbar-integrations { grid-column: 2; }
.top-actions { grid-column: 3; }

.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;
  justify-content: flex-end;
}

.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);
}

.followup-due-row {
  border-color: rgba(70, 185, 255, 0.24);
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(4, 17, 34, 0.96), rgba(9, 27, 48, 0.92));
}

.followup-due-row strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #f1f5f9;
}

.followup-due-row span {
  color: #cbd5e1;
}

.followup-due-soon {
  position: relative;
  overflow: hidden;
  border-color: rgba(248, 250, 252, 0.98);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.32), rgba(148, 163, 184, 0.32)),
    linear-gradient(135deg, rgba(4, 17, 34, 0.98), rgba(9, 27, 48, 0.95));
  box-shadow:
    0 0 0 2px rgba(248, 250, 252, 0.42),
    0 0 18px rgba(248, 250, 252, 0.48),
    0 0 34px rgba(148, 163, 184, 0.34);
  animation: followupSilverBlink 4.8s ease-in-out infinite;
}

.followup-due-soon strong,
.followup-due-soon span {
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(248, 250, 252, 0.45);
}

.followup-soon-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(248, 250, 252, 0.78);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(226, 232, 240, 0.16);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(248, 250, 252, 0.26);
}

.followup-soon-label.muted-label {
  border-color: rgba(148, 163, 184, 0.38);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: none;
  text-shadow: none;
}

.followup-due-soon:after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -55%;
  width: 52%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  animation: followupSilverShine 1.35s ease-out 1 forwards;
  pointer-events: none;
}

@keyframes followupSilverShine {
  0% { left: -55%; opacity: 0; }
  12% { opacity: 1; }
  78% { left: 120%; opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

@keyframes followupSilverBlink {
  0%, 72%, 100% {
    box-shadow:
      0 0 0 2px rgba(248, 250, 252, 0.34),
      0 0 14px rgba(248, 250, 252, 0.35),
      0 0 26px rgba(148, 163, 184, 0.24);
  }
  80%, 88% {
    box-shadow:
      0 0 0 2px rgba(248, 250, 252, 0.72),
      0 0 22px rgba(248, 250, 252, 0.62),
      0 0 38px rgba(148, 163, 184, 0.42);
  }
}

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

.dashboard-note-mode-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-note-mode-btn {
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(70, 185, 255, 0.4);
  border-radius: 999px;
  color: #dff4ff;
  background: rgba(70, 185, 255, 0.1);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-note-mode-btn.active {
  color: #15110a;
  border-color: rgba(242, 193, 78, 0.75);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 0 16px rgba(242, 193, 78, 0.2);
}

.dashboard-note-status {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.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: flex-start;
  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 auto;
  min-width: 76px;
  max-width: 90px;
  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;
}
button.pill {
  cursor: pointer;
  font-family: inherit;
}
.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); }
.ticket-billing-pill {
  min-width: 74px;
  font-weight: 800;
}
.ticket-billing-empty {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.ticket-billing-unpaid {
  color: #fff;
  border-color: rgba(255, 109, 98, 0.85);
  background: rgba(255, 109, 98, 0.18);
}
.ticket-billing-parts {
  color: #dff8ff;
  border-color: rgba(70, 185, 255, 0.78);
  background: rgba(70, 185, 255, 0.14);
}
.ticket-billing-invoice {
  color: #fff2c7;
  border-color: rgba(242, 193, 78, 0.78);
  background: rgba(242, 193, 78, 0.16);
}
.ticket-billing-other {
  color: #eadcff;
  border-color: rgba(180, 126, 255, 0.76);
  background: rgba(180, 126, 255, 0.14);
}

.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[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1) brightness(1.65);
  opacity: 0.95;
}

.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-map-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.24);
}

.ticket-map-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.ticket-map-empty {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.ticket-map-frame {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
  display: block;
}

.ticket-edit-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(70, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.24);
}

[hidden] {
  display: none !important;
}

.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-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-actions-right {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.ticket-payment-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #344054;
  font-size: 13px;
}

.payment-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-status-pill.paid,
.payment-status-pill.none {
  background: #dcfce7;
  color: #166534;
}

.payment-status-pill.partial,
.payment-status-pill.pending {
  background: #fef3c7;
  color: #92400e;
}

.payment-status-pill.due {
  background: #fee2e2;
  color: #991b1b;
}

.payment-config-warning {
  flex-basis: 100%;
  display: block;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.payment-history-panel {
  max-width: 620px;
}

.payment-history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.payment-history-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #fff;
}

.payment-history-row small {
  color: #667085;
}

.ticket-pill-stack,
.mini-ticket-pills {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.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: 2px solid rgba(99, 216, 132, 0.82);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(99, 216, 132, 0.08), rgba(70, 185, 255, 0.03)),
    rgba(2, 8, 16, 0.52);
  box-shadow:
    0 0 0 1px rgba(99, 216, 132, 0.16),
    0 16px 42px rgba(0, 0, 0, 0.24);
}

.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,
.invoice-entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.invoice-lines-header {
  margin: 16px 0 10px;
}

.invoice-entry-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.invoice-entry-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(99, 216, 132, 0.34);
  border-radius: 12px;
  background: rgba(1, 12, 10, 0.36);
}

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

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

.invoice-entry-card .invoice-line-row {
  grid-template-columns: 1fr;
}

.invoice-entry-card .invoice-line-total {
  grid-column: auto;
  grid-row: auto;
  justify-items: end;
}

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

.invoice-line-main {
  grid-template-columns: minmax(96px, 0.48fr) minmax(150px, 1.1fr) minmax(70px, 0.32fr) minmax(96px, 0.5fr) minmax(86px, 0.32fr);
}

.invoice-entry-card .invoice-line-main {
  grid-template-columns: minmax(110px, 0.5fr) minmax(170px, 1fr);
}

.invoice-line-labor {
  grid-template-columns: minmax(180px, 1fr) minmax(96px, 0.38fr) minmax(128px, 0.48fr) minmax(94px, 0.34fr);
  grid-column: 1 / -1;
}

.invoice-entry-card .invoice-line-labor {
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr);
}

.invoice-entry-card .invoice-labor-row .invoice-line-labor label:first-child {
  grid-column: 1 / -1;
}

.invoice-line-main textarea.invoiceLineDescription {
  min-height: 45px;
  resize: vertical;
}

.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;
  min-width: 0;
  white-space: normal;
}

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

.invoice-line-total {
  display: grid;
  gap: 6px;
  align-content: end;
  justify-items: stretch;
  grid-column: 2;
  grid-row: 1;
}

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

.invoice-line-total .ghost-btn {
  width: 96px;
  min-width: 96px;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

.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-action-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.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-section-title.small {
  margin: 12px 0 8px;
  font-size: 12px;
}

.warranty-issues-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.warranty-issues-header .warranty-section-title {
  margin-bottom: 4px;
}

.warranty-issue-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.warranty-issue-card {
  padding: 14px;
  border: 1px solid rgba(255, 226, 125, 0.62);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.4);
}

.warranty-issue-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.warranty-issue-top > div {
  flex: 1;
}

.warranty-issue-top input {
  margin-top: 6px;
}

.warranty-ccc-grid {
  margin-bottom: 12px;
}

.warranty-service-call-row {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(120px, 180px);
  gap: 12px;
  align-items: end;
  margin: 18px 0 10px;
  padding: 12px;
  border: 1px solid rgba(255, 226, 125, 0.52);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.36);
}

.warranty-service-call-row .warranty-check-row {
  min-height: 45px;
}

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

.warranty-issue-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 6px;
}

.warranty-part-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(180px, 1.25fr) minmax(70px, 0.42fr) minmax(100px, 0.62fr) minmax(108px, 0.66fr) minmax(104px, 0.54fr) 96px;
  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-tax {
  display: grid;
  gap: 6px;
}

.warranty-part-tax label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
}

.warranty-part-tax input {
  width: auto;
}

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

.warranty-part-actions .ghost-btn {
  width: 96px;
  min-width: 96px;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

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

.warranty-labor-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.5fr) minmax(120px, 0.55fr) 96px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255, 226, 125, 0.56);
  border-left: 7px solid rgba(242, 193, 78, 0.72);
  border-radius: 12px;
  background: rgba(2, 8, 16, 0.42);
}

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

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

.warranty-claim-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 6px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 193, 78, 0.72);
  border-radius: 12px;
  background: rgba(242, 193, 78, 0.12);
  color: #fff2bc;
  font-weight: 900;
}

.warranty-claim-total-bar strong {
  font-size: 22px;
  color: #ffffff;
}

.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 {
  position: relative;
  overflow: hidden;
  border-color: rgba(242, 193, 78, 0.74);
  color: #15110a;
  background: linear-gradient(135deg, #ffe48a, var(--gold), var(--gold-dark));
  box-shadow: 0 0 18px rgba(242, 193, 78, 0.32);
  font-weight: 900;
}

.qit-submit-btn:before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -45% auto -45% -60%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: qitGoldShimmer 2.6s ease-in-out infinite;
}

.qit-submit-btn > * {
  position: relative;
}

.ticket-qit-submit {
  min-width: 132px;
  white-space: nowrap;
}

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

@keyframes qitGoldShimmer {
  0%, 42% { left: -60%; }
  100% { left: 128%; }
}

.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 {
  @page {
    margin: 0.25in;
  }

  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;
    color: #111;
    background: #fff;
    font: 9.5px Arial, sans-serif;
  }

  .warranty-print-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
    gap: 8px 16px;
    border-bottom: 2px solid #c79223;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .warranty-print-header h1 {
    margin: 0 0 2px;
    font-size: 18px;
    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: 2px;
    min-width: 150px;
    text-align: right;
  }

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

  .warranty-print-title span {
    color: #5b6472;
  }

  .warranty-print-customer p {
    margin-top: 4px;
  }

  .warranty-print-brand {
    font-weight: 800;
  }

  .warranty-print-brand span {
    color: #687483;
    font-size: 0.8em;
    font-weight: 600;
  }

  .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, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .warranty-print-issue {
    border: 1px solid #d7dce4;
    border-radius: 4px;
    padding: 6px;
  }

  .warranty-print-issue h3 {
    margin: 0 0 6px;
    font-size: 13px;
    color: #5d420c;
  }

  .warranty-print-issue p {
    margin: 0 0 6px;
  }

  .warranty-print-notes {
    border: 1px solid #d7dce4;
    border-radius: 4px;
    padding: 6px;
  }

  .warranty-print-ccc strong,
  .warranty-print-notes strong {
    color: #5d420c;
  }

  .warranty-print-detail-line {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    gap: 8px 12px;
    margin-top: 3px !important;
  }

  .warranty-print-table .line-kind {
    width: 58px;
    font-weight: 800;
    color: #5b6472;
  }

  .warranty-print-table .line-notes td {
    padding-top: 0;
    color: #5b6472;
  }

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

  .warranty-print-table th,
  .warranty-print-table td {
    border-bottom: 1px solid #d7dce4;
    padding: 4px 3px;
    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: 6px;
    margin-left: auto;
  }

  .warranty-print-totals div {
    min-width: 82px;
    border: 1px solid #d7dce4;
    border-radius: 4px;
    padding: 5px;
    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;
  gap: 10px;
  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;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--text);
}

.inventory-shelf-head-actions,
.inventory-system-controls,
.inventory-card-controls,
.inventory-item-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inventory-shelf-head-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.inventory-item-action-row {
  justify-content: space-between;
  margin-top: 8px;
}

.inventory-item-action-row .ticket-actions {
  margin-top: 0;
}

.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-collapse-btn,
.inventory-order-btn,
.inventory-qty-btn,
.inventory-move-handle {
  min-height: 30px;
  border: 1px solid rgba(70, 185, 255, 0.38);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inventory-collapse-btn,
.inventory-move-handle {
  padding: 6px 10px;
}

.inventory-order-btn,
.inventory-qty-btn {
  width: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #dff4ff;
}

.inventory-collapse-btn {
  color: #fff3c2;
  border-color: rgba(242, 193, 78, 0.48);
  background: rgba(242, 193, 78, 0.11);
}

.inventory-move-handle {
  margin-left: auto;
  color: #dff4ff;
  border-color: rgba(70, 185, 255, 0.55);
  background: rgba(70, 185, 255, 0.12);
}

.inventory-collapse-btn:hover,
.inventory-order-btn:hover,
.inventory-qty-btn:hover,
.inventory-move-handle:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 193, 78, 0.78);
  background: rgba(242, 193, 78, 0.16);
}

.inventory-card-controls .pill {
  min-width: 44px;
  justify-content: center;
  text-align: center;
}

.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: 100px minmax(0, 0.95fr) minmax(0, 1.25fr) 110px 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;
}

.settings-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 8, 16, 0.28);
}

.settings-toggle-row input {
  width: auto;
}

.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-view.day-focused .schedule-weekdays,
.schedule-view.day-focused .schedule-month-grid {
  display: none;
}

.schedule-view.day-focused .schedule-day-detail {
  margin-top: 0;
}

.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.blocked {
  border-color: rgba(255, 109, 98, 0.9);
  background: linear-gradient(180deg, rgba(255, 109, 98, 0.16), rgba(2, 8, 16, 0.38));
  box-shadow: inset 0 0 0 1px rgba(255, 109, 98, 0.28), 0 0 18px rgba(255, 109, 98, 0.12);
}

.schedule-day-cell.selected.blocked {
  border-color: rgba(255, 109, 98, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 109, 98, 0.34), 0 0 22px rgba(255, 109, 98, 0.16);
}

.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-preview .schedule-job-preview {
  border-color: rgba(70, 185, 255, 0.32);
  background: rgba(70, 185, 255, 0.1);
}

.schedule-day-preview .schedule-preview-tech {
  border-left: 4px solid var(--tech-color);
  box-shadow: inset 0 0 0 1px rgba(70, 185, 255, 0.08), 0 0 10px rgba(70, 185, 255, 0.1);
}

.schedule-day-preview .schedule-preview-warranty {
  border-color: rgba(242, 193, 78, 0.76);
  color: #fff2c7;
  background: rgba(70, 185, 255, 0.07);
}

.schedule-day-preview .schedule-preview-emergency,
.schedule-day-preview .schedule-preview-dns {
  border-color: rgba(255, 109, 98, 0.78);
  color: #ffe0dd;
  background: rgba(70, 185, 255, 0.07);
}

.schedule-day-preview .schedule-preview-tech {
  border-left-color: var(--tech-color);
}

.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-clickable {
  cursor: pointer;
}

.ticket-tech-lit {
  border-color: var(--tech-color);
  box-shadow: var(--shadow), inset 5px 0 0 var(--tech-color), 0 0 22px rgba(70, 185, 255, 0.18);
}

.schedule-card-warranty {
  outline: 1px solid rgba(242, 193, 78, 0.82);
  outline-offset: -1px;
}

.schedule-card-emergency {
  outline: 1px solid rgba(255, 109, 98, 0.88);
  outline-offset: -1px;
}

.schedule-day-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.schedule-tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #eef7ff;
}

.schedule-tech-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tech-color);
  box-shadow: 0 0 10px var(--tech-color);
}

.schedule-item-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.72fr) minmax(94px, 0.5fr) minmax(94px, 0.5fr) minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto minmax(90px, auto);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.schedule-item-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 10px;
  background: rgba(242, 193, 78, 0.08);
}

.schedule-item-card strong,
.schedule-item-card span {
  display: block;
}

.schedule-item-card span {
  color: var(--muted);
  margin-top: 3px;
}

.schedule-item-do-not-schedule {
  border-color: rgba(255, 109, 98, 0.5);
  background: rgba(255, 109, 98, 0.12);
}

.schedule-item-tech-lit {
  border-color: var(--tech-color);
  box-shadow: inset 5px 0 0 var(--tech-color), 0 0 18px rgba(70, 185, 255, 0.12);
}

.schedule-item-preview {
  border-color: rgba(242, 193, 78, 0.2);
  color: #ffe8ad;
}

.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;
}

.followup-page-row {
  align-items: flex-start;
}

.followup-page-row.warning {
  border-color: rgba(255, 90, 90, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 90, 90, 0.2);
}

.followup-page-row .ticket-actions {
  justify-content: flex-end;
  min-width: 260px;
}

.team-color-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--team-color);
  box-shadow: 0 0 10px var(--team-color);
  vertical-align: -1px;
}

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

.team-editor-grid input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

.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;
  }

  .topbar > div:first-of-type {
    grid-column: 1;
  }

  .topbar-integrations {
    grid-column: 2;
    justify-self: end;
  }

  .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 > div:first-of-type,
  .topbar-integrations,
  .top-actions { grid-column: 1; }
  .topbar-integrations { flex-wrap: nowrap; min-width: 0; justify-self: start; }
  .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; }
  .schedule-item-form { grid-template-columns: 1fr 1fr; }
  .inventory-unit-grid,
  .customer-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-settings-strip,
  .invoice-entry-panels,
  .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) {
  .login-body { padding: 16px; }
  .login-card { padding: 20px; border-radius: 16px; }
  .login-card h1 { font-size: 34px; }
  .login-brand-row img { width: 48px; height: 48px; flex-basis: 48px; }
  .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-entry-panels,
  .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,
  .schedule-item-form,
  .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: 1 / -1; }
  .invoice-line-total { grid-column: auto; grid-row: auto; }
  .warranty-service-call-row { grid-template-columns: 1fr; }
  .storage-card-actions { justify-content: flex-start; }
  .ticket-action-row,
  .ticket-actions-right {
    align-items: stretch;
    flex-direction: column;
  }
  .ticket-actions-right {
    margin-left: 0;
  }
  .ticket-qit-submit {
    width: 100%;
  }
  .inventory-item-action-row,
  .inventory-shelf-head-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .inventory-move-handle {
    margin-left: 0;
  }
  .consignment-star { width: 78px; height: 74px; }
}
