/* ============================================
   LOGIN PAGE — login.css
   Place in: public/assets/css/login.css
   ============================================ */

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

body {
    font-family: 'Nunito', sans-serif;
    background: #f0ebe4;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}
/* ============ PAGE WRAPPER ============ */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.13);
}

/* ============ LEFT PANEL ============ */
.left-panel {
    width: 360px;
    flex-shrink: 0;
    background: #fdf3ec;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 32px 24px 38px;
    position: relative;
    overflow: hidden;
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44%;
    background: #fff;
    border-radius: 65% 65% 0 0;
    z-index: 0;
}

.illustration-area {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.desk-illustration {
    width: 210px;
    height: 190px;
}

.left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 4px;
}

.join-title {
    font-size: 22px;
    font-weight: 800;
    color: #2d9e8a;
    margin-bottom: 10px;
}

.join-subtitle {
    font-size: 13px;
    color: #999;
    line-height: 1.65;
    margin-bottom: 22px;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: center;
}

.btn-register {
    background: #2d9e8a;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 28px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, transform 0.1s;
}

.btn-register:hover {
    background: #228a78;
    color: #fff;
    transform: translateY(-1px);
}

.btn-login-link {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-login-link:hover {
    color: #2d9e8a;
}

/* ============ RIGHT PANEL ============ */
.right-panel {
    flex: 1;
    background: #fff;
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============ FORM HEADER ============ */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-title {
    font-size: 30px;
    font-weight: 800;
    color: #2d9e8a;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: #999;
}

/* ============ ALERTS ============ */
.alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-danger {
    background: #fff2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

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

.error-list {
    list-style: none;
    padding: 0;
}

.error-list li {
    padding: 2px 0;
}

.error-list li::before {
    content: '• ';
}

/* ============ FORM ============ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

/* ============ LABEL ROW (label + forgot link) ============ */
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 12px;
    font-weight: 700;
    color: #2d9e8a;
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ============ LABELS ============ */
.form-label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    letter-spacing: 0.07em;
}

/* ============ INPUTS ============ */
.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e4f4f1;
    border-radius: 10px;
    background: #f2faf8;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: #b2cdc9;
}

.form-input:focus {
    border-color: #2d9e8a;
    background: #eaf7f5;
    box-shadow: 0 0 0 3px rgba(45, 158, 138, 0.1);
}

.form-input.is-invalid {
    border-color: #f87171;
    background: #fff5f5;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* ============ FIELD ERROR ============ */
.field-error {
    font-size: 11.5px;
    color: #e53e3e;
    font-weight: 600;
    margin-top: 2px;
}

/* ============ PASSWORD ============ */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 46px;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #b2cdc9;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.toggle-pass:hover {
    color: #2d9e8a;
}

/* ============ REMEMBER ME ============ */
.remember-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 19px;
    height: 19px;
    min-width: 19px;
    border: 2px solid #c5dbd7;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2d9e8a;
    border-color: #2d9e8a;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* ============ SUBMIT BUTTON ============ */
.btn-login {
    width: 100%;
    padding: 15px;
    background: #2d9e8a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.btn-login:hover {
    background: #228a78;
    box-shadow: 0 6px 20px rgba(45, 158, 138, 0.35);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: scale(0.99) translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader spinner */
.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============ REGISTER REDIRECT ============ */
.register-redirect {
    text-align: center;
    font-size: 13.5px;
    color: #888;
}

.register-link {
    color: #2d9e8a;
    font-weight: 700;
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 740px) {
    .page-wrapper {
        flex-direction: column;
        max-width: 460px;
    }

    .left-panel {
        width: 100%;
        min-height: 260px;
        padding: 28px 24px 32px;
    }

    .left-panel::after {
        height: 38%;
    }

    .right-panel {
        padding: 32px 28px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .page-wrapper {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .right-panel {
        padding: 24px 18px;
    }
}

.auth-page {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 40px;
}