:root {
    --primary-color: #0d6efd;
    --sidebar-width: 250px;
    --header-height: 60px;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    border-right: 1px solid #dee2e6;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    color: #495057;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: #e9ecef;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: #e7f1ff;
    border-right: 3px solid var(--primary-color);
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Cards - Overriding/Extending Layui Card if needed, or just removing custom card styles */
.layui-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
}

.layui-card-header {
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .top-header {
        padding: 0 1rem;
    }
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1200px 600px at 15% 10%, rgba(13, 110, 253, 0.18), rgba(13, 110, 253, 0) 60%),
        radial-gradient(900px 500px at 85% 15%, rgba(32, 201, 151, 0.16), rgba(32, 201, 151, 0) 55%),
        linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(222, 226, 230, 0.7);
    border-radius: 18px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.10),
        0 6px 18px rgba(13, 110, 253, 0.08);
    backdrop-filter: blur(10px);
}

.login-brand {
    text-align: center;
    margin-bottom: 18px;
}

.login-brand .brand-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.18), rgba(13, 110, 253, 0.06));
    border: 1px solid rgba(13, 110, 253, 0.18);
}

.login-brand .brand-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.login-brand h4 {
    margin-top: 12px;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.login-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

.login-alert {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 53, 69, 0.20);
    background: rgba(220, 53, 69, 0.07);
    color: #842029;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.login-alert i.bi {
    margin-top: 2px;
}

/* Layui form tweaks inside login */
.login-card .layui-form-item {
    margin-bottom: 14px;
}

.login-card .layui-form-label {
    width: 44px;
    padding: 0;
    text-align: center;
    line-height: 44px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.login-card .layui-form-label i {
    font-size: 18px;
    color: #6c757d;
}

.login-card .layui-input-block {
    margin-left: 58px;
}

.login-card .layui-input {
    height: 44px;
    border-radius: 12px;
    border-color: #e9ecef;
    background: rgba(255, 255, 255, 0.9);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.login-card .layui-input:focus {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.login-actions {
    margin-top: 8px;
}

.login-actions .layui-btn {
    height: 44px;
    line-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 18px rgba(13, 110, 253, 0.18);
}

.login-footer {
    text-align: center;
    margin-top: 14px;
}

.login-footer a {
    color: #6c757d;
}

.login-footer a:hover {
    color: #0b5ed7;
}

@media (max-width: 420px) {
    .login-page {
        padding: 16px;
    }

    .login-card {
        padding: 20px;
        border-radius: 16px;
    }
}
