/* ============================================================
   keymode CLIENT PORTAL — Design System v2
   Einbinden: <link rel="stylesheet" href="/client/km-client.css">
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #07071a;
    --bg2:       #0c0c22;
    --surface:   rgba(255,255,255,.03);
    --surface2:  rgba(255,255,255,.055);
    --border:    rgba(255,255,255,.07);
    --border-h:  rgba(167,138,249,.22);
    --text:      #ece9f8;
    --muted:     rgba(255,255,255,.62);
    --dim:       rgba(255,255,255,.42);
    --purple:    #c4b5fd;
    --purple-s:  #a78af9;
    --cyan:      #22d3ee;
    --green:     #34d399;
    --amber:     #fbbf24;
    --red:       #fb7185;
    --r:         14px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(109,40,217,.18), transparent),
        radial-gradient(ellipse 45% 55% at 95% 85%, rgba(13,202,240,.07), transparent);
}

/* ── Navigation ─────────────────────────────────────────── */
.km-nav {
    background: rgba(7,7,26,.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(196,181,253,.09);
    padding: .85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 200;
    gap: 1rem;
}
.km-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
}
.km-logo img {
    width: 300px;
    max-width: 80vw;
    height: auto;
    display: block;
}
.km-nav-links { display: flex; gap: .15rem; align-items: center; flex-wrap: wrap; }
.km-link {
    color: var(--muted);
    text-decoration: none;
    font-size: .79rem;
    font-weight: 500;
    padding: .38rem .72rem;
    border-radius: 8px;
    transition: color .18s, background .18s;
    white-space: nowrap;
    letter-spacing: .01em;
}
.km-link:hover { color: rgba(255,255,255,.88); background: rgba(255,255,255,.06); }
.km-link.active { color: var(--purple); background: rgba(196,181,253,.1); }
.km-link.live-link { color: var(--red) !important; background: rgba(251,113,133,.1) !important; }
.km-link.live-link:hover { background: rgba(251,113,133,.18) !important; }

/* ── Subnav ──────────────────────────────────────────────── */
.km-subnav {
    display: flex;
    justify-content: center;
    padding: 1.1rem 1.5rem .4rem;
}
.km-subnav-inner {
    display: flex;
    gap: .2rem;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(196,181,253,.1);
    border-radius: 14px;
    padding: .3rem;
    flex-wrap: wrap;
    justify-content: center;
    backdrop-filter: blur(12px);
}

