/* ==========================================================
   EVCT Forms — site theme
   Simple, calm, fast. Loaded after Bootstrap; replaces the old
   template stylesheet (style.css) and custom.css.
   ========================================================== */
:root {
  --ink: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f1f3f5;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --accent: #1e3a5f;
  --accent-hover: #162c48;
  --accent-soft: #eef2f7;
  --danger: #b42318;
  --success: #067647;
  --radius: 8px;
  --header-h: 56px;
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
html, body { overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font); color: var(--ink); font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background: #dbe4ef; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 997;
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 16px 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header .logo { display: flex; align-items: center; gap: 10px; width: calc(var(--sidebar-w) - 20px); color: var(--ink); }
.header .logo img { width: 28px; height: 28px; flex: none; }
.header .logo span { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.toggle-sidebar-btn {
  font-size: 22px; color: var(--muted); cursor: pointer;
  width: 36px; height: 36px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.toggle-sidebar-btn:hover { background: var(--line-soft); color: var(--ink); }
.header-nav ul { list-style: none; margin: 0; padding: 0; }
.header-nav .nav-profile { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 500; padding: 4px 6px; border-radius: 6px; }
.header-nav .nav-profile:hover { background: var(--line-soft); }
.ev-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; text-transform: uppercase;
}
.header-nav .dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17,24,39,.08); padding: 6px; min-width: 200px; }
.header-nav .dropdown-header h6 { margin: 0; font-size: 14px; }
.header-nav .dropdown-item { border-radius: 6px; font-size: 14px; padding: 8px 10px; gap: 8px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; z-index: 996;
  width: var(--sidebar-w);
  padding: 16px 12px 24px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: transform .2s ease;
  scrollbar-width: thin; scrollbar-color: #d1d5db transparent;
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { list-style: none; }
.sidebar-nav .nav-heading {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); margin: 20px 10px 6px;
}
.sidebar-nav .nav-heading:first-child { margin-top: 4px; }
.sidebar-nav .nav-item { margin-bottom: 1px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--accent); background: var(--accent-soft);
}
.sidebar-nav .nav-link i { font-size: 16px; color: var(--accent); }
.sidebar-nav .nav-link.collapsed { color: #374151; background: transparent; }
.sidebar-nav .nav-link.collapsed i { color: var(--faint); }
.sidebar-nav .nav-link:hover { background: var(--line-soft); color: var(--ink); }
.sidebar-nav .nav-link:hover i { color: var(--muted); }
.sidebar-nav .nav-link .bi-chevron-down { margin-left: auto; font-size: 12px; transition: transform .2s; }
.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down { transform: rotate(180deg); }
.sidebar-nav .nav-content { padding: 2px 0 6px; margin: 0; }
.sidebar-nav .nav-content a {
  display: flex; align-items: center;
  padding: 7px 10px 7px 36px; border-radius: 6px;
  font-size: 13.5px; color: var(--muted);
}
.sidebar-nav .nav-content a i { display: none; }
.sidebar-nav .nav-content a:hover { color: var(--ink); background: var(--line-soft); }
.sidebar-nav .nav-content a.active { color: var(--accent); font-weight: 600; }

/* ---------- Main ---------- */
#main { margin-top: var(--header-h); margin-left: var(--sidebar-w); padding: 28px 32px 40px; min-height: calc(100vh - var(--header-h) - 57px); transition: margin .2s ease; }
#main > .container, #main .container { max-width: none; padding-left: 0; padding-right: 0; }
.footer {
  margin-left: var(--sidebar-w);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px;
  padding: 18px 32px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--faint);
  transition: margin .2s ease;
}
.footer strong { color: var(--muted); font-weight: 500; }

/* desktop: hamburger hides the sidebar */
@media (min-width: 1200px) {
  body.toggle-sidebar .sidebar { transform: translateX(-100%); }
  body.toggle-sidebar #main, body.toggle-sidebar .footer { margin-left: 0; }
}
/* tablet & phone: sidebar slides over the page */
.ev-backdrop { position: fixed; inset: var(--header-h) 0 0 0; z-index: 995; background: rgba(17,24,39,.35); opacity: 0; pointer-events: none; transition: opacity .2s; }
@media (max-width: 1199px) {
  .sidebar { transform: translateX(-100%); width: min(280px, 85vw); }
  body.toggle-sidebar .sidebar { transform: none; box-shadow: 0 10px 40px rgba(17,24,39,.15); }
  body.toggle-sidebar .ev-backdrop { opacity: 1; pointer-events: auto; }
  #main, .footer { margin-left: 0; }
  .header .logo { width: auto; margin-right: 8px; }
  .sidebar-nav .nav-link { padding: 11px 10px; }
  .sidebar-nav .nav-content a { padding-top: 10px; padding-bottom: 10px; }
}
@media (max-width: 767px) {
  #main { padding: 20px 16px 32px; }
  .footer { padding: 16px; }
}

