/* Hertz Home Solutions staff panel. Mobile first: bottom tab bar on phones, sidebar from 900px. */

:root {
  --brand: #103D99;
  --brand-dark: #0c2f78;
  --brand-soft: #E8EEFB;
  --ink: #0A1C32;
  --muted: #64708a;
  --line: #e3e7f0;
  --bg: #f3f5fa;
  --card: #fff;
  --ok: #0F9D58;
  --ok-soft: #e6f5ec;
  --warn: #E37400;
  --warn-soft: #fdf1e3;
  --danger: #D93025;
  --danger-soft: #fce9e7;
  --info: #1A73E8;
  --info-soft: #e8f0fe;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10,28,50,.04), 0 4px 16px rgba(10,28,50,.05);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
h1, h2 { margin: 0; line-height: 1.25; letter-spacing: -.2px; }
h2 { font-size: 16px; margin-bottom: 10px; }
img { max-width: 100%; display: block; }
small { font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

/* ---------- Layout ---------- */

.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 19px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-mark { width: 32px; height: 32px; flex: none; }
.back { font-size: 30px; line-height: 1; color: var(--ink); padding: 0 6px 2px 0; }
.content { padding: 16px 14px; max-width: 1240px; margin: 0 auto; }
.user-chip { display: none; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(10,28,50,.05);
}
.bottombar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.bottombar a.active { color: var(--brand); }
nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 256px 1fr; }
  .bottombar, .topbar-logout, .topbar-mark { display: none; }
  .main { padding-bottom: 40px; min-width: 0; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    background: var(--ink); color: #c5cfe3; padding: 20px 14px;
  }
  .sidebar-label {
    margin: 26px 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: .8px;
    text-transform: uppercase; color: #6f7f9e;
  }
  .sidebar nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: #c5cfe3; font-weight: 500; transition: background .12s, color .12s;
  }
  .sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .sidebar nav a.active { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(16,61,153,.45); }
  .sidebar-foot {
    margin-top: auto; display: flex; flex-direction: column; gap: 4px;
    padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px;
  }
  .sidebar-foot a, .sidebar-foot button.link {
    display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: #c5cfe3;
  }
  .sidebar-foot a:hover, .sidebar-foot button.link:hover { background: rgba(255,255,255,.07); color: #fff; }
  .content { padding: 28px; }
  .topbar { padding: 16px 28px; }
  .topbar h1 { font-size: 22px; }
  .user-chip {
    display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px;
    background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 600;
  }
  .user-chip .avatar { width: 32px; height: 32px; font-size: 13px; background: var(--brand); color: #fff; }
}

a.brand:not(.stat) { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; padding: 0 6px; line-height: 1.2; }
a.brand:not(.stat) span { display: flex; flex-direction: column; }
a.brand:not(.stat) small { color: #8fa0c2; font-weight: 500; font-size: 12px; }
.logo { width: 42px; height: 42px; padding: 5px; border-radius: 12px; background: #fff; flex: none; }

/* ---------- Messages ---------- */

.messages { padding: 12px 14px 0; max-width: 1200px; margin: 0 auto; }
.msg { padding: 11px 14px; border-radius: 10px; margin-bottom: 8px; font-weight: 500; }
.msg.success { background: var(--ok-soft); color: #0b6b3d; }
.msg.error { background: var(--danger-soft); color: #a3231b; }
.msg.info, .msg.warning { background: var(--warn-soft); color: #8a4600; }

/* ---------- Cards & rows ---------- */

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--line); margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.list { padding: 4px 0; }
.card.list { overflow: hidden; }
.card.list .row { padding: 13px 18px; }
.card.list .row:hover { background: #f8f9fd; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head a { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; gap: 16px; }
.grid-2 .card { margin: 0; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--muted); font-size: 22px; }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg); }
.thumb.empty { display: inline-block; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700;
}
.time { flex: none; width: 76px; font-weight: 700; font-size: 13px; text-align: center; padding: 6px 4px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.day-head {
  padding: 10px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted); background: var(--bg);
}
.empty-note { color: var(--muted); padding: 22px 16px; margin: 0; text-align: center; }

/* ---------- Dashboard ---------- */

.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 20px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(120deg, var(--ink), var(--brand));
}
.welcome h2 { font-size: 22px; margin: 0 0 2px; }
.welcome p { margin: 0; color: #c9d6f0; }
.welcome .btn { background: #fff; border-color: #fff; color: var(--brand); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stat {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink); display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(10,28,50,.1); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--bg); color: var(--muted);
}
.stat-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat b { font-size: 30px; line-height: 1.1; letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat.warn { border-color: #f6d9b3; } .stat.warn b { color: var(--warn); } .stat.warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat.brand { border-color: #c9d5f0; } .stat.brand b { color: var(--brand); } .stat.brand .stat-icon { background: var(--brand-soft); color: var(--brand); }
.stat.danger { border-color: #f2b8b3; } .stat.danger b { color: var(--danger); } .stat.danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat.ok b { color: var(--ok); } .stat.ok .stat-icon { background: var(--ok-soft); color: var(--ok); }

/* ---------- Filters ---------- */

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 8px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; font-size: 14px; transition: border-color .12s;
}
.tab:hover { border-color: var(--brand); }
.tab b { margin-left: 4px; font-size: 12px; background: var(--bg); padding: 1px 7px; border-radius: 999px; }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(16,61,153,.3); }
.tab.active b { background: rgba(255,255,255,.2); }
@media (min-width: 900px) {
  .filters { flex-direction: row; align-items: center; justify-content: space-between; }
  .tabs { margin: 0; padding: 0; }
  .search { max-width: 320px; }
}

/* ---------- Pills ---------- */

.pill {
  display: inline-block; flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg); color: var(--muted); white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.muted { background: var(--bg); color: var(--muted); }
/* review status */
.r-pending { background: var(--warn-soft); color: var(--warn); }
.r-approved { background: var(--ok-soft); color: var(--ok); }
.r-rejected { background: var(--danger-soft); color: var(--danger); }
.r-draft { background: var(--bg); color: var(--muted); }
/* dealer status */
.ds-pending { background: var(--warn-soft); color: var(--warn); }
.ds-approved { background: var(--ok-soft); color: var(--ok); }
.ds-rejected, .ds-suspended { background: var(--danger-soft); color: var(--danger); }
/* enquiry status */
.e-new { background: var(--brand-soft); color: var(--brand); }
.e-contacted { background: var(--info-soft); color: var(--info); }
.e-sold { background: var(--ok-soft); color: var(--ok); }
.e-closed { background: var(--bg); color: var(--muted); }
/* booking status */
.s-pending { background: var(--warn-soft); color: var(--warn); }
.s-confirmed, .s-assigned { background: var(--brand-soft); color: var(--brand); }
.s-in_progress { background: var(--info-soft); color: var(--info); }
.s-completed { background: var(--ok-soft); color: var(--ok); }
.s-cancelled { background: var(--danger-soft); color: var(--danger); }
/* defect severity */
.d-cosmetic { background: var(--info-soft); color: var(--info); }
.d-minor { background: var(--warn-soft); color: var(--warn); }
.d-functional { background: var(--danger-soft); color: var(--danger); }

/* ---------- Listing cards ---------- */

.cards { display: grid; gap: 14px; }
.cards > * { min-width: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.item-card {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.item-card:hover { transform: translateY(-2px); border-color: #c9d5f0; box-shadow: 0 10px 28px rgba(10,28,50,.1); }
.item-img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg); }
.item-img.empty { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-top { display: flex; gap: 6px; flex-wrap: wrap; }
.item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-weight: 700; }
.price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.price.big { font-size: 24px; margin: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Detail pages ---------- */

.detail { max-width: 760px; margin: 0 auto; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.title { font-size: 21px; margin-bottom: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.facts b { color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery a { position: relative; display: block; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg); }
.gallery span {
  position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
}
.defect { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.defect:last-child { border-bottom: 0; }
.defect img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.defect > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.specs { margin: 0 0 12px; padding-left: 20px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.proof { max-height: 420px; width: auto; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; }
.big-phone { font-size: 20px; font-weight: 700; margin: 2px 0 10px; letter-spacing: .3px; }
.quote { margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; font-style: italic; }
.history-title { margin: 18px 0 4px; font-size: 14px; }
.note { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.note p { flex-basis: 100%; margin: 0; }
.supplier { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines .num { text-align: right; white-space: nowrap; }
.lines .total td { font-weight: 700; border-bottom: 0; }

/* ---------- Forms & buttons ---------- */

input, select, textarea {
  width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #d5dbe8; border-radius: 12px;
  background: #fff; color: var(--ink);
}
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); flex: none; }
input[type=color] { width: 64px; height: 44px; padding: 4px; }
input[type=file] { padding: 9px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.search { background: var(--card); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; font: inherit; font-weight: 600;
  border: 1px solid #d5dbe8; background: var(--card); color: var(--ink); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { border-color: var(--brand); }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger-outline { color: var(--danger); border-color: #f2b8b3; }
.btn.current { background: var(--ink); border-color: var(--ink); color: #fff; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }

.actions-card form { margin-bottom: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { width: 90px; }
.inline.stretch select { flex: 1; }
.inline-forms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.inline-forms form { margin: 0; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.contact-buttons .btn { flex: 1 1 130px; }
.status-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.danger-zone { margin-top: 6px; }
.danger-zone summary { color: var(--danger); cursor: pointer; padding: 8px 0; font-weight: 600; }

/* ---------- Manage ---------- */

.group-title { margin: 6px 2px 10px; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.manage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
@media (min-width: 700px) { .manage-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .manage-grid { grid-template-columns: repeat(4, 1fr); } }
.manage-card {
  display: flex; flex-direction: column; gap: 2px; padding: 18px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.manage-card:hover { transform: translateY(-2px); border-color: #c9d5f0; box-shadow: 0 10px 28px rgba(10,28,50,.1); }
.manage-card b { font-size: 28px; line-height: 1.1; color: var(--brand); }
.manage-card span { font-weight: 700; font-size: 16px; }
.manage-card small { color: var(--muted); }

.list-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.list-search { flex: 1; }
.list-head .btn { flex: none; white-space: nowrap; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }

.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8f9fd; }
.table td.main a { font-weight: 600; }
.table .row-actions { text-align: right; white-space: nowrap; width: 1%; }
.table .row-actions form { display: inline; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 16px; }

/* On phones each table row becomes a small card. */
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .table td.main { font-size: 16px; padding-bottom: 6px; text-align: left; }
  .table td.main::before, .table td.empty-note::before { display: none; }
  .table .row-actions { width: 100%; padding-top: 8px; justify-content: flex-end; }
  .table .row-actions::before { display: none; }
  .list-head { flex-wrap: wrap; }
  .list-head .btn { flex: 1 1 100%; }
}

.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field.wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; font-size: 14px; }
.field > label small { font-weight: 400; }
.field.check { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.field.check small { flex: 1 1 100%; font-weight: 400; margin-left: 28px; margin-top: -6px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field > div { display: grid; gap: 8px; }                       /* checkbox lists */
.field > div label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.field-preview { max-height: 120px; width: auto; border-radius: 12px; border: 1px solid var(--line); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-actions .btn.primary { min-width: 120px; }

.gallery .photo { position: relative; margin: 0; }
.photo-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10,28,50,.75); color: #fff; font-size: 18px; line-height: 1;
}
.photo-x:hover { background: var(--danger); }
.defect .defect-x { margin-left: auto; align-self: center; }
.add-defect { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.add-defect .form-grid { width: 100%; }
.danger-zone.card { padding: 6px 18px; }
.danger-zone.card form { padding-bottom: 12px; }

@media (min-width: 900px) {
  .only-mobile { display: none !important; }
  .sidebar { overflow-y: auto; }
  .sidebar .sidebar-label { margin-top: 20px; }
  .sidebar nav.manage-nav a { padding: 8px 12px 8px 46px; font-size: 14px; }
  .sidebar nav.manage-nav a.active { box-shadow: none; }
}

/* ---------- Login ---------- */

.login-page { min-height: 100vh; display: grid; background: var(--card); }
.login-side {
  display: none; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff;
  background: linear-gradient(150deg, var(--ink) 30%, var(--brand));
}
.login-side .brand { padding: 0; font-size: 17px; }
.login-side h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.6px; margin: 0 0 12px; max-width: 420px; }
.login-side p { margin: 0; color: #c9d6f0; max-width: 400px; font-size: 16px; }
.login-side ul { margin: 24px 0 0; padding: 0; list-style: none; color: #dbe4f5; }
.login-side li { padding: 6px 0 6px 26px; position: relative; }
.login-side li::before { content: "✓"; position: absolute; left: 0; color: #7fd6a8; font-weight: 700; }
.login-side small { color: #8fa0c2; }
.login-main { display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login-logo { height: 130px; width: auto; align-self: center; margin-bottom: 6px; }
.login-card h1 { font-size: 24px; }
.login-card p { margin: -8px 0 6px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.login-card .btn { margin-top: 4px; min-height: 48px; }
.login-back { text-align: center; font-size: 14px; }
@media (min-width: 900px) {
  .login-page { grid-template-columns: 1.05fr 1fr; }
  .login-side { display: flex; }
  .login-logo { display: none; }
}