/* ── Layout ──────────────────────────────────────────────── */
.km-main    { max-width: 980px; margin: 0 auto; padding: 2rem 1.5rem; }
.km-main-sm { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; }
.km-main-xs { max-width: 580px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Page Title ───────────────────────────────────────────── */
.page-hd { margin-bottom: 2rem; }
.page-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.045em;
    background: linear-gradient(135deg, #fff 55%, rgba(196,181,253,.75) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: .3rem;
}
.page-sub  { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.page-desc { font-size: .8rem; color: var(--muted); margin: .5rem 0 0; line-height: 1.55; }

/* ── Event Hero ───────────────────────────────────────────── */
.event-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(109,40,217,.16) 0%, rgba(13,202,240,.07) 100%);
    border: 1px solid rgba(196,181,253,.18);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 60px rgba(109,40,217,.08), inset 0 1px 0 rgba(255,255,255,.06);
}
.event-hero::before {
    content: '';
    position: absolute;
    top: -60%; right: -15%;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(196,181,253,.1) 0%, transparent 70%);
    pointer-events: none;
}
.event-hero::after {
    content: '';
    position: absolute;
    bottom: -40%; left: -5%;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(34,211,238,.07) 0%, transparent 70%);
    pointer-events: none;
}
.hero-eyebrow {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--purple-s);
    margin-bottom: .5rem;
}
.hero-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1.08;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, #fff 50%, rgba(196,181,253,.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; position: relative; z-index: 1; }
.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
    border-radius: 100px; padding: .28rem .75rem;
    font-size: .73rem; color: rgba(255,255,255,.58); font-weight: 500;
    transition: all .2s;
}
.chip-planned { background: rgba(13,202,240,.1);  border-color: rgba(13,202,240,.2);  color: var(--cyan); }
.chip-active  { background: rgba(52,211,153,.1);  border-color: rgba(52,211,153,.2);  color: var(--green); }
.chip-done    { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); color: var(--dim); }
.chip-armed   { background: rgba(196,181,253,.1);  border-color: rgba(196,181,253,.2);  color: var(--purple); }
.chip-link    { text-decoration: none; cursor: pointer; }
.chip-link:hover { background: rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
.chip-link-hint { color: var(--purple, #a78af9); font-weight: 700; }

/* ── KPI Grid ────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px,1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.kpi-card {
    background: rgba(255,255,255,.028);
    border: 1px solid var(--border);
    border-top: 2px solid var(--kc, var(--purple-s));
    border-radius: 0 0 var(--r) var(--r);
    padding: 1.2rem 1.2rem 1rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform .22s, box-shadow .22s, border-color .22s;
    position: relative;
    overflow: hidden;
}
.kpi-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, transparent 60%);
    pointer-events: none;
}
.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196,181,253,.16);
    border-top-color: var(--kc, var(--purple-s));
    box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(196,181,253,.08);
}
.kpi-icon {
    font-size: 1rem; margin-bottom: .65rem;
    display: inline-flex; width: 30px; height: 30px;
    background: rgba(255,255,255,.05); border-radius: 7px;
    align-items: center; justify-content: center;
}
.kpi-val {
    font-size: 2.15rem; font-weight: 800;
    letter-spacing: -.055em; line-height: 1;
    color: var(--kc, var(--purple-s));
    margin-bottom: .22rem;
}
.kpi-val-sm { font-size: 1.1rem; opacity: .38; font-weight: 400; letter-spacing: -.02em; }
.kpi-label {
    font-size: .63rem; font-weight: 600;
    color: var(--dim); letter-spacing: .07em; text-transform: uppercase;
}
.kpi-bar { background: rgba(255,255,255,.07); border-radius: 99px; height: 3px; margin-top: .7rem; overflow: hidden; }
.kpi-fill { height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--kc, var(--purple-s)), rgba(34,211,238,.7)); transition: width .6s ease; }

/* ── Grid Layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
@media(max-width:660px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Glass Cards ─────────────────────────────────────────── */
.glass-card {
    background: rgba(255,255,255,.028);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color .22s, box-shadow .22s;
}
.glass-card:hover { border-color: var(--border-h); }
.card-label {
    font-size: .62rem; font-weight: 700;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 1.1rem;
    display: flex; align-items: center; justify-content: space-between;
}

/* ── Section Heading (inline) ─────────────────────────────── */
.section-label {
    font-size: .63rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--dim); margin-bottom: .9rem;
}

/* ── Timeline ────────────────────────────────────────────── */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: .8rem; padding: .55rem 0; position: relative; }
.tl-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 50px; top: 1.25rem; bottom: 0;
    width: 1px; background: rgba(255,255,255,.05);
}
.tl-time {
    font-size: .7rem; color: var(--muted);
    min-width: 42px; text-align: right;
    padding-top: .1rem; flex-shrink: 0;
    font-weight: 500; line-height: 1.2;
}
.tl-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(196,181,253,.45); border: 1.5px solid rgba(196,181,253,.7);
    flex-shrink: 0; margin-top: .22rem; flex-shrink: 0;
}
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: .86rem; font-weight: 500; }
.tl-desc { font-size: .73rem; color: var(--muted); margin-top: .12rem; }