/* ---------- Page title ---------- */
.pagetitle { margin-bottom: 20px; }
.pagetitle h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.ev-page-sub { color: var(--muted); margin: 4px 0 0; font-size: 14.5px; }
.breadcrumb { font-size: 13px; margin: 4px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .active { color: var(--text); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  margin-bottom: 20px;
}
.card-header, .card-footer { background: transparent; border-color: var(--line); padding: 14px 20px; }
.card-body { padding: 20px; }
.card-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 16px; padding: 0; }
.card-title span { color: var(--muted); font-weight: 400; }
.section { margin: 0; }

/* ---------- Forms ---------- */
.form-label, .col-form-label { font-size: 13.5px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.col-form-label { padding-top: 0; }
.form-control, .form-select {
  font-size: 14.5px;
  color: var(--ink);
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: .5rem .75rem;
  min-height: 40px;
  box-shadow: none;
}
.form-control::placeholder { color: var(--faint); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,58,95,.12); }
.form-control:disabled, .form-control[readonly] { background: var(--line-soft); }
.input-group-text { background: var(--line-soft); border-color: #d1d5db; color: var(--muted); font-size: 14px; }
.input-group > .form-control, .input-group > .form-select { min-height: 40px; }
.form-check-input { border-color: #c4c9d1; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(30,58,95,.12); border-color: var(--accent); }
.form-text { color: var(--muted); font-size: 13px; }
.custom-file-upload { border: 1px solid #d1d5db; border-radius: 6px; display: inline-block; padding: 6px 12px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn { font-size: 14px; font-weight: 500; border-radius: 6px; padding: .5rem 1rem; box-shadow: none !important; }
.btn-sm { font-size: 13px; padding: .3rem .55rem; border-radius: 5px; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-secondary, .btn-light { background: var(--surface); border: 1px solid #d1d5db; color: var(--text); }
.btn-secondary:hover, .btn-light:hover { background: var(--line-soft); border-color: #c4c9d1; color: var(--ink); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-success:hover { background: #055d38; border-color: #055d38; }
.btn-danger { background: var(--surface); border: 1px solid #E4E4E1; color: var(--danger); }
.btn-danger:hover { background: #F0F0EE; border-color: var(--danger); color: var(--danger); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* old icon names used on list pages, drawn with the main icon set */
[class^="ri-"], [class*=" ri-"] { font-family: "bootstrap-icons" !important; font-style: normal; line-height: 1; display: inline-block; vertical-align: -.125em; }
.ri-edit-box-line::before { content: "\f4ca"; }
.ri-edit-2-fill::before { content: "\f4c9"; }
.ri-delete-bin-2-fill::before { content: "\f5dd"; }

/* ---------- Tables ---------- */
.table { font-size: 14px; color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .75rem; border-bottom-color: var(--line-soft); }
.table > thead th, .dataTable-table > thead > tr > th {
  font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); background: transparent;
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap; vertical-align: bottom;
}
.table > tbody td { vertical-align: middle; }
.table-bordered > :not(caption) > * > * { border-color: var(--line); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fafbfc; }
.table td .btn-sm + .btn-sm { margin-left: 4px; }

/* list search/sort/paging */
.dataTable-wrapper .dataTable-top, .dataTable-wrapper .dataTable-bottom { padding: 0 0 14px; }
.dataTable-wrapper .dataTable-bottom { padding: 14px 0 0; }
.dataTable-container { border-bottom: 0 !important; }
.dataTable-input, .dataTable-selector {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 10px; font-size: 14px; color: var(--ink); background-color: #fff;
}
.dataTable-input:focus, .dataTable-selector:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,58,95,.12); }
.dataTable-sorter { padding-right: 1.25rem; color: inherit; }
.dataTable-sorter::before, .dataTable-sorter::after { opacity: .35; right: 2px; }
.dataTable-info { color: var(--muted); font-size: 13px; }
.dataTable-pagination a { border-radius: 6px; color: var(--text); font-size: 13px; }
.dataTable-pagination .active a, .dataTable-pagination .active a:hover { background: var(--accent-soft); color: var(--accent); }

/* tables that aren't lists scroll sideways if they must */
.ev-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
.ev-scroll > .table td .form-control { min-width: 0; }

/* ---------- Alerts & toasts ---------- */
.alert { border-radius: var(--radius); font-size: 14px; }
.ev-toasts { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 1100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.ev-toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--success);
  border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: var(--ink);
  box-shadow: 0 8px 24px rgba(17,24,39,.10);
  animation: ev-in .2s ease;
}
.ev-toast i { font-size: 16px; color: var(--success); margin-top: 1px; }
.ev-toast--error { border-left-color: var(--danger); }
.ev-toast--error i { color: var(--danger); }
.ev-toast--info, .ev-toast--warning { border-left-color: var(--accent); }
.ev-toast--info i, .ev-toast--warning i { color: var(--accent); }
.ev-toast span { flex: 1; }
.ev-toast button { border: 0; background: none; color: var(--faint); padding: 0 2px; font-size: 18px; line-height: 1; }
@keyframes ev-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Rental Application page ---------- */
.ev-file {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc;
  margin-bottom: 16px;
}
.ev-file__icon {
  flex: none; width: 40px; height: 48px; border-radius: 4px; position: relative;
  background: #fff; border: 1px solid #d1d5db;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--danger);
}
.ev-file__icon::before { content: ""; position: absolute; top: 9px; left: 8px; right: 8px; height: 2px; background: #e5e7eb; box-shadow: 0 5px 0 #e5e7eb, 0 10px 0 #e5e7eb; }
.ev-file__name { font-weight: 600; color: var(--ink); font-size: 14.5px; word-break: break-word; }
.ev-file__meta { font-size: 13px; color: var(--muted); }
.ev-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.ev-points li { display: flex; gap: 10px; }
.ev-points i { color: var(--success); }

/* ==========================================================
   Sign-in page
   ========================================================== */
.ev-signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.ev-signin__box { width: 100%; max-width: 380px; }
.ev-signin__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; font-size: 18px; font-weight: 600; color: var(--ink); }
.ev-signin__brand img { width: 32px; height: 32px; }
.ev-signin .card { margin: 0; }
.ev-signin .card-body { padding: 28px; }
.ev-signin h1 { font-size: 20px; margin: 0 0 4px; }
.ev-signin .ev-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.ev-signin .btn-primary { width: 100%; padding: .6rem; font-size: 15px; }
.ev-signin__error {
  display: flex; gap: 8px; align-items: center;
  background: #F0F0EE; border: 1px solid #E4E4E1; color: var(--danger);
  border-radius: 6px; padding: 9px 12px; font-size: 14px; margin-bottom: 16px;
}
.ev-signin__foot { text-align: center; color: var(--faint); font-size: 13px; margin-top: 20px; }
.ev-pw { position: relative; }
.ev-pw .form-control { padding-right: 42px; }
.ev-pw__toggle { position: absolute; right: 4px; top: 4px; height: 32px; width: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 5px; }
.ev-pw__toggle:hover { color: var(--ink); background: var(--line-soft); }

/* ==========================================================
   Phones & tablets
   ========================================================== */
@media (max-width: 991px) {
  .form-control, .form-select { font-size: 16px; min-height: 44px; }  /* no zoom-on-tap on iPhone */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; min-width: 34px; }
  .card-body { padding: 16px; }
}
@media (max-width: 575px) {
  #main form .text-center > .btn, #main form .text-center > button { display: block; width: 100%; margin: 0 0 10px !important; }
  .footer { flex-direction: column; }
  .header .logo span { font-size: 15px; }
}

/* list tables become labeled cards on phones */
@media (max-width: 767px) {
  .ev-cards thead { display: none !important; }
  .ev-cards, .ev-cards tbody { display: block !important; width: 100%; }
  .ev-cards tbody tr { display: block !important; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 10px; background: #fff; }
  .ev-cards tbody td {
    display: flex !important; justify-content: flex-end; align-items: center; gap: 8px;
    width: 100% !important; padding: 9px 0 !important; border: 0 !important; border-bottom: 1px solid var(--line-soft) !important;
    text-align: right; word-break: break-word;
  }
  .ev-cards tbody td:last-child { border-bottom: 0 !important; }
  .ev-cards tbody td::before {
    content: attr(data-label); margin-right: auto; flex: none; max-width: 45%; text-align: left;
    font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
  }
  .ev-cards tbody td:not([data-label])::before, .ev-cards tbody td.dataTables-empty::before { content: none; }
  .ev-cards tbody td.dataTables-empty { justify-content: center; color: var(--muted); }
  .dataTable-top, .dataTable-bottom { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
  .dataTable-top > *, .dataTable-bottom > * { float: none !important; width: 100%; margin: 0 !important; }
  .dataTable-dropdown label { display: flex; align-items: center; gap: 8px; }
  .dataTable-search .dataTable-input { width: 100%; }
  .ev-scroll > .table td, .ev-scroll > .table th { padding: 6px 4px; }
  .ev-scroll > .table input[type=date] { font-size: 14px; padding-left: 6px; padding-right: 4px; }
}

/* edit / delete buttons in lists: side by side, quiet */
.table td:last-child:has(.btn-sm) { white-space: nowrap; width: 1%; }
.table .btn-sm.btn-primary { background: var(--surface); border: 1px solid #d1d5db; color: var(--accent); }
.table .btn-sm.btn-primary:hover { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent); }
.table .btn-sm.btn-danger { border-color: #d1d5db; }
.table .btn-sm.btn-danger:hover { border-color: var(--danger); }
.table .btn-sm { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; }
.table .btn-sm.ev-wide { width: auto; padding: 0 .65rem; gap: 2px; }
.table > :not(:first-child) { border-top: 0; }

/* ---------- Delete confirmation ---------- */
.ev-confirm { border: 0; border-radius: 12px; box-shadow: 0 20px 50px rgba(17,24,39,.2); }
.ev-confirm .modal-body { text-align: center; padding: 28px 24px 8px; }
.ev-confirm__icon { width: 48px; height: 48px; border-radius: 50%; background: #F0F0EE; color: var(--danger); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.ev-confirm__title { font-size: 17px; margin: 0 0 6px; }
.ev-confirm__name { font-weight: 500; color: var(--ink); margin: 0 0 4px; word-break: break-word; }
.ev-confirm__note { color: var(--muted); font-size: 14px; margin: 0; }
.ev-confirm .modal-footer { border-top: 0; justify-content: center; gap: 8px; padding: 16px 24px 24px; }
.ev-confirm .modal-footer .btn { min-width: 110px; }
.ev-btn-delete { background: var(--danger); border: 1px solid var(--danger); color: #fff; }
.ev-btn-delete:hover, .ev-btn-delete:focus { background: #912018; border-color: #912018; color: #fff; }
.ev-confirm .btn-secondary, .ev-confirm .btn-secondary:focus, .ev-confirm .btn-secondary:active { background: var(--surface) !important; color: var(--text) !important; border: 1px solid #d1d5db !important; }
.ev-confirm .btn-secondary:hover { background: var(--line-soft) !important; }
.ev-confirm .btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================
   Colour theme: each menu section has its own colour.
   A page takes the colour of its section (class on <body>).
   ========================================================== */
.ev-t-dash     { --accent: #4f46e5; --accent-hover: #4338ca; --accent-soft: #eef2ff; }
.ev-t-nonpay   { --accent: #e11d48; --accent-hover: #be123c; --accent-soft: #F0F0EE; }
.ev-t-holdover { --accent: #c2410c; --accent-hover: #9a3412; --accent-soft: #fff7ed; }
.ev-t-court    { --accent: #a21caf; --accent-hover: #86198f; --accent-soft: #fdf4ff; }
.ev-t-lease    { --accent: #7c3aed; --accent-hover: #6d28d9; --accent-soft: #f5f3ff; }
.ev-t-rental   { --accent: #0f766e; --accent-hover: #115e59; --accent-soft: #f0fdfa; }
.ev-t-deposit  { --accent: #15803d; --accent-hover: #166534; --accent-soft: #f0fdf4; }
.ev-t-inspect  { --accent: #b45309; --accent-hover: #92400e; --accent-soft: #fffbeb; }
.ev-t-docs     { --accent: #0369a1; --accent-hover: #075985; --accent-soft: #f0f9ff; }
.ev-t-tenants  { --accent: #2563eb; --accent-hover: #1d4ed8; --accent-soft: #eff6ff; }
.ev-t-owners   { --accent: #db2777; --accent-hover: #be185d; --accent-soft: #F0F0EE; }
.ev-t-help     { --accent: #0e7490; --accent-hover: #155e75; --accent-soft: #ecfeff; }

body { background: linear-gradient(180deg, var(--accent-soft) 0, #f7f8fb 320px) fixed; }
::selection { background: var(--accent-soft); }

/* header: white with a thin rainbow strip */
.header { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #e11d48, #c2410c, #a21caf, #7c3aed, #0f766e, #15803d, #0369a1, #2563eb, #db2777);
}
.header .logo span { background: linear-gradient(90deg, #4f46e5, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.ev-avatar { background: linear-gradient(135deg, #4f46e5, #db2777); color: #fff; }

/* menu: each item has a coloured icon tile */
.sidebar { top: calc(var(--header-h) + 3px); }
.sidebar-nav .nav-link i:first-child {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--accent) !important; background: var(--accent-soft);
}
.sidebar-nav .nav-link { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sidebar-nav .nav-link:not(.collapsed) i:first-child { background: var(--accent); color: #fff !important; }
.sidebar-nav .nav-link.collapsed { color: #374151; background: transparent; font-weight: 500; }
.sidebar-nav .nav-link:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-nav .nav-link .bi-chevron-down { color: var(--faint) !important; }
.sidebar-nav .nav-content a { padding-left: 48px; position: relative; }
.sidebar-nav .nav-content a::before { content: ""; position: absolute; left: 30px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); opacity: .35; }
.sidebar-nav .nav-content a:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-nav .nav-content a.active { color: var(--accent); background: var(--accent-soft); }
.sidebar-nav .nav-content a.active::before { opacity: 1; }
.sidebar-nav .nav-heading { color: #6b7280; }

/* page title with a coloured marker */
.pagetitle h1 { display: flex; align-items: center; gap: 10px; }
.pagetitle h1::before { content: ""; width: 6px; height: 24px; border-radius: 3px; background: var(--accent); flex: none; }

/* cards: coloured top edge, soft shadow */
.card { border-color: #e8eaf0; border-top: 3px solid var(--accent); box-shadow: 0 1px 2px rgba(17,24,39,.04), 0 4px 14px rgba(17,24,39,.04); }
.ev-signin .card { border-top-width: 4px; }
.card-title, .ev-help-title, .ev-dash-title { color: var(--accent); }
.modal .card, .ev-confirm { border-top: 0; }

/* buttons */
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.btn-success { background: #16a34a; border-color: #16a34a; }
.btn-success:hover { background: #15803d; border-color: #15803d; }
.table .btn-sm.btn-primary { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.table .btn-sm.btn-primary:hover { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff; }
.table .btn-sm.btn-danger { background: #F0F0EE; border-color: transparent; color: #e11d48; }
.table .btn-sm.btn-danger:hover { background: #e11d48; border-color: #e11d48; color: #fff; }

/* forms */
.form-control:focus, .form-select:focus, .dataTable-input:focus, .dataTable-selector:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* tables: tinted header row, soft row hover */
.table > thead th, .dataTable-table > thead > tr > th { background: var(--accent-soft) !important; color: var(--accent); border-bottom: 0 !important; }
.table > thead th:first-child { border-top-left-radius: 6px; }
.table > thead th:last-child { border-top-right-radius: 6px; }
.table-hover > tbody > tr:hover > *, .dataTable-table > tbody > tr:hover > * { --bs-table-accent-bg: var(--accent-soft); background-color: color-mix(in srgb, var(--accent-soft) 60%, #fff); }
.dataTable-pagination .active a, .dataTable-pagination .active a:hover { background: var(--accent); color: #fff; }
@media (max-width: 767px) {
  .ev-cards tbody tr { border-left: 3px solid var(--accent); }
  .ev-cards tbody td::before { color: var(--accent); }
}

/* notices */
.ev-toast--info, .ev-toast--warning { border-left-color: var(--accent); }
.footer { border-top: 0; }
