/* ============================================================
   soundvia distro — extra CSS layer
   Sits on top of: soundvia.eu/static/css/style.css
   ============================================================ */

/* ---- Auth page — hide sidebar, full viewport ---------------- */
body.auth-page .app-container { display: block; }
body.auth-page .sidebar,
body.auth-page #sidebar,
body.auth-page #sidebarToggle { display: none !important; }
body.auth-page .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}
body.auth-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- Admin page — full-viewport shell, no portal sidebar ---- */
body.admin-page .sidebar,
body.admin-page #sidebar,
body.admin-page #sidebarToggle { display: none !important; }
body.admin-page .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    overflow: hidden;
}
body.admin-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100%;
}
body.admin-page .portal-flash-messages { display: none; }

/* ---- Auth split layout -------------------------------------- */
.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.auth-visual {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #0a0f1e 0%, #0f1b3d 50%, #091530 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 768px) { .auth-visual { display: none; } }
.auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 60%, rgba(26,92,255,0.18) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(26,92,255,0.10) 0%, transparent 50%);
}
.auth-visual-content {
    position: relative;
    z-index: 2;
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-visual-brand {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.auth-visual-tagline {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin: 0;
    line-height: 1.4;
}

/* Animated ambient tiles */
.auth-visual-tiles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
.auth-tile {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: tileFloat 12s ease-in-out infinite alternate;
}
.auth-tile-1 { width: 380px; height: 380px; background: #1A5CFF; top: -80px; left: -100px; animation-delay: 0s; }
.auth-tile-2 { width: 280px; height: 280px; background: #4f8fff; bottom: 0; right: -60px; animation-delay: -4s; }
.auth-tile-3 { width: 200px; height: 200px; background: #0a2a80; top: 50%; left: 50%; animation-delay: -2s; }
.auth-tile-4 { width: 150px; height: 150px; background: #1A5CFF; bottom: 20%; left: 20%; animation-delay: -6s; }
@keyframes tileFloat {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(-30px) scale(1.08); }
}

/* ---- Auth right panel --------------------------------------- */
.auth-panel {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: var(--bg, #0d1117);
}
@media (max-width: 768px) {
    .auth-panel { width: 100%; min-height: 100vh; padding: 32px 20px; }
}
.auth-panel-card {
    width: 100%;
    max-width: 400px;
}
.auth-form-container {
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 20px;
    padding: 36px 32px;
}
.auth-form-header { margin-bottom: 24px; }
.auth-form-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--black, #fff);
    margin: 0 0 6px;
    line-height: 1.3;
}
.auth-brand-accent { color: var(--primary, #1A5CFF); }
.auth-form-subtitle { font-size: 13px; color: var(--muted); margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* ---- Form input wrapper with icon (fixes eye button) -------- */
.form-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}
.form-input-wrap .form-input {
    width: 100%;
    flex: 1;
}
.form-input-wrap--icon-right .form-input {
    padding-right: 44px !important;
}
.form-input-icon-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, rgba(255,255,255,0.45));
    transition: color 0.15s;
    z-index: 2;
}
.form-input-icon-btn:hover { color: var(--black, #fff); }

/* ---- Form group spacing ------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--black, #fff);
    letter-spacing: 0.02em;
}
.form-label-optional { font-weight: 400; color: var(--muted); }
.form-label-hint { font-size: 11px; color: var(--primary); margin-left: 6px; }
.form-hint { font-size: 11px; color: var(--muted); }
.btn-full { width: 100%; justify-content: center; }


/* ---- Portal brand tag ---------------------------------------- */
.distro-brand-tag {
    display: inline-block;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--primary, #1A5CFF);
    color: #fff;
    border-radius: 4px;
    vertical-align: middle;
    line-height: 1.5;
}

/* ---- Portal page wrapper ------------------------------------- */
.portal-page { padding: 0 0 48px; }
.portal-section {
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.portal-section--compact { padding: 20px 24px; }
.portal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.portal-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--black, #fff);
}
.portal-section-hint {
    font-size: 12px;
    color: var(--muted, rgba(255,255,255,0.45));
}

/* ---- Flash messages ----------------------------------------- */
.portal-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}
.portal-status-error {
    background: rgba(255,59,48,0.12);
    border-color: rgba(255,59,48,0.25);
    color: #ff3b30;
}
.portal-status-success {
    background: rgba(48,209,88,0.10);
    border-color: rgba(48,209,88,0.2);
    color: #34c759;
}
.portal-status-info {
    background: rgba(26,92,255,0.10);
    border-color: rgba(26,92,255,0.2);
    color: var(--primary, #1A5CFF);
}

/* ---- Stats grid --------------------------------------------- */
.lp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.lp-stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
    .lp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.lp-stat-card {
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lp-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.lp-stat-card--success { border-color: rgba(48,209,88,0.25); }
.lp-stat-card--warning { border-color: rgba(255,159,10,0.25); }
.lp-stat-card--danger  { border-color: rgba(255,59,48,0.25); }
.lp-stat-icon {
    font-size: 22px;
    color: var(--primary, #1A5CFF);
    min-width: 32px;
    text-align: center;
}
.lp-stat-card--success .lp-stat-icon { color: #34c759; }
.lp-stat-card--warning .lp-stat-icon { color: #ff9f0a; }
.lp-stat-card--danger  .lp-stat-icon { color: #ff3b30; }
.lp-stat-body { display: flex; flex-direction: column; }
.lp-stat-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--black, #fff); }
.lp-stat-label { font-size: 12px; color: var(--muted, rgba(255,255,255,0.45)); margin-top: 4px; }

/* ---- Tables ------------------------------------------------- */
.lp-stats-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); }
.lp-stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lp-stats-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.lp-stats-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.lp-stats-table tbody tr:last-child { border-bottom: none; }
.lp-stats-table tbody tr:hover { background: var(--hover-bg, rgba(255,255,255,0.03)); }
.lp-stats-table td { padding: 12px 16px; vertical-align: middle; }
.lp-table-primary { font-weight: 600; color: var(--black); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-table-muted { color: var(--muted); font-size: 12px; }

/* ---- Status badges ------------------------------------------ */
.admin-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--badge-bg, rgba(255,255,255,0.08));
    color: var(--muted, rgba(255,255,255,0.55));
    border: 1px solid var(--border);
    white-space: nowrap;
}
.admin-badge-success { background: rgba(48,209,88,0.12); color: #34c759; border-color: rgba(48,209,88,0.2); }
.admin-badge-warning { background: rgba(255,159,10,0.12); color: #ff9f0a; border-color: rgba(255,159,10,0.2); }
.admin-badge-danger  { background: rgba(255,59,48,0.12);  color: #ff3b30; border-color: rgba(255,59,48,0.2); }
.admin-badge-info    { background: rgba(26,92,255,0.12);  color: #4f8fff; border-color: rgba(26,92,255,0.2); }
.admin-badge-muted   { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ---- List items --------------------------------------------- */
.lp-list { display: flex; flex-direction: column; gap: 1px; }
.lp-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.lp-list-item:last-child { border-bottom: none; }
.lp-list-item--error { opacity: 0.85; }
.lp-list-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--primary, #1A5CFF);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lp-list-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-list-name { font-size: 14px; font-weight: 600; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-list-meta { font-size: 12px; color: var(--muted); }
.lp-list-actions { display: flex; gap: 8px; }
.lp-list-icon { font-size: 18px; min-width: 24px; text-align: center; }

/* ---- Empty state -------------------------------------------- */
.lp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    gap: 12px;
}
.lp-empty-icon { font-size: 48px; color: var(--muted); opacity: 0.4; }
.lp-empty-text { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0; }
.lp-empty-hint { font-size: 13px; color: var(--muted); opacity: 0.7; margin: 0; max-width: 380px; }

/* ---- Mode tabs (submit page) -------------------------------- */
.distro-mode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.distro-mode-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.15s, border-color 0.15s;
}
.distro-mode-tab.active {
    color: var(--black);
    border-bottom-color: var(--primary, #1A5CFF);
}
.distro-mode-tab:hover { color: var(--black); }
.distro-panel { animation: fadeIn 0.2s ease; }

/* ---- Upload drop zone --------------------------------------- */
.upload-section { margin-bottom: 20px; }
.upload-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-drop-zone:hover,
.upload-drop-zone.dragover {
    border-color: var(--primary, #1A5CFF);
    background: rgba(26,92,255,0.05);
}
.upload-drop-icon { font-size: 40px; color: var(--muted); margin-bottom: 12px; }
.upload-drop-title { font-size: 16px; font-weight: 700; color: var(--black); margin: 0 0 6px; }
.upload-drop-sub { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.upload-drop-link { color: var(--primary); cursor: pointer; text-decoration: underline; }
.upload-drop-hint { font-size: 11px; color: var(--muted); opacity: 0.6; margin: 0; }
.upload-input-hidden { display: none; }
.upload-selected-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(26,92,255,0.08);
    border: 1px solid rgba(26,92,255,0.2);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 12px;
}
.upload-progress-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}
.upload-progress-bar {
    height: 100%;
    background: var(--primary, #1A5CFF);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.upload-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ---- DDEX XML preview --------------------------------------- */
.lp-ddex-preview {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    background: #0d1117;
    color: #e6edf3;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    min-height: 300px;
    resize: vertical;
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
    line-height: 1.55;
    outline: none;
}
.lp-ddex-preview:focus { border-color: var(--primary); }

/* ---- Processing log ----------------------------------------- */
.distro-log {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 320px;
    overflow-y: auto;
    font-size: 12.5px;
    font-family: 'Courier New', monospace;
    background: #0d1117;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}
.distro-log-entry {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    line-height: 1.5;
}
.distro-log-entry:last-child { border-bottom: none; }
.distro-log-ts { color: rgba(255,255,255,0.3); flex-shrink: 0; font-size: 11px; padding-top: 1px; }
.distro-log-entry.level-info i { color: #4f8fff; }
.distro-log-entry.level-warning i { color: #ff9f0a; }
.distro-log-entry.level-error i { color: #ff3b30; }
.distro-log-msg { color: #e6edf3; flex: 1; word-break: break-all; }

/* ---- API row ------------------------------------------------ */
.portal-api-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.portal-api-docs { margin-top: 4px; }
.portal-api-doc-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.form-input--mono { font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 0.02em; }

/* ---- ID badges ---------------------------------------------- */
.lp-id-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-id-badge {
    padding: 4px 10px;
    background: rgba(26,92,255,0.1);
    border: 1px solid rgba(26,92,255,0.2);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #4f8fff;
}

/* ---- Info box ----------------------------------------------- */
.portal-info-box {
    padding: 16px 20px;
    background: rgba(26,92,255,0.06);
    border: 1px solid rgba(26,92,255,0.15);
    border-radius: 12px;
    font-size: 13px;
    color: var(--black);
}
.portal-info-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portal-info-list li { display: flex; align-items: center; gap: 10px; }

/* ---- Footer meta -------------------------------------------- */
.lp-footer-meta {
    font-size: 11px;
    color: var(--muted);
    opacity: 0.6;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.lp-footer-meta code {
    font-family: monospace;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---- Section danger title ----------------------------------- */
.lp-section-danger { color: #ff3b30; }

/* ---- Count badge -------------------------------------------- */
.lp-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ---- Back link ---------------------------------------------- */
.hub-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s;
}
.hub-back-link:hover { color: var(--black); }

/* ---- Animations --------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Sidebar footer additions ------------------------------- */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}
.sidebar-theme-toggle { background: none; border: none; cursor: pointer; text-align: left; width: 100%; }

/* ---- Header sub items --------------------------------------- */
.lp-header-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.hub-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.hub-header-left { display: flex; flex-direction: column; }
.hub-header-actions { display: flex; gap: 10px; align-items: center; }
.lp-title { font-size: 26px; font-weight: 800; margin: 0 0 4px; color: var(--black); }
.lp-subtitle { font-size: 13px; color: var(--muted); margin: 0; }
