:root {
  --ink: #11283a;
  --muted: #6f8491;
  --line: #e4edf0;
  --surface: #ffffff;
  --canvas: #f4f8fa;
  --navy: #092c43;
  --navy-2: #0c3c59;
  --blue: #0b86c9;
  --blue-dark: #066b9f;
  --aqua: #36c4c8;
  --green: #1c9b72;
  --orange: #e89432;
  --purple: #7866d6;
  --coral: #dc6d64;
  --shadow: 0 10px 30px rgba(17, 40, 58, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3, h4, h5, h6, .brand, .stat-value, .report-card strong {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
}
h1 { margin: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.04em; line-height: 1.1; }
h2 { margin: 0; color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; }
p { margin-top: 0; }
small, .small { font-size: .79rem; }
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--blue-dark) !important; }
.text-success { color: var(--green) !important; }
.text-danger { color: #bd4c45 !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.d-lg-none { display: none !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.ms-2 { margin-left: .5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.p-4 { padding: 1.5rem !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0;
  display: flex; width: 252px; flex-direction: column;
  padding: 25px 16px 18px;
  background:
    radial-gradient(circle at 15% 0%, rgba(54,196,200,.18), transparent 31%),
    linear-gradient(180deg, #0b3c59 0%, var(--navy) 72%);
  color: #d8edf4;
  box-shadow: 12px 0 32px rgba(7, 39, 58, .12);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
.brand { display: block; color: #fff; text-align: center; }
.brand:hover { color: #fff; }
.sidebar-logo {
  display: block; width: 100%; height: 72px; margin: 0 auto 12px;
  padding: 7px; background: #fff; border-radius: 13px; object-fit: contain;
}
.sidebar > .brand > span {
  display: block; color: #9ed3df; font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.user-chip {
  display: flex; align-items: center; gap: 10px; margin: 28px 4px 22px;
  padding: 11px 10px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; background: rgba(255,255,255,.07);
}
.user-chip strong { display: block; color: #fff; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 155px; }
.user-chip small { color: #9fc2cb; text-transform: capitalize; }
.avatar {
  display: inline-grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--aqua); color: var(--navy); font-weight: 800;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 41px; padding: 10px 12px;
  border-radius: 10px; color: #bdd9e1; font-size: .88rem; font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav a i { width: 18px; color: #7db7c8; text-align: center; }
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.1); color: #fff; transform: translateX(2px); }
.nav a:hover i, .nav a:focus-visible i { color: var(--aqua); }
.nav-label {
  margin: 19px 12px 5px; color: #6fa9b8; font-size: .66rem; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase;
}
.main-content { min-width: 0; width: calc(100% - 252px); margin-left: 252px; }
.topbar {
  display: flex; align-items: center; min-height: 76px; padding: 0 42px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #27b881; box-shadow: 0 0 0 5px rgba(39,184,129,.12); }
.today { color: var(--ink); font-size: .8rem; font-weight: 700; }
.container-fluid { width: 100%; padding: 38px 42px; }
.page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 28px;
}
.page-heading .text-muted { margin: 8px 0 0; }
.eyebrow {
  margin-bottom: 9px; color: var(--blue-dark); font-size: .68rem; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase;
}

/* Buttons and form controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-height: 40px; padding: .6rem 1rem; border: 1px solid transparent; border-radius: 9px;
  font: 700 .82rem "DM Sans", sans-serif; cursor: pointer; transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px rgba(11,134,201,.2); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { background: #f5fafb; color: var(--ink); }
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-warning, .btn-outline-danger {
  background: transparent; border-color: #c9dce3; color: var(--blue-dark);
}
.btn-outline-primary:hover { background: #e8f6fb; border-color: #9ccddd; color: var(--blue-dark); }
.btn-outline-success { border-color: #a7d7c8; color: #16765a; }
.btn-outline-success:hover { background: #e9f8f2; color: #16765a; }
.btn-outline-warning { border-color: #e8c38d; color: #95601a; }
.btn-outline-danger { border-color: #e7b0aa; color: #a4413b; }
.btn-sm { min-height: 32px; padding: .4rem .7rem; font-size: .74rem; }
.btn-lg { min-height: 48px; padding: .75rem 1rem; }
.form-label { display: block; margin: 0 0 6px; color: var(--ink); font-size: .78rem; font-weight: 700; }
.form-control, .form-select {
  display: block; width: 100%; min-height: 42px; padding: .62rem .78rem;
  border: 1px solid #d6e3e7; border-radius: 9px; background: #fff; color: var(--ink);
  font: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,201,.12); }
textarea.form-control { min-height: 84px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--blue); }
.form-check-label { color: var(--ink); font-size: .82rem; }

/* Cards, metrics and tables */
.panel, .stat-card, .mini-metric, .report-card {
  border: 1px solid rgba(220,232,236,.9); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.panel { overflow: hidden; }
.panel-header, .panel-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.panel-toolbar { padding: 15px 20px; background: #fbfdfe; }
.stat-card { position: relative; min-height: 154px; padding: 20px; overflow: hidden; }
.stat-card::after { position: absolute; right: -25px; bottom: -35px; width: 112px; height: 112px; border-radius: 50%; background: currentColor; content: ""; opacity: .08; }
.stat-card.blue { color: #198ac4; } .stat-card.green { color: #1b9a72; } .stat-card.orange { color: #d68a29; }
.stat-card.purple { color: #7764d5; } .stat-card.teal { color: #159ea0; } .stat-card.coral { color: #d36c62; }
.stat-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 16px; border-radius: 10px; background: currentColor; color: #fff; }
.stat-label { color: var(--muted); font-size: .72rem; font-weight: 700; }
.stat-value { margin-top: 4px; color: var(--ink); font-size: 1.55rem; font-weight: 700; letter-spacing: -.05em; }
.queue-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #eaf6fa; color: var(--blue-dark); font-weight: 800; }
.status-pill, .badge {
  display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px;
  font-size: .68rem; font-weight: 800; line-height: 1; letter-spacing: .01em;
}
.status-pill { padding: 7px 10px; background: #eef3f5; color: #657883; }
.status-completed, .status-active, .status-pass { background: #e7f7f0; color: #187457; }
.action-guidance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-right:15px; }
.action-guidance > span { flex: 1 1 320px; min-width: 0; }
.action-guidance > .btn, .action-guidance > a.btn, .action-guidance > div { flex: 0 0 auto; }
.empty-state .empty-action { margin-top:12px; }
.status-received, .status-assigned, .status-loaded, .status-on_way, .status-arrived, .status-available, .status-loading { background: #e8f3fb; color: #176c9a; }
.status-attention, .status-maintenance { background: #fff3df; color: #9a651d; }
.status-cancelled, .status-failed, .status-unable, .status-inactive { background: #fdeceb; color: #a7443e; }
.badge { padding: 6px 8px; }
.badge-sla { background: #fff0d9; color: #9c671c; }
.badge-standard { background: #edf3f5; color: #627681; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; margin-bottom: 0; border-collapse: collapse; color: var(--ink); }
.table th { padding: 13px 20px; border-bottom: 1px solid var(--line); color: #71858f; font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 15px 20px; border-bottom: 1px solid #edf2f4; font-size: .82rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfdfe; }
.table strong { font-weight: 700; }
.empty-state { padding: 42px 20px !important; color: var(--muted); text-align: center; }
.search-form { display: flex; width: min(420px, 100%); }
.search-form input { border-radius: 9px 0 0 9px; }
.search-form button { width: 44px; border: 1px solid #d6e3e7; border-left: 0; border-radius: 0 9px 9px 0; background: #fff; color: var(--blue-dark); cursor: pointer; }
.activity-row { display: flex; align-items: flex-start; gap: 11px; padding: 15px 22px; border-bottom: 1px solid #edf2f4; }
.activity-row:last-child { border-bottom: 0; }
.activity-row strong { display: block; color: var(--ink); font-size: .8rem; }
.activity-row p { margin: 2px 0 0; color: var(--muted); font-size: .72rem; }
.activity-row time { margin-left: auto; color: var(--muted); font-size: .7rem; }
.activity-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 4px #e9f8f8; }
.mini-metric { padding: 18px 20px; }
.mini-metric span, .report-card span { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.mini-metric strong { display: block; margin-top: 7px; color: var(--ink); font: 700 1.35rem "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.report-card { min-height: 142px; padding: 22px; border-left: 4px solid var(--blue); }
.report-card.revenue { border-left-color: #1b9a72; } .report-card.cost { border-left-color: #d68a29; } .report-card.profit { border-left-color: #7764d5; }
.report-card strong { display: block; margin: 12px 0 5px; color: var(--ink); font-size: 1.65rem; letter-spacing: -.05em; }
.report-card small { color: var(--muted); }
.inspection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.inspection-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.inspection-row label { color: var(--ink); font-size: .8rem; }
.refill-choice { display: block; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.refill-choice:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,134,201,.1); }
.obligation { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #d5eeeb; border-radius: 13px; background: #f3fcfb; }
.obligation-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #c9f0eb; color: #168b83; }

/* Bootstrap-compatible grid used by the existing templates */
.row { display: flex; flex-wrap: wrap; margin: calc(var(--gutter, 1rem) * -.5); }
.row > * { width: 100%; max-width: 100%; padding: calc(var(--gutter, 1rem) * .5); }
.g-3 { --gutter: 1rem; } .g-4 { --gutter: 1.5rem; }
.col-12 { width: 100%; } .col-6 { width: 50%; } .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-5, .col-lg-7, .col-xl-2, .col-xl-4, .col-xl-5, .col-xl-7, .col-xl-8 { width: 100%; }
.container { width: min(100% - 32px, 1120px); margin: 0 auto; }

/* Alerts and modals */
.alert { position: relative; margin-bottom: 20px; padding: 12px 42px 12px 15px; border: 1px solid transparent; border-radius: 10px; }
.alert-success { border-color: #b9e4d2; background: #ecfaf3; color: #166d51; }
.alert-danger { border-color: #efc3bf; background: #fff1ef; color: #9e3b35; }
.alert-warning { border-color: #f0d29c; background: #fff8e9; color: #8a5a14; }
.alert-info { border-color: #b9dfed; background: #eefaff; color: #176984; }
.btn-close { position: absolute; top: 11px; right: 12px; width: 20px; height: 20px; border: 0; background: transparent; color: currentColor; cursor: pointer; opacity: .55; }
.btn-close::before { content: "×"; font-size: 1.2rem; }
.modal { display: none; position: fixed; z-index: 1050; inset: 0; overflow-x: hidden; overflow-y: auto; padding: 28px; background: rgba(5,25,38,.58); overscroll-behavior: contain; }
.modal.show { display: block; }
.modal-open { overflow: hidden; }
.modal-dialog { width: min(100%, 520px); min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); margin: 0 auto; display: flex; align-items: center; }
.modal-lg { width: min(100%, 760px); } .modal-xl { width: min(100%, 980px); }
.modal-content { position: relative; width: 100%; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); overflow: hidden; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(5,25,38,.25); }
.modal-content > form { display: flex; width: 100%; min-height: 0; max-height: inherit; flex-direction: column; }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header, .modal-footer { flex: 0 0 auto; }
.modal-footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal-body { flex: 1 1 auto; min-height: 0; padding: 22px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.modal-title { margin: 0; font: 700 1.05rem "Space Grotesk", sans-serif; }
.fade { transition: opacity .15s linear; }

/* Login and customer portal */
.login-page, .portal-login { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, rgba(54,196,200,.25), transparent 30%), linear-gradient(135deg, #092c43 0%, #0b566e 100%); }
.login-card, .portal-login-card { width: min(100%, 450px); padding: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 26px 80px rgba(0,20,35,.28); }
.login-logo, .portal-login-logo { display: block; width: 100%; height: 104px; margin: 0 auto 23px; padding: 8px; border-radius: 13px; object-fit: contain; }
.portal-login-card h1 { margin-bottom: 8px; font-size: 2rem; letter-spacing: -.05em; }
.portal-link { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: .8rem; }
.portal-auth-body { min-height: 100vh; background: #edf5f7; }
.portal-auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(390px, .9fr) minmax(520px, 1.1fr); }
.portal-auth-showcase { position: relative; display: flex; min-height: 100%; padding: clamp(34px, 5vw, 76px); flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(circle at 85% 18%, rgba(54,196,200,.34), transparent 27%), radial-gradient(circle at 15% 85%, rgba(11,134,201,.3), transparent 30%), linear-gradient(145deg, #082b43 0%, #0b5269 58%, #0a7078 100%); color: #fff; }
.portal-auth-showcase::after { position: absolute; right: -120px; bottom: -150px; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.04), 0 0 0 110px rgba(255,255,255,.025); content: ""; }
.portal-auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; color: #fff; font: 700 1.05rem "Space Grotesk", sans-serif; }
.portal-auth-brand:hover { color: #fff; }
.portal-auth-brand img { width: 76px; height: 60px; padding: 6px; border-radius: 13px; background: #fff; object-fit: contain; }
.portal-auth-pitch { position: relative; z-index: 1; max-width: 590px; margin-block: 54px; }
.portal-auth-pitch .eyebrow { color: #78e2e5; }
.portal-auth-pitch h2 { max-width: 560px; margin-bottom: 16px; color: #fff; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.03; letter-spacing: -.055em; }
.portal-auth-pitch > p:not(.eyebrow) { max-width: 530px; color: #c9e4e9; font-size: 1rem; line-height: 1.7; }
.auth-feature-grid { display: grid; margin-top: 32px; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.auth-feature-grid > div { display: flex; min-height: 86px; padding: 15px; align-items: flex-start; gap: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
.auth-feature-grid i { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: rgba(54,196,200,.18); color: #79e2e5; }
.auth-feature-grid strong, .auth-feature-grid small { display: block; }
.auth-feature-grid strong { color: #fff; font-size: .82rem; }
.auth-feature-grid small { margin-top: 4px; color: #bdd6dc; font-size: .7rem; line-height: 1.45; }
.portal-auth-contact { position: relative; z-index: 1; display: flex; gap: 18px; flex-wrap: wrap; }
.portal-auth-contact a { display: inline-flex; align-items: center; gap: 8px; color: #d6edf0; font-size: .78rem; }
.portal-auth-panel { display: flex; min-width: 0; padding: clamp(30px, 6vw, 86px); align-items: center; flex-direction: column; justify-content: center; }
.portal-auth-card { width: min(100%, 570px); padding: clamp(28px, 4vw, 48px); border: 1px solid #d9e7eb; border-radius: 24px; background: #fff; box-shadow: 0 28px 80px rgba(9,44,67,.12); }
.portal-auth-card h1 { margin-bottom: 10px; font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.055em; }
.auth-lead { margin-bottom: 28px; color: var(--muted); line-height: 1.65; }
.auth-form .form-label { font-weight: 700; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; z-index: 2; top: 50%; left: 15px; transform: translateY(-50%); color: #73909e; }
.input-icon .form-control { padding-left: 43px; }
.auth-inline-link { font-size: .76rem; font-weight: 700; }
.auth-divider { display: flex; margin: 26px 0 16px; align-items: center; gap: 12px; color: var(--muted); font-size: .72rem; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-secondary-link { display: block; margin-top: 22px; text-align: center; font-size: .76rem; font-weight: 700; }
.auth-security-note { display: flex; margin-top: 18px; padding: 13px; align-items: flex-start; gap: 10px; border-radius: 11px; background: #edf8fa; color: #426b79; font-size: .72rem; line-height: 1.55; }
.auth-security-note i { margin-top: 2px; color: var(--blue); }
.portal-auth-footer { margin: 18px 0 0; color: #78909c; font-size: .68rem; }
.settings-note { display: flex; min-height: 100%; padding: 14px; align-items: flex-start; gap: 11px; border: 1px solid #cce5ea; border-radius: 11px; background: #eff9fa; color: #426b79; font-size: .74rem; line-height: 1.55; }
.settings-note i { margin-top: 2px; color: var(--blue); font-size: 1rem; }
.portal-body { background: var(--canvas); }
.portal-nav { min-height: 78px; padding: 12px 22px; background: linear-gradient(110deg, var(--navy), #0a5267); box-shadow: 0 8px 25px rgba(9,44,67,.15); }
.portal-nav-inner { display: flex; width: min(100%,1120px); min-height: 54px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 18px; }
.portal-nav .brand { display: flex; align-items: center; gap: 10px; text-align: left; }
.portal-nav .brand span, .portal-nav .brand strong, .portal-nav .brand small { display: block; }
.portal-nav .brand strong { color: #fff; font: 700 .84rem "Space Grotesk", sans-serif; }
.portal-nav .brand small { margin-top: 2px; color: #a9d2d9; font-size: .65rem; }
.portal-nav-actions { display: flex; align-items: center; gap: 12px; }
.portal-nav-help { display: inline-flex; padding: 8px 11px; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; color: #d6eff1; font-size: .72rem; font-weight: 700; }
.portal-nav-help:hover { background: rgba(255,255,255,.08); color: #fff; }
.portal-user-chip { display: flex; align-items: center; gap: 8px; color: #e4f2f4; font-size: .72rem; }
.portal-user-chip b { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--aqua); color: var(--navy); }
.nav-logo { width: 43px; height: 35px; padding: 3px; border-radius: 7px; background: #fff; object-fit: contain; }
.portal-welcome { padding: 26px; border-radius: var(--radius); background: linear-gradient(135deg, #0d4962, #0d7f8a); color: #fff; box-shadow: var(--shadow); }
.portal-welcome h1 { color: #fff; }
.portal-welcome .text-muted { color: #c8edf0 !important; }
.portal-stat { height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.portal-welcome-rich { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.portal-welcome-actions { display: flex; align-items: center; gap: 10px; }
.portal-welcome-actions .btn-light { color: var(--navy); border: 0; }
.portal-stat small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; }
.portal-action-panel, .portal-help-panel { overflow: hidden; }
.portal-panel-icon { color: var(--aqua); font-size: 1.5rem; }
.saved-detail { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fbfc; color: var(--muted); font-size: .78rem; }
.saved-detail i { color: var(--blue); }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.contact-row:last-child { border-bottom: 0; }
.contact-row:hover { color: var(--blue-dark); }
.contact-row small, .contact-row strong { display: block; }
.contact-row small { color: var(--muted); font-size: .7rem; }
.contact-row strong { margin-top: 2px; font-size: .82rem; }
.contact-icon { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e9f7fa; color: var(--blue); }
.contact-row-whatsapp .contact-icon { background: #eaf8ee; color: #159455; }
.progress-track { width: 95px; height: 5px; overflow: hidden; border-radius: 99px; background: #e8eff1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--aqua)); }
.portal-guide { overflow: hidden; }
.portal-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 6px 24px 25px; }
.portal-steps > div { position: relative; padding: 8px 22px 0 48px; }
.portal-steps > div:not(:last-child)::after { position: absolute; top: 22px; right: -5px; width: 30px; border-top: 1px dashed #b9d7de; content: ""; }
.portal-steps span { position: absolute; left: 0; top: 5px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e5f7f7; color: var(--blue-dark); font-weight: 800; }
.portal-steps strong, .portal-steps small { display: block; }
.portal-steps strong { font-size: .82rem; }
.portal-steps small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.portal-whatsapp-float { position: fixed; right: 24px; bottom: 24px; z-index: 1040; display: flex; min-height: 62px; padding: 10px 17px 10px 11px; align-items: center; gap: 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: #16a75c; color: #fff; box-shadow: 0 14px 38px rgba(6,74,39,.32); transition: transform .2s ease,box-shadow .2s ease,background .2s ease; }
.portal-whatsapp-float:hover,.portal-whatsapp-float:focus { transform: translateY(-3px); background: #108c4c; color: #fff; box-shadow: 0 18px 45px rgba(6,74,39,.4); }
.portal-whatsapp-float > i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 1.6rem; }
.portal-whatsapp-float span,.portal-whatsapp-float strong,.portal-whatsapp-float small { display: block; line-height: 1.15; }
.portal-whatsapp-float strong { font-size: .8rem; }
.portal-whatsapp-float small { margin-top: 4px; color: #dff8e9; font-size: .65rem; }

@media (min-width: 576px) {
  .col-md-2 { width: 16.666667%; } .col-md-3 { width: 25%; } .col-md-4 { width: 33.333333%; }
  .col-md-6 { width: 50%; } .col-md-8 { width: 66.666667%; }
}
@media (min-width: 992px) {
  .col-lg-5 { width: 41.666667%; } .col-lg-7 { width: 58.333333%; }
}
@media (min-width: 1200px) {
  .col-xl-2 { width: 16.666667%; } .col-xl-4 { width: 33.333333%; } .col-xl-5 { width: 41.666667%; }
  .col-xl-7 { width: 58.333333%; } .col-xl-8 { width: 66.666667%; }
}
@media (max-width: 991px) {
  .portal-auth-shell { grid-template-columns: 1fr; }
  .portal-auth-showcase { min-height: auto; padding: 32px; }
  .portal-auth-pitch { margin: 42px 0 20px; }
  .portal-auth-pitch h2 { max-width: 680px; font-size: 2.7rem; }
  .portal-auth-pitch > p:not(.eyebrow), .auth-feature-grid, .portal-auth-contact { display: none; }
  .portal-auth-panel { padding: 34px 22px 50px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { padding: 0 22px; }
  .d-lg-none { display: inline-flex !important; }
  .container-fluid { padding: 28px 22px; }
}
@media (max-width: 640px) {
  .portal-auth-showcase { padding: 22px; }
  .portal-auth-brand img { width: 58px; height: 46px; }
  .portal-auth-pitch { margin: 32px 0 8px; }
  .portal-auth-pitch h2 { font-size: 2rem; }
  .portal-auth-card { padding: 27px 21px; border-radius: 18px; }
  .portal-nav { padding-inline: 14px; }
  .portal-nav-help span, .portal-user-chip span, .portal-nav .brand strong { display: none; }
  .portal-nav .brand small { margin: 0; }
  .portal-nav-actions { gap: 7px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-heading .btn { width: 100%; }
  .topbar .today { display: none; }
  .topbar .gap-3 { gap: .55rem !important; }
  .panel-header, .panel-toolbar { align-items: flex-start; flex-direction: column; }
  .panel-toolbar > * { width: 100%; }
  .inspection-grid { grid-template-columns: 1fr; }
  .inspection-row { align-items: stretch; flex-direction: column; }
  .inspection-row .btn-group { display: flex; width: 100%; }
  .inspection-row .btn-group .btn { flex: 1 1 0; min-width: 0; padding-inline: .45rem; }
  .login-card, .portal-login-card { padding: 28px 22px; }
  .modal { padding: 14px; }
  .modal-dialog { min-height: calc(100vh - 28px); min-height: calc(100dvh - 28px); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
  .modal-content { max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
  .modal-header, .modal-footer { padding: 15px 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 140px; }
  .action-guidance { align-items: stretch; }
  .action-guidance > span { flex-basis: 100%; }
  .action-guidance > .btn, .action-guidance > a.btn, .action-guidance > div { width: 100%; }
  .col-6 { width: 100%; }
  .portal-welcome-rich { align-items: flex-start; flex-direction: column; }
  .portal-welcome-actions { width: 100%; justify-content: space-between; }
  .portal-steps { grid-template-columns: 1fr; gap: 18px; }
  .portal-steps > div:not(:last-child)::after { display: none; }
  .portal-whatsapp-float { right: 14px; bottom: max(14px,env(safe-area-inset-bottom)); min-height: 56px; padding: 8px; }
  .portal-whatsapp-float > i { width: 40px; height: 40px; }
  .portal-whatsapp-float span { display: none; }
}
