:root {
    --primary-color: #1a237e; /* Deep Navy */
    --secondary-color: #0d47a1; /* Royal Blue */
    --accent-color: #2979ff; /* Vibrant Blue */
    --bg-light: #f4f7fa;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    overflow-x: hidden;
    position: fixed;
    height: 100vh;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: rgba(0,0,0,0.2);
    white-space: nowrap;
}

.sidebar-header .brand-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 0.75rem;
}

.sidebar-header .brand-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    opacity: 1;
    transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-header .brand-text {
    opacity: 0;
    width: 0;
}

.sidebar-menu {
    padding: 1.5rem 0.75rem;
}

.menu-label {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.sidebar.collapsed .menu-label {
    display: none;
}

.nav-link {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link i {
    font-size: 1.1rem;
    width: 25px;
    text-align: center;
    margin-right: 1rem;
    transition: margin 0.3s;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.nav-link span {
    opacity: 1;
    transition: opacity 0.3s;
}

.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
}

.nav-link:hover {
    color: #fff;
    background-color: var(--sidebar-hover);
}

.nav-link.active {
    color: #fff;
    background-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

/* Content Area */
.content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar-collapsed .content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.topbar {
    height: 70px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-content {
    padding: 2.5rem;
    flex: 1;
}

/* Card Improvements */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: transform 0.3s ease;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* Table Design */
.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    padding: 1rem 1.5rem;
    border-top: none;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
}

/* Auth Pages Redesign */
.auth-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 121, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: 0;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(26, 35, 126, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    z-index: 0;
}

.auth-card {
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #fff;
    width: 100%;
    max-width: 450px;
    z-index: 1;
    overflow: hidden;
    animation: authCardFadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authCardFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: #fff;
    padding: 3rem 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(26, 35, 126, 0.3);
}

.auth-logo i {
    font-size: 1.75rem;
    color: #fff;
}

.auth-header h1 {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-body {
    padding: 2.5rem;
}

.input-group-text {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.form-control {
    padding: 0.75rem 1.25rem;
    border-color: #e2e8f0;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.1);
}

.auth-footer {
    padding: 1.5rem;
    background: #f8fafc;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Utility */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.animate__fadeInDown {
    animation: fadeInDown 0.5s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
