:root {
    --primary: #0f172a;
    --accent: #3b82f6;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-main);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--primary);
    color: var(--white);
    padding: 24px 0;
    transition: all 0.3s;
}

.sidebar-brand {
    padding: 0 30px 40px;
    text-align: center;
}

.sidebar-brand h2 span {
    color: var(--accent);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 14px 30px;
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar ul li a.active, .sidebar ul li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-left: 4px solid var(--accent);
}

/* ===== CONTENT AREA ===== */
.content {
    margin-left: 260px;
    padding: 40px;
}

/* ===== TOPBAR ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.topbar h1 {
    font-size: 28px;
    font-weight: 700;
}

.user {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== MODERN CARDS ===== */
.card-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.card .number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

/* Decorative Accent on Cards */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.card.blue::after { background: var(--accent); }
.card.green::after { background: #10b981; }
.card.orange::after { background: #f59e0b; }

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

/* ===== ACTION BAR & BUTTONS ===== */
.action-bar {
    margin-bottom: 25px;
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== TABLE STYLING ===== */
.table-box {
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.04);
    overflow-x: auto;
}

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

table th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid #f1f5f9;
}

table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.img-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.text-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* ===== BADGE & ACTIONS ===== */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge.success {
    background: #dcfce7;
    color: #15803d;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-icon.edit { background: #eff6ff; color: #3b82f6; }
.btn-icon.delete { background: #fef2f2; color: #ef4444; }

.btn-icon:hover { transform: scale(1.1); }

/* Update CSS Variabel */
:root {
    --primary: #0f172a;
    --accent: #3b82f6;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* --- TOOLBAR SECTION --- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.search-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: 0.3s;
}

.search-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text-gray);
    outline: none;
}

.btn-add {
    background: var(--accent);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- TABLE MODERN STYLING --- */
.table-container {
    background: white;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

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

.modern-table th {
    background: #f8fafc;
    padding: 15px 20px;
    text-align: left;
    font-size: 13px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
}

.article-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.article-cell img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.article-info .title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.article-info .author {
    font-size: 12px;
    color: var(--text-gray);
}

/* --- BADGES --- */
.category-tag {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.published { background: #dcfce7; color: #15803d; }
.status-badge.draft { background: #fef3c7; color: #92400e; }

/* --- ACTIONS --- */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btns a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: 0.3s;
    text-decoration: none;
}

.btn-edit { background: #eff6ff; color: #3b82f6; }
.btn-delete { background: #fef2f2; color: #ef4444; }

.action-btns a:hover { transform: translateY(-3px); }

/* User Profile Topbar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.user-info span { font-weight: 600; font-size: 14px; }
.user-info small { color: var(--text-gray); font-size: 11px; }

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* =========================
   ADMIN LOGIN PAGE
========================= */

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: fadeInUp 0.6s ease;
}

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

.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
}

.login-header h2 span {
    color: var(--accent);
}

.login-header p {
    color: var(--text-gray);
    font-size: 14px;
    margin-top: 5px;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59,130,246,0.35);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-gray);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
