/* ---- Limoscanner admin — brand refresh (gold / white) --------------------
 * Override layer for the admin panel (/dash/, /admin/*).
 * Loaded AFTER the dashboard CSS in headscripts.htm (admin branch), so
 * equal-specificity rules here win by cascade order. Visual restyle only:
 * no routes, element IDs, or JS are touched; all behaviour is unchanged.
 *
 * Brand tokens (same as the public site, htdocs/css/refresh.css):
 *   gold #b89e71 | dark gold #9d8761 | deep gold #a48652 | ink #2c2c2c
 *   warm paper #faf8f5 | warm border #e9e2d5 | warm light #f0e9db
 * -------------------------------------------------------------------------- */

/* ============ 1. Base ============ */
body {
  background: #faf8f5;
  color: #2c2c2c;
  font-family: 'Titillium Web', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
a { color: #a48652; }
a:hover, a:focus { color: #9d8761; }

/* ============ 2. Fixed header ============ */
.admin-nav .navbar-default {
  background: #fff;
  border: 0;
  /* thin gold rule under the header + soft shadow; shadow does not add height */
  box-shadow: 0 1px 0 #b89e71, 0 2px 10px rgba(44, 44, 44, .08);
}
.admin-nav .admin-nav-control .menu-toggle { color: #2c2c2c; }
.admin-nav .admin-nav-control .menu-toggle:hover,
.admin-nav .admin-nav-control .menu-toggle:focus { color: #b89e71; }
/* SVG logo stays crisp; height unchanged (30px) */
.admin-nav .admin-nav-control .admin-logo img { height: 30px; width: auto; }
.admin-nav .admin-nav-menu > li span,
.admin-nav .admin-nav-menu > li a { color: #2c2c2c; }
.admin-nav .admin-nav-menu .dropdown-menu {
  border: 1px solid #e9e2d5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(44, 44, 44, .12);
}
.admin-nav .admin-nav-menu .dropdown-menu > li > a:hover,
.admin-nav .admin-nav-menu .dropdown-menu > li > a:focus {
  background: #faf7f0;
  color: #9d8761;
}

/* ============ 3. Content spacing — the page title must clear the fixed header ============
 * Was padding-top:50px, exactly the navbar height, so the breadcrumb/title
 * could slide under the fixed header on phones (any rounding or a taller
 * navbar hid it). 64px desktop / 70px mobile leaves real clearance. */
.admin-content { padding-top: 64px; }
.admin-content > ol.breadcrumb {
  margin: 8px 0 14px 10px;
  background: transparent;
  padding: 0;
  font-size: 14px;
}
.admin-content > ol.breadcrumb a { color: #a48652; }
.admin-content > ol.breadcrumb li.active { color: #2c2c2c; font-weight: 700; }
.admin-content > ol.breadcrumb > li + li:before { color: #c9b98f; }

/* ============ 4. Sidebar — light brand (was dark #2c2c2c / #131313) ============ */
.admin-sidebar {
  background: #fff;
  border-right: 1px solid #e9e2d5;
  padding-top: 50px;
}
.admin-sidebar .panel-group .panel-default {
  background: transparent;
  border-bottom: 1px solid #f0ebe0;
}
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a {
  color: #2c2c2c;
}
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a .fa {
  color: #b89e71;
}
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a:hover,
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a:focus,
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a.active {
  background: #faf7f0;
  color: #2c2c2c;
}
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a:hover .fa,
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a:focus .fa,
.admin-sidebar .panel-group .panel-default > .panel-heading > .panel-title > a.active .fa {
  color: #9d8761;
}
.admin-sidebar .nav > li > a { color: #555; }
.admin-sidebar .nav > li > a:hover,
.admin-sidebar .nav > li > a:focus {
  background: #faf7f0;
  color: #9d8761;
}
.admin-sidebar .nav > li > a.active { background: #b89e71; color: #fff; }
/* collapsed (icon-only) fly-out panel */
.admin-sidebar.sidebar-small .panel-collapse {
  background: #fff;
  border: 1px solid #e9e2d5;
  box-shadow: 0 8px 24px rgba(44, 44, 44, .12);
}
.admin-sidebar.sidebar-small .nav > li > a { color: #555; }
.admin-sidebar.sidebar-small .nav > li > a:hover,
.admin-sidebar.sidebar-small .nav > li > a:focus {
  background: #faf7f0;
  color: #9d8761;
}
.admin-sidebar.sidebar-small .nav > li > a.active { background: #b89e71; color: #fff; }
/* sidebar scrollbars, warm */
.admin-sidebar::-webkit-scrollbar-track { background: #faf8f5; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #d8c9a8; }
.admin-sidebar .panel-group .panel-default > .panel-collapse > .panel-body::-webkit-scrollbar-track { background: #faf8f5; }
.admin-sidebar .panel-group .panel-default > .panel-collapse > .panel-body::-webkit-scrollbar-thumb { background: #d8c9a8; }

/* ============ 5. Buttons — gold primary actions ============ */
.btn { border-radius: 6px; font-weight: 600; }
.btn-primary { background-color: #b89e71; border-color: #b89e71; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active {
  background-color: #9d8761; border-color: #9d8761;
}
/* success actions are brand gold, not green (fixes "Block Notifications") */
.btn-success { background-color: #b89e71; border-color: #b89e71; }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
  background-color: #9d8761; border-color: #9d8761;
}
/* warning / secondary actions become a gold outline (was amber #ffc107) */
.btn-warning { background-color: #fff; border-color: #b89e71; color: #9d8761; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active {
  background-color: #faf7f0; border-color: #9d8761; color: #8a744e;
}
.btn-warning.disabled, .btn-warning[disabled],
.btn-warning.disabled:hover, .btn-warning[disabled]:hover {
  background-color: #fff; border-color: #d8c9a8; color: #b39d6b;
}
/* info actions: gold outline as well (was light blue) */
.btn-info { background-color: #fff; border: 1px solid #b89e71; color: #9d8761; }
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active {
  background-color: #faf7f0; border-color: #9d8761; color: #8a744e;
}
.btn-default { background-color: #fff; border-color: #ddd; color: #555; }
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active {
  background-color: #faf7f0; border-color: #b89e71; color: #2c2c2c;
}
/* .btn-danger stays red on purpose: destructive actions must stay red. */

/* ============ 6. Forms ============ */
label { font-weight: 600; color: #555; }
.form-control {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: none;
  color: #222;
}
.form-control:focus {
  border-color: #b89e71;
  box-shadow: 0 0 0 3px rgba(184, 158, 113, .18);
}
.form-control::placeholder { color: #aaa; }
.input-group-addon { background: #faf7f0; border-color: #ddd; color: #9d8761; }
.help-block { color: #999; }

/* ============ 7. Tables ============ */
.table {
  background: #fff;
  border: 1px solid #e9e2d5;
  box-shadow: 0 1px 4px rgba(44, 44, 44, .05);
}
.table thead tr th {
  color: #9d8761;
  background: #faf7f0;
  border-color: #e9e2d5;
}
.table thead tr th, .table tbody tr td { border-color: #efe9db; }
.table tbody tr td { color: #2c2c2c; }
.table.table-hover tbody tr:hover { background: #fbf8f3; }

/* ============ 8. Widgets (dashboard home: New Bookings, No City, …) ============ */
.widget {
  background: #fff;
  border: 1px solid #e9e2d5;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(44, 44, 44, .05);
}
.widget .widget-title { color: #b89e71; }
.widget .widget-title h4 { letter-spacing: .04em; }
.widget-upcoming-orders .row { border-bottom: 1px solid #ece5d8; }
.label-default { background: #efe8d8; color: #7a6a45; }

/* ============ 9. Tabs ============ */
.admin-tabs .nav-tabs { background: #fff; border-bottom: 1px solid #e9e2d5; }
.admin-tabs .nav-tabs > li > a {
  color: #777;
  border-top: 3px solid transparent;
  border-right: 1px solid #e9e2d5;
}
.admin-tabs .nav-tabs > li > a:hover,
.admin-tabs .nav-tabs > li > a:focus {
  color: #9d8761;
  background: #faf7f0;
}
.admin-tabs .nav-tabs > li.active > a,
.admin-tabs .nav-tabs > li.active > a:hover,
.admin-tabs .nav-tabs > li.active > a:focus {
  color: #2c2c2c;
  background: #faf7f0;
  border-top: 3px solid #b89e71;
}
.admin-tabs .tab-pane { background: #faf7f0; }
.admin-tabs .widget { border: 1px solid #e9e2d5; }

/* ============ 10. Content headers / page titles ============ */
.admin-content-header { border-bottom: 1px solid #e9e2d5; background: #fff; }
.page-title-container .media .media-heading { color: #2c2c2c; }
.page-title-container .media .media-left .fa { color: #b89e71; }

/* ============ 11. Mobile ============ */
@media (max-width: 767px) {
  /* header: logo centered in the row, burger big enough for a finger */
  .admin-nav .navbar .container-fluid { position: relative; }
  .admin-nav .admin-nav-control { padding-top: 3px; }
  .admin-nav .admin-nav-control .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 8px 0 0;
    font-size: 22px;
  }
  .admin-nav .admin-nav-control .admin-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  /* header nav menu: the dashboard template hides the whole menu on
     phones (dashboard/css/style.min.css, @media max-width:767px:
     `.admin-nav-menu{display:none}`) — that also hides the vendor
     "Sign out" button (and, in SuperMode, the Administrator menu),
     so on a phone there is no visible way out of the dashboard.
     Show the menu again as a flex row pinned to the top right of
     the fixed header; the logo stays absolutely centered. The
     inline margin-top:10px on the Sign out button is reset so the
     button is vertically centered (needs !important to beat the
     inline style). */
  .admin-nav .admin-nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
  }
  .admin-nav .admin-nav-menu .btn-logout { margin-top: 0 !important; }
  /* SuperMode: the "Apply Vendor" link would not fit next to the
     Administrator menu on a phone (it overlaps the centered logo),
     so it is hidden on phones only — the admin can still switch
     vendors from the desktop header or the vendor list. The
     Administrator dropdown (with Log Out) stays visible. The menu
     links also get tighter side padding so the toggle clears the
     centered logo (Bootstrap's 15px padding overlapped it by ~7px). */
  .admin-nav .admin-nav-menu > li.lm-apply-vendor { display: none; }
  .admin-nav .admin-nav-menu > li > a { padding-left: 8px; padding-right: 8px; }
  /* Admin (ited) header — the admin_old .header.gold-bg (hamburger +
     "limoscanner" logo + ADMINISTRATOR menu) has no layout of its own:
     .header-left is a plain block and the .top-nav menu is a right
     float, so on a narrow phone the logo text and the ADMINISTRATOR
     menu collide (the logo is cut off behind the menu). Make the
     header a flex row: the left side shrinks and the logo truncates
     with an ellipsis instead of overlapping; the menu stays pinned
     right and never shrinks. Desktop is untouched (flex only applies
     below 768px, and the header keeps its 50px height). */
  header.header.gold-bg { display: flex; align-items: center; }
  header.header.gold-bg .header-left { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; }
  header.header.gold-bg .header-left .sidebar-toggle-box { flex: 0 0 auto; }
  header.header.gold-bg .header-left .logo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; margin-right: 8px; }
  header.header.gold-bg .top-nav { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; }
  header.header.gold-bg .top-nav .top-menu { float: none; margin: 0; }
  header.header.gold-bg .top-nav .user-utility > a { white-space: nowrap; }
  /* extra clearance under the fixed header on phones.
     NOTE (2026-11-09): the plain `.admin-content { padding-top: 70px }` above
     does NOT reach the live page. extra.css (mobile) has
     `.admin-content.sidebar-small-content { padding: 0 }` at specificity
     (0,2,0), which beats this (0,1,0) rule — and every admin/dash page
     renders `<div class="admin-content sidebar-small-content">` (head.htm),
     so padding-top was 0 and the fixed 50px header covered the first 50px
     of every page (heading clipped, "top is cut off on all pages").
     This (0,2,0) rule re-asserts the 70px clearance on the same selector,
     so it wins over extra.css by load order (admin-refresh.css is last). */
  .admin-content { padding-top: 70px; }
  .admin-content.sidebar-small-content { padding-top: 70px; }
  .admin-content > ol.breadcrumb { margin: 6px 0 12px; }
  .admin-content .admin-content-container { padding-left: 12px; padding-right: 12px; }

  /* shell: the fixed sidebar sits 45px off-screen (left:-45px) on phones,
     which expands the page's scrollable area and shifts the whole content
     right / clips its left edge — the "design is leaking" bug on /dash/,
     /dash-services/ and /dash-vehicles/. Hiding the overflow alone did not
     fix it (the per-template guards only hid the scrollbar); the off-screen
     element must leave the layout entirely. Hide the sidebar until the
     hamburger toggles it open as an overlay. Content has no left offset
     while it is closed, and clears the 45px rail (padding-left:50px)
     while it is open. */
  html, body { overflow-x: hidden; overflow-x: clip; }
  /* overflow-x:clip (where supported; hidden is the fallback) also blocks
     horizontal panning by touch — the live page was seen shifted sideways
     by ~10px with its left edge cut, which varies between screenshots
     (a pan offset, not a fixed CSS offset). With nothing overflowing,
     clip makes sure the page cannot be panned sideways at all. */
  .admin-sidebar.sidebar-small { display: none; }
  .admin-sidebar.sidebar-small.sidebar-small-show { display: block; left: 0 !important; }
  .admin-content.sidebar-small-content { padding-left: 0; }
  .admin-content.sidebar-small-content.sidebar-small-content-show { padding-left: 50px; }
  .widget.widget-large .widget-title { padding: 20px 20px 0; }
  .widget.widget-large .widget-content { padding: 20px; }
  .table thead tr th, .table tbody tr td { padding: 12px; }
  .admin-content-header { padding: 12px; min-height: 0; }

  /* Admin Zoom headers (every /admin-* ited page: vendors, vehicles,
     requests/edit, cities, events, … — all render the same .page-header
     + iactions "inner" BACK TO LIST + SAVE split-button + h1
     "Type: id: name"): the same float disease as the vendor dash Zoom
     pages (a6aa1151). Bootstrap 3 sets .pull-right{float:right!important},
     so the button group stays floated on phones: on a 360px phone it is
     240px wide, leaving ~120px for the h1's first line, so a long title
     wraps around it into 3 awkward lines ("Vendor:" / "4512:" /
     "VIP RIDES LLC"). Worse, the title starts exactly at the viewport's
     left edge — .admin-content has padding:0 on phones (extra.css) and
     .page-header adds no horizontal padding — so the title touches the
     screen edge and reads as cut off (user screenshot 2026-11-09,
     /admin-vendors/4512/-/info/; measured in a faithful replica:
     h1 x=0, min glyph x=0.0, buttons 240.2px wide on 360px).
     Fix (mobile-only, desktop untouched): un-float the button group and
     stack BACK TO LIST + SAVE full-width (same pattern as the dash Zoom
     fix — same selectors, same values, so the dash Zoom pages, which
     already carry this pattern template-local, render identically),
     give the header 12px side padding so the title clears the edge,
     and let the title wrap on the full width below the buttons.
     The h1 font-size is NOT changed (the dash Zoom titles keep theirs).
     Shared CSS, so css_reset must be bumped 111 -> 112 at deploy. */
  .admin-content .page-header { padding-left: 12px; padding-right: 12px; }
  .admin-content .page-header > .pull-right {
    float: none !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }
  .admin-content .page-header > .pull-right > .btn-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 10px;
  }
  .admin-content .page-header > .pull-right > .btn-group > .btn { flex: 1 1 100%; }
  .admin-content .page-header > .pull-right > .btn-group > .btn-group {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .admin-content .page-header > .pull-right > .btn-group > .btn-group > .btn { flex: 0 1 auto; }
  .admin-content .page-header > .pull-right > .btn-group > .btn-group > .btn:first-child {
    flex: 1 1 auto;
    border-radius: 8px;
  }
  .admin-content .page-header > .pull-right > .btn-group > .btn-group > .btn:first-child:last-child {
    border-radius: 8px;
  }
  .admin-content .page-header > .pull-right > .btn-group > .btn-group > .dropdown-toggle {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 8px;
  }
  /* long unbroken names must wrap instead of pushing the header wider */
  .admin-content .page-header h1 { overflow-wrap: break-word; }

  /* Admin Zoom tabs row (every /admin-* ited page + the vendor dash
     vehicles Zoom: all render the same core submenu
     <ul class="nav nav-tabs"> as a direct child of .admin-content):
     the row starts exactly at the viewport's left edge — .admin-content
     has padding:0 on phones and the ul adds none — so the first tab's
     border touches the screen edge (measured on 360px, current master:
     ul x=0 w=360 h=42, first tab link x=0, last tab right=244, no
     horizontal overflow). Give it the same 12px side clearance as the
     header above it. Padding, not margin, so the tab row's bottom
     border still spans the full width. The tab links are 42px tall
     (10px padding + 20px line-height + 2px borders) — bump the
     vertical padding to 11px so the tap target reaches 44px. This
     also makes the dash vehicles pill tabs 44px tall (their
     template-local padding is 8px). The dash services Zoom tabs need
     no fix — they sit inside .lm-services, which already has 16px
     side padding. The requests list tabs (.admin-tabs .nav-tabs) and
     the public quote-form tabs (#js-pricing-nav) are not direct
     children of .admin-content and are untouched by this selector.
     The 12px margin-top is the Preview gap (user 2026-11-09, dash
     vehicles Zoom /dash-vehicles/7/-/info/: the full-width white
     PREVIEW button and the pill tabs touch — measured gap 0px, Preview
     bottom = tabs top = 445.5 on 360px; the Preview div has
     margin-bottom 0 and the tabs have margin-top 0). On admin pages
     there is no Preview button, so this margin just collapses with
     the header's 20px margin-bottom and the header-to-tabs gap stays
     20px (verified in the replica). Shared CSS, so css_reset must be
     bumped 112 -> 113 at deploy. */
  .admin-content > .nav-tabs { padding-left: 12px; padding-right: 12px; margin-top: 12px; }
  .admin-content > .nav-tabs > li > a { padding-top: 11px; padding-bottom: 11px; }

  /* admin requests: the leads table becomes stacked cards on phones */
  .table-responsive.lm-cards-wrap { border: 0; overflow: visible; }
  table.lm-admin-list thead { display: none; }
  table.lm-admin-list, table.lm-admin-list tbody, table.lm-admin-list tr, table.lm-admin-list td {
    display: block;
    width: 100%;
  }
  table.lm-admin-list { border: 0; box-shadow: none; background: transparent; }
  table.lm-admin-list tbody tr {
    background: #fff;
    border: 1px solid #e9e2d5;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(44, 44, 44, .05);
    margin-bottom: 12px;
    padding: 6px 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  table.lm-admin-list tbody tr td {
    border: 0;
    border-bottom: 1px solid #f0ebe0;
    padding: 8px 14px;
    /* Bootstrap's .table-responsive forces white-space:nowrap on all td's —
       that kept long addresses/emails on one line and pushed the card wider
       than the phone screen. Force wrapping + break long unbroken strings. */
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
  }
  table.lm-admin-list tbody tr td:last-child { border-bottom: 0; }
  table.lm-admin-list tbody tr td:before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #b89e71;
    margin-bottom: 2px;
  }
  table.lm-admin-list tbody tr td[data-label=""]:before { display: none; }
}

/* ============ 12. Requests — "New" badge, tab counters ============ */
.lm-new-badge {
  display: inline-block;
  background: #b89e71;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: 1px;
}
.lm-tab-count {
  display: inline-block;
  background: #efe8d8;
  color: #7a6a45;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.lm-tab-new {
  display: inline-block;
  background: #b89e71;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.lm-req-tabs { margin: 0 0 16px; }
.lm-req-toolbar { margin-bottom: 12px; }
