:root { --aegle: #13424b; --aegle-2: #1d6b75; --aegle-teal: #55bcc5; --aegle-teal-d: #2f9aa5;
  --bs-primary: #1f8f9b; --bs-primary-rgb: 31,143,155; --bs-link-color: #1a7d88; --bs-link-color-rgb: 26,125,136; --bs-link-hover-color: #13424b; }
.btn-primary { --bs-btn-bg: #1f8f9b; --bs-btn-border-color: #1f8f9b; --bs-btn-hover-bg: #187a85; --bs-btn-hover-border-color: #187a85;
  --bs-btn-active-bg: #13646d; --bs-btn-active-border-color: #13646d; --bs-btn-disabled-bg: #1f8f9b; --bs-btn-disabled-border-color: #1f8f9b; }
.btn-outline-primary { --bs-btn-color: #1a7d88; --bs-btn-border-color: #1f8f9b; --bs-btn-hover-bg: #1f8f9b; --bs-btn-hover-border-color: #1f8f9b;
  --bs-btn-active-bg: #187a85; --bs-btn-active-border-color: #187a85; }
.text-bg-primary { background-color: #1f8f9b !important; }
.form-control:focus, .form-select:focus { border-color: #55bcc5; box-shadow: 0 0 0 .2rem rgba(85,188,197,.25); }
.form-check-input:checked { background-color: #1f8f9b; border-color: #1f8f9b; }
.nav-logo { width: 34px; height: 34px; border-radius: 50%; background: #fff; padding: 1px; }
.app-nav .navbar-brand { padding: 6px 0; margin-right: 1.5rem; }
.brand-name { display: flex; flex-direction: column; justify-content: center; font-size: 1.08rem; line-height: 1.15; }
.brand-name small { display: block; margin-top: 1px; font-size: .62rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .7; line-height: 1; }
.app-nav .nav-link { font-size: .95rem; padding-top: .55rem; padding-bottom: .55rem; }
.app-nav { min-height: 58px; }
body { background: #f4f6fa; font-size: .92rem; }
.app-nav { background: var(--aegle); }
.app-nav .badge { font-weight: 500; }
.card { border: 0; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
.card-header { background: #fff; font-weight: 600; }
.page-title { font-size: 1.25rem; font-weight: 600; color: var(--aegle); margin: 0; }
.table thead th { background: #e7f2f3; color: #2b4a50; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.table td { vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conf { background: #fff7e6 !important; }
th.conf { background: #fde9c4 !important; }
tr.blocked td { background: #fde2e1 !important; }
tr.differs td { background: #fff3cd !important; }
.stat { font-size: 1.6rem; font-weight: 700; color: var(--aegle); }
.stat-label { color: #667085; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
/* ---------- login ---------- */
.login-page { min-height: 100vh; display: flex; background: #fff; }
.login-brand { position: relative; flex: 1 1 55%; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px; background: radial-gradient(1200px 600px at 10% 0%, #2a8f9a 0%, transparent 60%), linear-gradient(150deg, #13424b 0%, #0d2e35 100%); }
.login-brand .mesh { position: absolute; right: -200px; bottom: -240px; width: 760px; height: 760px; opacity: .14; pointer-events: none; }
.login-brand .logo-ring { width: 92px; height: 92px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-brand h1 { font-size: 2.35rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 28px 0 12px; max-width: 520px; }
.login-brand h1 span { color: var(--aegle-teal); }
.login-brand .lead-text { font-size: 1.02rem; color: rgba(255,255,255,.78); max-width: 470px; }
.login-brand .points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.login-brand .points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.88); }
.login-brand .points i { color: var(--aegle-teal); font-size: 1.1rem; margin-top: 1px; }
.login-brand .contact { position: relative; font-size: .82rem; color: rgba(255,255,255,.7); border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; }
.login-brand .contact div { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.login-form-side { flex: 1 1 45%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #f7fafb; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-weight: 700; color: #13424b; font-size: 1.6rem; margin-bottom: 4px; }
.login-box .form-control { padding: .7rem .9rem .7rem 2.6rem; border-radius: 10px; background: #fff; }
.login-box .field { position: relative; }
.login-box .field > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #8aa3a8; }
.login-box .toggle-pw { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8aa3a8; }
.login-box .btn-primary { padding: .7rem; border-radius: 10px; font-weight: 600; }
.login-mobile-logo { display: none; }
@media (max-width: 991px) {
  .login-brand { display: none; }
  .login-form-side { background: linear-gradient(180deg, #e8f5f6 0%, #f7fafb 40%); }
  .login-mobile-logo { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
}
.items-table .ts-wrapper { min-width: 340px; }
.items-table input.form-control { min-width: 90px; }
.small-muted { font-size: .78rem; color: #667085; }
.perm-matrix td, .perm-matrix th { text-align: center; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }
.ts-dropdown .opt-sub { font-size: .75rem; color: #667085; }
@media print { .no-print { display: none !important; } body { background: #fff; } }

/* ---------- sidebar layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: 0 0 248px; background: linear-gradient(180deg, #13424b 0%, #0e3239 100%); color: #dbe9eb;
  display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; } }
@media (max-width: 991.98px) { .sidebar { --bs-offcanvas-width: 268px; background: #13424b; } }
.side-brand { display: flex; align-items: center; padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand .brand-name { color: #fff; }
.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 10px 16px; }
.side-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.45);
  padding: 16px 10px 6px; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin: 1px 0; border-radius: 8px;
  color: #cfe3e6; text-decoration: none; font-size: .9rem; transition: background .15s, color .15s; }
.side-link i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.active { background: #1f8f9b; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.side-link.active i { opacity: 1; }
.side-badge { margin-left: auto; background: #f5b83d; color: #3d2a00; font-size: .7rem; font-weight: 700;
  border-radius: 10px; padding: 1px 7px; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; }
.side-user .avatar { width: 34px; height: 34px; border-radius: 50%; background: #55bcc5; color: #0e3239; display: flex;
  align-items: center; justify-content: center; font-weight: 700; flex: 0 0 34px; }
.side-actions { display: flex; gap: 6px; padding: 0 12px 14px; }
.side-actions a { flex: 1; text-align: center; font-size: .8rem; color: #cfe3e6; text-decoration: none; padding: 6px;
  border-radius: 6px; background: rgba(255,255,255,.06); }
.side-actions a:hover { background: rgba(255,255,255,.12); color: #fff; }
.app-main { flex: 1 1 auto; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; background: #13424b; padding: 8px 16px; position: sticky; top: 0; z-index: 1020; }
/* ---------- stepper (dealer form) ---------- */
.stepper { display: flex; gap: 0; counter-reset: step; border: 0; margin-bottom: 1rem; flex-wrap: wrap; }
.stepper .nav-link { position: relative; display: flex; align-items: center; gap: 10px; color: #667085; border: 0 !important;
  background: none !important; padding: 8px 18px 8px 0; font-weight: 500; }
.stepper .nav-link .num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #c9d6d9; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .85rem; background: #fff; color: #667085; }
.stepper .nav-link:not(:last-child)::after { content: ""; display: inline-block; width: 36px; height: 2px; background: #d6e1e3; margin-left: 8px; }
.stepper .nav-link.active { color: #13424b; }
.stepper .nav-link.active .num { border-color: #1f8f9b; background: #1f8f9b; color: #fff; }
.stepper .nav-link.done .num { border-color: #1f8f9b; color: #1f8f9b; }
.stepper .nav-link.err .num { border-color: #dc3545; color: #dc3545; }
.sticky-actions { position: sticky; bottom: 0; z-index: 10; background: rgba(244,246,250,.95); backdrop-filter: blur(4px);
  border-top: 1px solid #e3e8ef; padding: 10px 0; margin-top: 1rem; }
@media print { .sidebar, .topbar { display: none !important; } }