/* ── Forms ───────────────────────────────────────────────── */
.fg { margin-bottom: 1rem; }
.fg label {
    display: block; font-size: .73rem; font-weight: 600;
    color: var(--muted); margin-bottom: .35rem; letter-spacing: .02em;
}
.km-input, .km-textarea, .km-select {
    width: 100%;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    color: var(--text);
    padding: .72rem 1rem;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.km-input:focus, .km-textarea:focus, .km-select:focus {
    border-color: rgba(196,181,253,.5);
    box-shadow: 0 0 0 3px rgba(196,181,253,.07);
}
.km-input::placeholder, .km-textarea::placeholder { color: rgba(255,255,255,.34); }
.km-textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.km-select { cursor: pointer; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media(max-width:500px) { .form-row-2 { grid-template-columns: 1fr; } }

/* ── Search Bar ──────────────────────────────────────────── */
.search-bar { display: flex; gap: .55rem; margin-bottom: 1.5rem; }
.search-input {
    flex: 1;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    color: var(--text);
    padding: .78rem 1.1rem;
    font-size: .95rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.search-input:focus {
    border-color: rgba(196,181,253,.45);
    box-shadow: 0 0 0 3px rgba(196,181,253,.06);
}
.search-input::placeholder { color: rgba(255,255,255,.34); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .62rem 1.25rem; border-radius: 10px;
    font-size: .83rem; font-weight: 600; font-family: inherit;
    text-decoration: none; border: none; cursor: pointer;
    transition: all .2s; letter-spacing: .01em; white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    box-shadow: 0 2px 14px rgba(124,58,237,.28);
}
.btn-primary:hover { opacity: .9; box-shadow: 0 4px 24px rgba(124,58,237,.4); transform: translateY(-1px); }
.btn-ghost {
    background: rgba(255,255,255,.06);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.08);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); }
.btn-danger { background: rgba(251,113,133,.1); color: var(--red); border: 1px solid rgba(251,113,133,.2); }
.btn-danger:hover { background: rgba(251,113,133,.18); }
.btn-cyan { background: rgba(34,211,238,.12); color: var(--cyan); border: 1px solid rgba(34,211,238,.2); }
.btn-cyan:hover { background: rgba(34,211,238,.2); }
.btn-sm { font-size: .73rem; padding: .3rem .7rem; border-radius: 7px; }
.btn-lg { font-size: .92rem; padding: .75rem 1.6rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { border-radius: 10px; padding: .78rem 1.1rem; font-size: .84rem; margin-bottom: 1.3rem; border: 1px solid; }
.alert-ok    { background: rgba(52,211,153,.07);  border-color: rgba(52,211,153,.2);  color: #6ee7b7; }
.alert-err   { background: rgba(251,113,133,.07); border-color: rgba(251,113,133,.2); color: var(--red); }
.alert-info  { background: rgba(196,181,253,.06); border-color: rgba(196,181,253,.15); color: var(--purple); }

/* ── Limit Bar ───────────────────────────────────────────── */
.limit-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,.025); border: 1px solid var(--border);
    border-radius: 10px; padding: .65rem 1.1rem;
    margin-bottom: 1.3rem; font-size: .81rem;
}
.limit-count { color: var(--purple); font-weight: 700; }
.limit-mini-bar { background: rgba(255,255,255,.07); border-radius: 99px; height: 4px; width: 110px; }
.limit-mini-fill { height: 4px; border-radius: 99px; background: linear-gradient(90deg,#7c3aed,var(--cyan)); transition: width .4s; }

/* ── Track Cards (Spotify results) ──────────────────────── */
.track-list { display: flex; flex-direction: column; gap: .65rem; }
.track-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .85rem 1rem;
    display: flex; align-items: center; gap: .95rem;
    transition: border-color .2s, box-shadow .2s;
}
.track-card:hover { border-color: var(--border-h); box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.track-cover { width: 50px; height: 50px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,.05); }
.track-cover-ph { width: 50px; height: 50px; border-radius: 7px; background: rgba(255,255,255,.05); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.track-body { flex: 1; min-width: 0; }
.track-artist { font-size: .72rem; color: var(--muted); margin-bottom: .12rem; }
.track-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta { font-size: .69rem; color: var(--dim); margin-top: .14rem; }
.track-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.btn-preview {
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: .85rem;
    transition: all .2s;
    background: rgba(34,211,238,.12); color: var(--cyan);
}
.btn-preview:hover { background: rgba(34,211,238,.22); }
.btn-preview.playing { background: rgba(34,211,238,.25); animation: pulse-btn 1.5s ease infinite; }
@keyframes pulse-btn { 0%,100%{box-shadow:0 0 0 0 rgba(34,211,238,.3)} 50%{box-shadow:0 0 0 6px rgba(34,211,238,0)} }
.btn-add { padding: .4rem .85rem; border-radius: 7px; border: none; cursor: pointer; font-size: .78rem; font-weight: 700; transition: all .2s; white-space: nowrap; }
.btn-add-def  { background: rgba(124,58,237,.18); color: var(--purple); }
.btn-add-def:hover { background: rgba(124,58,237,.3); }
.btn-add-done { background: rgba(52,211,153,.12); color: var(--green); cursor: default; }
.btn-add-max  { background: rgba(255,255,255,.05); color: var(--dim); cursor: default; }

/* ── Wish List Items ─────────────────────────────────────── */
.wish-list { display: flex; flex-direction: column; gap: 0; }
.wish-item {
    display: flex; align-items: center; gap: 1rem;
    padding: .72rem 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .15s;
}
.wish-item:last-child { border-bottom: none; }
.wish-item:hover { background: rgba(255,255,255,.015); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 8px; }
.wish-num { font-size: .68rem; color: var(--dim); min-width: 18px; text-align: right; font-weight: 600; flex-shrink: 0; }
.wish-info { flex: 1; min-width: 0; }
.wish-artist { font-size: .71rem; color: var(--muted); margin-bottom: .1rem; }
.wish-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish-note { font-size: .7rem; color: var(--dim); margin-top: .1rem; }
.wish-status { font-size: .67rem; font-weight: 700; padding: .22rem .55rem; border-radius: 20px; white-space: nowrap; flex-shrink: 0; letter-spacing: .03em; }
.ws-pending { background: rgba(255,255,255,.06); color: rgba(255,255,255,.3); }
.ws-queued  { background: rgba(34,211,238,.1);   color: var(--cyan); }
.ws-playing { background: rgba(52,211,153,.12);  color: var(--green); }
.ws-done    { background: rgba(255,255,255,.04); color: var(--dim); }
.ws-skipped { background: rgba(251,113,133,.08); color: rgba(251,113,133,.45); }

/* ── Guest Table ─────────────────────────────────────────── */
.km-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.km-table th {
    color: var(--dim); font-weight: 600; font-size: .62rem;
    letter-spacing: .09em; text-transform: uppercase;
    padding: .6rem .85rem; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left;
}
.km-table td { padding: .7rem .85rem; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.km-table tr:last-child td { border-bottom: none; }
.km-table tr:hover td { background: rgba(255,255,255,.02); }

/* ── Avatars ─────────────────────────────────────────────── */
.g-av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(109,40,217,.55), rgba(13,202,240,.3));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.75); flex-shrink: 0;
}
.g-cell { display: flex; align-items: center; gap: .65rem; }
.g-name { font-weight: 500; font-size: .85rem; }
.g-email { font-size: .71rem; color: var(--dim); }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .22rem .6rem; border-radius: 6px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em;
}
.badge-yes     { background: rgba(52,211,153,.1);  color: var(--green); border: 1px solid rgba(52,211,153,.2); }
.badge-no      { background: rgba(251,113,133,.1); color: var(--red);   border: 1px solid rgba(251,113,133,.2); }
.badge-pending { background: rgba(251,191,36,.1);  color: var(--amber); border: 1px solid rgba(251,191,36,.2); }

