/* admin/css/admin.css */
/* Premium glassmorphic design system for Color 'n' Design Administrative Panel */

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

:root {
    --primary-color: #024430;
    --primary-light: #066a4c;
    --accent-color: #06d6a0;
    --bg-dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --text-dark: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --font-main: 'Manrope', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: #f1f5f9;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* --- Layout Architecture --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.admin-sidebar {
    width: 260px;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 50px;
}

.sidebar-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.sidebar-menu {
    list-style: none;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75);
}

.sidebar-menu li a:hover, .sidebar-menu li.active a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu li.active a {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

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

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.sidebar-footer a:hover {
    color: #ef476f;
}

/* Main Content Area */
.admin-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 28px;
    color: var(--text-dark);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.admin-profile span.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

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

.stats-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stats-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

/* --- Content Panel Boxes --- */
.admin-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.admin-card-header h3 {
    font-size: 20px;
    color: var(--text-dark);
}

/* --- Tables Structures --- */
.admin-table-container {
    overflow-x: auto;
    width: 100%;
}

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

.admin-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    padding: 14px 20px;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-main);
    vertical-align: middle;
}

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

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

.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-warning { background-color: #fef3c7; color: #92400e; }

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.btn-action-edit {
    background-color: #e0f2fe;
    color: #0369a1;
}

.btn-action-edit:hover {
    background-color: #0284c7;
    color: #ffffff;
}

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

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

.btn-admin-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

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

/* --- Admin Forms UI --- */
.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.admin-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.admin-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: var(--transition-smooth);
}

.admin-form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 68, 48, 0.06);
}

/* --- Admin Login Styling --- */
.admin-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-dark);
    padding: 24px;
}

.admin-login-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.admin-login-card img {
    height: 45px;
    margin-bottom: 25px;
}

.admin-login-card h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* Alerts inside dashboard */
.admin-alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
}

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

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

/* Responsive sidebar hides */
@media (max-width: 991px) {
    .admin-sidebar {
        width: 70px;
        padding: 40px 10px;
        align-items: center;
    }
    .sidebar-logo img {
        height: 24px;
        width: auto;
    }
    .sidebar-menu li a span.menu-text, .sidebar-footer span.menu-text {
        display: none;
    }
    .admin-content {
        margin-left: 70px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .admin-form-row {
        grid-template-columns: 1fr;
    }
}
