:root {
  --bg: #07101e;
  --panel: rgba(17, 29, 48, 0.88);
  --panel-solid: #111d30;
  --panel-light: #182740;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f7f9fc;
  --muted: #9facbf;
  --orange: #ff6a00;
  --orange-light: #ff9a4f;
  --danger: #ff6c70;
  --success: #56dca0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #142745 0, var(--bg) 44%);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  pointer-events: none;
}
.ambient-one {
  width: 360px;
  height: 360px;
  background: var(--orange);
  top: -220px;
  right: -80px;
}
.ambient-two {
  width: 420px;
  height: 420px;
  background: #1555aa;
  bottom: -280px;
  left: -140px;
}
.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  border-radius: 22px;
}

.login-layout {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1.1fr minmax(320px, 460px);
  gap: 56px;
  align-items: center;
  max-width: 1180px;
  margin: auto;
}
.brand-panel {
  padding: 42px;
  max-width: 650px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--orange), #c54400);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -2px;
  box-shadow: 0 18px 45px rgba(255, 106, 0, 0.28);
}
.brand-mark-small {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 16px;
}
.eyebrow {
  margin: 20px 0 5px;
  color: var(--orange-light);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 16px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}
h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}
h3 {
  margin-bottom: 8px;
  font-size: 22px;
}
.lead {
  max-width: 590px;
  color: #d9e1ed;
  font-size: 21px;
  line-height: 1.55;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.security-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #dbe6f4;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(86, 220, 160, 0.1);
}
.login-card {
  display: grid;
  gap: 22px;
  padding: 34px;
}
.login-card .eyebrow {
  margin-top: 0;
}
label {
  display: grid;
  gap: 8px;
  color: #d8e1ee;
  font-size: 13px;
  font-weight: 750;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  color: var(--text);
  background: rgba(3, 10, 20, 0.65);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.button {
  border: 0;
  border-radius: 13px;
  padding: 12px 17px;
  color: var(--text);
  font-weight: 800;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.button-primary {
  background: linear-gradient(135deg, var(--orange), #e45200);
  box-shadow: 0 12px 26px rgba(255, 106, 0, 0.18);
}
.button-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}
.message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
}
.error {
  color: #ffd9db;
  background: rgba(255, 79, 84, 0.12);
  border: 1px solid rgba(255, 79, 84, 0.3);
}

.topbar {
  max-width: 1500px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-inline,
.account {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-inline .eyebrow {
  margin: 0 0 3px;
}
.account {
  text-align: right;
}
.account strong {
  display: block;
  font-size: 13px;
}
.role-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  color: var(--orange-light);
  background: rgba(255, 106, 0, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.portal-grid {
  max-width: 1500px;
  min-height: calc(100vh - 114px);
  margin: auto;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 22px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
.sidebar > .eyebrow {
  margin: 5px 12px 12px;
}
.nav-item {
  width: 100%;
  margin: 3px 0;
  padding: 13px 14px;
  border: 0;
  border-radius: 12px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}
.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.nav-item.active {
  box-shadow: inset 3px 0 var(--orange);
}
.sidebar-spacer {
  flex: 1;
  min-height: 50px;
}
.read-only-note {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1.45;
}
.read-only-note strong {
  color: var(--text);
}
.content {
  min-width: 0;
  padding: 16px 6px 40px;
}
.content-section {
  animation: reveal 0.22s ease-out;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 24px;
}
.section-heading .eyebrow {
  margin-top: 0;
}
.section-heading h2 {
  margin: 0;
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.stat-card {
  min-height: 180px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-card span,
.stat-card small {
  color: var(--muted);
}
.stat-card strong {
  margin: 12px 0;
  font-size: clamp(46px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}
.accent-card {
  background: linear-gradient(145deg, rgba(255, 106, 0, 0.22), var(--panel));
}
.warning-card {
  background: linear-gradient(145deg, rgba(255, 190, 70, 0.2), var(--panel));
}
.info-card {
  margin-top: 18px;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.info-card .eyebrow {
  margin-top: 0;
}
.info-card p:last-child {
  margin-bottom: 0;
}
.result-count {
  color: var(--muted);
  font-size: 13px;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px;
}
.inquiry-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(440px, 1.25fr);
  gap: 18px;
  align-items: start;
}
.inquiry-list {
  max-height: calc(100vh - 290px);
  overflow: auto;
}
.inquiry-item {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--text);
  background: transparent;
}
.inquiry-item:hover,
.inquiry-item.active {
  background: rgba(255, 255, 255, 0.055);
}
.inquiry-item.active {
  box-shadow: inset 3px 0 var(--orange);
}
.inquiry-item-top,
.detail-title-wide,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inquiry-item-top {
  justify-content: space-between;
}
.inquiry-subject,
.inquiry-schedule {
  color: var(--muted);
  font-size: 12px;
}
.type-chip,
.status-chip,
.conflict-chip {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}
.type-chip {
  color: #b9d9ff;
  background: rgba(52, 136, 255, 0.15);
}
.status-new {
  color: #ffd18d;
  background: rgba(255, 169, 42, 0.15);
}
.status-in_progress {
  color: #b9d9ff;
  background: rgba(52, 136, 255, 0.15);
}
.status-confirmed,
.status-completed {
  color: #94efc1;
  background: rgba(86, 220, 160, 0.13);
}
.status-rejected {
  color: #ffb2b5;
  background: rgba(255, 79, 84, 0.13);
}
.conflict-chip {
  color: #ffd18d;
  background: rgba(255, 169, 42, 0.13);
}
.detail-title-wide > div {
  flex: 1;
}
.inquiry-edit-form {
  display: grid;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.detail-actions {
  flex-wrap: wrap;
}
.inquiry-message {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.inquiry-message span {
  color: var(--muted);
  font-size: 11px;
}
.inquiry-message p {
  margin: 7px 0 0;
  line-height: 1.55;
}
.warning-message {
  margin-top: 14px;
  color: #ffe1ad;
  border: 1px solid rgba(255, 169, 42, 0.28);
  background: rgba(255, 169, 42, 0.1);
}
.workflow-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(3, 10, 20, 0.35);
}
.workflow-card-heading {
  justify-content: space-between;
}
.workflow-grid {
  margin-bottom: 0;
}
.workflow-form {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.workflow-empty {
  padding: 22px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.workflow-confirmation {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  color: #94efc1;
  background: rgba(86, 220, 160, 0.1);
}
.workflow-list {
  display: grid;
  gap: 14px;
}
.workflow-warning {
  margin: 0;
}
.workflow-grid strong {
  overflow-wrap: anywhere;
}
.checkbox-label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
}
.checkbox-label input {
  width: auto;
  margin-top: 3px;
}
.customer-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: start;
}
.list-panel {
  overflow: hidden;
}
.customer-list {
  max-height: calc(100vh - 290px);
  overflow: auto;
}
.customer-item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--text);
  background: transparent;
}
.customer-item:hover,
.customer-item.active {
  background: rgba(255, 255, 255, 0.055);
}
.customer-item.active {
  box-shadow: inset 3px 0 var(--orange);
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--orange-light);
  background: rgba(255, 106, 0, 0.13);
  font-weight: 900;
}
.customer-copy {
  min-width: 0;
}
.customer-copy strong,
.customer-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.customer-chevron {
  color: var(--orange);
  font-size: 20px;
}
.detail-panel {
  position: sticky;
  top: 14px;
  min-height: 320px;
  padding: 22px;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}
.detail-title h3 {
  margin: 0;
}
.detail-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.detail-field {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.detail-field span,
.vehicle-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-field strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.subheading {
  margin: 22px 0 10px;
  font-size: 14px;
}
.vehicle-list {
  display: grid;
  gap: 10px;
}
.vehicle-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(3, 10, 20, 0.35);
}
.vehicle-card strong {
  display: block;
  margin: 4px 0 9px;
}

.availability-calendar-panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.compact-heading {
  margin-bottom: 14px;
}

.compact-heading label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.availability-calendar {
  overflow-x: auto;
}

.availability-calendar table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 3px;
}

.availability-calendar th,
.availability-calendar td {
  min-width: 48px;
  padding: 9px 6px;
  border-radius: 7px;
  background: #f3f5f8;
  text-align: center;
  font-size: 12px;
}

.availability-calendar th:first-child,
.availability-calendar td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 170px;
  background: #fff;
  text-align: left;
  font-weight: 700;
}

.availability-calendar td.calendar-block {
  background: #ffe1cc;
  color: #7c3000;
  font-weight: 700;
}

.availability-calendar td.block-maintenance {
  background: #ffe9a8;
  color: #674d00;
}

.availability-calendar td.block-rental,
.availability-calendar td.block-reservation {
  background: #dce8ff;
  color: #173c7a;
}
.vehicle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.vehicle-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}
.empty-state {
  padding: 45px 22px;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}
.loading {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  font-size: 13px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 30px 0;
  }
  .brand-panel {
    padding: 15px 10px 35px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    position: sticky;
    top: 8px;
    z-index: 10;
    padding: 8px;
  }
  .sidebar > .eyebrow,
  .sidebar-spacer,
  .read-only-note {
    display: none;
  }
  .nav-item {
    width: auto;
    flex: 1;
    text-align: center;
  }
  .customer-layout {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-bar,
  .inquiry-layout {
    grid-template-columns: 1fr;
  }
  .inquiry-list {
    max-height: 430px;
  }
  .customer-list {
    max-height: 420px;
  }
  .detail-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 16px;
  }
  .topbar {
    align-items: flex-start;
  }
  .brand-inline > div:last-child {
    display: none;
  }
  .account {
    align-items: flex-end;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .info-card {
    align-items: stretch;
    flex-direction: column;
  }
  .search-bar {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 24px;
  }
  h1 {
    font-size: 48px;
  }
}
