/* Ujjina Player Studio - Dashboard */

#dashboard-screen {
    flex-direction: column;
    min-height: 100vh;
}

/* Header - Premium glass bar */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    background: var(--header-bg);
    border-bottom: none;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 100vw;
    overflow: hidden;
}

.dash-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #FF0040, #FF6600, #FFDD00, #00CC66, #00DDFF, #4A6CF7, #CC00FF);
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dash-logo {
    height: 28px;
    width: auto;
}

.dash-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.dash-header-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.player-selector {
    padding: 8px 14px;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    max-width: 260px;
    min-width: 0;
    flex: 1;
    outline: none;
    transition: all 0.2s;
}

.player-selector:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-glow);
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dash-user {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Layout principal */
.dash-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Preview panel */
.preview-panel {
    background: var(--preview-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

/* Editor panel */
.editor-panel {
    background: var(--bg);
    flex: 1;
}

.editor-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 16px;
    padding: 24px;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

/* Cards con borde de acento superior */
.editor-section {
    background: var(--surface);
    border-radius: 14px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.2s;
}

.editor-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-border-top);
    opacity: 0.6;
    transition: opacity 0.25s;
}

.editor-section:hover {
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: var(--border-accent);
}

.editor-section:hover::before {
    opacity: 1;
}

/* Barra de acciones sticky */
.editor-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 50;
    width: 100%;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action svg {
    flex-shrink: 0;
}

/* Save indicator — lives in header, always visible */
.save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    padding: 4px 10px;
    border-radius: 6px;
}

.save-indicator.saving {
    color: var(--accent);
}

.save-indicator.saved {
    color: #10b981;
}

.save-indicator.error {
    color: var(--danger);
}

.save-icon {
    display: none;
}

.save-indicator.saved .save-icon-ok {
    display: block;
}

.save-indicator.saving .save-icon-spin {
    display: block;
    animation: spin-save 0.8s linear infinite;
}

@keyframes spin-save {
    to { transform: rotate(360deg); }
}

/* Responsive */

@media (max-width: 1024px) {
    .dash-title {
        display: none;
    }

    .editor-scroll {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .dash-header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 14px;
        gap: 10px;
    }

    .dash-header-right .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .dash-header-center {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .player-selector {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .dash-user {
        display: none;
    }

    .dash-title {
        display: none;
    }

    .editor-scroll {
        padding: 12px;
    }

    .editor-section {
        padding: 18px;
        border-radius: 12px;
    }

    .editor-actions-bar {
        padding: 10px 14px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .dash-logo {
        height: 28px;
    }

    .dash-header {
        padding: 10px 12px;
    }

    .dash-header-right {
        gap: 6px;
    }

    .dash-header-right .btn {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .dash-header-center {
        gap: 6px;
    }

    .player-selector {
        font-size: 12px;
        min-width: 0;
        flex-basis: 100%;
    }

    .dash-header-center .btn {
        font-size: 11px;
        padding: 5px 10px;
        flex: 1;
    }

    .editor-scroll {
        padding: 8px;
    }

    .editor-section {
        padding: 14px;
        border-radius: 10px;
    }

    .radio-group {
        gap: 6px;
    }

    .radio-card-content {
        padding: 10px;
        font-size: 12px;
    }

    .editor-actions-bar {
        padding: 8px 10px;
        gap: 6px;
    }

    .editor-actions-bar .btn {
        font-size: 11px;
        padding: 7px 10px;
    }

    .editor-actions-bar .btn-primary {
        flex: 1;
    }

    .save-indicator {
        font-size: 10px;
        padding: 3px 6px;
    }
}
