/* Safe Trip Motor Club: dashboard and open sign-up pages.
   Restyles the old template's markup to match the public site (css/site.css).
   The pages carry many inline <style> blocks from the template, so the contested rules use !important. */

:root {
  --navy: #0b2547;
  --navy-2: #12355f;
  --blue: #1663d6;
  --blue-600: #0f52b5;
  --sky: #eaf2fd;
  --sky-2: #f5f9ff;
  --ink: #142033;
  --muted: #5b6b80;
  --line: #dde5f0;
  --field: #c9d5e6;
  --shadow: 0 1px 2px rgba(11, 37, 71, .06), 0 8px 24px rgba(11, 37, 71, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar: 250px;
}

html body {
  background: #f3f6fb !important;
  background-image: none !important;
  font-family: var(--font) !important;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body .container-scroller, body .page-body-wrapper, body .main-panel, body .content-wrapper {
  background: transparent !important;
}
body h1, body h2, body h3, body h4, body h5, body h6, body p, body label, body td, body th, body input, body select, body textarea, body button {
  font-family: var(--font) !important;
}
body .main-panel p { color: var(--ink) !important; }
body .main-panel h1, body .main-panel h2, body .main-panel h3, body .main-panel h4, body .main-panel h5 { color: var(--navy) !important; }
body u:has(> h4) { text-decoration: none; }

/* ---------- sidebar ---------- */
body .sidebar {
  background: var(--navy) !important;
  width: var(--sidebar) !important;
  min-height: 100vh;
  box-shadow: none !important;
  padding-bottom: 24px;
}
body .sidebar .user-profile { background: transparent !important; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; }
body .sidebar .user-profile .logo { padding: 28px 20px 16px !important; text-align: center; }
body .sidebar .user-profile img { max-width: 96px !important; margin: 0 auto !important; display: block; }
body .sidebar .user-profile h2 { color: #fff !important; font-weight: 700 !important; margin: 10px 0 0 !important; }
body .sidebar .user-profile h2 + br + h2, body .sidebar .user-profile h2:last-child { color: #9db4d3 !important; font-weight: 500 !important; margin-top: 2px !important; }
body .sidebar .nav { margin-top: 0 !important; padding: 0 12px !important; }
body .sidebar .nav .nav-item, body li.nav-item { border-bottom: 0 !important; margin: 2px 0; width: 100% !important; height: auto !important; }
body .sidebar .nav .nav-item .nav-link {
  color: #c4d3e8 !important;
  background: transparent !important;
  border-radius: 10px;
  padding: 11px 14px !important;
  font-size: 15px !important;
  font-weight: 500;
  display: flex !important;
  align-items: center;
  width: 100% !important;
  height: auto !important;
  white-space: normal;
  transition: background .15s, color .15s;
}
body .sidebar .nav .nav-item .nav-link i { color: #7fa6dc !important; font-size: 15px !important; width: 18px; margin-right: 12px !important; text-align: center; }
body .sidebar .nav .nav-item .nav-link .menu-title { color: inherit !important; font-size: inherit !important; }
body .sidebar .nav .nav-item .nav-link:hover,
body .sidebar .nav .nav-item.active > .nav-link,
body .sidebar .nav .nav-item .nav-link[aria-current="page"] {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
body .sidebar .nav .nav-item .nav-link[aria-current="page"] { background: var(--blue) !important; }
body .sidebar .nav .nav-item .nav-link[aria-current="page"] i { color: #fff !important; }

/* ---------- top bar (phones) ---------- */
body .navbar.fixed-top {
  background: #fff !important;
  border-bottom: 1px solid var(--line);
  box-shadow: none !important;
  min-height: 60px;
}
body .navbar .navbar-menu-wrapper { background: transparent !important; padding: 8px 14px !important; }
body .navbar .navbar-toggler { border: 1px solid var(--line) !important; border-radius: 10px; width: 44px; height: 44px; color: var(--navy) !important; background: #fff; }
body .navbar .navbar-toggler .icon-menu::before { color: var(--navy) !important; }
@media (min-width: 992px) {
  body .navbar.fixed-top { display: none !important; }
  body .page-body-wrapper { padding-top: 0 !important; min-height: 100vh; }
  body .main-panel { width: calc(100% - var(--sidebar)) !important; }
}

/* ---------- content ---------- */
body .content-wrapper { padding: 32px clamp(16px, 3vw, 40px) !important; }
body .main-panel .main-panel { width: 100% !important; }
body .main-panel .main-panel > .content-wrapper { padding: 8px 0 0 !important; }
body .dlogo { height: auto !important; width: 140px !important; margin: 0 0 8px; }

/* quick-action tiles */
body .shadow1 {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow) !important;
  padding: 0 !important;
  margin-bottom: 16px !important;
  min-height: 0 !important;
  height: auto !important;
  transition: border-color .15s, transform .15s;
}
body .shadow1:hover { border-color: var(--blue) !important; transform: translateY(-1px); }
body .shadow1.shadow.bg-white.rounded a, body .shadow1 a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 16px 18px !important;
  color: var(--navy) !important;
  font-size: 15.2px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  line-height: 1.3;
}
body .shadow1 a i {
  flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  display: grid !important; place-items: center;
  background: var(--sky); color: var(--blue) !important;
  font-size: 16px !important; margin: 0 !important;
}

/* content cards */
body .main-panel .shadow:not(.shadow1),
body .main-panel .card,
body .dealer_form,
body .form_section .container > form,
body .main-panel form.form-group {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow) !important;
}
body .main-panel .shadow.p-3 { padding: clamp(20px, 3vw, 32px) !important; }
body .main-panel form.form-group { height: auto !important; padding: clamp(20px, 3vw, 32px) !important; }
body .dealer_form { padding: 8px clamp(12px, 2vw, 24px) 24px !important; }
body .dealer_form form.form-group, body .dealer_form .container > form { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
body .dealer_cont h4, body .main-panel .heading h4 { font-size: 24px !important; font-weight: 800 !important; color: var(--navy) !important; text-decoration: none !important; }
body .highlight-points { font-size: 16.8px !important; font-weight: 700 !important; text-decoration: none !important; color: var(--navy) !important; margin-top: 18px; }
body .highlighter { color: var(--blue) !important; font-weight: 700; }

/* ---------- forms ---------- */
body .main-panel label, body form label { font-weight: 600 !important; font-size: 14.4px !important; color: var(--navy) !important; }
body .form-control, body select.form-control, body input[type=text], body input[type=email], body input[type=tel],
body input[type=number], body input[type=password], body input[type=date], body textarea {
  font-size: 16px !important;
  color: var(--ink) !important;
  background: #fff !important;
  border: 1px solid var(--field) !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  height: auto !important;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
body input[type=file].form-control, body input[type=file] { background: var(--sky-2) !important; padding: 9px 10px !important; }
body input[readonly].form-control { background: var(--sky-2) !important; }
body .form-control:focus, body input:focus, body select:focus, body textarea:focus {
  outline: none !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 4px rgba(22, 99, 214, .15) !important;
}
body input[type=checkbox], body input[type=radio] { accent-color: var(--blue); }

body .btn, body button[type=submit], body input[type=submit] {
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 12px 22px !important;
  box-shadow: none !important;
  transition: background .15s, border-color .15s;
}
body button[type=submit], body input[type=submit], body .btn-primary, body .btn-info, body .btn-dark, body .btn-success {
  background: var(--blue) !important;
  border: 0 !important;
  color: #fff !important;
}
body button[type=submit]:hover, body input[type=submit]:hover, body .btn-primary:hover, body .btn-info:hover, body .btn-dark:hover, body .btn-success:hover {
  background: var(--blue-600) !important;
}
body button[type=submit][disabled] { opacity: .6; cursor: progress; }
body .kbw-signature { border: 1px dashed #9fb3cf !important; border-radius: 10px !important; background: var(--sky-2) !important; }

/* ---------- tables ---------- */
body .dataTables_wrapper { width: 100% !important; max-width: 100% !important; }
body .main-panel table, body table.dataTable {
  background: #fff;
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--line) !important;
  border-radius: 14px;
  overflow: hidden;
  width: 100% !important;
}
body .main-panel table thead th, body table.dataTable thead th {
  background: var(--sky-2) !important;
  color: var(--navy) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 12px 12px !important;
  white-space: nowrap;
}
body .main-panel table tbody td, body table.dataTable tbody td, body table.table-bordered.dataTable tbody td {
  border: 0 !important;
  border-bottom: 1px solid #edf1f7 !important;
  padding: 12px !important;
  font-size: 14.4px !important;
  color: var(--ink) !important;
  vertical-align: middle;
}
body .main-panel table tbody tr:last-child td { border-bottom: 0 !important; }
body .main-panel table tbody tr:hover td { background: var(--sky-2); }
body .main-panel table.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
body .dataTables_wrapper .dataTables_filter input, body .dataTables_wrapper .dataTables_length select {
  padding: 8px 10px !important; margin-left: 6px;
}
body .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important; border: 1px solid var(--line) !important; background: #fff !important; color: var(--navy) !important; margin: 0 2px;
}
body .dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important; }
body .dataTables_wrapper .dataTables_info, body .dataTables_wrapper label { color: var(--muted) !important; font-size: 14.1px !important; font-weight: 500 !important; }

/* ---------- phones ---------- */
@media (max-width: 991px) {
  body .content-wrapper { padding: 20px 14px !important; }
  body .sidebar-offcanvas.active { box-shadow: 0 20px 50px rgba(11, 37, 71, .3) !important; }
  body .sidebar-offcanvas:not(.active) { box-shadow: none !important; }
}

/* app.js toast in the site's colors */
.st-toast { background: var(--navy) !important; border-radius: 12px !important; }
.st-toast.st-err { background: #b3261e !important; }

/* sortable table headers: room for the sort arrows */
body table.dataTable thead th.sorting, body table.dataTable thead th.sorting_asc, body table.dataTable thead th.sorting_desc { padding-right: 26px !important; }

/* ---------- open pages (sign-up links, payment result): no menu, so a slim top bar ---------- */
body.st-open .navbar.fixed-top { display: none !important; }
body.st-open .page-body-wrapper { display: block !important; padding-top: 0 !important; }
body.st-open .sidebar {
  position: static !important; width: 100% !important; min-height: 0 !important; height: auto !important;
  display: flex !important; align-items: center; padding: 0 !important; transform: none !important; right: auto !important;
}
body.st-open .sidebar .user-profile { border: 0; margin: 0; }
body.st-open .sidebar .user-profile .logo { padding: 10px clamp(16px, 3vw, 40px) !important; }
body.st-open .sidebar .user-profile img { max-width: 56px !important; margin: 0 !important; }
body.st-open .sidebar .nav { display: none !important; }
body.st-open .main-panel { width: 100% !important; max-width: 1040px; margin: 0 auto; float: none !important; }

/* secondary buttons (clear signature, etc.) */
body .btn-warning, body .btn-secondary, body .btn-light, body .btn-default {
  background: #fff !important; color: var(--navy) !important; border: 1px solid var(--field) !important;
}
body .btn-warning:hover, body .btn-secondary:hover, body .btn-light:hover, body .btn-default:hover { border-color: var(--blue) !important; color: var(--blue) !important; }
