/* ==========================================================================
   ADMIN CMS DASHBOARD STYLES - JURNAL BLUEBEE INDONESIA
   ========================================================================== */

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #2563eb;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.admin-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.sidebar-title h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.sidebar-title span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    padding: 20px 12px;
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-heading {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 14px 6px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.sidebar-nav li a:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-nav li a.active {
    background: var(--sidebar-active);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.badge-unread {
    background: var(--danger);
    color: white;
    padding: 2px 7px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: auto;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

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

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-visit-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-visit-site:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.admin-content {
    padding: 32px;
    flex-grow: 1;
}

/* ==========================================================================
   CARDS & STATS
   ========================================================================== */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.content-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.content-title p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card-admin {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-blue .stat-icon { background: #eff6ff; color: var(--primary); }
.stat-green .stat-icon { background: #ecfdf5; color: var(--success); }
.stat-amber .stat-icon { background: #fef3c7; color: var(--warning); }
.stat-purple .stat-icon { background: #f3e8ff; color: #8b5cf6; }

.stat-info h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   PANELS & TABLES
   ========================================================================== */
.admin-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    overflow: hidden;
}

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

.admin-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.admin-card-body {
    padding: 24px;
}

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

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

.admin-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 6px;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: #64748b;
    color: white;
}
.btn-secondary:hover {
    background: #475569;
}

.form-group-admin {
    margin-bottom: 22px;
}

.form-group-admin label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

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

.form-control-admin {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: white;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-control-admin:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   LOGIN PAGE SPECIFIC
   ========================================================================== */
.login-body {
    background: radial-gradient(circle at top, #1e3a8a 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

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

/* Responsive */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        position: fixed;
        top: 70px;
        left: -100%;
        height: calc(100vh - 70px);
    }
    .admin-sidebar.active {
        left: 0;
    }
    .topbar-toggle { display: block; }
    .admin-content { padding: 20px; }
}

