@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #00023c;
    --primary-hover: #000125;
    --bg-light: #f4f7fe;
    --text-main: #2D3748;
    --text-muted: #718096;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --border-radius: 20px;
    --shadow: 0 10px 30px rgba(0, 2, 60, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-wrap: wrap;
    min-height: 550px;
}

.login-form-side {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1c5e 100%);
    color: var(--white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-brand-side::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-brand-side::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-group-custom {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group-custom > i:first-child {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.form-control-custom {
    border: none;
    border-bottom: 2px solid #E2E8F0;
    border-radius: 0;
    padding: 0.75rem 0.5rem 0.75rem 2rem;
    width: 100%;
    transition: var(--transition);
    background: transparent;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.form-control-custom:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
    box-shadow: none;
}

.form-control-custom::placeholder {
    color: #A0AEC0;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    margin-top: 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 2, 60, 0.3);
}

.btn-login:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 2, 60, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    z-index: 1;
}

.brand-text {
    font-size: 1.1rem;
    opacity: 0.9;
    z-index: 1;
    max-width: 250px;
}

/* Dots animation */
.dots {
    display: flex;
    gap: 8px;
    margin-top: 2rem;
    z-index: 1;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.dot.active {
    background: var(--white);
    width: 25px;
    border-radius: 10px;
}

.brand-logo {
    max-width: 150px;
    z-index: 1;
}

/* Responsive Adjustments for Login */
@media (max-width: 768px) {
    .auth-body {
        background-color: var(--bg-light);
        padding: 5px;
        align-items: flex-start;
        display: block;
    }

    .login-container {
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        margin: 0;
        border-radius: 30px;
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    .login-brand-side {
        flex: none;
        width: 100%;
        padding: 3rem 1.5rem 6rem; /* Increased bottom padding for overlap */
        background: var(--primary-color) !important; /* Flat purple as per mockup */
        border-radius: 0 0 50px 50px;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
    }

    .brand-logo {
        max-width: 120px;
        margin-bottom: 1.5rem;
        z-index: 5;
    }

    .login-brand-side::before,
    .login-brand-side::after {
        display: none;
    }

    .back-home {
        position: absolute;
        top: 2rem;
        left: 1.5rem;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        z-index: 10;
    }

    .brand-title {
        color: var(--white) !important;
        font-size: 3rem;
        font-weight: 700;
        margin-top: 1.5rem;
        line-height: 1;
    }

    .brand-text {
        font-size: 1.15rem;
        color: rgba(255, 255, 255, 0.8) !important;
        opacity: 1 !important;
        max-width: 100%;
        margin-top: 0.8rem;
    }

    .login-form-side {
        flex: none;
        width: 90%;
        margin: -80px auto 40px; /* More dramatic overlap */
        background: var(--white);
        border-radius: 50px;
        padding: 3.5rem 2rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;
        z-index: 10;
    }

    .login-form-side h2 {
        color: var(--primary-color);
        font-size: 1.8rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .login-form-side .subtitle {
        text-align: center;
        display: block;
        margin-bottom: 2rem;
    }

    .login-form-side .form-label {
        display: none; /* Hide labels on mobile to match mockup */
    }

    /* Underlined Inputs */
    .form-control-custom {
        border: none;
        border-bottom: 1.5px solid #CBD5E0;
        padding: 0.75rem 0.5rem 0.75rem 2.2rem;
        font-size: 1.05rem;
        border-radius: 0;
        width: 100%;
        background: transparent;
    }

    .form-control-custom:focus {
        border-bottom-color: var(--primary-color);
        outline: none;
    }

    .input-group-custom > i:first-child {
        font-size: 1.25rem;
        color: #A0AEC0;
    }

    .btn-login {
        background: var(--primary-color);
        border-radius: 18px;
        padding: 1rem;
        font-size: 1.15rem;
        color: var(--white);
        border: none;
        width: 100%;
        font-weight: 600;
        box-shadow: 0 8px 20px rgba(123, 97, 255, 0.3);
        margin-top: 1rem;
    }

    .btn-signup {
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        background: transparent;
        border-radius: 18px;
        padding: 0.7rem 2rem;
        font-weight: 600;
        display: inline-block;
        transition: var(--transition);
        text-decoration: none;
        margin-top: 0.5rem;
    }

    .sign-up-section {
        text-align: center;
        margin-top: 2rem;
    }

    .dots {
        margin-top: 2.5rem;
        justify-content: center;
        display: flex;
        gap: 8px;
    }

    .form-check {
        margin-bottom: 0.5rem;
    }

    .login-form-side .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem;
    }
}

/* Dashboard Layout & Sidebar Styles */
.dashboard-body {
    overflow-x: hidden;
    background-color: #f8f9fc;
    display: block;
}

#wrapper {
    display: flex;
}

.bg-dark-blue {
    background-color: #00023c;
}

#sidebar-wrapper {
    min-width: 280px;
    max-width: 280px;
    transition: margin-left 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.5rem;
}

#sidebar-wrapper .list-group {
    width: 280px;
}

/* Sidebar Link Styles */
#sidebar-wrapper .list-group-item {
    background-color: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

#sidebar-wrapper .list-group-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

#sidebar-wrapper .list-group-item.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #fff;
}

#page-content-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Sidebar Toggle Logic */
body.sb-sidenav-toggled #sidebar-wrapper {
    margin-left: -280px;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    body.sb-sidenav-toggled #sidebar-wrapper {
        margin-left: -280px;
    }
}

/* Navbar Custom Styles */
.navbar {
    background: #fff;
    border-radius: 0;
}

#menu-toggle {
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--primary-color);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-500 {
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -280px;
        position: fixed;
        height: 100vh;
        z-index: 1050;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }

    body.sb-sidenav-toggled #sidebar-wrapper {
        margin-left: 0;
    }
    
    #page-content-wrapper {
        min-width: 100vw;
    }

    /* Overlay for mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        transition: all 0.3s ease;
    }
    
    body.sb-sidenav-toggled .sidebar-overlay {
        display: block;
    }
}
