/* WisnuNews - Admin CMS Styles */
:root {
    --primary: #E31E24;
    --primary-dark: #C4191F;
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #a0aec0;
    --sidebar-active: #ffffff;
    --bg: #f0f2f5;
    --white: #ffffff;
    --text: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --info: #3182ce;
    --radius: 8px;
    --font: 'Inter', -apple-system, sans-serif;
    --sidebar-width: 260px;
}

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

a { text-decoration: none; color: inherit; }

/* Login Page */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

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

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

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

.logo-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 16px;
}

.logo-icon.lg { width: 64px; height: 64px; font-size: 28px; }

.login-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-header p { color: var(--text-muted); font-size: 14px; }

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

.login-footer { text-align: center; margin-top: 24px; }
.login-footer a { color: var(--primary); font-weight: 600; font-size: 13px; }

/* Admin Layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand .logo-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 8px; }

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

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    transition: all .2s;
}

.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: var(--white); }

.sidebar-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

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

.user-info strong { display: block; color: var(--white); font-size: 13px; }
.user-info small { font-size: 11px; text-transform: capitalize; }

.logout-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}

.logout-btn:hover { background: rgba(255,255,255,.15); color: var(--white); }

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.admin-header {
    background: var(--white);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.admin-header h1 { font-size: 22px; font-weight: 700; }

.admin-content { padding: 24px 32px; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: #c6f6d5; color: #22543d; border: 1px solid #9ae6b4; }
.alert-error { background: #fed7d7; color: #742a2a; border: 1px solid #feb2b2; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.red { background: #fed7d7; }
.stat-icon.green { background: #c6f6d5; }
.stat-icon.orange { background: #feebc8; }
.stat-icon.blue { background: #bee3f8; }

.stat-value { display: block; font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* Panels */
.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
}

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

.panel-header h3 { font-size: 16px; font-weight: 700; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

/* Tables */
.table-responsive { overflow-x: auto; }

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

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f7fafc;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
}

.data-table td { font-size: 14px; }

.data-table tr:hover td { background: #f7fafc; }

.text-center { text-align: center; }

.actions { display: flex; gap: 6px; }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: #c6f6d5; color: #22543d; }
.badge-warning { background: #feebc8; color: #744210; }
.badge-info { background: #bee3f8; color: #2a4365; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

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

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.page-actions { margin-bottom: 20px; }

/* Forms */
.admin-form { padding: 24px; }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227,30,36,.1);
}

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

.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }
.form-row .flex-2 { flex: 2; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Popular List */
.popular-list { padding: 8px 0; }

.popular-list li {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.popular-list li:last-child { border-bottom: none; }

.popular-list .rank {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    opacity: .5;
    min-width: 24px;
}

.popular-list a { font-weight: 600; font-size: 13px; display: block; margin-bottom: 2px; }
.popular-list a:hover { color: var(--primary); }
.popular-list small { color: var(--text-muted); font-size: 11px; }

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 16px;
}

.pagination a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--border);
}

.pagination a.active,
.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .admin-content { padding: 16px; }
}
