@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --bg-glass: rgba(26, 26, 46, 0.7);
    --bg-input: #16162a;
    --bg-sidebar: #0d0d16;

    --text-primary: #e8e8f0;
    --text-secondary: #9999b3;
    --text-muted: #666680;
    --text-accent: #a78bfa;

    --accent-primary: #7c3aed;
    --accent-secondary: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 50%, #06b6d4 100%);
    --accent-gradient-hover: linear-gradient(135deg, #6d28d9 0%, #2563eb 50%, #0891b2 100%);
    --accent-soft: rgba(124, 58, 237, 0.15);

    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.15);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(124, 58, 237, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);

    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 70px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #c4b5fd;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    width: 72px;
    height: 72px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 8px 36px rgba(124, 58, 237, 0.5); }
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.file-upload-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-upload-text span {
    color: var(--accent-secondary);
    font-weight: 500;
}

.logo-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    display: none;
    border: 1px solid var(--border-color);
}

/* Radio Buttons for logo type */
.radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-option {
    flex: 1;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
    text-align: center;
}

.radio-option input[type="radio"]:checked + label {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
    color: var(--accent-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

/* ============================================
   LAYOUT — SIDEBAR + CONTENT
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-brand-text h2 {
    font-size: 1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand-text span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 12px 8px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.sidebar-nav-item:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-secondary);
    border-left: 3px solid var(--accent-primary);
}

.sidebar-nav-item .nav-icon {
    font-size: 1.125rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .sidebar-nav-item {
    color: var(--danger);
}

.sidebar-footer .sidebar-nav-item:hover {
    background: var(--danger-soft);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-header-left h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.top-header-left .breadcrumb {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.admin-badge .admin-avatar {
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

/* Mobile toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* ============================================
   HEADER PLAYER
   ============================================ */
.header-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    min-width: 180px;
}

.header-player.playing {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.2);
}

.header-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.header-player-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    display: none;
    flex-shrink: 0;
}

.header-player-logo.visible {
    display: block;
}

.header-player-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.header-player.playing .header-player-name {
    color: var(--text-primary);
}

.header-player-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    line-height: 1;
}

.header-player-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.header-player-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.header-player-btn:active:not(:disabled) {
    transform: scale(0.95);
}

/* Radio logo play overlay */
.radio-logo-play {
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
}

.radio-logo-play:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
    border-color: var(--accent-primary) !important;
}

.radio-logo-play::after {
    content: '▶';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.radio-logo-play:hover::after {
    opacity: 1;
}

/* Playing indicator on active radio row */
.radio-logo-play.now-playing {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

.radio-logo-play.now-playing::after {
    content: '⏸';
    opacity: 1;
    background: rgba(124, 58, 237, 0.6);
}

/* Page Content */
.page-content {
    padding: 32px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-icon.purple {
    background: var(--accent-soft);
    color: var(--accent-secondary);
}

.stat-card-icon.green {
    background: var(--success-soft);
    color: var(--success);
}

.stat-card-icon.yellow {
    background: var(--warning-soft);
    color: var(--warning);
}

.stat-card-icon.red {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-card-icon.blue {
    background: var(--info-soft);
    color: var(--info);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-card-header h2 {
    font-size: 1.0625rem;
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Radio row elements */
.radio-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.radio-logo-placeholder {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.radio-name {
    font-weight: 600;
    color: var(--text-primary);
}

.stream-url {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-family: 'Courier New', monospace;
}

.listen-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--info-soft);
    color: var(--info);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge.inactive {
    background: var(--danger-soft);
    color: var(--danger);
}

.error-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.error-count-badge.none {
    background: var(--success-soft);
    color: var(--success);
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    gap: 4px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
}

.pagination .active {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   FLASH MESSAGES / ALERTS
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-soft);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
}

/* ============================================
   FORM PAGE
   ============================================ */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-width: 700px;
}

.form-card-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.form-card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
}

.form-card-header p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-card-body {
    padding: 32px;
}

.form-card-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   ERRORS PAGE
   ============================================ */
.error-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
}

.error-card:hover {
    border-color: var(--border-accent);
}

.error-card.resolved {
    opacity: 0.6;
}

.error-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.error-radio-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.error-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.error-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.error-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   MODAL / CONFIRM DIALOG
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-box h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.modal-box p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Staggered animations for table rows */
.data-table tbody tr {
    animation: fadeInUp 0.4s ease backwards;
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.10s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.20s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px 16px;
    }

    .top-header {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }

    .login-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }

    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        display: none;
    }
}
