:root {
    --primary: #059669;
    --primary-dark: #047857;
    --secondary: #1f2937;
    --danger: #dc2626;
    --warning: #f59e0b;
    --success: #10b981;
    --text: #374151;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --background: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--background);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #05966920 0%, #04785720 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header img {
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.login-form label i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-login i {
    margin-right: 0.5rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--primary);
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-header img {
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.sidebar-header h3 {
    color: var(--secondary);
    font-size: 1.1rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.875rem 2rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.sidebar-nav a i {
    width: 24px;
    margin-right: 0.75rem;
    color: var(--text-light);
    transition: color 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.sidebar-nav a:hover i,
.sidebar-nav li.active a i {
    color: var(--primary);
}

.badge {
    position: absolute;
    right: 2rem;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.logout {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.logout a {
    color: var(--danger);
}

.logout a i {
    color: var(--danger);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-header h1 {
    font-size: 1.875rem;
    color: var(--secondary);
}

.user-info {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon.green {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Recent Sections */
.recent-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.recent-section h2 {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem;
    background: var(--background);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.875rem;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-published {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.status-draft {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-light);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-approved {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--background);
    color: var(--primary);
}

.btn-icon.delete:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

/* Forms */
.post-form {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--background);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--background);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert.success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}