@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #d92b27;
    --brand-600: #ef4444;
    --brand-50: #fff1f1;
    --brand-100: #fee2e2;
    --accent: #ffffff;
    --ink: #111827;
    --ink-2: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f7f7f8;
    --card: #ffffff;
    --danger: #d92b27;
    --danger-50: #fef2f2;
    --warn: #d97706;
    --warn-50: #fffbeb;
    --ok: #059669;
    --ok-50: #ecfdf5;
    --info: #2563eb;
    --info-50: #eff6ff;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
    --sidebar: 264px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.icon { flex-shrink: 0; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
    background: linear-gradient(180deg, #0b3b44 0%, #0f766e 100%);
    color: #d6f5ef; display: flex; flex-direction: column; padding: 22px 16px;
    transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #0b3b44; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.brand-name { color: #fff; font-weight: 800; font-size: 16px; line-height: 1.15; }
.brand-sub { font-size: 11px; color: #99e6da; letter-spacing: .08em; text-transform: uppercase; }

.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #7fcfc3; padding: 14px 12px 8px; }
.nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; margin-bottom: 4px;
    color: #cdeee8; font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }

.sidebar-foot { margin-top: auto; background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px; font-size: 12px; color: #bfeee6; }
.sidebar-foot strong { color: #fff; display: block; margin-bottom: 2px; }
.sidebar-foot a { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #fff; font-weight: 600; }

.overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 35; }

.main { margin-left: var(--sidebar); flex: 1; min-width: 0; }

.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
    padding: 14px 28px; background: rgba(244,247,251,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--line); place-items: center; }
.page-title h1 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.page-title p { color: var(--muted); font-size: 12.5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #0e7490); color: #fff; display: grid; place-items: center; font-weight: 700; }
.profile-chip b { display: block; font-size: 13px; line-height: 1.2; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chip small { color: var(--muted); font-size: 11px; }

.content { padding: 28px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head .sub { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 2px; }
.card-head .link { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }
.card-body { padding: 22px; }

.grid { display: grid; gap: 20px; }
.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.two-col { grid-template-columns: 1.7fr 1fr; align-items: start; }
.profile-grid { grid-template-columns: 1fr 1.6fr; align-items: start; }

/* Hero */
.hero {
    border-radius: 20px; padding: 26px 30px; margin-bottom: 20px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(120deg, #0b3b44, #0f766e 60%, #0d9488);
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(250,204,21,.18); }
.hero::before { content: ''; position: absolute; right: 120px; bottom: -110px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07); }
.hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.hero p { color: #c8f2ea; margin-top: 4px; max-width: 520px; }
.hero > * { position: relative; z-index: 1; }
.hero .live { margin-left: auto; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 10px 16px; border-radius: 14px; font-weight: 600; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

/* Stat */
.stat { padding: 20px 22px; display: flex; gap: 16px; align-items: center; }
.stat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.stat-ic.teal { background: var(--brand-100); color: var(--brand); }
.stat-ic.red { background: var(--danger-50); color: var(--danger); }
.stat-ic.amber { background: var(--warn-50); color: var(--warn); }
.stat-ic.green { background: var(--ok-50); color: var(--ok); }
.stat small { color: var(--muted); font-weight: 500; display: block; }
.stat b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; display: block; }
.stat .delta { font-size: 11.5px; color: var(--ok); font-weight: 600; }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--brand-600), var(--brand)); opacity: .85; transition: opacity .15s; position: relative; }
.bar:hover i { opacity: 1; }
.bar.peak i { background: linear-gradient(180deg, var(--accent), #eab308); }
.bar span { font-size: 11.5px; color: var(--muted); }
.bar em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 22px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid #eef2f7; vertical-align: middle; white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fffd; }
tbody tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 36px; height: 36px; font-size: 13px; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); }
.person b { display: block; font-weight: 600; }
.person small { color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* Badges / buttons */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--warn-50); color: var(--warn); }
.badge.confirmed, .badge.active { background: var(--ok-50); color: var(--ok); }
.badge.blocked { background: var(--danger-50); color: var(--danger); }
.badge.plain::before { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 11px; font-weight: 600; font-size: 13px; transition: transform .1s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(15,118,110,.3); }
.btn-primary:hover { background: #0b625b; }
.btn-call { background: var(--ok-50); color: var(--ok); }
.btn-call:hover { background: #d1fae5; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; padding: 12px; }

/* Toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; padding: 16px 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .select { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.search .input { padding-left: 38px; }
.input:focus, .select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(13,148,136,.12); }
.select { width: auto; padding-right: 30px; }
.tabs { display: inline-flex; background: #f1f5f9; padding: 4px; border-radius: 12px; gap: 2px; }
.tabs button { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(15,23,42,.1); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 10px; }
.pager .pages { display: flex; gap: 6px; }
.pager .pages button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--ink-2); }
.pager .pages button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { display: none; padding: 40px; text-align: center; color: var(--muted); }

/* Notification list */
.notif { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid #eef2f7; position: relative; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: #f7fffd; }
.notif.unread::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-600); }
.n-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.n-ic.emergency { background: var(--danger-50); color: var(--danger); }
.n-ic.email { background: var(--info-50); color: var(--info); }
.n-ic.system { background: var(--brand-100); color: var(--brand); }
.notif b { font-weight: 600; display: block; }
.notif p { color: var(--muted); font-size: 13px; }
.notif time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.notif .body { flex: 1; min-width: 0; }

/* Profile */
.cover { height: 120px; border-radius: 16px 16px 0 0; background: linear-gradient(120deg, #0b3b44, #0f766e 55%, #14b8a6); position: relative; overflow: hidden; }
.cover::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(250,204,21,.25); }
.p-main { padding: 0 24px 24px; text-align: center; }
.p-logo { width: 84px; height: 84px; margin: -42px auto 12px; border-radius: 22px; background: #fff; border: 4px solid #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--brand); position: relative; }
.p-logo > span { width: 100%; height: 100%; border-radius: 18px; background: var(--brand-50); display: grid; place-items: center; }
.p-main h2 { font-size: 18px; font-weight: 800; }
.p-badges { display: flex; gap: 8px; justify-content: center; margin: 10px 0 18px; flex-wrap: wrap; }
.contact-list { text-align: left; display: grid; gap: 12px; margin-top: 8px; }
.contact-list div { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.contact-list .icon { color: var(--brand); margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
.info-grid label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.info-grid div b { font-weight: 600; }
.info-grid .full { grid-column: 1 / -1; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shot { position: relative; display: block; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--brand-50); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.shot:hover img { transform: scale(1.06); }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: #fff; font-size: 12px; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.service { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid #eef2f7; align-items: flex-start; }
.service:last-child { border-bottom: 0; }
.service .s-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.service b { display: block; font-weight: 600; }
.service p { color: var(--muted); font-size: 13px; }
.service .op { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-2); max-width: 200px; }
.service .op small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.note { display: flex; gap: 10px; background: var(--info-50); color: #1e40af; border-radius: 12px; padding: 12px 16px; font-size: 13px; margin-bottom: 20px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(150deg, #0b3b44, #0f766e 65%, #14b8a6); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(250,204,21,.2); }
.login-art h1 { font-size: 38px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; max-width: 460px; }
.login-art p { color: #bff0e7; margin-top: 14px; max-width: 420px; font-size: 15px; }
.login-art ul { list-style: none; margin-top: 26px; display: grid; gap: 12px; position: relative; z-index: 1; }
.login-art li { display: flex; gap: 10px; align-items: center; color: #e2faf6; }
.login-art li .icon { color: var(--accent); }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-box > p { color: var(--muted); margin: 4px 0 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 13px; }
.row a { color: var(--brand); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .two-col, .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
    .overlay.show { display: block; }
    .main { margin-left: 0; }
    .menu-btn { display: grid; }
    .topbar { padding: 12px 16px; }
    .content { padding: 18px 16px; }
    .profile-chip div { display: none; }
    .profile-chip { padding: 4px; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-art { display: none; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 22px; }
    .hero .live { margin-left: 0; }
    .service { flex-wrap: wrap; }
    .service .op { margin-left: 52px; text-align: left; }
    .notif { flex-wrap: wrap; }
}

/* ---------- White + red theme (matches Stroke SOS logo) ---------- */
.sidebar { background: #fff; border-right: 1px solid var(--line); color: var(--ink-2); box-shadow: 4px 0 24px rgba(15,23,42,.04); }
.brand-name { color: var(--ink); }
.brand-sub { color: var(--brand); }
.brand-mark { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(217,43,39,.35); }
.nav-label { color: #94a3b8; }
.nav a { color: var(--ink-2); }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(217,43,39,.3); }
.nav .count { background: var(--brand); color: #fff; }
.nav a.active .count { background: #fff; color: var(--brand); }
.sidebar-foot { background: #fff5f5; border: 1px solid #fde2e2; color: var(--muted); }
.sidebar-foot strong { color: var(--ink); }
.sidebar-foot a { color: var(--brand); }
.hero { background: linear-gradient(120deg, #b91c1c, #d92b27 60%, #ef4444); }
.hero::after { background: rgba(255,255,255,.14); }
.hero p { color: #ffe4e4; }
.stat-ic.teal { color: var(--brand); }
.bar i { background: linear-gradient(180deg, #f87171, #ef4444); opacity: .9; }
.bar.peak i { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.btn-primary { box-shadow: 0 6px 16px rgba(217,43,39,.3); }
.btn-primary:hover { background: #b91c1c; }
tbody tr:hover { background: #fff8f8; }
.tabs button.on { color: var(--brand); }
.notif.unread { background: #fff8f8; }
.cover { background: linear-gradient(120deg, #b91c1c, #d92b27 55%, #f87171); }
.login-art { background: linear-gradient(150deg, #991b1b, #d92b27 65%, #ef4444); }
.login-art::after { background: rgba(255,255,255,.14); }
.login-art p, .login-art li { color: #ffe4e4; }
.login-art li .icon { color: #fff; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(217,43,39,.12); }

/* Logo */
.brand-logo { width: 48px; height: 38px; object-fit: cover; border-radius: 9px; box-shadow: 0 4px 12px rgba(217,43,39,.3); flex-shrink: 0; }
.login-art .brand-logo { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }

/* Request detail + live map */
.name-link:hover b { color: var(--brand); text-decoration: underline; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--brand); }
.detail-grid { grid-template-columns: repeat(3, 1fr); }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.live-stats label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.live-stats b { font-size: 18px; font-weight: 800; }
.progress { height: 8px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #f87171, #d92b27); }
.live-dot { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--brand); }
.live-dot .pulse { background: var(--brand); animation: pulse-red 1.8s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(217,43,39,.6); } 70% { box-shadow: 0 0 0 10px rgba(217,43,39,0); } 100% { box-shadow: 0 0 0 0 rgba(217,43,39,0); } }
#map { height: 460px; border-radius: 0 0 16px 16px; z-index: 1; }
.pin { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.pin.hosp { background: #059669; }
.pin.me { background: var(--brand); position: relative; }
.pin.me i { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.pin.me::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--brand); animation: ring 1.6s infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }
@media (max-width: 1180px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { #map { height: 340px; } }

/* Profile layout */
.profile-grid { grid-template-columns: 1fr 1.4fr; align-items: stretch; }
.profile-card { height: 100%; }
.gallery-wide { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) { .profile-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .gallery-wide { grid-template-columns: repeat(2, 1fr); } }

/* Live map page */
.map-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }
.map-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.map-big { height: 600px; border-radius: 0 0 16px 16px; z-index: 1; }
.pin.big { width: 46px; height: 46px; font-size: 26px; }
.pin.me.arrived { background: #059669; }
.pin.me.arrived::after { border-color: #059669; }
.incoming { max-height: 640px; overflow-y: auto; }
.inc { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef2f7; transition: background .12s; }
.inc:last-child { border-bottom: 0; }
.inc:hover { background: #fff8f8; }
.inc .avatar { width: 38px; height: 38px; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); flex-shrink: 0; }
.inc-main { flex: 1; min-width: 0; }
.inc-main b { display: block; font-weight: 600; }
.inc-main small { color: var(--muted); display: block; margin-bottom: 6px; }
.inc-main .progress { height: 5px; }
.inc-eta { font-weight: 800; color: var(--brand); white-space: nowrap; }
.inc-eta.ok { color: var(--ok); }
.inc.done { opacity: .7; }
@media (max-width: 1180px) { .map-layout { grid-template-columns: 1fr; } .map-big { height: 480px; } }
@media (max-width: 560px) { .map-stats { grid-template-columns: 1fr; } .map-big { height: 380px; } }
.stats-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .stats-2 { grid-template-columns: 1fr; } }

/* Logo */
.brand-stack { flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 8px 22px; }
.logo-img { display: block; width: 50px; height: auto; border-radius: 10px; box-shadow: 0 6px 18px rgba(217,43,39,.28); }
.brand-stack .brand-sub { padding-left: 4px; }
.login-brand { padding: 0; position: relative; z-index: 1; }
.login-brand .logo-img { width: 56px; box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 10px 30px rgba(0,0,0,.25); }
.login-brand .brand-sub { color: #ffe4e4; }

/* Facilities */
.facility-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.facility { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 500; color: var(--ink-2); }
.facility .icon { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.type-badge { background: #f1f5f9; color: var(--ink-2); }
