:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --border: #e2e6ea;
    --text: #1f2937;
    --muted: #6b7280;
    --accent: #1b6ec2;
    --accent-dark: #155a9e;
    --green: #4caf50;
    --yellow: #ffc107;
    --red: #f44336;
    --amber: #f59e0b;
    --blue: #2563eb;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100%;
}

/* ===== App shell ===== */
.app-shell { display: flex; flex-direction: column; height: 100vh; }
.app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 0 16px; height: 48px; flex: 0 0 auto;
}
.brand { font-weight: 700; font-size: 17px; }
.brand span { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip { color: var(--muted); font-size: 14px; }
.logout-link { color: var(--accent); text-decoration: none; font-size: 14px; }
.logout-link:hover { text-decoration: underline; }
.app-body { flex: 1 1 auto; min-height: 0; }

/* ===== Console layout ===== */
.console { display: grid; grid-template-columns: 340px 1fr; height: 100%; position: relative; transition: grid-template-columns .18s ease; }
.console.collapsed { grid-template-columns: 44px 1fr; }
.sidebar { overflow: hidden; min-height: 0; border-right: 1px solid var(--border); background: #fafbfc; }
.session-list { background: #fafbfc; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
.session-detail-host { min-width: 0; min-height: 0; overflow: hidden; }

/* sklopljeni panel = uska traka s okomitim natpisom „WhatsApp upiti" + brojač otvorenih sesija */
.session-rail {
    width: 44px; height: 100%; border: none; cursor: pointer; background: #fafbfc;
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0;
    color: var(--muted);
}
.session-rail:hover { background: #eef3f8; color: var(--accent); }
.rail-icon { font-size: 18px; }
.rail-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
    color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rail-label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--text);
    margin-top: 4px; user-select: none;
}
.session-rail.has-new .rail-badge { animation: pulse 1s ease-in-out infinite; }
.list-header-btns { display: flex; align-items: center; gap: 2px; }

/* balon notifikacije — usidren uz WhatsApp sidebar, strelica pokazuje na njega */
.wa-bubble {
    position: absolute; top: 58px; z-index: 1200;
    display: flex; align-items: center; gap: 10px; text-align: left;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.20);
    cursor: pointer; max-width: 250px; animation: bubble-in .28s ease;
}
.wa-bubble.rail { left: 54px; }   /* sidebar sklopljen (uska traka) */
.wa-bubble.list { left: 352px; }  /* sidebar otvoren (lista) */
.wa-bubble:hover { background: #f7fbff; }
.wa-bubble-arrow { position: absolute; left: -8px; top: 16px; width: 0; height: 0;
    border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 8px solid #fff;
    filter: drop-shadow(-1px 0 0 var(--border)); }
.toast-bell { font-size: 18px; }
.toast-body { display: flex; flex-direction: column; }
.toast-title { font-size: 12px; color: var(--muted); }
.toast-name { font-weight: 700; font-size: 14px; }
@keyframes bubble-in { from { transform: translateX(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

.list-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.conn { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.conn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.conn.ok .dot { background: var(--green); }
.conn.down { color: var(--red); }

.filter-row { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.chip { border: 1px solid var(--border); background: #fff; border-radius: 14px; padding: 3px 12px; font-size: 13px; cursor: pointer; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.list-scroll { overflow-y: auto; flex: 1 1 auto; }
.empty, .detail-empty, .muted { color: var(--muted); padding: 16px; }
.detail-empty { display: flex; align-items: center; justify-content: center; height: 100%; }

.sess-card { padding: 10px 12px; border-bottom: 1px solid var(--border); border-left: 6px solid transparent; cursor: pointer; }
.sess-card.open { background: #bfe8c9; border-left-color: #1f8a3b; }
.sess-card.closed { background: #f3b6af; border-left-color: #c0291a; }
.sess-card:hover { filter: brightness(0.96); }
.sess-card.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.sess-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sess-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-veh { font-size: 13px; color: var(--text); margin-top: 2px; }
.sess-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== Badges ===== */
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-weight: 600; }
.b-amber { background: #fef3c7; color: #92400e; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-green { background: #dcfce7; color: #166534; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-gray { background: #e5e7eb; color: #374151; }

/* ===== Detail grid ===== */
/* lijevi panel (razgovor+akcije): 368px (−20% od ranijih 460px); sklopljeno = uska traka */
.detail-grid { display: grid; grid-template-columns: 368px 1fr; height: 100%; min-height: 0; transition: grid-template-columns .18s ease; }
.detail-grid.chat-collapsed { grid-template-columns: 44px 1fr; }
.chat-col { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-right: 1px solid var(--border); min-height: 0; background: var(--bg); }
.work-col { overflow-y: auto; padding: 12px; min-height: 0; }

/* sklopljeni lijevi panel = uska okomita traka */
.chat-rail { border-right: 1px solid var(--border); background: #fafbfc; min-height: 0; }
.chat-rail-btn { width: 44px; height: 100%; border: none; cursor: pointer; background: #fafbfc; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; color: var(--muted); }
.chat-rail-btn:hover { background: #eef3f8; color: var(--accent); }
.chat-rail-btn .rail-icon { font-size: 18px; }
.chat-rail-btn .rail-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--text); user-select: none; }

/* dugme za sakrivanje u zaglavlju razgovora */
.wa-head-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wa-collapse { border: none; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; border-radius: 4px; font-size: 15px; line-height: 1; padding: 2px 8px; }
.wa-collapse:hover { background: rgba(255,255,255,.34); }

/* WhatsApp okviri (konverzacija + dopune) — zaobljene kartice sa zelenim zaglavljem */
.wa-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.07); display: flex; flex-direction: column; }
.wa-conv { flex: 1 1 0; min-height: 200px; }          /* konverzacija ~60% slobodnog prostora */
.wa-note { flex: 0.7 1 0; min-height: 110px; }        /* dopuna ~30% manja od konverzacije */
.wa-actions { flex: 0 0 auto; }                        /* akcije: visina po sadržaju */
.wa-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; background: #075e54; color: #fff; padding: 9px 13px; }
.wa-head-note { background: #0b7a6e; }
.wa-head-actions { background: #455a64; }

/* okvir akcija — dugmad vertikalno, puna širina */
.action-stack { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.action-stack > button { width: 100%; padding: 9px 12px; font-size: 13px; }
.wa-head-main { display: flex; flex-direction: column; min-width: 0; }
.wa-title { font-weight: 700; font-size: 14px; }
.wa-sub { font-size: 12px; color: #bfe0d7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-warn { font-size: 11px; color: #ffe08a; margin-top: 1px; }

.thread { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #ece5dd; }
.bubble { max-width: 78%; padding: 7px 10px; border-radius: 10px; font-size: 14px; }
.bubble.in { align-self: flex-start; background: #fff; border: 1px solid var(--border); }
.bubble.out { align-self: flex-end; background: #dcf8c6; }
.bubble.note { align-self: flex-end; background: #fff7d6; border: 1px dashed #e0c200; }
.bubble-author { font-size: 11px; color: var(--muted); margin-bottom: 2px; display: flex; justify-content: space-between; gap: 8px; }
.bubble-text { white-space: pre-wrap; word-break: break-word; }
.bubble-time { font-size: 10px; color: var(--muted); text-align: right; margin-top: 2px; }
.bubble-img { max-width: 220px; border-radius: 6px; cursor: pointer; display: block; }
.note-x { border: none; background: none; color: var(--red); cursor: pointer; font-size: 11px; }
.ai-indicator { align-self: center; color: var(--accent); font-style: italic; padding: 6px; display: flex; align-items: center; gap: 7px; }

.composer { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); }
.composer textarea, .reply-box { width: 100%; resize: vertical; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 14px; }
.composer-actions { display: flex; justify-content: flex-end; }
.note-composer { display: flex; gap: 6px; align-items: center; padding: 10px 12px; }
.note-composer input { flex: 1 1 auto; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.note-result { font-size: 12px; color: var(--muted); }

/* ===== Buttons ===== */
.btn, .btn-sec, .btn-primary, .btn-danger, .btn-ai { border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: #fff; }
.btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { background: var(--accent-dark); }
.btn-primary { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-primary:hover { background: #15803d; }
.btn-ai { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3b4b4; }
.btn-danger:hover { background: #fee2e2; }
.btn-sec:hover { background: #f0f4f8; }
.btn:disabled, .btn-sec:disabled, .btn-primary:disabled, .btn-danger:disabled, .btn-ai:disabled { opacity: .5; cursor: default; }
.btn-icon { border: none; background: none; cursor: pointer; font-size: 16px; color: var(--muted); }
.btn-link { border: none; background: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-x { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.btn-x:hover { color: var(--red); }

/* ===== Panels ===== */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; padding: 10px 12px; }
.panel-head { font-weight: 600; margin-bottom: 8px; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reply-actions { display: flex; justify-content: space-between; margin-top: 6px; }
.send-status { background: #eef6ff; color: var(--accent-dark); padding: 6px 10px; border-radius: 6px; margin-bottom: 10px; font-size: 13px; }

.alert { font-size: 13px; padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; }
.alert-high { background: #fee2e2; color: #991b1b; }
.alert-medium { background: #fef3c7; color: #92400e; }
.alert-low { background: #e0f2fe; color: #075985; }

/* ===== Objedinjeni panel: Vozila | Prijedlog (vodoravno) ===== */
.combo-panel { border: none; background: transparent; padding: 0; }
.combo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.combo-col { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 1180px) { .combo-grid { grid-template-columns: 1fr; gap: 12px; } }

/* zaobljene sekcije s obojenim zaglavljem (u stilu ostatka sucelja) */
.section-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.07); display: flex; flex-direction: column; }
.section-head { background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; padding: 9px 14px; position: relative; overflow: hidden; }
.section-body { padding: 12px; display: flex; flex-direction: column; position: relative; }

/* ===== AI obrada — efektna animacija ===== */
/* pokretni preljev preko zaglavlja dok AI radi */
.section-card.ai-working .section-head { background: linear-gradient(90deg, #1b6ec2, #7c3aed, #1b6ec2); background-size: 200% 100%; animation: ai-head-flow 2s linear infinite; }
@keyframes ai-head-flow { from { background-position: 0% 0; } to { background-position: 200% 0; } }

/* prekrivač s pulsirajucim „orbom" i shimmer sweepom */
.ai-overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); overflow: hidden; }
.ai-overlay::before { content: ''; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(124,58,237,.14) 50%, transparent 65%);
    background-size: 220% 100%; animation: ai-sweep 1.3s linear infinite; }
@keyframes ai-sweep { from { background-position: 220% 0; } to { background-position: -220% 0; } }
.ai-orb { width: 48px; height: 48px; border-radius: 50%; z-index: 1;
    background: radial-gradient(circle at 34% 30%, #8b5cf6 0%, #1b6ec2 75%);
    animation: ai-orb-pulse 1.4s ease-in-out infinite; }
@keyframes ai-orb-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124,58,237,.45); }
    50% { transform: scale(1.12); box-shadow: 0 0 0 16px rgba(124,58,237,0); }
}
.ai-overlay-text { z-index: 1; font-weight: 600; color: #4c1d95; display: inline-flex; align-items: center; gap: 6px; }
.ai-overlay-text .thinking-dots i { background: #7c3aed; }

/* vozilo kao stavka: opis + „Promijeni vozilo" desno, padajuća lista varijanti, VIN red */
.veh-item { border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; background: #fbfcfd; }
.veh-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.veh-item-desc { font-weight: 600; font-size: 13px; }
.veh-item-act { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.veh-select { width: 100%; margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13px; background: #fff; cursor: pointer; }

/* animacija „razmišljanja" za vrijeme AI obrade */
.thinking { display: flex; align-items: center; gap: 8px; color: var(--accent); font-style: italic; font-size: 13px; padding: 4px 0 10px; }
.thinking-brain { font-size: 18px; display: inline-block; animation: think-pulse 1.4s ease-in-out infinite; }
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; animation: think-bounce 1.2s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .2s; }
.thinking-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes think-pulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes think-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }

/* ===== Vehicles (legacy kartica — i dalje korištena drugdje) ===== */
.veh-card { border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin-bottom: 6px; }
.veh-desc { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.veh-status { font-size: 11px; color: var(--muted); font-weight: 400; }
.veh-vin-row { display: flex; gap: 6px; margin-top: 6px; }
.veh-vin-row input { flex: 1 1 auto; border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.candidates { margin-top: 8px; }
.cand-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cand { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 4px; cursor: pointer; font-size: 13px; }
.cand:hover { background: #f0f4f8; }
.cand.sel { background: #e7f0fa; border-color: var(--accent); }

/* ===== Parts ===== */
.parts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.instock-toggle { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* „Samo na stanju" ispod „Dodaj dio", desno poravnato (caption lijevo, checkbox desno) */
.instock-foot { display: flex; justify-content: flex-end; margin: -2px 0 10px; }
.add-part-row { display: flex; gap: 6px; margin-bottom: 10px; }
.add-part-row input { border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.add-part-row input:first-child { flex: 1 1 auto; }

/* napomena: BEZ overflow:hidden — inace bi rezalo hover-karticu sa stanjem po skladistima */
.group { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.group-head { display: flex; justify-content: space-between; align-items: center; background: var(--accent); color: #fff; padding: 7px 11px; border-radius: 8px 8px 0 0; }
.group-head .btn-link { color: #fff; text-decoration: underline; }
.group-head .btn-link:hover { color: #e6f0fa; }
.group-title { font-weight: 600; font-size: 13px; }
.part { border-top: 1px solid var(--border); padding: 6px 10px; }
.part-head { display: flex; align-items: center; gap: 8px; }
.part-name { font-weight: 600; font-size: 13px; }
.part-qty { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.part-status { font-size: 11px; color: var(--muted); margin-left: auto; }

/* uredljiva tražena količina (lokalno; samo preračuna semafor, ne perzistira — kao WPF) */
.qty-input { width: 38px; text-align: center; border: 1px solid #9fa8da; border-radius: 4px; background: #eef2ff; color: #3949ab; font-weight: 600; font-size: 12px; padding: 1px 2px; }

/* nosioci — poravnata tablica. .carrier = display:contents pa ćelije dijele kolone grida */
.carriers {
    display: grid;
    grid-template-columns: 22px 16px minmax(70px,130px) minmax(70px,1fr) auto auto auto auto;
    column-gap: 10px; row-gap: 3px;
    align-items: center;
    padding: 4px 10px 8px 10px;
    font-size: 13px;
}
.carrier { display: contents; }
.car-sel { margin: 0; cursor: pointer; }
.sem-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.sem-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.sem-green { background: var(--green); }
.sem-yellow { background: var(--yellow); }
.sem-red { background: var(--red); }
.car-brand { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-art { font-family: 'Consolas','Cascadia Mono',monospace; }
.car-oe { color: var(--muted); font-size: 12px; white-space: nowrap; }
.car-stock { font-size: 12px; color: var(--muted); justify-self: end; padding: 2px 8px; border-radius: 4px; background: #eeeeee; white-space: nowrap; }
.car-stock.in { background: #e8f5e9; color: #166534; font-weight: 600; }
.car-price { font-size: 12px; font-weight: 700; color: #e65100; justify-self: end; padding: 2px 8px; border-radius: 4px; background: #fff8e1; border: 1px solid #ffb300; white-space: nowrap; }
.car-price:empty { background: none; border: none; padding: 0; }
.car-actions { display: flex; align-items: center; gap: 6px; justify-self: end; }

/* hover-kartica: stanje po skladištima (zamjena za WPF ToolTip) */
.sem-tip {
    display: none; position: absolute; top: 15px; left: -4px; z-index: 50;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 8px 10px; min-width: 220px;
}
.sem-wrap:hover .sem-tip { display: block; }
.sem-tip-head { font-weight: 700; font-size: 11px; display: block; margin-bottom: 6px; }
.sem-tip-row { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 8px; font-size: 12px; padding: 1px 0; }
.sem-tip-wh { color: var(--text); white-space: nowrap; }
.sem-tip-qty { color: var(--muted); }

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.vehicle-picker { width: 560px; }
.image-modal { width: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.modal-body { padding: 12px 14px; overflow-y: auto; }
.modal-foot { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.image-body img { max-width: 80vw; max-height: 70vh; display: block; }
.picker-filter { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; margin: 8px 0; font-size: 14px; }
.picker-list { max-height: 50vh; overflow-y: auto; }
.picker-item { padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.picker-item:hover { background: #f0f4f8; }
.picker-item .ktype { margin-left: auto; font-size: 11px; color: var(--muted); }

/* ===== Login ===== */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 28px 32px; width: 340px; box-shadow: 0 8px 30px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.login-title { font-size: 22px; margin: 0 0 2px; }
.login-title span { color: var(--accent); }
.login-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.login-card label { font-size: 13px; color: var(--muted); margin: 8px 0 3px; }
.login-card input { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.login-card button { margin-top: 18px; background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 9px; font-size: 15px; cursor: pointer; }
.login-card button:hover { background: var(--accent-dark); }
.login-error { background: #fee2e2; color: #991b1b; padding: 8px 10px; border-radius: 6px; font-size: 13px; margin-bottom: 8px; }

#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: 0.6rem 1.25rem; position: fixed; width: 100%; z-index: 1100; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
