:root {
  --navy: #0b1f3a;
  --navy-2: #112a4d;
  --blue: #1f6feb;
  --blue-dark: #1657c0;
  --gold: #ffffff;
  --ink: #16202e;
  --muted: #5b6b7f;
  --line: #e3e8ef;
  --bg: #f5f7fb;
  --white: #ffffff;
  --green: #1f9d57;
  --red: #d6453d;
  --amber: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 31, 58, 0.10);
  --shadow-sm: 0 4px 14px rgba(13, 31, 58, 0.08);
  --font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  /* Blue gradients */
  --grad-blue: linear-gradient(135deg, #1f6feb 0%, #1657c0 55%, #0b1f3a 100%);
  --grad-blue-soft: linear-gradient(135deg, #2f80ff 0%, #1f6feb 100%);
  --grad-blue-deep: linear-gradient(120deg, #0b1f3a 0%, #123a72 50%, #1f6feb 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(11,31,58,0.97), rgba(22,87,192,0.95));
  backdrop-filter: blur(6px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #e8eef7);
  display: grid; place-items: center;
  color: var(--navy); font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.brand .brand-text small {
  display: block; font-weight: 400; font-size: 11px;
  color: #9db4d6; letter-spacing: 1.5px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #d8e2f1; font-size: 15px; }
.nav-links a:hover { color: #fff; text-decoration: none; }

/* Mobile menu toggle (hamburger) — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  width: 42px; height: 38px;
  cursor: pointer;
  padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, background .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-blue-soft); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.btn-gold { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-gold:hover { background: #eef2f8; text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-light:hover { background: #f0f3f8; text-decoration: none; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b8362f; text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(11,31,58,0.94) 0%, rgba(18,58,114,0.86) 45%, rgba(31,111,235,0.78) 100%),
    url('https://images.pexels.com/photos/1095814/pexels-photo-1095814.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
}
.hero-inner { padding: 96px 0 110px; max-width: 720px; }
.eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.45);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 50px; line-height: 1.08; margin: 0 0 16px; }
.hero p { font-size: 19px; color: #d8e2f1; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Quick track bar on hero */
.track-bar {
  margin-top: 34px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 14px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.track-bar input {
  flex: 1; min-width: 200px;
  padding: 12px 14px; border-radius: 10px; border: none;
  font-size: 15px;
}

/* ---------------- Sections ---------------- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-head h2 { font-size: 34px; margin: 0 0 12px; color: var(--navy); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.feature {
  padding: 28px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ico {
  width: 54px; height: 54px; border-radius: 12px;
  background: linear-gradient(135deg, #e8f0ff, #d6e4ff);
  color: var(--blue);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 16px;
}
.feature .ico svg { width: 26px; height: 26px; }
.side-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.feature h3 { margin: 0 0 8px; font-size: 19px; color: var(--navy); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Services with images */
.service-card { overflow: hidden; }
.service-card img { height: 180px; object-fit: cover; width: 100%; }
.service-card .body { padding: 22px; }
.service-card h3 { margin: 0 0 8px; color: var(--navy); }
.service-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Stats band */
.stats {
  background: var(--grad-blue-deep);
  color: #fff;
}
.stats .grid-4 { gap: 16px; }
.stat { text-align: center; padding: 22px; }
.stat .num { font-size: 40px; font-weight: 800; color: var(--gold); }
.stat .label { color: #c4d3e8; font-size: 15px; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { font-size: 32px; color: var(--navy); margin-top: 0; }
.split ul { padding-left: 0; list-style: none; }
.split li { padding: 8px 0 8px 30px; position: relative; color: var(--ink); }
.split li::before {
  content: '✓'; position: absolute; left: 0; top: 8px;
  color: var(--green); font-weight: 800;
}

/* CTA */
.cta {
  background: var(--grad-blue);
  color: #fff; text-align: center;
}
.cta h2 { font-size: 34px; margin: 0 0 12px; }
.cta p { font-size: 18px; color: #e6eefb; margin: 0 0 26px; }

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #0b1f3a 0%, #102d54 100%);
  color: #c4d3e8;
  padding: 56px 0 26px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.site-footer a { color: #c4d3e8; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 14px; color: #8ea4c4;
}

/* ---------------- Auth pages ---------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background:
    linear-gradient(160deg, rgba(11,31,58,0.86), rgba(31,111,235,0.7)),
    url('https://images.pexels.com/photos/4481259/pexels-photo-4481259.jpeg?auto=compress&cs=tinysrgb&w=1200') center/cover;
  color: #fff;
  padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual h2 { font-size: 32px; margin: 0 0 10px; }
.auth-form-side {
  display: grid; place-items: center; padding: 40px;
  background: var(--bg);
}
.auth-card {
  width: min(420px, 100%);
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 38px 34px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 26px; color: var(--navy); }
.auth-card .sub { color: var(--muted); margin: 0 0 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,111,235,0.15);
}
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.alert {
  padding: 11px 14px; border-radius: 10px; font-size: 14px;
  margin-bottom: 16px; display: none;
}
.alert.show { display: block; }
.alert-error { background: #fdecea; color: #a4271e; border: 1px solid #f5c6c2; }
.alert-success { background: #e7f6ee; color: #176b3c; border: 1px solid #b9e3ca; }

/* ---------------- Dashboard layout ---------------- */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy);
  color: #c4d3e8;
  padding: 22px 16px;
  display: flex; flex-direction: column;
}
.sidebar .brand { color: #fff; margin-bottom: 28px; padding: 0 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px;
  color: #c4d3e8; font-size: 15px; cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left;
  font-family: inherit;
}
.side-link:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.side-link.active { background: var(--blue); color: #fff; }
.sidebar .spacer { flex: 1; }

.main { background: var(--bg); }
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { font-size: 20px; margin: 0; color: var(--navy); }
.topbar .who { font-size: 14px; color: var(--muted); }
.content { padding: 28px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.kpi .label { color: var(--muted); font-size: 14px; }
.kpi .value { font-size: 32px; font-weight: 800; color: var(--navy); margin-top: 4px; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 26px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 18px; margin: 0; color: var(--navy); }
.panel-body { padding: 22px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:hover { background: #f8fafd; }
.table-actions { display: flex; gap: 6px; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-active { background: #e7f6ee; color: #176b3c; }
.badge-suspended { background: #fdecea; color: #a4271e; }
.badge-status { background: #e8f0ff; color: var(--blue-dark); }
.badge-Delivered { background: #e7f6ee; color: #176b3c; }
.badge-In.Transit { background: #eef2f8; color: var(--blue-dark); }

.empty {
  text-align: center; padding: 40px; color: var(--muted);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,31,58,0.55);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: min(560px, 100%);
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow);
}
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { margin: 0; color: var(--navy); }
.modal-body { padding: 22px; }
.modal-foot {
  padding: 16px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
}
.close-x { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Tracking timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 0 0 22px 30px; border-left: 2px solid var(--line);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -8px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--line);
}
.timeline li.done::before { background: var(--green); }
.timeline li.current::before { background: var(--blue); box-shadow: 0 0 0 4px rgba(31,111,235,0.2); }
.timeline .t-status { font-weight: 600; color: var(--navy); }
.timeline .t-meta { font-size: 13px; color: var(--muted); }

.live-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(31,157,87,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31,157,87,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(31,157,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,157,87,0); }
}

.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: 14px; animation: slidein .25s ease;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Page wrapper for simple pages */
.page { min-height: 70vh; padding: 50px 0; }
.page h1 { color: var(--navy); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar .spacer { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
}
@media (max-width: 768px) {
  /* Mobile navigation: show hamburger, collapse links into a dropdown */
  .nav { position: relative; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0 4px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 11px 8px;
    border-radius: 8px;
    font-size: 16px;
  }
  .nav-links a:hover { background: rgba(255,255,255,0.10); }
  .nav-links .btn { width: 100%; margin-top: 4px; }
}

@media (max-width: 560px) {
  .grid-3, .grid-4, .stat-row, .row2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   Express layout
   =================================================================== */

/* Promo / announcement bar */
.promo-bar {
  background: #ffffff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.promo-bar svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* Express hero */
.hero-express .hero-inner { padding: 78px 0 88px; max-width: 780px; }
.hero-express h1 .accent { color: var(--gold); }
.trust-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.trust-row .tp { display: flex; align-items: center; gap: 8px; color: #d8e2f1; font-size: 14px; font-weight: 600; }
.trust-row .tp svg { width: 18px; height: 18px; color: var(--gold); flex: 0 0 auto; }

/* The hero track bar gets a label for express focus */
.track-bar .track-label {
  width: 100%; color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
}
.track-bar .track-label svg { width: 18px; height: 18px; color: var(--gold); }

/* Express service tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.tier {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; position: relative; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tier:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.tier.featured { border-color: var(--blue); box-shadow: 0 14px 34px rgba(31,111,235,0.18); }
.tier .pill {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.tier .time { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.tier .time small {
  display: block; font-size: 12px; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 6px;
}
.tier h3 { margin: 14px 0 6px; color: var(--navy); font-size: 20px; }
.tier > p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 22px; }
.tier li { padding: 7px 0 7px 28px; position: relative; font-size: 14px; color: var(--ink); }
.tier li::before {
  content: '✓'; position: absolute; left: 0; top: 7px;
  color: var(--green); font-weight: 800;
}

/* How it works steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { text-align: center; padding: 8px; }
.step .num {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  border: 3px solid var(--blue);
}
.step h3 { color: var(--navy); margin: 0 0 8px; font-size: 19px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

@media (max-width: 900px) {
  .tiers { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
}

/* Subpage hero + clickable hub cards */
.subhero { padding: 56px 0 60px; }
.subhero h1 { font-size: 40px; margin: 10px 0 12px; }
.subhero p { font-size: 18px; color: #d8e2f1; margin: 0; max-width: 640px; }
.service-card { transition: transform .15s ease, box-shadow .15s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
a.card-link { text-decoration: none; color: inherit; display: block; }
a.card-link:hover { text-decoration: none; }
a.card-link .body .more { color: var(--blue); font-weight: 600; font-size: 14px; margin-top: 10px; display: inline-block; }

/* ===================================================================
   Notice banner + Chat widget
   =================================================================== */

/* Phone-outage notice bar (sits above the promo bar) */
.notice-bar {
  background: #fdecea;
  color: #a4271e;
  border-bottom: 1px solid #f5c6c2;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 9px 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.notice-bar svg { width: 16px; height: 16px; flex: 0 0 auto; }
.notice-bar a { color: #7a1c16; text-decoration: underline; }
.notice-bar .notice-chat {
  background: #a4271e; color: #fff; border: none; cursor: pointer;
  padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 13px;
  margin-left: 4px;
}
.notice-bar .notice-chat:hover { background: #7a1c16; }

/* Floating chat launcher */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad-blue-soft, #1f6feb); color: #fff;
  border: none; cursor: pointer; box-shadow: 0 8px 24px rgba(13,31,58,0.28);
  display: grid; place-items: center;
  transition: transform .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 26px; height: 26px; }
.chat-fab .chat-badge {
  position: absolute; top: -2px; right: -2px;
  background: #d6453d; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: none; align-items: center; justify-content: center; padding: 0 5px;
}
.chat-fab .chat-badge.show { display: flex; }

/* Chat panel */
.chat-panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 301;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 130px));
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(13,31,58,0.30);
  display: none; flex-direction: column;
  border: 1px solid var(--line);
}
.chat-panel.open { display: flex; }
.chat-head {
  background: var(--navy); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-head h4 { margin: 0; font-size: 16px; }
.chat-head small { color: #9db4d6; display: block; font-weight: 400; font-size: 12px; }
.chat-head .chat-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 14px;
  background: #f5f7fb; display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { max-width: 80%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.chat-msg .meta { display: block; font-size: 10px; opacity: .65; margin-top: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.admin { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-empty { text-align: center; color: var(--muted); font-size: 13px; margin: auto 0; }
.chat-id-fields { padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat-id-fields input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; width: 100%; }
.chat-input {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff;
}
.chat-input textarea {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font: inherit; font-size: 14px; height: 40px; max-height: 100px;
}
.chat-input button {
  background: var(--blue); color: #fff; border: none; border-radius: 10px;
  padding: 0 16px; cursor: pointer; font-weight: 600;
}
.chat-input button:hover { background: var(--blue-dark); }

/* Admin chat layout */
.chat-admin { display: grid; grid-template-columns: 300px 1fr; gap: 0; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; background: #fafbfd; }
.chat-list-item { padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat-list-item:hover { background: #eef2f8; }
.chat-list-item.active { background: #e8f0ff; }
.chat-list-item .cli-name { font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.chat-list-item .cli-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item .cli-unread { background: #d6453d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.chat-thread { display: flex; flex-direction: column; }
.chat-thread .thread-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-thread .thread-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.chat-thread .thread-head small { color: var(--muted); }
.chat-thread .thread-body { flex: 1; overflow-y: auto; padding: 16px; background: #f5f7fb; display: flex; flex-direction: column; gap: 10px; }
.chat-thread .thread-empty { margin: auto; color: var(--muted); }
@media (max-width: 700px) {
  .chat-admin { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 220px; }
  .chat-thread { min-height: 360px; }
}
