/* assets/css/admin.css */
/* Premium Admin Panel Stylesheet for LPPM Global Institute */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --primary-dark: #1e293b;
    --secondary: #f59e0b;
    --bg-admin: #f1f5f9;
    --bg-white: #ffffff;
    --text-color: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-admin);
    color: var(--text-color);
}

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

/* Auth Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

.login-header .logo {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 16px;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary-dark);
}

/* Admin Dashboard Layout */
.admin-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255,255,255,0.05);
}

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

.sidebar-logo {
    width: 36px;
    height: 36px;
    background-color: var(--secondary);
    color: #000;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-heading);
}

.sidebar-title h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.sidebar-title span {
    font-size: 11px;
}

.sidebar-menu {
    margin-top: 30px;
    flex-grow: 1;
}

.sidebar-menu ul li {
    list-style: none;
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    border-left: 4px solid var(--secondary);
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
}

.sidebar-footer {
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Content Area */
.main-content {
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: var(--bg-white);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}

.top-bar h2 {
    font-size: 20px;
    font-family: var(--font-heading);
}

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

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

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

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

.admin-stat-card {
    background-color: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.admin-stat-info h4 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.admin-stat-info .num {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.admin-stat-icon.secondary {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--secondary);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

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

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-admin-primary {
    background-color: var(--primary-light);
    color: #fff;
}

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

.btn-admin-secondary {
    background-color: #e2e8f0;
    color: var(--text-color);
}

.btn-admin-secondary:hover {
    background-color: #cbd5e1;
}

/* Tables and Panels */
.panel {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 18px;
    font-family: var(--font-heading);
}

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

.admin-table th, .admin-table td {
    padding: 14px 24px;
    font-size: 14px;
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
    border-bottom: 1px solid #e2e8f0;
}

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

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

.btn-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-action-edit {
    background-color: var(--secondary);
}

.btn-action-edit:hover {
    background-color: #d97706;
}

.btn-action-delete {
    background-color: var(--danger);
}

.btn-action-delete:hover {
    background-color: #b91c1c;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

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

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

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--secondary);
}

.badge-info {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
}

/* Responsive grid for admin settings */
@media (max-width: 1024px) {
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .admin-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* In a production application, we can use JS to toggle it */
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}
