/* ============================================================
   Huminic Motors — Customer Portal + Dealer Login styles (v2)
   Loaded AFTER site.css; reuses its tokens/components (.hdr, .btn,
   .ai-strip, .eyebrow, etc). Crimson dark theme.
   ============================================================ */

body.portal { padding-top:98px; }
body.portal .hdr { background:rgba(10,10,11,.9); backdrop-filter:blur(12px); border-bottom:1px solid var(--line-soft); }
.portal-section { padding:22px 0; }
.portal-section + .portal-section { padding-top:8px; }
.p-eyebrow { font-family:var(--head); font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); margin-bottom:14px; }

/* ---- welcome + weather ---- */
.welcome { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; padding:20px 0 6px; }
.welcome h1 { font-size:clamp(1.9rem,4.2vw,3rem); text-transform:none; }
.welcome .hello-sub { color:var(--muted); margin-top:6px; }
.weather { display:inline-flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--line-soft); border-radius:12px; padding:14px 20px; }
.weather .wico { width:38px; height:38px; color:#f5b93b; flex:none; animation:sunspin 26s linear infinite; }
@keyframes sunspin { to { transform:rotate(360deg); } }
.weather .wtemp { font-family:var(--head); font-size:1.6rem; font-weight:600; color:#fff; line-height:1; }
.weather .wmeta { font-size:.8rem; color:var(--muted); margin-top:3px; }

/* ---- new-model banner ---- */
.newmodel { position:relative; overflow:hidden; border-radius:12px; border:1px solid rgba(184,32,28,.4);
  background:linear-gradient(120deg, rgba(184,32,28,.24), rgba(21,21,23,.5)); padding:26px 28px;
  display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; margin:14px 0 6px; }
.newmodel .nm-copy { max-width:62ch; }
.newmodel .nm-tag { display:inline-flex; align-items:center; gap:9px; font-family:var(--head); font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color:#e0855d; margin-bottom:10px; }
.newmodel .nm-tag .spark { width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(184,32,28,.25); animation:pulse 2s infinite; }
.newmodel h3 { text-transform:none; font-size:1.42rem; color:#fff; margin-bottom:6px; }
.newmodel p { color:rgba(255,255,255,.82); font-size:.95rem; }
.newmodel .nm-weather { display:inline-flex; align-items:center; gap:7px; margin-top:12px; font-size:.85rem; color:#f5b93b; font-family:var(--head); }
.newmodel .nm-weather svg { width:16px; height:16px; }
.newmodel .nm-cta { flex:none; }

/* ---- generic portal card ---- */
.pcard { background:var(--surface); border:1px solid var(--line-soft); border-radius:12px; padding:clamp(20px,3vw,28px); }
.pcard > h3 { text-transform:uppercase; font-size:1.02rem; margin-bottom:16px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pcard .edit { color:var(--muted); cursor:pointer; display:inline-grid; place-items:center; width:32px; height:32px; border-radius:7px; border:1px solid var(--line-soft); transition:.2s; }
.pcard .edit:hover { color:#fff; border-color:#fff; }
.pcard .edit svg { width:15px; height:15px; }
.portal-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }

/* ---- profile ---- */
.pf-row { display:flex; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid var(--line-soft); }
.pf-row:last-child { border-bottom:none; }
.pf-ico { width:38px; height:38px; border-radius:9px; background:var(--bg); display:grid; place-items:center; color:var(--accent); flex:none; }
.pf-ico svg { width:17px; height:17px; }
.pf-main { flex:1; min-width:0; }
.pf-k { font-size:.72rem; color:var(--muted-2); text-transform:uppercase; letter-spacing:.06em; font-family:var(--head); }
.pf-v { font-size:1rem; color:#fff; margin-top:2px; }
.pf-v input { font-family:var(--body); font-size:1rem; padding:8px 10px; border-radius:6px; background:var(--bg); border:1px solid var(--line); color:#fff; width:100%; }

/* ---- preferences ---- */
.pref { position:relative; display:flex; align-items:flex-start; gap:13px; padding:15px 0; border-bottom:1px solid var(--line-soft); cursor:pointer; }
.pref:last-of-type { border-bottom:none; }
.pref input { position:absolute; opacity:0; width:0; height:0; }
.pref .box { width:22px; height:22px; border-radius:6px; border:1px solid var(--line); flex:none; display:grid; place-items:center; transition:.2s; margin-top:1px; }
.pref .box svg { width:14px; height:14px; color:#fff; opacity:0; transform:scale(.6); transition:.2s; }
.pref input:checked + .box { background:var(--accent); border-color:var(--accent); }
.pref input:checked + .box svg { opacity:1; transform:none; }
.pref .pref-t { font-family:var(--head); color:#fff; font-size:.98rem; }
.pref .pref-d { font-size:.84rem; color:var(--muted); margin-top:2px; }
.pref-save { margin-top:18px; }

/* ---- milestones timeline ---- */
.timeline { position:relative; padding-left:28px; margin-top:4px; }
.timeline::before { content:""; position:absolute; left:7px; top:6px; bottom:6px; width:2px; background:var(--line); }
.mile { position:relative; padding:0 0 22px; }
.mile:last-child { padding-bottom:0; }
.mile::before { content:""; position:absolute; left:-28px; top:2px; width:16px; height:16px; border-radius:50%; background:var(--bg); border:2px solid var(--accent); box-sizing:border-box; }
.mile.done::before { background:var(--accent); }
.mile.up::before { border-color:#f5b93b; background:var(--bg); }
.mile .m-date { font-family:var(--head); font-size:.74rem; color:var(--muted-2); text-transform:uppercase; letter-spacing:.05em; }
.mile.up .m-date { color:#f5b93b; }
.mile .m-title { font-family:var(--head); color:#fff; font-size:1rem; margin-top:2px; }
.mile .m-note { font-size:.85rem; color:var(--muted); margin-top:2px; }

/* ---- my vehicle ---- */
.myveh { display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.myveh img { width:200px; aspect-ratio:16/11; object-fit:cover; border-radius:9px; flex:none; }
.myveh .mv-info { flex:1; min-width:190px; }
.myveh .mv-name { font-family:var(--head); font-size:1.35rem; text-transform:uppercase; color:#fff; }
.myveh .mv-sub { font-size:.86rem; color:var(--muted); margin-top:3px; }
.myveh .mv-specs { display:grid; grid-template-columns:1fr 1fr; gap:10px 20px; margin-top:16px; }
.myveh .mv-specs .k { font-size:.72rem; color:var(--muted-2); text-transform:uppercase; letter-spacing:.05em; font-family:var(--head); }
.myveh .mv-specs b { color:#fff; font-family:var(--head); font-weight:600; display:block; font-size:.98rem; }

/* ---- resources: manuals + videos ---- */
.res-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
.manual { display:flex; align-items:center; gap:13px; background:var(--bg); border:1px solid var(--line-soft); border-radius:9px; padding:14px 16px; transition:.2s var(--ease); }
.manual:hover { border-color:var(--accent); transform:translateY(-2px); }
.manual .m-ic { width:36px; height:36px; border-radius:8px; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; flex:none; }
.manual .m-ic svg { width:17px; height:17px; }
.manual .m-t { font-family:var(--head); font-size:.9rem; color:#fff; }
.manual .m-s { font-size:.75rem; color:var(--muted-2); margin-top:1px; }
.video-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.video { display:block; background:var(--bg); border:1px solid var(--line-soft); border-radius:9px; overflow:hidden; transition:.2s var(--ease); }
.video:hover { border-color:var(--accent); transform:translateY(-3px); }
.video .v-thumb { position:relative; aspect-ratio:16/9; background:#000; overflow:hidden; }
.video .v-thumb img { width:100%; height:100%; object-fit:cover; opacity:.88; transition:.3s; }
.video:hover .v-thumb img { opacity:1; transform:scale(1.04); }
.video .v-play { position:absolute; inset:0; display:grid; place-items:center; }
.video .v-play span { width:50px; height:50px; border-radius:50%; background:rgba(184,32,28,.92); display:grid; place-items:center; box-shadow:0 8px 24px rgba(0,0,0,.5); }
.video .v-play svg { width:20px; height:20px; color:#fff; margin-left:3px; }
.video .v-t { padding:12px 14px 4px; font-family:var(--head); font-size:.86rem; color:#fff; line-height:1.32; }
.video .v-ch { padding:0 14px 13px; font-size:.75rem; color:var(--muted-2); }

/* ---- schedule service form ---- */
.svc-form { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.svc-form .full { grid-column:1/-1; }
.svc-form label { display:block; font-family:var(--head); font-size:.8rem; color:var(--muted); margin-bottom:6px; }
.svc-form input, .svc-form select { width:100%; font-family:var(--body); font-size:.95rem; padding:12px 13px; border-radius:6px; background:var(--bg); border:1px solid var(--line); color:#fff; }
.svc-form input:focus, .svc-form select:focus { outline:none; border-color:var(--accent); }

/* ---- portal toast ---- */
.portal-toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px); z-index:250; background:#151517; border:1px solid var(--line); border-left:3px solid #3fbf6a; border-radius:9px; padding:14px 20px; color:#fff; font-family:var(--head); font-size:.9rem; box-shadow:0 16px 40px rgba(0,0,0,.5); opacity:0; transition:.3s var(--ease); display:flex; align-items:center; gap:10px; pointer-events:none; }
.portal-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.portal-toast svg { width:18px; height:18px; color:#3fbf6a; flex:none; }

@media (max-width:820px){ .portal-grid, .svc-form { grid-template-columns:1fr; } .myveh img { width:100%; } }

/* ============================================================ DEALER LOGIN PAGE */
.login-wrap { min-height:100vh; display:grid; place-items:center; padding:120px 20px 60px; position:relative; }
.login-wrap::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(rgba(10,10,11,.86),rgba(10,10,11,.96)), url('/img/vehicles/showroom.jpg') center/cover; }
.login-card { width:100%; max-width:430px; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:38px 34px; box-shadow:0 30px 80px rgba(0,0,0,.5); }
.login-card .lc-eyebrow { font-family:var(--head); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--accent); margin-bottom:12px; }
.login-card h2 { text-transform:uppercase; font-size:1.6rem; margin-bottom:6px; }
.login-card .sub { color:var(--muted); font-size:.9rem; margin-bottom:24px; }
.login-card label { display:block; font-family:var(--head); font-size:.8rem; color:var(--muted); margin-bottom:6px; }
.login-card input { width:100%; font-family:var(--body); font-size:.95rem; padding:13px 14px; border-radius:7px; background:var(--bg); border:1px solid var(--line); color:#fff; margin-bottom:16px; }
.login-card input:focus { outline:none; border-color:var(--accent); }
.login-card .lc-note { font-size:.78rem; color:var(--muted-2); margin-top:16px; text-align:center; }
.login-card .lc-note a { color:var(--accent); }
/* dealer preview nav used by the tutorial */
.dealer-nav { position:fixed; top:0; left:0; right:0; z-index:60; display:flex; align-items:center; gap:26px; padding:14px var(--pad); background:rgba(10,10,11,.9); backdrop-filter:blur(12px); border-bottom:1px solid var(--line-soft); }
.dealer-nav .dn-brand { font-family:var(--head); font-weight:700; color:#fff; text-transform:uppercase; letter-spacing:.02em; margin-right:auto; display:inline-flex; align-items:center; gap:10px; }
.dealer-nav .dn-brand .m { width:26px; height:26px; border-radius:6px; background:var(--accent); display:grid; place-items:center; color:#fff; }
.dealer-nav .dn-brand .m svg { width:16px; height:16px; }
.dealer-nav a { font-family:var(--head); font-size:.9rem; color:var(--muted); transition:color .2s; }
.dealer-nav a:hover { color:#fff; }
@media (max-width:720px){ .dealer-nav a.dn-hide { display:none; } }
