@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #0f1724;
  --bg-soft: #151f2e;
  --bg-panel: rgba(20, 29, 42, 0.92);
  --bg-panel-strong: #172233;
  --bg-panel-hover: #1b293d;
  --bg-subtle: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f7fb;
  --muted: #95a2b8;
  --muted-strong: #bac4d3;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --success: #66e5b2;
  --success-soft: rgba(102, 229, 178, 0.16);
  --gold: #c9a44c;
  --warning: #f8c56d;
  --danger: #f2877b;
  --radius-xl: 1.6rem;
  --radius-lg: 1.15rem;
  --radius-md: 0.95rem;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08) 0%, transparent 26%),
    radial-gradient(circle at top right, rgba(201, 164, 76, 0.08) 0%, transparent 18%),
    linear-gradient(180deg, #0e1621 0%, #111a27 48%, #121d2b 100%);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: adminReveal 0.35s ease both;
}

body.admin-mobile-nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.admin-transitioning #admin-root,
body.admin-transitioning main {
  opacity: 0;
  transform: translateY(10px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

select {
  color-scheme: dark;
}

button {
  cursor: pointer;
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.admin-root,
.admin-shell,
.admin-login-shell {
  min-height: 100vh;
}

.admin-login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 500px);
  gap: 2rem;
  align-items: stretch;
  padding: 2rem;
}

.login-promo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 25% 18%, rgba(56, 189, 248, 0.12), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(201, 164, 76, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(18, 28, 42, 0.86), rgba(16, 24, 36, 0.94));
  box-shadow: var(--shadow);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-promo::after {
  content: 'KHUSHI MOTORS';
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted-strong);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.login-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.login-title {
  margin: 0;
  max-width: 12ch;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.login-copy {
  max-width: 34rem;
  margin-top: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.login-metric {
  border-radius: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.login-metric-label {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.login-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.login-card {
  border-radius: 2rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 42, 0.92), rgba(17, 25, 38, 0.97));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  font-weight: 700;
}

.login-card h1,
.page-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.login-card p {
  color: var(--muted);
  line-height: 1.7;
}

.login-form,
.content-form,
.settings-grid,
.vehicle-form-grid {
  display: grid;
  gap: 1rem;
}

.login-form {
  margin-top: 1.4rem;
}

.field,
.field-inline {
  display: grid;
  gap: 0.55rem;
}

.field-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.field input,
.field select,
.field textarea,
.field-inline .field input,
.field-inline .field select,
.field-inline .field textarea,
.search-input,
.topbar-search input {
  width: 100%;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field select,
.field-inline .field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 3.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23E5ECF7' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1rem) 50%;
  background-size: 14px 14px;
}

.field select:hover,
.field-inline .field select:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.05);
}

.field select option,
.field select optgroup,
.field-inline .field select option,
.field-inline .field select optgroup {
  background: #111926;
  color: #F5F7FB;
}

.field select option:checked,
.field-inline .field select option:checked {
  background: #1A2B3D;
  color: #FFFFFF;
}

.field textarea {
  min-height: 126px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus,
.topbar-search input:focus {
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.field-hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.form-error {
  margin: 0.2rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(242, 135, 123, 0.22);
  background: rgba(242, 135, 123, 0.1);
  color: #ffd1cb;
  font-size: 0.92rem;
  line-height: 1.5;
}

.login-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.hint-pill,
.tag,
.filter-pill,
.status-pill,
.quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.admin-shell {
  display: flex;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  background: linear-gradient(180deg, rgba(13, 20, 31, 0.98), rgba(16, 24, 36, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 30;
  transition: transform 0.24s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar-mobile-header {
  display: none;
}

.sidebar-mobile-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.sidebar-brand {
  padding: 0.7rem 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 0.45rem;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.sidebar-brand-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.92rem 1rem;
  border-radius: 1rem;
  color: rgba(255, 255, 255, 0.76);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.sidebar-link.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.13), rgba(255, 255, 255, 0.03));
  border-color: rgba(56, 189, 248, 0.18);
  color: #fff;
}

.sidebar-link-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sidebar-link i,
.icon-only-btn i,
.panel-icon {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.9rem;
}

.sidebar-ops {
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
}

.sidebar-ops p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.admin-main {
  flex: 1;
  margin-left: 280px;
  min-width: 0;
  transition: margin-left 0.24s ease, opacity 0.24s ease, transform 0.24s ease;
}

.mobile-sidebar-backdrop {
  display: none;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.4rem 2rem;
  backdrop-filter: blur(18px);
  background: rgba(15, 22, 33, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-main {
  display: grid;
  gap: 0.4rem;
}

.topbar-copy {
  margin: 0;
  color: var(--muted);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-search {
  position: relative;
  width: min(100%, 360px);
}

.topbar-search input {
  padding-left: 2.9rem;
}

.topbar-search i {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.42);
  width: 18px;
  height: 18px;
}

.icon-only-btn,
.profile-btn,
.mobile-toggle,
.sidebar-close,
.secondary-btn,
.ghost-btn,
.danger-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.icon-only-btn,
.mobile-toggle,
.sidebar-close {
  width: 46px;
  padding: 0;
}

.primary-btn {
  background: #fff;
  color: #111926;
  font-weight: 700;
  border-color: #fff;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.icon-only-btn:hover,
.profile-btn:hover,
.mobile-toggle:hover,
.sidebar-close:hover {
  transform: translateY(-1px);
}

.danger-btn {
  color: #fff;
  border-color: rgba(242, 135, 123, 0.18);
  background: rgba(242, 135, 123, 0.08);
}

.profile-btn {
  padding-right: 0.55rem;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.notification-badge {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.08);
}

.dropdown,
.slide-panel {
  position: fixed;
  z-index: 60;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(16, 24, 36, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.dropdown {
  top: 84px;
  right: 2rem;
  width: min(360px, calc(100vw - 2rem));
  padding: 1rem;
}

.dropdown-title {
  margin: 0 0 0.7rem;
  font-weight: 700;
}

.dropdown-stack {
  display: grid;
  gap: 0.75rem;
}

.dropdown-item {
  border-radius: 1rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item strong,
.list-title {
  display: block;
  margin-bottom: 0.25rem;
}

.dropdown-item p,
.list-copy,
.muted-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-section {
  padding: 2rem;
  display: grid;
  gap: 1.4rem;
}

.panel,
.metric-card,
.table-card,
.detail-card,
.mini-card,
.hero-panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 29, 42, 0.88), rgba(18, 26, 38, 0.96));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
}

.panel,
.table-card,
.detail-card,
.hero-panel {
  padding: 1.4rem;
}

.page-header,
.panel-header,
.split-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.panel-subtitle {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-actions,
.panel-actions,
.filter-row,
.table-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1.15rem;
  display: grid;
  gap: 0.65rem;
}

.metric-kicker {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.metric-value {
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1;
  font-weight: 700;
}

.metric-foot {
  color: var(--muted);
  font-size: 0.92rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

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

.stack {
  display: grid;
  gap: 1rem;
}

.list-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.status-pill {
  font-weight: 700;
}

.status-pill.pending,
.status-pill.new {
  background: rgba(248, 197, 109, 0.12);
  border-color: rgba(248, 197, 109, 0.18);
  color: #ffd792;
}

.status-pill.available,
.status-pill.confirmed,
.status-pill.replied,
.status-pill.active {
  background: rgba(102, 229, 178, 0.12);
  border-color: rgba(102, 229, 178, 0.18);
  color: #90f5c6;
}

.status-pill.contacted,
.status-pill.read {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.18);
  color: #85d9ff;
}

.status-pill.cancelled,
.status-pill.archived,
.status-pill.sold {
  background: rgba(242, 135, 123, 0.12);
  border-color: rgba(242, 135, 123, 0.18);
  color: #ffb0a6;
}

.status-pill.rented-out,
.status-pill.completed {
  background: rgba(201, 164, 76, 0.12);
  border-color: rgba(201, 164, 76, 0.18);
  color: #eed18d;
}

.filter-pill.active,
.quick-pill.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.2);
  color: #fff;
}

.table-wrap {
  overflow: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

th,
td {
  padding: 1rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

th {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

td {
  color: var(--muted-strong);
}

.vehicle-cell,
.person-cell {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.vehicle-thumb {
  width: 62px;
  height: 46px;
  border-radius: 1rem;
  object-fit: cover;
  background: linear-gradient(135deg, #24344c, #182231);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.25rem;
}

.cell-title {
  margin: 0 0 0.2rem;
  color: #fff;
  font-weight: 700;
}

.cell-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-contact-link {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.table-contact-link:hover {
  color: #85d9ff;
}

.table-contact-link.phone-link {
  color: #eed18d;
}

.table-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.table-action {
  min-height: 36px;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-size: 0.86rem;
}

.table-action.danger {
  border-color: rgba(242, 135, 123, 0.14);
  background: rgba(242, 135, 123, 0.06);
}

.table-action:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled,
.icon-only-btn:disabled,
.profile-btn:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 1.2rem;
  overflow: hidden;
}

.hero-panel-copy h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.hero-panel-copy p {
  color: var(--muted);
  max-width: 52rem;
  line-height: 1.8;
}

.hero-panel-aside {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.mini-card {
  padding: 1rem;
}

.mini-card strong {
  display: block;
  margin-bottom: 0.3rem;
}

.upload-zone {
  display: grid;
  gap: 0.85rem;
  place-items: center;
  min-height: 180px;
  padding: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  color: var(--muted);
}

.upload-zone img {
  width: 140px;
}

.vehicle-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.vehicle-image-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.vehicle-image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, #24344c, #182231);
}

.vehicle-image-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vehicle-image-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vehicle-image-card-actions > * {
  flex: 1 1 120px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.switch {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 0.18s ease;
}

.switch::after {
  content: '';
  position: absolute;
  inset: 4px auto 4px 4px;
  width: 22px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch.active {
  background: rgba(56, 189, 248, 0.28);
}

.switch.active::after {
  transform: translateX(24px);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 20, 0.62);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.slide-panel {
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100vh;
  padding: 1.4rem;
  overflow: auto;
}

.slide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.slide-header h3 {
  margin: 0;
  font-size: 1.45rem;
  font-family: 'Playfair Display', serif;
}

.slide-content {
  display: grid;
  gap: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.detail-item {
  padding: 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.detail-item span {
  display: block;
}

.detail-item span:first-child {
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-item span:last-child {
  color: #fff;
  line-height: 1.55;
}

.detail-kicker {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.enquiry-phone-card {
  border-color: rgba(201, 164, 76, 0.18);
  background: linear-gradient(135deg, rgba(201, 164, 76, 0.1), rgba(20, 29, 42, 0.9));
}

.enquiry-phone-card strong {
  display: block;
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  letter-spacing: 0.01em;
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
}

.enquiry-phone-actions {
  margin-top: 1rem;
}

.toast {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 24, 36, 0.96);
  box-shadow: var(--shadow);
}

.mobile-toggle {
  display: none;
}

@keyframes adminReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
  }

  .login-promo {
    min-height: 320px;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2,
  .hero-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 960px) {
  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 54;
    background: rgba(8, 13, 20, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
  }

  .mobile-sidebar-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.28s ease;
  }

  .admin-sidebar {
    width: min(86vw, 320px);
    max-width: 320px;
    padding: 1.05rem 1rem 1.2rem;
    gap: 1rem;
    z-index: 62;
    box-shadow: 24px 0 54px rgba(0, 0, 0, 0.34);
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, visibility 0s linear 0.32s;
  }

  .admin-sidebar.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  }

  .sidebar-mobile-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.2rem 0.95rem;
    margin-bottom: 0.15rem;
    background: linear-gradient(180deg, rgba(13, 20, 31, 0.98) 0%, rgba(13, 20, 31, 0.94) 78%, rgba(13, 20, 31, 0) 100%);
  }

  .sidebar-close:focus-visible,
  .mobile-toggle:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.88);
    outline-offset: 3px;
  }

  .admin-main {
    margin-left: 0;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .admin-topbar {
    grid-template-columns: 1fr;
  }

  .topbar-tools {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .topbar-search {
    width: 100%;
  }

  .page-section {
    padding: 1.5rem;
  }

  .list-item,
  .switch-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .login-promo,
  .login-card,
  .page-section,
  .admin-topbar,
  .slide-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .login-metrics,
  .metrics-grid,
  .grid-3,
  .field-inline,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-header,
  .panel-header,
  .split-header {
    flex-direction: column;
  }

  .admin-topbar,
  .page-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .table-wrap {
    margin-inline: -0.15rem;
    padding-inline: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .dropdown {
    right: 1rem;
    left: 1rem;
    width: auto;
  }
}
@media (max-width: 640px) {
  .admin-topbar,
  .page-section,
  .login-promo,
  .login-card,
  .panel,
  .table-card,
  .detail-card,
  .hero-panel,
  .slide-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .topbar-tools,
  .page-actions,
  .panel-actions,
  .table-actions,
  .quick-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-tools > *,
  .page-actions > *,
  .panel-actions > *,
  .table-actions > *,
  .quick-actions > * {
    width: 100%;
  }

  .profile-btn {
    justify-content: space-between;
  }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-row > * {
    flex: 0 0 auto;
  }

  .table-wrap {
    overflow: visible;
    margin-top: 1rem;
  }

  table {
    min-width: 0;
  }

  table thead {
    display: none;
  }

  table tbody {
    display: grid;
    gap: 0.9rem;
  }

  table tr {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
  }

  table td {
    display: grid;
    gap: 0.35rem;
    padding: 0;
    border: 0;
  }

  table td::before {
    content: attr(data-label);
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
  }

  .table-row-actions {
    width: 100%;
  }

  .table-row-actions > * {
    flex: 1 1 100%;
  }
}
