:root {
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Light Theme (Default) */
    --bg-admin-body: #f8f9fa;
    --bg-admin-card: #ffffff;
    --bg-admin-sidebar: #ffffff;
    --bg-admin-topbar: rgba(255, 255, 255, 0.8);
    --text-admin-main: #2d3436;
    --text-admin-muted: #636e72;
    --border-admin: rgba(0,0,0,0.06);
    --bg-admin-table-header: #fbfbfb;
}

body.dark-mode {
    --bg-admin-body: #0a0b0d;
    --bg-admin-card: #141619;
    --bg-admin-sidebar: #141619;
    --bg-admin-topbar: rgba(20, 22, 25, 0.8);
    --text-admin-main: #ffffff;
    --text-admin-muted: #b2bec3;
    --border-admin: rgba(255,255,255,0.08);
    --bg-admin-table-header: #1c1e21;
}

body.admin-body {
    background: var(--bg-admin-body);
    color: var(--text-admin-main);
    transition: background 0.3s ease, color 0.3s ease;
    
    /* Map generic variables used in views to admin variables */
    --text-main: var(--text-admin-main);
    --text-muted: var(--text-admin-muted);
}




.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-admin-sidebar);
    border-right: 1px solid var(--border-admin);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.02);
}


.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-admin);
}


.sidebar-menu {
    flex-grow: 1;
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-admin-main);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}


.menu-item i {
    margin-right: 15px;
    font-size: 1.2rem;
}

.menu-item:hover, .menu-item.active {
    color: var(--primary);
    background: rgba(0, 188, 212, 0.05);
    border-left-color: var(--primary);
}


.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-admin);
}


/* Main Content Area */
.admin-main {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-admin-body);
}


/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-admin-topbar);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-admin);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}



.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

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


.content-body {
    padding: 30px;
}

/* Professional Table Styles */
.admin-card {
    background: var(--bg-admin-card);
    border-radius: 12px;
    border: 1px solid var(--border-admin);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}


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

.admin-table th {
    background: var(--bg-admin-table-header);
    padding: 15px 20px;
    text-align: left;
    font-family: 'Outfit';
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-admin-muted);
    border-bottom: 1px solid var(--border-admin);
}


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



.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
}

.btn-action:hover {
    transform: translateY(-2px);
    color: #fff;
}

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

.btn-action.delete:hover {
    border-color: #ff4757;
    color: #ff4757;
}

/* Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-planning { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.status-progress { background: rgba(229, 45, 39, 0.1); color: var(--primary); }

.status-completed { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar.open {
        transform: translateX(0);
    }
}
