/**
 * Hoja de Estilos de Administración - Radio Arcadia
 * Autor: CTO & Technical Lead
 */

:root {
    --bg-dark: #090714;
    --bg-sidebar: #0f0c1d;
    --bg-card: rgba(23, 19, 41, 0.6);
    --border-light: rgba(255, 255, 255, 0.06);
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f857a6;
    --text-primary: #f5f3f7;
    --text-secondary: #a7a2bd;
    --text-muted: #6e6a82;
    --success: #00e676;
    --warning: #ffb300;
    --error: #ff1744;
    --sidebar-width: 260px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
}

/* --- SIDEBAR --- */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 90;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-user {
    padding: 1.2rem 1.5rem;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-user .user-role {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-link:hover, 
.sidebar-item.active .sidebar-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-item.active .sidebar-link {
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.2);
    color: #ff5252;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ff1744;
    color: #fff;
}

/* --- MAIN CONTENT AREA --- */
.admin-main {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.admin-title-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

/* --- METRICS CARDS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.metric-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    color: var(--primary);
}

/* --- TABLES & CARDS --- */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 1rem;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.admin-table tbody tr:hover {
    background: rgba(255,255,255,0.01);
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-success { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.badge-warning { background: rgba(255, 179, 0, 0.15); color: #ffb300; }
.badge-danger { background: rgba(255, 23, 68, 0.15); color: #ff1744; }
.badge-info { background: rgba(0, 242, 254, 0.15); color: var(--primary); }

.table-img {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-light);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.3s;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #090714;
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(0,242,254,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-danger {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: #ff5252;
}

.btn-danger:hover {
    background: #ff1744;
    color: #fff;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* --- ALERTS --- */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success { background: rgba(0, 230, 118, 0.12); border-color: rgba(0, 230, 118, 0.25); color: #00e676; }
.alert-error { background: rgba(255, 23, 68, 0.12); border-color: rgba(255, 23, 68, 0.25); color: #ff5252; }

/* --- FORMS --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.15);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* LOGIN LAYOUT */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #150f28 0%, var(--bg-dark) 70%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* RESPONSIVE ADMIN */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.8rem;
        gap: 0.5rem;
    }
    .sidebar-link {
        padding: 0.5rem 0.8rem;
        white-space: nowrap;
        font-size: 0.85rem;
    }
    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
    }
    .sidebar-user, .sidebar-footer {
        display: none; /* Simplificado para móviles */
    }
}
