:root{
  --primary:#1e3a8a;--primary-dark:#172554;--accent:#f59e0b;--accent-dark:#d97706;
  --dark:#0f172a;--text:#1e293b;--muted:#64748b;--bg:#f8fafc;--border:#e2e8f0;--radius:14px;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;color:var(--text);line-height:1.6;background:#fff}
a{color:var(--primary);text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 22px;border-radius:10px;font-weight:600;background:var(--primary);color:#fff;border:none;cursor:pointer;transition:.15s;font-size:15px}
.btn:hover{background:var(--primary-dark)}
.btn.accent{background:var(--accent);color:#0f172a}.btn.accent:hover{background:var(--accent-dark)}
.btn.ghost{background:transparent;border:1.5px solid rgba(255,255,255,.6);color:#fff}
.btn.outline{background:#fff;border:1.5px solid var(--border);color:var(--text)}
.btn.sm{padding:8px 14px;font-size:13px}
.btn.wa{background:#25d366;color:#fff}.btn.wa:hover{background:#1da851}
/* Header */
header.site{background:var(--dark);color:#fff;position:sticky;top:0;z-index:50}
.topline{background:#0b1120;font-size:13px;padding:7px 0}
.topline .container{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;color:#cbd5e1}
.topline a{color:#cbd5e1}
.nav{display:flex;align-items:center;justify-content:space-between;padding:15px 0}
.nav .logo{font-size:22px;font-weight:800;color:#fff;display:flex;align-items:center;gap:10px}
.nav .logo .mark{width:38px;height:38px;background:var(--accent);color:#0f172a;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:900}
.nav ul{list-style:none;display:flex;gap:6px;align-items:center}
.nav ul a{color:#e2e8f0;padding:9px 14px;border-radius:8px;font-weight:500}
.nav ul a:hover{background:rgba(255,255,255,.1);color:#fff}
.menu-toggle{display:none;background:none;border:none;color:#fff;font-size:26px}
/* Hero */
.hero{position:relative;background:linear-gradient(rgba(15,23,42,.8),rgba(15,23,42,.85)),url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1600') center/cover;color:#fff;padding:90px 0}
.hero h1{font-size:44px;line-height:1.15;margin-bottom:16px;font-weight:800}
.hero p{font-size:19px;max-width:620px;color:#e2e8f0;margin-bottom:26px}
.hero .cta{display:flex;gap:12px;flex-wrap:wrap}
/* Search bar */
.searchbar{background:#fff;border-radius:14px;padding:16px;box-shadow:0 20px 40px rgba(0,0,0,.2);margin-top:36px;display:grid;grid-template-columns:repeat(4,1fr) auto;gap:10px}
.searchbar select,.searchbar input{padding:12px;border:1px solid var(--border);border-radius:9px;font-size:14px;width:100%}
@media(max-width:820px){.searchbar{grid-template-columns:1fr 1fr}}
/* Sections */
section.block{padding:60px 0}
.section-head{text-align:center;margin-bottom:40px}
.section-head h2{font-size:32px;font-weight:800;margin-bottom:8px}
.section-head p{color:var(--muted);font-size:16px}
.bg-soft{background:var(--bg)}
/* Stats strip */
.stats-strip{background:var(--primary);color:#fff;padding:36px 0}
.stats-strip .container{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;text-align:center}
.stats-strip .num{font-size:34px;font-weight:800;color:var(--accent)}
@media(max-width:700px){.stats-strip .container{grid-template-columns:1fr 1fr}}
/* Vehicle grid */
.vgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:24px}
.vcard{background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:.2s;display:flex;flex-direction:column}
.vcard:hover{box-shadow:0 12px 30px rgba(0,0,0,.1);transform:translateY(-3px)}
.vcard .img{position:relative;aspect-ratio:16/10;background:#e2e8f0;overflow:hidden}
.vcard .img img{width:100%;height:100%;object-fit:cover}
.vcard .tag{position:absolute;top:10px;left:10px;background:var(--accent);color:#0f172a;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:700}
.vcard .tag.sold{background:#dc2626;color:#fff}
.vcard .body{padding:16px;flex:1;display:flex;flex-direction:column}
.vcard h3{font-size:17px;margin-bottom:6px}
.vcard h3 a{color:var(--text)}
.vcard .price{font-size:22px;font-weight:800;color:var(--primary);margin:8px 0}
.vcard .specs{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:13px;margin-bottom:12px}
.vcard .specs span{display:flex;align-items:center;gap:4px}
.vcard .foot{margin-top:auto;display:flex;gap:8px}
/* make chips */
.chips{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.chip{background:#fff;border:1px solid var(--border);border-radius:999px;padding:10px 18px;font-weight:600;color:var(--text)}
.chip:hover{border-color:var(--primary);color:var(--primary)}
/* layout inventory */
.inv-layout{display:grid;grid-template-columns:280px 1fr;gap:26px}
@media(max-width:900px){.inv-layout{grid-template-columns:1fr}}
.filters{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:20px;align-self:start}
.filters label{display:block;font-weight:600;font-size:13px;margin:12px 0 5px}
.filters select,.filters input{width:100%;padding:9px;border:1px solid var(--border);border-radius:8px}
/* detail */
.detail-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:30px}
@media(max-width:900px){.detail-grid{grid-template-columns:1fr}}
.gallery img{width:100%;border-radius:var(--radius);aspect-ratio:16/10;object-fit:cover;background:#e2e8f0}
.thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:10px}
.thumbs img{aspect-ratio:1;object-fit:cover;border-radius:8px;cursor:pointer;border:2px solid transparent}
.spec-table{width:100%;border-collapse:collapse}
.spec-table td{padding:10px 12px;border-bottom:1px solid var(--border)}
.spec-table td:first-child{color:var(--muted);width:45%}
.feature-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.feature-list li{list-style:none;padding:8px 12px;background:var(--bg);border-radius:8px;font-size:14px}
.card-box{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:22px}
.badge{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:700;background:#e2e8f0;color:#334155}
/* forms */
.field{margin-bottom:14px}
.field label{display:block;font-weight:600;margin-bottom:5px;font-size:14px}
.field input,.field textarea,.field select{width:100%;padding:11px;border:1px solid var(--border);border-radius:9px;font-size:15px;font-family:inherit}
/* footer */
footer.site{background:var(--dark);color:#cbd5e1;padding:56px 0 24px}
footer.site .cols{display:grid;grid-template-columns:2fr 1fr 1fr 1.5fr;gap:32px}
@media(max-width:800px){footer.site .cols{grid-template-columns:1fr 1fr}}
footer.site h4{color:#fff;margin-bottom:14px;font-size:16px}
footer.site a{color:#cbd5e1;display:block;padding:4px 0}
footer.site a:hover{color:var(--accent)}
.social{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.social a{width:40px;height:40px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#cbd5e1;transition:transform .15s,background .15s,color .15s}
.social a:hover{transform:translateY(-2px);color:#fff}
.social a.soc-fb:hover{background:#1877f2;border-color:#1877f2}
.social a.soc-ig:hover{background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);border-color:transparent}
.social a.soc-x:hover{background:#000;border-color:#333}
.social a.soc-yt:hover{background:#ff0000;border-color:#ff0000}
.social a.soc-tt:hover{background:#000;border-color:#333}
.copyright{border-top:1px solid rgba(255,255,255,.1);margin-top:34px;padding-top:20px;text-align:center;font-size:13px}
.alert{padding:14px 18px;border-radius:10px;margin-bottom:20px}
.alert.success{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534}
.alert.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.prose h2{margin:22px 0 10px}.prose h3{margin:18px 0 8px}.prose p{margin-bottom:14px}.prose ul,.prose ol{margin:0 0 14px 22px}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:30px;list-style:none;flex-wrap:wrap}
.pagination a,.pagination span{padding:9px 14px;border:1px solid var(--border);border-radius:8px;background:#fff}
.pagination [aria-current] span{background:var(--primary);color:#fff;border-color:var(--primary)}
.float-wa{position:fixed;bottom:24px;right:24px;width:58px;height:58px;background:#25d366;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28px;box-shadow:0 8px 20px rgba(0,0,0,.25);z-index:60}
@media(max-width:800px){.nav ul{display:none;position:absolute;top:100%;left:0;right:0;background:var(--dark);flex-direction:column;padding:10px}.nav ul.open{display:flex}.menu-toggle{display:block}.hero h1{font-size:32px}}

/* ===== Added: dark mode, PWA, favourites, ratings, account ===== */
.navcount{background:var(--accent);color:#0f172a;border-radius:999px;font-size:11px;font-weight:700;padding:0 6px;margin-left:3px}
.theme-toggle{background:rgba(255,255,255,.1);border:none;color:#fff;padding:7px 9px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:0}
.theme-toggle:hover{background:rgba(255,255,255,.2)}
/* Show moon in light mode, sun in dark mode */
.theme-toggle .ic-sun{display:none}
.theme-toggle .ic-moon{display:inline-block}
html.dark .theme-toggle .ic-sun{display:inline-block}
html.dark .theme-toggle .ic-moon{display:none}
/* Global icon defaults + fix hidden attribute being overridden by display rules */
.icon{display:inline-block;vertical-align:middle;flex:none}
[hidden]{display:none!important}
.topcontact{display:flex;gap:18px;flex-wrap:wrap}
.topcontact a{color:inherit;display:inline-flex;align-items:center;gap:6px}
.topcontact a:hover{color:#fff}
.nav-ico{display:inline-flex;align-items:center}
.install-btn{position:fixed;bottom:24px;left:24px;z-index:60;display:inline-flex;align-items:center;gap:6px;background:var(--primary);color:#fff;border:none;padding:12px 18px;border-radius:30px;box-shadow:0 8px 20px rgba(0,0,0,.25);cursor:pointer;font-weight:600}
.fav-btn{position:absolute;top:10px;right:10px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.92);border:none;font-size:19px;cursor:pointer;color:#dc2626;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.15);z-index:2}
.fav-btn.active{background:#dc2626;color:#fff}
.cmp-btn{position:absolute;top:10px;right:54px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.92);border:none;cursor:pointer;color:#1e3a8a;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.15);z-index:2}
.cmp-btn.active{background:#1e3a8a;color:#fff}
.compare-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:60;background:#0f172a;color:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.35);padding:12px 16px;display:none;align-items:center;gap:14px;max-width:calc(100% - 24px)}
.compare-bar.show{display:flex}
.compare-bar .cb-count{background:#1e3a8a;border-radius:20px;padding:3px 11px;font-weight:700;font-size:14px}
.compare-bar .cb-label{font-size:14px;opacity:.9}
.compare-bar a.cb-go{background:#2563eb;color:#fff;padding:8px 16px;border-radius:9px;font-weight:600;text-decoration:none;font-size:14px}
.compare-bar button.cb-clear{background:transparent;border:1px solid rgba(255,255,255,.35);color:#fff;padding:8px 12px;border-radius:9px;cursor:pointer;font-size:14px}
[dir="rtl"] .cmp-btn{right:auto;left:54px}
[dir="rtl"] .fav-btn{right:auto;left:10px}
.stars{color:#f59e0b;letter-spacing:1px;font-size:15px}
.stars .empty{color:#cbd5e1}
.rating-input{display:inline-flex;flex-direction:row-reverse;gap:4px;font-size:26px}
.rating-input input{display:none}
.rating-input label{color:#cbd5e1;cursor:pointer}
.rating-input input:checked ~ label,.rating-input label:hover,.rating-input label:hover ~ label{color:#f59e0b}
.faq-item{border:1px solid var(--border);border-radius:10px;margin-bottom:10px;overflow:hidden;background:#fff}
.faq-q{padding:16px 18px;font-weight:600;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.faq-a{padding:0 18px;max-height:0;overflow:hidden;transition:.25s;color:var(--muted)}
.faq-item.open .faq-a{max-height:500px;padding:0 18px 16px}
.acct-layout{display:grid;grid-template-columns:240px 1fr;gap:26px}
@media(max-width:800px){.acct-layout{grid-template-columns:1fr}}
.acct-nav{background:#fff;border:1px solid var(--border);border-radius:14px;padding:12px;align-self:start}
.acct-nav a{display:block;padding:11px 14px;border-radius:9px;color:var(--text);font-weight:500}
.acct-nav a.active,.acct-nav a:hover{background:var(--bg);color:var(--primary)}
.calc-result{background:var(--primary);color:#fff;border-radius:14px;padding:22px;text-align:center}
.calc-result .big{font-size:34px;font-weight:800;color:var(--accent)}
.compare-table{width:100%;border-collapse:collapse;background:#fff}
.compare-table th,.compare-table td{border:1px solid var(--border);padding:12px;text-align:left;vertical-align:top}
.compare-table th{background:var(--bg)}

/* Dark mode */
html.dark body{background:#0b1120;color:#e2e8f0}
html.dark .card-box,html.dark .vcard,html.dark .filters,html.dark .acct-nav,html.dark .faq-item,html.dark .compare-table{background:#111827;border-color:#1f2937;color:#e2e8f0}
html.dark .vcard h3 a,html.dark .stars .empty{color:#e2e8f0}
html.dark .bg-soft{background:#0b1120}
html.dark .section-head p,html.dark .muted,html.dark .vcard .specs{color:#94a3b8}
html.dark input,html.dark select,html.dark textarea{background:#1f2937;border-color:#374151;color:#e2e8f0}
html.dark .compare-table th{background:#1f2937}
html.dark .btn.outline{background:#1f2937;color:#e2e8f0;border-color:#374151}
html.dark .spec-table td{border-color:#1f2937}
html.dark .feature-list li{background:#1f2937}

/* ============ Language switcher ============ */
.lang-switch{position:relative;display:inline-block}
.lang-switch>button{background:transparent;border:none;color:inherit;cursor:pointer;font-size:13px;font-weight:600;padding:2px 4px}
.lang-switch>ul{position:absolute;right:0;top:100%;background:#fff;border-radius:10px;box-shadow:0 12px 34px rgba(0,0,0,.18);list-style:none;margin:6px 0 0;padding:6px;min-width:160px;display:none;z-index:120}
.lang-switch.open>ul{display:block}
.lang-switch li a{display:block;padding:8px 12px;border-radius:7px;color:#0f172a;font-size:14px;white-space:nowrap}
.lang-switch li a:hover{background:#f1f5f9}
.lang-switch li a.active{background:var(--primary);color:#fff}

/* ============ Back to top ============ */
.to-top{position:fixed;right:22px;bottom:150px;width:46px;height:46px;border-radius:50%;border:none;background:var(--primary);color:#fff;font-size:22px;cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.25);opacity:0;visibility:hidden;transform:translateY(10px);transition:.2s;z-index:90}
.to-top.show{opacity:1;visibility:visible;transform:none}

/* ============ Cookie consent ============ */
.cookie-bar{position:fixed;left:16px;right:16px;bottom:16px;max-width:920px;margin:0 auto;background:#0f172a;color:#e2e8f0;padding:16px 20px;border-radius:14px;display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;box-shadow:0 14px 40px rgba(0,0,0,.35);z-index:130;font-size:14px}

/* ============ Chat assistant ============ */
.chat-fab{position:fixed;right:22px;bottom:90px;width:60px;height:60px;border-radius:50%;border:none;background:var(--primary);color:#fff;font-size:26px;cursor:pointer;box-shadow:0 10px 28px rgba(0,0,0,.3);z-index:95;transition:.15s}
.chat-fab:hover{transform:scale(1.06)}
.chat-panel[hidden]{display:none!important}
.chat-panel{position:fixed;right:22px;bottom:90px;width:360px;max-width:calc(100vw - 32px);height:520px;max-height:calc(100vh - 120px);background:#fff;border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.35);display:flex;flex-direction:column;overflow:hidden;z-index:96}
.chat-head{background:var(--primary);color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center}
.chat-head strong{display:block;font-size:15px}
.chat-status{font-size:12px;color:#4ade80}
.chat-x{background:transparent;border:none;color:#fff;font-size:24px;cursor:pointer;line-height:1}
.chat-body{flex:1;overflow-y:auto;padding:16px;background:#f8fafc;display:flex;flex-direction:column;gap:10px}
.chat-body .msg{max-width:82%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;word-wrap:break-word}
.chat-body .msg.bot{background:#fff;border:1px solid #e2e8f0;align-self:flex-start;border-bottom-left-radius:4px}
.chat-body .msg.me{background:var(--primary);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.chat-body .msg a{color:var(--accent-dark);font-weight:600}
.chat-cars{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.chat-car{display:flex;gap:10px;align-items:center;background:#f1f5f9;border-radius:10px;padding:6px;color:#0f172a!important;font-weight:400!important}
.chat-car img{width:56px;height:44px;object-fit:cover;border-radius:7px}
.chat-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chat-links a{display:inline-block;background:var(--accent);color:#0f172a!important;padding:7px 12px;border-radius:8px;font-size:13px;font-weight:600}
.chat-suggest{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 6px;background:#f8fafc}
.chat-suggest button{background:#eef2ff;border:1px solid #c7d2fe;color:var(--primary);border-radius:16px;padding:6px 12px;font-size:12.5px;cursor:pointer}
.chat-suggest button:hover{background:var(--primary);color:#fff}
.chat-input{display:flex;gap:8px;padding:12px;border-top:1px solid #e2e8f0;background:#fff}
.chat-input input{flex:1;border:1px solid #cbd5e1;border-radius:22px;padding:10px 16px;font-size:14px;outline:none}
.chat-input input:focus{border-color:var(--primary)}
.chat-input button{width:42px;height:42px;border-radius:50%;border:none;background:var(--primary);color:#fff;cursor:pointer;font-size:16px}
.dots{display:inline-flex;gap:4px}.dots i{width:7px;height:7px;background:#94a3b8;border-radius:50%;animation:cbdot 1s infinite ease-in-out}
.dots i:nth-child(2){animation-delay:.2s}.dots i:nth-child(3){animation-delay:.4s}
@keyframes cbdot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
@media(max-width:480px){.chat-panel{right:8px;left:8px;width:auto;bottom:80px}}

/* dark mode tweaks */
html.dark .lang-switch>ul{background:#1e293b}
html.dark .lang-switch li a{color:#e2e8f0}
html.dark .lang-switch li a:hover{background:#334155}
html.dark .chat-panel{background:#1e293b}
html.dark .chat-body{background:#0f172a}
html.dark .chat-body .msg.bot{background:#1e293b;border-color:#334155;color:#e2e8f0}
html.dark .chat-input{background:#1e293b;border-color:#334155}
html.dark .chat-input input{background:#0f172a;border-color:#334155;color:#e2e8f0}
html.dark .chat-car{background:#0f172a;color:#e2e8f0!important}

/* ============ Header icon buttons + notification bell ============ */
.ico-btn{background:transparent;border:none;color:inherit;cursor:pointer;position:relative;padding:2px 4px;line-height:0;display:inline-flex;align-items:center}
.ico-btn:hover{color:#fff}
.chat-fab,.float-wa,.to-top{display:inline-flex;align-items:center;justify-content:center}
.chat-input button[type=submit]{display:inline-flex;align-items:center;justify-content:center}
.notif-bell{position:relative;display:inline-block}
.notif-count{position:absolute;top:-8px;right:-8px;background:#ef4444;color:#fff;border-radius:10px;font-size:10px;font-weight:700;padding:1px 5px;min-width:16px;text-align:center}
.notif-panel{position:absolute;right:0;top:130%;width:340px;max-width:92vw;background:#fff;border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.22);z-index:140;overflow:hidden;color:#0f172a}
.notif-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #eef2f7}
.notif-head button{background:transparent;border:none;color:var(--primary);font-size:12px;cursor:pointer;font-weight:600}
.notif-list{max-height:360px;overflow-y:auto}
.notif-item{display:flex;gap:10px;padding:11px 14px;border-bottom:1px solid #f1f5f9;color:#0f172a}
.notif-item:hover{background:#f8fafc}
.notif-item.unread{background:#eff6ff}
.notif-item .ni-ico{font-size:18px}
.notif-item .ni-body{display:flex;flex-direction:column;font-size:13px;line-height:1.35}
.notif-item .ni-body b{font-size:13.5px}
.notif-item .ni-body small{color:#94a3b8;font-size:11px;margin-top:2px}
.notif-empty{padding:26px 14px;text-align:center;color:#94a3b8;font-size:13px}
.notif-all{display:block;text-align:center;padding:11px;font-size:13px;font-weight:600;border-top:1px solid #eef2f7}

/* ============ Generic modal ============ */
.modal-wrap[hidden]{display:none!important}
.modal-wrap{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;z-index:200;padding:16px}
.modal-card{background:#fff;border-radius:18px;padding:22px;width:440px;max-width:100%;max-height:88vh;overflow-y:auto;box-shadow:0 30px 70px rgba(0,0,0,.4)}
.modal-card h3{margin:0 0 4px}
.modal-x{background:transparent;border:none;font-size:26px;cursor:pointer;color:#64748b;line-height:1}
.ck-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #f1f5f9}
.ck-row small{color:#94a3b8}
.ck-row input{width:20px;height:20px}

/* ============ Contacts list ============ */
.contacts-list{max-height:52vh;overflow-y:auto}
.contact-row{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px}
.contact-row:hover{background:#f8fafc}
.contact-row img,.call-initials.sm{width:44px;height:44px;border-radius:50%;object-fit:cover}
.call-initials{width:120px;height:120px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:44px;font-weight:700}
.call-initials.sm{font-size:16px;width:44px;height:44px}
.cr-info{flex:1;display:flex;flex-direction:column}
.cr-info small{color:#94a3b8}
.cr-actions{display:flex;gap:8px}
.cr-actions button{width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;font-size:16px;background:#e0f2fe}
.cr-actions button:last-child{background:#dcfce7}

/* ============ Call overlay ============ */
.call-wrap{position:fixed;inset:0;background:#0b1220;z-index:300;display:flex;align-items:center;justify-content:center}
.call-stage{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:#fff}
.call-remote{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.call-local{position:absolute;right:18px;top:18px;width:150px;height:200px;object-fit:cover;border-radius:14px;border:2px solid rgba(255,255,255,.5);z-index:2;background:#111}
.call-avatar{z-index:2}
.call-avatar img{width:120px;height:120px;border-radius:50%;object-fit:cover}
.call-meta{z-index:2;text-align:center}
.call-name{font-size:24px;font-weight:700}
.call-sub{color:#cbd5e1;margin-top:4px}
.call-timer{color:#4ade80;font-size:18px;margin-top:6px;font-variant-numeric:tabular-nums}
.call-controls{z-index:3;position:absolute;bottom:40px;display:flex;gap:16px}
.cc-btn{width:62px;height:62px;border-radius:50%;border:none;cursor:pointer;font-size:24px;background:rgba(255,255,255,.16);color:#fff;backdrop-filter:blur(6px);transition:.15s}
.cc-btn:hover{background:rgba(255,255,255,.28)}
.cc-btn.off{background:#f59e0b;color:#0f172a}
.cc-btn.accept{background:#22c55e}
.cc-btn.hangup{background:#ef4444}
@media(max-width:480px){.call-local{width:100px;height:140px}}

/* dark mode */
html.dark .notif-panel,html.dark .modal-card{background:#1e293b;color:#e2e8f0}
html.dark .notif-item{color:#e2e8f0;border-color:#334155}
html.dark .notif-item:hover{background:#0f172a}
html.dark .notif-item.unread{background:#1d3a5f}
html.dark .contact-row:hover{background:#0f172a}
html.dark .ck-row{border-color:#334155}

/* ============ Blog, pages & content (v2) ============ */
.page-hero{background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;padding:64px 0 56px;text-align:center;background-size:cover;background-position:center}
.page-hero.has-img{padding:96px 0}
.page-hero .eyebrow,.eyebrow{display:inline-block;text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:700;color:var(--accent);margin-bottom:12px}
.page-hero h1{font-size:42px;font-weight:800;line-height:1.1;margin:0 auto;max-width:820px}
.page-hero p{color:rgba(255,255,255,.82);font-size:17px;margin:14px auto 0;max-width:640px}

.chip.active{background:var(--primary);border-color:var(--primary);color:#fff}
.blog-cats{justify-content:flex-start;margin-bottom:34px}

.blog-hero{display:grid;grid-template-columns:1.15fr 1fr;gap:0;background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;margin-bottom:40px;transition:.2s;color:inherit}
.blog-hero:hover{box-shadow:0 18px 44px rgba(0,0,0,.12);transform:translateY(-3px)}
.blog-hero-img{background:#e2e8f0;min-height:300px}
.blog-hero-img img{width:100%;height:100%;object-fit:cover;display:block}
.blog-hero-body{padding:34px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.blog-hero-body h2{font-size:28px;font-weight:800;margin:12px 0 12px;line-height:1.2}
.blog-hero-body p{color:var(--muted);margin-bottom:18px}
.read-more{margin-top:6px}

.blog-grid{grid-template-columns:repeat(3,1fr)}
.blog-card .img{display:block;aspect-ratio:16/10;background:#e2e8f0;position:relative}
.blog-card .img-ph{display:flex;align-items:center;justify-content:center;height:100%;color:#94a3b8}
.blog-card h3{font-size:19px;line-height:1.3;margin-bottom:8px}
.blog-card .excerpt{color:var(--muted);font-size:14px;margin-bottom:14px;flex:1}
.read-link{display:inline-flex;align-items:center;gap:4px;font-weight:700;font-size:14px}

.post-meta{display:flex;flex-wrap:wrap;gap:16px;color:var(--muted);font-size:14px;align-items:center}
.post-meta span{display:inline-flex;align-items:center;gap:6px}
.post-meta.foot{justify-content:space-between;margin-top:auto}

.post-header{background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;padding:56px 0 40px}
.post-header .back-link{color:rgba(255,255,255,.85);display:inline-flex;align-items:center;gap:6px;font-size:14px}
.post-header h1{font-size:40px;font-weight:800;line-height:1.15;margin:6px 0 18px}
.post-header .post-meta{color:rgba(255,255,255,.82)}
.post-cover{width:100%;border-radius:var(--radius);margin:-30px 0 8px;box-shadow:0 18px 44px rgba(0,0,0,.18);aspect-ratio:16/8;object-fit:cover}
.post-layout{padding-top:34px}

.share-bar{display:flex;align-items:center;gap:10px;margin:32px 0;padding:18px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);font-weight:600}
.share-bar a{width:38px;height:38px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text);border:1px solid var(--border);transition:.15s}
.share-bar a:hover{color:#fff;transform:translateY(-2px)}
.share-bar a.soc-fb:hover{background:#1877f2;border-color:#1877f2}
.share-bar a.soc-x:hover{background:#000;border-color:#000}
.share-bar a.soc-wa:hover{background:#25d366;border-color:#25d366}
.share-bar a.soc-mail:hover{background:var(--primary);border-color:var(--primary)}

.author-box{display:flex;gap:16px;align-items:center;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:22px;margin-top:8px}
.author-avatar{width:56px;height:56px;flex:none;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800}
.author-box p{color:var(--muted);font-size:14px;margin-top:4px}

.pager{margin-top:36px}
.empty-state{text-align:center;padding:56px 20px;color:var(--muted)}
.empty-state h3{margin:14px 0 6px;color:var(--text)}

/* Contact page */
.contact-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:26px;margin-top:34px}
.contact-info h2,.contact-grid .card-box h2{margin-bottom:18px}
.contact-list{list-style:none;display:flex;flex-direction:column;gap:16px}
.contact-list li a{color:inherit;display:block}
.contact-list li>*,.contact-list li a{display:flex;gap:14px;align-items:center}
.contact-list .ci-ico{width:44px;height:44px;flex:none;border-radius:11px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center}
.contact-list small{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px}

/* Richer prose */
.prose{font-size:17px;line-height:1.75;color:var(--text)}
.prose h2{font-size:26px;font-weight:800;margin:30px 0 12px}
.prose h3{font-size:21px;font-weight:700;margin:24px 0 10px}
.prose p{margin-bottom:16px}
.prose ul,.prose ol{margin:0 0 16px 22px}
.prose li{margin-bottom:8px}
.prose a{color:var(--primary);text-decoration:underline}
.prose img{max-width:100%;border-radius:12px;margin:18px 0}
.prose blockquote{border-left:4px solid var(--accent);background:var(--bg);padding:14px 20px;border-radius:0 10px 10px 0;margin:20px 0;font-style:italic;color:var(--muted)}
.prose hr{border:none;border-top:1px solid var(--border);margin:28px 0}

/* Dark mode additions */
html.dark .blog-hero,html.dark .author-box,html.dark .share-bar a{background:#111827;border-color:#1f2937;color:#e2e8f0}
html.dark .author-box{background:#0f1626}
html.dark .prose{color:#cbd5e1}
html.dark .prose h2,html.dark .prose h3{color:#f1f5f9}
html.dark .prose blockquote{background:#0f1626;color:#94a3b8}
html.dark .chip{background:#111827;border-color:#1f2937;color:#cbd5e1}
html.dark .contact-list small,html.dark .blog-card .excerpt{color:#94a3b8}

/* Responsive */
@media(max-width:860px){
  .blog-hero{grid-template-columns:1fr}
  .blog-grid{grid-template-columns:repeat(2,1fr)}
  .contact-grid{grid-template-columns:1fr}
  .page-hero h1{font-size:32px}
  .post-header h1{font-size:30px}
}
@media(max-width:560px){
  .blog-grid{grid-template-columns:1fr}
}

/* ============ Password visibility toggle ============ */
.pw-wrap{position:relative;display:flex;align-items:center}
.pw-wrap input{width:100%;padding-right:46px}
.pw-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;color:var(--muted);padding:6px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;line-height:0}
.pw-toggle:hover{color:var(--text);background:rgba(0,0,0,.05)}
.pw-toggle .pw-eye-off{display:none}
.pw-toggle.revealed .pw-eye{display:none}
.pw-toggle.revealed .pw-eye-off{display:inline-block}
html.dark .pw-toggle:hover{background:rgba(255,255,255,.08)}

/* ============ Avatar / profile picture ============ */
.avatar-edit{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.avatar-preview{display:inline-flex;align-items:center;justify-content:center;width:88px;height:88px;border-radius:50%;overflow:hidden;background:var(--primary,#1e3a8a);color:#fff;flex:0 0 auto;border:2px solid var(--border)}
.avatar-preview.sm{width:40px;height:40px}
.avatar-preview img{width:100%;height:100%;object-fit:cover;display:block}
.avatar-initials{font-weight:700;font-size:1.6rem;letter-spacing:1px;text-transform:uppercase}
.avatar-preview.sm .avatar-initials{font-size:.9rem}
.avatar-actions{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.acct-nav .acct-me{border-radius:10px;background:rgba(0,0,0,.03);margin-bottom:6px}
.acct-nav .acct-me:hover{background:rgba(0,0,0,.06)}
html.dark .acct-nav .acct-me{background:rgba(255,255,255,.05)}

/* ============ Insecure-context (HTTPS required) notice ============ */
.insecure-notice{align-items:flex-start;gap:12px;background:#fff7ed;border:1px solid #fed7aa;border-left:4px solid #f97316;color:#7c2d12;border-radius:10px;padding:14px 16px;margin-bottom:16px;font-size:.9rem;line-height:1.5}
.insecure-notice__icon{font-size:1.3rem;line-height:1}
.insecure-notice code{background:rgba(124,45,18,.1);padding:1px 5px;border-radius:4px;font-size:.85em}
html.dark .insecure-notice{background:#3a2410;border-color:#7c3a12;color:#fed7aa}

/* ===== Fix: language switcher usable on phones ===== */
/* The topline used to wrap, dropping the language switcher to the far left and
   making its dropdown hard to read. On phones: hide the phone/email links
   (they stay in the footer + contact page) and keep the controls right-aligned. */
.lang-switch>ul{max-height:min(70vh,430px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:700px){
    .topcontact{display:none}
    .topline .container{flex-wrap:nowrap;justify-content:flex-end;gap:10px}
    .topline .container>div:last-child{flex-wrap:wrap;justify-content:flex-end;gap:4px 12px}
    .lang-switch>button{padding:6px 8px;font-size:14px}
    .lang-switch>ul{min-width:185px;max-width:calc(100vw - 24px)}
}

/* ===== PWA install banner ===== */
.pwa-banner{position:fixed;left:12px;right:12px;bottom:12px;z-index:95;background:#0b1120;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:13px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 12px 32px rgba(0,0,0,.4)}
.pwa-banner[hidden]{display:none}
.pwa-banner .txt{flex:1;min-width:0;font-size:13px;line-height:1.5;color:#cbd5e1}
.pwa-banner .txt strong{display:block;color:#fff;font-size:14px;margin-bottom:2px}
.pwa-banner .go{flex:none;background:var(--primary,#1e3a8a);color:#fff;border:0;border-radius:9px;padding:11px 18px;font-weight:700;font-size:14px;cursor:pointer}
.pwa-banner .go[hidden]{display:none}
.pwa-banner .x{flex:none;background:transparent;border:0;color:#94a3b8;font-size:20px;line-height:1;cursor:pointer;padding:4px 8px}


/* ===== v3: install button glows when the native install prompt is ready ===== */
.install-btn.ready{animation:maReadyPulse 1.8s ease-out 3}
@keyframes maReadyPulse{0%{box-shadow:0 0 0 0 rgba(30,58,138,.55)}100%{box-shadow:0 0 0 16px rgba(30,58,138,0)}}
html.dark .install-btn.ready{animation-name:maReadyPulseDark}
@keyframes maReadyPulseDark{0%{box-shadow:0 0 0 0 rgba(96,165,250,.55)}100%{box-shadow:0 0 0 16px rgba(96,165,250,0)}}


/* ===== v3.1: language switcher pinned to the RIGHT EDGE on phones ===== */
/* order:99 makes it the last (rightmost) control in the top bar, so its
   dropdown — anchored to its right edge — can never spill off-screen. */
@media(max-width:700px){
    .topline .container>div:last-child>.lang-switch{order:99}
    .lang-switch>ul{min-width:min(185px,calc(100vw - 24px))}
}

/* ===== v3.1: install button must sit ABOVE the cookie bar, never under it ===== */
.install-btn{transition:bottom .25s}
