/* --- Design Aesthetics --- */
:root {
    --bg-dark: #0a0e1a;
    --bg-sidebar: #0f162a;
    --bg-card: #1e293b;
    --primary-neon: #38bdf8;
    --accent-neon: #a855f7;
    --success-neon: #10b981;
    --error-neon: #ef4444;
    --warning-neon: #f59e0b;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
    --gradient-card: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}

/* App Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar navigation */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

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

.sidebar-header i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-item a:hover,
.sidebar-item.active a {
    color: var(--text-primary);
    background-color: rgba(56, 189, 248, 0.1);
    border-left: 3px solid var(--primary-neon);
}

.sidebar-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-item.active a i {
    color: var(--primary-neon);
}

/* Main content workspace */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(15, 22, 42, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.content-body {
    padding: 30px;
    flex-grow: 1;
}

/* Cards Design System */
.glass-card {
    background: var(--bg-card);
    background-image: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -3px rgba(56, 189, 248, 0.15);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before { background-color: var(--primary-neon); }
.stat-card.purple::before { background-color: var(--accent-neon); }
.stat-card.green::before { background-color: var(--success-neon); }
.stat-card.red::before { background-color: var(--error-neon); }
.stat-card.yellow::before { background-color: var(--warning-neon); }

.stat-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 40px;
    opacity: 0.15;
    color: var(--text-primary);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0;
}

/* Custom Buttons */
.btn-neon-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.btn-neon-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* Tables and components */
.table-responsive {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.custom-table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    background-color: rgba(15, 22, 42, 0.6);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13.5px;
    vertical-align: middle;
}

.custom-table tr:hover td {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-status.pending { background-color: rgba(245, 158, 11, 0.15); color: var(--warning-neon); }
.badge-status.processing { background-color: rgba(56, 189, 248, 0.15); color: var(--primary-neon); }
.badge-status.publishing { background-color: rgba(168, 85, 247, 0.15); color: var(--accent-neon); }
.badge-status.published { background-color: rgba(16, 185, 129, 0.15); color: var(--success-neon); }
.badge-status.failed { background-color: rgba(239, 68, 68, 0.15); color: var(--error-neon); }
.badge-status.retrying { background-color: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Log items */
.log-item {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 10px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    gap: 12px;
}

.log-item.error { color: var(--error-neon); }
.log-item.warning { color: var(--warning-neon); }
.log-item.info { color: var(--text-muted); }

/* Login Page Theme */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}