:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #ea580c;
    --warning-light: #ffedd5;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* Global Styles */
body {
    background: radial-gradient(circle at top right, var(--slate-50), #eff6ff);
    min-height: 100vh;
    color: var(--slate-900);
    font-family: 'Inter', sans-serif;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Dashboard Specific Layout */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Responsive Table */
.responsive-table-wrapper {
    overflow-x: auto;
    border-radius: 1.5rem;
    background: white;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .hide-on-mobile {
        display: none;
    }

    .card-p {
        padding: 1.25rem;
    }

    .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* Premium Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2);
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Global Layout Refined */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* Sidebar (Dark) */
.sidebar {
    width: 260px;
    background: var(--slate-900);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

@media (max-width: 1023px) {
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0.75rem;
    margin: 0.25rem 0.75rem;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-left: 3px solid var(--primary);
    border-radius: 0 0.5rem 0.5rem 0;
    margin-left: 0;
}

/* Main Components */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 2rem;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
}

.breadcrumb-back {
    display: flex;
    align-items: center;
    color: var(--slate-500);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumb-back:hover {
    color: var(--primary);
}

/* Mobile Toggle Header */
.mobile-header {
    background: white;
    border-bottom: 1px solid var(--slate-100);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
}