/* ============================================
   Soft UI Design System — admin.radyoph.com
   ============================================ */

:root {
    --primary: #6C63FF;
    --primary-light: #8b84ff;
    --primary-dark: #5a52e0;
    --success: #2DCE89;
    --warning: #FB6340;
    --info: #11CDEF;
    --danger: #F5365C;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #333333;
    --text-muted: #8898aa;
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #a0aec0;
    --sidebar-active: #ffffff;
    --border: #e9ecef;
    --input-bg: #f7f8fa;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 4px 20px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-h: 64px;
    --sidebar-w: 240px;
    --table-head-bg: #fafbfc;
    --table-row-hover: #f8f9ff;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ---- Auth Pages ---- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container { width: 100%; max-width: 420px; padding: 20px; }

.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 40px;
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 24px; font-weight: 700; color: var(--text); }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.auth-form .form-group { margin-bottom: 20px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.auth-footer { text-align: center; margin-top: 20px; }
.auth-link { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* ---- Forms ---- */
.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-input::placeholder { color: var(--text-muted); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-block { width: 100%; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    color: inherit;
    text-decoration: none;
}

.btn-icon:hover { background: rgba(0,0,0,0.05); }

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.alert ul { margin: 0; padding-left: 20px; }

.alert-success { background: #e6f9f0; color: #0d6832; border-left: 4px solid var(--success); }
.alert-danger { background: #fde8ec; color: #8b1325; border-left: 4px solid var(--danger); }
.alert-warning { background: #fff3e6; color: #8b4513; border-left: 4px solid var(--warning); }

/* ---- CMS Layout ---- */
.cms-body { overflow: hidden; }

.cms-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-brand { font-size: 16px; font-weight: 700; color: var(--text); }
.header-center { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 8px; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }

.station-selector {
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    background: var(--input-bg);
    cursor: pointer;
}

.station-badge {
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cms-wrapper {
    display: flex;
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ---- Sidebar ---- */
.cms-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    overflow-y: auto;
    padding: 16px 0 0;
    z-index: 90;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.08);
    border-left-color: var(--primary);
}

.nav-item .material-symbols-outlined { font-size: 20px; }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 20px;
}

/* ---- Main Content ---- */
.cms-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 24px;
    overflow-y: auto;
    height: calc(100vh - var(--header-h));
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-body { padding: 24px; }
.card-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h1 { font-size: 22px; font-weight: 700; }

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.stat-icon .material-symbols-outlined { font-size: 24px; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: var(--table-head-bg);
}

tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover { background: var(--table-row-hover); }

/* ---- Footer (in sidebar) ---- */
.sidebar-footer {
    padding: 16px 20px;
    margin-top: auto;
    font-size: 11px;
    color: var(--sidebar-text);
    opacity: 0.5;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.sidebar-version {
    font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 1170px) {
    .cms-sidebar {
        transform: translateX(-100%);
    }

    .cms-sidebar.open {
        transform: translateX(0);
    }

    .cms-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-card {
        padding: 28px;
    }

    .header-brand {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