/* ── Progress mini ───────────────────────────────────────── */
.mini-bar { background: rgba(255,255,255,.07); border-radius: 99px; height: 4px; overflow: hidden; min-width: 60px; }
.mini-fill { height: 4px; border-radius: 99px; background: linear-gradient(90deg,#7c3aed,var(--cyan)); }

/* ── Message Bubbles ─────────────────────────────────────── */
.msg-bubble {
    background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06);
    border-radius: 11px; padding: .9rem 1.1rem; margin-bottom: .6rem;
    transition: border-color .2s;
}
.msg-bubble:last-child { margin-bottom: 0; }
.msg-bubble:hover { border-color: rgba(196,181,253,.15); }
.msg-text { font-size: .87rem; line-height: 1.6; color: rgba(255,255,255,.73); white-space: pre-wrap; }
.msg-time { font-size: .66rem; color: var(--dim); margin-top: .4rem; font-weight: 500; }

/* ── Live Badge ──────────────────────────────────────────── */
.live-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.25);
    border-radius: 100px; padding: .3rem .9rem;
    font-size: .74rem; font-weight: 700; color: var(--red); margin-bottom: 1.3rem;
}
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--red);
    animation: blink-dot 1.3s ease-in-out infinite;
}
@keyframes blink-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.25;transform:scale(.75)} }

