/* SIPTV My List – μοντέρνο σκούρο στυλ (ίδια αισθητική με την εφαρμογή TV) */
.siptv-ml {
    --sm-accent: #6d5efc;
    --sm-accent2: #22b8f0;
    --sm-grad: linear-gradient(135deg, #6d5efc 0%, #22b8f0 100%);
    --sm-danger: #ff5c6c;
    --sm-ok: #34d399;
    --sm-text: #e8edf7;
    --sm-muted: #8b97b1;
    --sm-bg: #0b1020;
    --sm-card: #121a2e;
    --sm-field: #0d1424;
    --sm-border: rgba(255, 255, 255, .09);
    max-width: 880px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(900px 400px at 0% -10%, rgba(109, 94, 252, .28), transparent 60%),
        radial-gradient(700px 380px at 100% 0%, rgba(34, 184, 240, .18), transparent 60%),
        var(--sm-bg);
    color: var(--sm-text);
    font-size: 15px;
    line-height: 1.45;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.siptv-ml *, .siptv-ml *::before, .siptv-ml *::after { box-sizing: border-box; }

/* ---- Κάρτες ---- */
.siptv-ml__box {
    background: var(--sm-card);
    border: 1px solid var(--sm-border);
    border-radius: 18px;
    padding: 22px 24px;
    margin: 0 0 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: opacity .2s;
}
.siptv-ml__box:last-of-type { margin-bottom: 0; }
.siptv-ml__box.is-busy { opacity: .65; pointer-events: none; }
.siptv-ml__title {
    margin: 0 0 18px;
    font-size: 1.25em;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.siptv-ml__title::before {
    content: "";
    width: 6px; height: 22px;
    border-radius: 3px;
    background: var(--sm-grad);
}

/* ---- Γραμμές φόρμας ---- */
.siptv-ml__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}
.siptv-ml__row[hidden] { display: none; }
.siptv-ml__lbl {
    flex: 0 0 84px;
    font-weight: 600;
    font-size: .88em;
    color: var(--sm-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---- Πεδία ---- */
.siptv-ml__in {
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sm-border);
    border-radius: 12px;
    background: var(--sm-field);
    color: var(--sm-text);
    font: inherit;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s;
}
.siptv-ml__in::placeholder { color: #55617c; }
.siptv-ml__in:hover { border-color: rgba(255, 255, 255, .18); }
.siptv-ml__in:focus {
    outline: none;
    border-color: var(--sm-accent);
    box-shadow: 0 0 0 4px rgba(109, 94, 252, .25);
}
select.siptv-ml__in { padding-right: 34px; cursor: pointer; color-scheme: dark; }
.siptv-ml__in[type="file"] { padding: 6px; height: auto; min-height: 44px; color: var(--sm-muted); cursor: pointer; }
.siptv-ml__in[type="file"]::file-selector-button {
    margin-right: 12px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.siptv-ml__in[type="file"]::file-selector-button:hover { background: rgba(255, 255, 255, .18); }
.siptv-ml__mac {
    width: 200px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    letter-spacing: .06em;
    font-size: 1.02em;
    color: #fff;
}
.siptv-ml__pin { width: 130px; }
.siptv-ml__grow { flex: 1 1 260px; }

/* ---- Κουμπιά ---- */
.siptv-ml__btn {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--sm-grad);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(109, 94, 252, .35);
    transition: transform .12s, filter .15s, box-shadow .15s;
}
.siptv-ml__btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.siptv-ml__btn:active:not(:disabled) { transform: translateY(0); }
.siptv-ml__btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(109, 94, 252, .4); }
.siptv-ml__btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.siptv-ml__btn--ghost {
    background: rgba(255, 255, 255, .06);
    color: var(--sm-text);
    border: 1px solid var(--sm-border);
    box-shadow: none;
    padding: 0 16px;
}
.siptv-ml__btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); filter: none; }
.siptv-ml__btn--ghost.is-on { background: var(--sm-grad); color: #fff; border-color: transparent; }
.siptv-ml__btn--danger { background: linear-gradient(135deg, #ff5c6c, #ff8a5c); box-shadow: 0 6px 18px rgba(255, 92, 108, .3); }

/* ---- Καρτέλες πηγής (segmented control) ---- */
.siptv-ml__tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    background: var(--sm-field);
    border: 1px solid var(--sm-border);
    border-radius: 14px;
}
.siptv-ml__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 10px;
    color: var(--sm-muted);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.siptv-ml__tab input { position: absolute; opacity: 0; pointer-events: none; }
.siptv-ml__tab:hover { color: #fff; }
.siptv-ml__tab:has(input:checked) {
    background: var(--sm-grad);
    color: #fff;
    box-shadow: 0 4px 14px rgba(109, 94, 252, .4);
}
.siptv-ml__tab:has(input:focus-visible) { outline: 2px solid var(--sm-accent2); outline-offset: 2px; }

/* ---- Επιλογές / checkboxes ως «χάπια» ---- */
.siptv-ml__radios { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.siptv-ml__radios label, .siptv-ml__chk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--sm-border);
    border-radius: 999px;
    background: var(--sm-field);
    color: var(--sm-text);
    cursor: pointer;
    white-space: nowrap;
    font-size: .93em;
    transition: border-color .15s, background .15s;
}
.siptv-ml__radios label:hover, .siptv-ml__chk:hover { border-color: rgba(255, 255, 255, .22); }
.siptv-ml__radios label:has(input:checked), .siptv-ml__chk:has(input:checked) {
    border-color: var(--sm-accent);
    background: rgba(109, 94, 252, .18);
    color: #fff;
}
.siptv-ml input[type="checkbox"], .siptv-ml input[type="radio"] { accent-color: var(--sm-accent); margin: 0; width: 16px; height: 16px; }
.siptv-ml__tab input[type="radio"] { width: 1px; height: 1px; }

/* ---- Κατάσταση / πρόοδος / μηνύματα ---- */
.siptv-ml__badge { font-size: .9em; color: var(--sm-muted); }
.siptv-ml__badge.is-ok { color: var(--sm-ok); font-weight: 600; }

.siptv-ml__progress {
    flex: 1 1 160px;
    max-width: 280px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.siptv-ml__progress[hidden] { display: none; }
.siptv-ml__progress span { display: block; height: 100%; width: 0; background: var(--sm-grad); transition: width .2s; }

.siptv-ml__msg { min-height: 1.4em; font-weight: 600; }
.siptv-ml__msg:not(:empty) {
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--sm-border);
}
.siptv-ml__msg.is-error { color: #ffb3bb; background: rgba(255, 92, 108, .12); border-color: rgba(255, 92, 108, .35); }
.siptv-ml__msg.is-success { color: #a7f3d0; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .35); }
.siptv-ml__msg.is-info { color: var(--sm-muted); }

/* ---- Επιλογή ομάδων ---- */
.siptv-ml__hint { font-size: .88em; color: var(--sm-muted); }
.siptv-ml__groups {
    border: 1px solid var(--sm-border);
    border-radius: 14px;
    padding: 14px;
    margin: 0 0 16px;
    background: var(--sm-field);
}
.siptv-ml__groups[hidden] { display: none; }
.siptv-ml__groups-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.siptv-ml__groups-bar .siptv-ml__in { background: var(--sm-card); height: 40px; }
.siptv-ml__groups-bar .siptv-ml__btn { height: 40px; }
.siptv-ml__groups-list { max-height: 360px; overflow: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #2a3654 transparent; }
.siptv-ml__groups-head {
    font-weight: 700;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 14px 0 6px;
    color: var(--sm-muted);
    display: flex;
    gap: 12px;
    align-items: center;
}
.siptv-ml__groups-head button { font-size: .95em; background: none; border: 0; color: var(--sm-accent2); cursor: pointer; padding: 0; font-weight: 600; }
.siptv-ml__groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 10px; }
.siptv-ml__g {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: .93em;
    transition: background .12s;
}
.siptv-ml__g:hover { background: rgba(255, 255, 255, .07); }
.siptv-ml__g:has(input:checked) { background: rgba(109, 94, 252, .16); }
.siptv-ml__g[hidden] { display: none; }
.siptv-ml__g span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.siptv-ml__g small { color: var(--sm-muted); }

/* ---- Βοήθεια ---- */
.siptv-ml__help {
    margin-top: 18px;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--sm-border);
    font-size: .9em;
    color: var(--sm-muted);
}
.siptv-ml__help b { color: var(--sm-text); }
.siptv-ml__help ul { margin: 0 0 12px 18px; padding: 0; }
.siptv-ml__help li { margin-bottom: 4px; }

/* ---- Κινητό ---- */
@media (max-width: 640px) {
    .siptv-ml { padding: 12px; border-radius: 18px; }
    .siptv-ml__box { padding: 18px 16px; }
    .siptv-ml__lbl { flex-basis: 100%; }
    .siptv-ml__lbl:empty { display: none; }
    .siptv-ml__mac, .siptv-ml__grow { flex: 1 1 100%; width: auto; }
    .siptv-ml__tabs { display: flex; width: 100%; }
    .siptv-ml__tab { flex: 1; justify-content: center; padding: 9px 8px; font-size: .9em; }
    .siptv-ml__groups-grid { grid-template-columns: 1fr; }
}

/* ---- Κουμπί «+» για πολλά αρχεία ---- */
.siptv-ml__plus { width: 44px; padding: 0; font-size: 1.5em; line-height: 1; font-weight: 500; }
[data-file-extra][hidden] { display: none; }
