/* ADMIN CONTROL PANEL STYLESHEET */
:root {
    --bg-primary: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    --accent: #FF6B00;
    --accent-hover: #E05E00;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --border-color: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --font: 'Plus Jakarta Sans', sans-serif;
}

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

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

/* Sidebar and Main Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.logo-icon {
    font-size: 28px;
    color: var(--accent);
}
.brand-title {
    font-weight: 800;
    font-size: 18px;
    display: block;
    line-height: 1.1;
}
.brand-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-light);
}

.sidebar-user {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    background: #F8FAFC;
}
.sidebar-user .avatar {
    font-size: 32px;
    color: var(--text-light);
}
.sidebar-user .username {
    font-weight: 700;
    display: block;
}
.sidebar-user .role {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.sidebar-menu {
    padding: 15px 12px;
    overflow-y: auto;
    flex-grow: 1;
}
.menu-group {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin: 20px 0 8px 12px;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}
.menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.menu-item:hover, .menu-item.active {
    background: #FFF0E6;
    color: var(--accent);
}
.menu-logout:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* Main Body Area */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.toggle-sidebar-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}
.view-site-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 700;
}
.view-site-link:hover {
    color: var(--accent);
}

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

/* Dashboard Counts Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.dash-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.dash-card-icon {
    font-size: 32px;
    color: var(--accent);
    background: #FFF0E6;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-card-info h3 {
    font-size: 28px;
    font-weight: 800;
}
.dash-card-info p {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

/* Form Styles */
.admin-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}
.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.admin-form .form-group {
    margin-bottom: 20px;
}
.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 14px;
}
.admin-form input:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}
.btn-primary:hover {
    background: var(--accent-hover);
}

/* Alert Notices */
.admin-alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}
.admin-alert-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}
.admin-alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.admin-table th, .admin-table td {
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.admin-table th {
    background: #F8FAFC;
    font-weight: 700;
}
.admin-table tr:hover {
    background: #F8FAFC;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

/* Login Page Spec */
.auth-body {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.auth-container {
    width: 100%;
    max-width: 400px;
}
.login-box {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
}

/* Responsiveness */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
    }
    .admin-sidebar.active {
        transform: translateX(280px);
    }
    .toggle-sidebar-btn {
        display: block;
    }
}