/* ── Embed Bar (Spotify Preview) ─────────────────────────── */
.embed-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(7,7,26,.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(29,185,84,.2);
    z-index: 200;
}
.embed-inner { max-width: 760px; margin: 0 auto; position: relative; }
.embed-close {
    position: absolute; top: .35rem; right: .8rem;
    background: none; border: none; color: var(--dim);
    font-size: 1.1rem; cursor: pointer; z-index: 1;
    transition: color .2s;
}
.embed-close:hover { color: rgba(255,255,255,.6); }

/* ── Manual Form ──────────────────────────────────────────── */
.manual-toggle {
    background: rgba(255,255,255,.04); color: var(--muted);
    border: 1px solid rgba(255,255,255,.08);
    padding: .5rem 1rem; border-radius: 9px; font-size: .8rem;
    cursor: pointer; width: 100%; transition: all .2s; font-family: inherit;
}
.manual-toggle:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.65); }
.manual-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 1rem; margin-bottom: 1.2rem;
    display: none;
}
.manual-form.open { display: block; }
.manual-row { display: flex; gap: .55rem; margin-bottom: .6rem; }
.manual-input {
    flex: 1; background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px; color: var(--text);
    padding: .6rem .85rem; font-size: .88rem; outline: none; font-family: inherit;
    transition: border-color .2s;
}
.manual-input:focus { border-color: rgba(196,181,253,.45); }
.manual-input::placeholder { color: rgba(255,255,255,.34); }

/* ── Divider ─────────────────────────────────────────────── */
.km-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: .9rem 0; color: var(--dim); font-size: .76rem;
}
.km-divider::before, .km-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.07); }

/* ── State Hints ──────────────────────────────────────────── */
.state-hint { text-align: center; color: var(--dim); padding: 2.5rem 1rem; font-size: .85rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--dim); font-size: .83rem; }
.empty-icon { font-size: 2rem; margin-bottom: .6rem; opacity: .35; display: block; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.1); border-top-color: #7c3aed;
    border-radius: 50%; animation: spin .7s linear infinite;
    vertical-align: middle; margin-right: .35rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────── */
.km-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    background: rgba(18,18,42,.97);
    border: 1px solid rgba(196,181,253,.28);
    border-radius: 11px; padding: .7rem 1.15rem;
    font-size: .84rem; z-index: 999;
    opacity: 0; transform: translateY(8px);
    transition: all .28s; pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    backdrop-filter: blur(12px);
}
.km-toast.show { opacity: 1; transform: translateY(0); }
