:root { font-family: "Segoe UI", Arial, sans-serif; color: #203047; background: #f5f7fb; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
.shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; flex: none; background: #13233a; color: #d5deea; padding: 28px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 20px; font-weight: 650; margin: 2px 10px 52px; }
.brand strong { font-weight: 400; color: #85baff; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: #2876d1; font-weight: 750; }
.sidebar-label, .eyebrow { font-size: 11px; font-weight: 750; letter-spacing: 1.6px; }
.sidebar-label { color: #8194ac; padding: 0 13px; margin-bottom: 13px; }
.nav-item { display: block; width: 100%; text-align: left; text-decoration: none; color: #c4d3e7; padding: 13px; border: 0; border-radius: 10px; background: transparent; font-weight: 650; }
.nav-item.active { color: #fff; background: #253d5c; }
.sidebar-note { margin: auto 13px 28px; color: #9fb1c8; font-size: 13px; line-height: 1.55; }
.sidebar-bottom { border-top: 1px solid #30435c; padding: 21px 12px 0; color: #9fb1c8; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #4bca9e; }
.main { flex: 1; min-width: 0; }
.topbar { height: 70px; background: #fff; border-bottom: 1px solid #e8edf4; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; color: #748298; font-size: 13px; }
.operator { display: flex; gap: 18px; align-items: center; }
.content { max-width: 1270px; margin: 0 auto; padding: 48px 42px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.eyebrow { color: #2876d1; margin-bottom: 11px; }
.page-heading h1, .login-card h1 { font-size: 34px; letter-spacing: -1px; margin-bottom: 9px; }
.page-heading p, .login-card p { color: #718198; margin-bottom: 0; }
.primary-button, .secondary-button { border-radius: 8px; padding: 11px 17px; font-weight: 650; border: 1px solid transparent; }
.primary-button { background: #246cc5; color: #fff; box-shadow: 0 3px 8px #246cc529; }
.primary-button:hover { background: #175cae; }
.secondary-button { background: #fff; color: #2f4c70; border-color: #d7e0eb; }
.secondary-button:hover { background: #f1f6fc; }
.text-button, .icon-button { border: 0; background: none; color: #246cc5; }
.overview { display: flex; align-items: center; gap: 18px; border: 1px solid #dce9fa; background: #edf5ff; border-radius: 12px; padding: 18px 22px; margin-bottom: 26px; }
.overview-icon { font-size: 29px; color: #2675d0; }
.overview strong, .overview span { display: block; }
.overview strong { font-size: 14px; margin-bottom: 4px; }
.overview span { color: #647b96; font-size: 13px; }
.garage-home { max-width: 1450px; }
.garage-home .page-heading { margin-bottom: 24px; }
.home-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.home-metric { min-height: 145px; padding: 20px 23px; border: 1px solid #dce5f0; border-radius: 13px; background: #fff; color: #233a55; text-align: left; box-shadow: 0 5px 20px #22345408; }
.home-metric:hover, .home-city-card:hover { border-color: #7fb0e7; box-shadow: 0 9px 23px #245ba516; transform: translateY(-2px); }
.home-metric span, .home-metric strong, .home-metric small { display: block; }
.home-metric span { font-size: 13px; font-weight: 700; }
.home-metric strong { margin: 10px 0 5px; font-size: 34px; line-height: 1; }
.home-metric small { color: #4977aa; font-size: 12px; }
.home-metric-primary { background: #193453; border-color: #193453; color: #fff; }
.home-metric-primary small { color: #b9d9ff; }
.home-city-panel { padding: 27px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.home-section-heading h2 { margin-bottom: 7px; font-size: 21px; }
.home-section-heading p { margin-bottom: 0; color: #718198; font-size: 13px; }
.home-city-search { display: grid; gap: 7px; max-width: 330px; margin: 24px 0 18px; color: #52637b; font-size: 12px; font-weight: 700; }
.home-city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-city-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; min-height: 84px; padding: 16px; border: 1px solid #d6e3f3; border-radius: 11px; background: #fff; text-align: left; color: #1f3855; }
.home-city-card strong { font-size: 14px; }
.home-city-card span { color: #637a96; font-size: 12px; white-space: nowrap; }
.home-city-card small { grid-column: 1 / -1; color: #8190a4; font-size: 11px; }
.home-metric:focus-visible, .home-city-card:focus-visible { outline: 3px solid #3584df; outline-offset: 2px; }
.panel { background: #fff; border: 1px solid #e4eaf2; border-radius: 13px; box-shadow: 0 5px 20px #22345408; overflow: hidden; }
.panel-heading { padding: 25px 26px 0; }
.panel-heading h2 { font-size: 18px; margin-bottom: 5px; }
.panel-heading p { font-size: 13px; color: #8794a5; }
.filters { padding: 20px 26px 23px; display: flex; align-items: end; gap: 14px; }
.filters label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 650; color: #53647a; }
.search-field { flex: 1; }
.product-field { width: 220px; }
input, select { background: #fff; border: 1px solid #d9e2ec; border-radius: 8px; padding: 11px 12px; color: #25364d; outline: none; min-width: 0; }
input:focus, select:focus { border-color: #3584df; box-shadow: 0 0 0 3px #3584df22; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { background: #f8fafc; color: #7a899d; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 750; }
td, th { padding: 16px 26px; border-top: 1px solid #edf1f5; }
td { font-size: 13px; color: #607187; }
td:first-child { color: #24364d; font-weight: 700; }
.row-button { border: 0; background: none; color: #246cc5; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-block; border-radius: 20px; background: #e9f2ff; color: #2b65ad; padding: 6px 10px; font-size: 11px; font-weight: 700; }
.empty-state { text-align: center; padding: 45px 15px; color: #7a899d; }
.login-view { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 32px; }
.login-card { width: min(100%, 440px); background: #fff; padding: 42px; border: 1px solid #e4eaf2; border-radius: 14px; box-shadow: 0 14px 45px #22345412; }
.login-card h1 { font-size: 28px; }
.login-card p { line-height: 1.5; margin-bottom: 30px; }
.login-card form { display: grid; gap: 10px; }
.login-card label { font-size: 12px; font-weight: 700; color: #53647a; }
.login-card input { margin-bottom: 10px; }
.full-width { width: 100%; margin-top: 8px; }
.message { color: #b34d36; font-size: 13px; margin: 10px 26px; }
.login-card .message { margin: 14px 0 0; }
.login-link { display: block; margin-top: 18px; padding: 0; }
.dialog { width: min(94vw, 680px); border: 1px solid #dce4ee; border-radius: 14px; padding: 30px; box-shadow: 0 25px 75px #162b4c35; }
.small-dialog { width: min(94vw, 480px); }
.dialog::backdrop { background: #14233b91; }
#detail-dialog { box-sizing: border-box; width: min(94vw, 600px); max-width: none; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 14px 0 0 14px; overflow-y: auto; }
.garage-record-page { max-width: 1500px; }
.garage-record-page .page-heading { margin-bottom: 24px; }
.garage-back { padding: 0; margin-bottom: 24px; font-weight: 700; }
.drawer-tabs { display: flex; gap: 5px; overflow-x: auto; margin: 0; padding: 0 20px; background: #fff; border: 1px solid #dce4ee; border-radius: 12px 12px 0 0; scrollbar-width: thin; }
.drawer-tabs button { flex: none; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #64758e; padding: 12px 14px; font-size: 13px; font-weight: 700; }
.drawer-tabs button[aria-selected="true"] { color: #246cc5; border-bottom-color: #246cc5; }
.drawer-tabs button:focus-visible { outline: 2px solid #246cc5; outline-offset: -4px; }
.garage-tab-panel { min-height: 450px; padding: 30px; background: #fff; border: 1px solid #dce4ee; border-top: 0; border-radius: 0 0 12px 12px; }
.garage-tab-panel h3 { font-size: 16px; margin: 4px 0 15px; }
.profile-help { color: #607187; font-size: 13px; line-height: 1.5; margin: 0 0 22px; }
.site-toolbar { display: flex; align-items: end; gap: 12px; margin: 0 0 24px; }
.site-toolbar label { min-width: 260px; }
.garage-tab-panel h3:not(:first-child) { margin-top: 30px; }
.garage-tab-panel form > button { margin-top: 14px; }
.garage-tab-panel label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; color: #52637b; }
.garage-tab-panel .link-product { margin-top: 0; margin-bottom: 26px; }
.drawer-message { margin: 12px 0; }
.drawer-grid { overflow-x: auto; border: 1px solid #e5ebf3; border-radius: 9px; }
.drawer-grid table { min-width: 700px; }
.drawer-grid th, .drawer-grid td { padding: 12px; vertical-align: top; overflow-wrap: anywhere; }
.drawer-grid td { line-height: 1.5; }
.drawer-grid td input, .drawer-grid td select { width: 100%; margin: 3px 0; }
.drawer-grid td .row-button { text-align: left; padding: 5px 0; }
.drawer-grid .drawer-grid-empty { color: #8190a4; font-style: italic; padding: 24px 12px; }
.drawer-section { border-top: 1px solid #e5ebf3; padding-top: 22px; margin-top: 25px; }
.drawer-section h3 { font-size: 16px; margin-bottom: 15px; }
.drawer-section form > button { margin-top: 15px; }
.drawer-section ul { padding-left: 20px; color: #52647c; font-size: 13px; line-height: 1.6; }
.drawer-section li { margin-bottom: 8px; }
.drawer-section label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #52637b; }
.drawer-section .link-product label { flex: 1; }
.marketing-panel { margin-bottom: 24px; }
.marketing-form { padding: 18px 26px 26px; }
.marketing-form > button { margin-top: 18px; }
.marketing-preview { padding: 22px 26px; border-top: 1px solid #e5ebf3; color: #52647c; font-size: 13px; }
.marketing-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-page { max-width: none; padding: 30px 32px; }
.mail-workspace { display: grid; grid-template-columns: 220px minmax(300px, 360px) minmax(330px, 1fr); min-height: 650px; margin-bottom: 28px; }
.mail-folder-pane { padding: 22px 14px; background: #f8faff; }
.mail-account-label { display: grid; gap: 7px; margin: 0 7px 16px; color: #52637b; font-size: 12px; font-weight: 700; }
.mail-account-label select { width: 100%; }
.mail-new-button { width: 100%; margin-bottom: 26px; }
.mail-folder-title { margin: 0 12px 10px; color: #8191a7; font-size: 11px; font-weight: 750; letter-spacing: 1px; text-transform: uppercase; }
.mail-folder-nav { display: grid; gap: 3px; }
.mail-folder-button { width: 100%; padding: 11px 13px; border: 0; border-radius: 8px; background: transparent; color: #3b526f; text-align: left; font-weight: 650; }
.mail-folder-button:hover { background: #ecf3fd; }
.mail-folder-button.active { background: #e2efff; color: #175baa; }
.mail-manage-link { margin: 25px 12px 0; padding: 0; border: 0; background: none; color: #246cc5; font-size: 12px; font-weight: 650; text-align: left; }
.mail-list-pane, .mail-reading-pane { min-width: 0; border-left: 1px solid #e5ebf3; }
.mail-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 18px 10px; }
.mail-list-heading .eyebrow { margin-bottom: 5px; }
.mail-list-heading h2 { margin: 0; font-size: 20px; }
.mail-list-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 18px; }
.mail-list-actions button, .mail-list-heading button, .mail-pagination button { padding: 7px 10px; font-size: 12px; }
.mail-select-bar { padding: 10px 18px; border-top: 1px solid #edf1f5; border-bottom: 1px solid #edf1f5; color: #66788f; font-size: 12px; }
.mail-select-bar label { display: inline-flex; align-items: center; gap: 8px; }
.mail-select-bar input { margin: 0; }
.mail-message-list { max-height: 620px; overflow-y: auto; }
.mail-message-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #edf1f5; }
.mail-message-card:hover { background: #f7faff; }
.mail-message-card.selected { background: #eaf3ff; }
.mail-message-card > input { margin: 4px 0 0; }
.mail-message-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: #263b56; text-align: left; }
.mail-message-preview strong, .mail-message-preview time, .mail-message-subject, .mail-message-excerpt, .mail-message-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-message-preview strong { font-size: 13px; }
.mail-message-preview time { color: #8b99aa; font-size: 11px; }
.mail-message-subject, .mail-message-excerpt, .mail-message-status { grid-column: 1 / -1; }
.mail-message-subject { font-size: 13px; }
.mail-message-excerpt, .mail-message-status { color: #78899e; font-size: 12px; }
.mail-message-card.unread .mail-message-subject { font-weight: 750; }
.mail-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; font-size: 11px; color: #718198; }
.mail-message-detail { padding: 28px; color: #52647c; font-size: 13px; overflow-wrap: anywhere; }
.mail-message-detail h2 { color: #203047; font-size: 23px; }
.mail-message-detail p { margin-bottom: 8px; }
.mail-reading-body { margin: 22px 0; padding-top: 20px; border-top: 1px solid #e5ebf3; white-space: pre-wrap; }
.mail-garage-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 12px; border-radius: 8px; background: #edf5ff; }
.mail-garage-links button { padding: 4px; text-align: left; }
.mail-attachment-links { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 18px 0; }
.mail-attachment-links a { padding: 6px 10px; border: 1px solid #d7e0eb; border-radius: 7px; background: #f8fafc; }
.drawer-grid details { max-width: 520px; }
.drawer-grid details .mail-reading-body { max-height: 280px; overflow: auto; }
.mail-message-detail > button, .mail-message-detail > a { display: inline-block; margin: 0 10px 12px 0; }
.mail-compose-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 24px 26px 0; }
.mail-compose-heading h2 { margin: 0; font-size: 20px; }
.mail-admin-heading { margin: 30px 0 16px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.dialog-heading h2 { font-size: 24px; letter-spacing: -.5px; }
.dialog p { color: #718198; font-size: 13px; line-height: 1.5; }
.icon-button { font-size: 27px; line-height: 1; color: #798aa1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .link-product label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 700; color: #52637b; }
.stacked-label { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 12px; font-weight: 700; color: #52637b; }
.stacked-label input, .stacked-label select { width: 100%; }
.user-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.duplicate-panel { border: 1px solid #f1d2a9; background: #fff8ea; border-radius: 8px; padding: 16px; margin-top: 15px; font-size: 13px; }
.duplicate-panel p { color: #86643d; margin: 6px 0; }
.duplicate-panel ul { padding-left: 20px; }
.link-product { display: flex; align-items: end; gap: 12px; margin-top: 25px; }
.link-product label { flex: 1; }
[hidden] { display: none !important; }
.garage-section-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.garage-section-tab { padding: 11px 17px; border: 1px solid #d6e1ef; border-radius: 9px; background: #fff; color: #47627e; font-weight: 700; }
.garage-section-tab.active { border-color: #246cc5; background: #eaf3ff; color: #175cae; }
.garage-section-tab:focus-visible { outline: 3px solid #3584df; outline-offset: 2px; }
.garage-report-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.garage-report-tab { padding: 8px 13px; border: 1px solid #d6e1ef; border-radius: 20px; background: #fff; color: #526b86; font-size: 12px; font-weight: 700; }
.garage-report-tab.active { border-color: #246cc5; color: #175cae; background: #eaf3ff; }
.garage-report-tab:focus-visible { outline: 3px solid #3584df; outline-offset: 2px; }
#garage-filter-form { flex-wrap: wrap; }
#garage-filter-form label { flex: 1 1 155px; }
#garage-filter-form .search-field { flex: 2 1 220px; }
#garage-filter-form .check-label { flex: 0 1 auto; min-width: 115px; }
.garage-dashboard, #garage-reports, #garage-conversion-report { margin-bottom: 20px; }
.garage-dashboard .table-scroll, #garage-reports .table-scroll, #garage-conversion-report .table-scroll { max-height: 390px; overflow: auto; }
.garage-dashboard th, #garage-reports th, #garage-conversion-report th { position: sticky; top: 0; z-index: 1; }
#garage-conversion-report > label { display: grid; gap: 7px; width: min(280px, 100%); margin: 16px 26px; color: #53647a; font-size: 12px; font-weight: 700; }
.garage-dashboard tbody tr { cursor: pointer; }
.garage-dashboard tbody tr:hover { background: #f2f7ff; }
.garage-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 18px 26px; }
.garage-review { margin-top: 26px; padding-bottom: 20px; }
.garage-review > button { margin: 8px 26px 15px; }
.dvsa-duplicate-row { background: #fff7e8; }
.dvsa-duplicate-row:hover { background: #ffefd1; }
.dvsa-duplicate-badge { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 5px; background: #a34e00; color: #fff; font-size: 11px; white-space: nowrap; }
.check-label { flex-direction: row !important; align-items: center; white-space: nowrap; }
.check-label input { width: auto; }
textarea { width: 100%; box-sizing: border-box; border: 1px solid #d9e2ec; border-radius: 8px; padding: 11px 12px; font: inherit; }
@media (max-width: 1350px) {
  .home-city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mail-workspace { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
  .mail-folder-pane { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; }
  .mail-account-label { min-width: 190px; margin: 0; }
  .mail-new-button { width: auto; margin: 0; }
  .mail-folder-title { display: none; }
  .mail-folder-nav { display: flex; flex-wrap: wrap; }
  .mail-folder-button { width: auto; }
  .mail-manage-link { margin: 0 0 0 auto; }
  .mail-list-pane { border-left: 0; }
}
@media (max-width: 800px) {
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-workspace { grid-template-columns: 1fr; }
  .mail-reading-pane { min-height: 300px; border-left: 0; border-top: 1px solid #e5ebf3; }
  .mail-folder-pane { display: block; }
  .mail-account-label { margin-bottom: 10px; }
  .mail-new-button { margin-bottom: 12px; }
  .mail-manage-link { margin: 12px 0 0; }
  .sidebar { width: 70px; padding: 22px 8px; }
  .brand { margin: 0 10px 40px; }
  .brand span:not(.brand-mark), .sidebar-label, .sidebar-note, .sidebar-bottom { display: none; }
  .nav-item { font-size: 0; }
  .nav-item::before { content: "◫"; font-size: 20px; }
  .topbar { padding: 0 20px; }
  .content { padding: 30px 20px; }
  .page-heading { align-items: start; flex-direction: column; }
  .filters { flex-direction: column; align-items: stretch; }
  .product-field { width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
}
@media (max-width: 520px) {
  .home-metrics, .home-city-grid { grid-template-columns: 1fr; }
  .home-section-heading { align-items: start; flex-direction: column; }
  .home-city-panel { padding: 20px; }
}
