@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
    --primary: #1d4ed8;
    --primary-dark: #0f172a;
    --accent: #dc2626;
    --success: #16a34a;
    --danger: #dc2626;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --panel: #ffffff;
    --bg: #f8fafc;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body{
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

body{
    min-height: 100vh;
}

a{
    text-decoration: none;
}

.auth-page{
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(220, 38, 38, 0.08), transparent 30%),
        #f8fafc;
}

.auth-wrapper{
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-brand{
    position: relative;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.88)),
        url(../images/login-bg.jpg) center/cover no-repeat;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 56px;
}

.brand-overlay{
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.20), rgba(15, 23, 42, 0.72));
}

.brand-content{
    position: relative;
    z-index: 2;
    max-width: 560px;
}

.brand-badge{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
}

.brand-content h1{
    font-size: 44px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 18px;
}

.brand-content p{
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 30px;
}

.brand-features{
    display: grid;
    gap: 14px;
}

.feature-item{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.feature-item i{
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
}

.auth-panel{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.login-card{
    width: 100%;
    max-width: 470px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    padding: 38px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.login-top{
    text-align: center;
    margin-bottom: 30px;
}

.logo-box{
    width: 72px;
    height: 72px;
    margin: 0 auto 18px auto;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}

.login-top h2{
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.login-top p{
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.alert-box{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
}

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

.alert-success{
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger{
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.input-group{
    margin-bottom: 18px;
}

.input-group label{
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.input-box{
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    height: 58px;
    transition: all 0.25s ease;
    overflow: hidden;
}

.input-box:focus-within{
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.input-icon{
    width: 56px;
    min-width: 56px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 16px;
}

.input-box input{
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 15px;
    color: var(--text);
    background: transparent;
    padding: 0 16px 0 0;
    font-family: 'Inter', sans-serif;
}

.input-box input::placeholder{
    color: #94a3b8;
}

.form-row{
    display: flex;
    justify-content: flex-end;
    margin: 6px 0 22px 0;
}

.forgot-link{
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: 0.2s ease;
}

.forgot-link:hover{
    color: #1e40af;
}

.submit-btn{
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.18);
}

.submit-btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.24);
}

.login-footer{
    margin-top: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.terms-wrap{
    margin: 4px 0 22px 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
}

.terms-label{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    cursor: pointer;
}

.terms-label input[type="checkbox"]{
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-label a{
    color: var(--primary);
    font-weight: 600;
}

.terms-label a:hover{
    color: #1e40af;
}

.auth-switch{
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a{
    color: var(--primary);
    font-weight: 700;
    margin-left: 6px;
}

.auth-switch a:hover{
    color: #1e40af;
}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.info-box{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.6;
}

.info-box i{
    margin-top: 2px;
    color: var(--primary);
}


@media (max-width: 1100px){
    .auth-wrapper{
        grid-template-columns: 1fr;
    }

    .auth-brand{
        min-height: 320px;
        padding: 40px 32px;
    }

    .auth-panel{
        padding: 32px 24px;
    }
}

@media (max-width: 768px){
    .auth-page{
        padding: 25px 5px;
    }

    .auth-wrapper{
        min-height: auto;
        border-radius: 24px;
    }

    .auth-brand{
        padding: 32px 24px;
        min-height: 280px;
    }

    .brand-content h1{
        font-size: 30px;
    }

    .brand-content p{
        font-size: 14px;
    }

    .login-card{
        padding: 24px;
        border-radius: 22px;
    }

    .login-top h2{
        font-size: 26px;
    }

    .logo-box{
        width: 64px;
        height: 64px;
        font-size: 26px;
        border-radius: 18px;
    }
}

@media (max-width: 480px){
    .auth-brand{
        display: none;
    }

    .auth-panel{
        padding: 0;
    }

    .login-card{
        padding: 22px 18px;
    }

    .input-box{
        height: 54px;
        border-radius: 14px;
    }

    .submit-btn{
        height: 54px;
        border-radius: 14px;
    }
}