/* --- assets/css/components/pages/auth/login.css --- */
:root {
    --green: #13ad55;
    --green-deep: #109943;
    --green-light: #d0fbde;
    --green-pale: #e9f9f2;
    --blue-bg: #eafcf6;
    --box-radius: 16px;
    --input-radius: 10px;
    --accent-shadow: 0 8px 32px rgba(19, 173, 85, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    --border-subtle: 1px solid rgba(19, 173, 85, 0.2);
    --border-input: 1.5px solid #c5e5d0;
}
body.login-body {
    margin: 0;
    padding: 0;
    font-family: var(--ui-font);
    font-feature-settings: "ss01" on, "ss02" on;
    background: #f5faf7;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}
.login-main {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 0;
    position: relative;
}
/* Left panel: form */
.login-panel-form {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 4vw;
    background:
        radial-gradient(circle at 20% 30%, #e0f7ef 0px, transparent 50%),
        linear-gradient(180deg, #f8fcf9 0%, #f0f9f4 100%);
    border-right: 1px solid rgba(19, 173, 85, 0.12);
}
.login-panel-form .login-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
/* Right panel: hero image */
.login-panel-hero {
    flex: 1 1 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
}
.login-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(16, 153, 67, 0.72) 0%, rgba(19, 173, 85, 0.65) 40%, rgba(42, 130, 100, 0.58) 100%),
        url('../../../resources/images/login-image.webp') center/cover no-repeat;
    background-blend-mode: overlay;
}
.login-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2.5rem 3rem;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.login-hero-logo {
    width: 130px;
    height: auto;
    margin-bottom: 1.25rem;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.login-hero-tagline {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    margin: 0 0 0.35rem 0;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
    line-height: 1.25;
}
.login-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.92);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.login-container {
    z-index: 10;
    background: #ffffff;
    border-radius: var(--box-radius);
    padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(20px, 3vw, 36px);
    width: 100%;
    max-width: 380px;
    position: relative;
    flex: 0 0 auto;
    height: auto;
    animation: containerFadeIn 0.5s cubic-bezier(.48,.56,.25,1.16);
    border: 1px solid rgba(19, 173, 85, 0.15);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 32px rgba(19, 173, 85, 0.1), 0 2px 8px rgba(0,0,0,0.04);
    box-sizing: border-box;
}
@keyframes containerFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: none;}
}
.login-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 0;
}
/* New logo: BIGGER, NO background, no padding, just the image */
.login-logo-wrapper img {
    width: 170px; /* Significantly bigger (was 110px) */
    height: auto;
    display: block;
    object-fit: contain;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 auto;
    padding: 0 !important;
    filter: none;
    transition: none;
}
.login-logo-wrapper img:hover {
    /* No hover effect for logo, keep it clean */
    box-shadow: none;
    filter: none;
}
.login-container h2 {
    margin: 0 0 8px 0;
    text-align: center;
    font-size: 1.5em;
    color: var(--green-deep);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.login-subtitle {
    text-align: center;
    color: #417a63;
    font-size: 0.95em;
    margin: 0 0 20px 0;
    font-weight: 400;
    opacity: 0.82;
    letter-spacing: 0.02em;
}
.login-container form {
    display: grid;
    gap: 20px;
    margin-top: 0;
}
.login-group {
    display: grid;
    gap: 6px;
}
.login-container label {
    display: block;
    font-size: 0.9em;
    color: #2d5a42;
    letter-spacing: 0.02em;
    font-weight: 500;
    margin-bottom: 4px;
}
.login-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.login-password-wrapper input[type="password"],
.login-password-wrapper input[type="text"] {
    padding-right: 2.75rem;
}
.login-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a8a72;
    transition: color 0.2s;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: var(--green-deep);
    outline: none;
    background: rgba(19, 173, 85, 0.08);
}
.login-eye-icon--closed {
    display: none;
}
.login-password-toggle--visible .login-eye-icon--open {
    display: none;
}
.login-password-toggle--visible .login-eye-icon--closed {
    display: block;
}
.login-field-error {
    display: block;
    margin-top: 4px;
    font-size: 0.82em;
    color: #b71c1c;
    font-weight: 500;
    line-height: 1.35;
}
.login-field-error[hidden] {
    display: none;
}
.login-container input.login-input-error {
    border-color: #ef5350;
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: var(--input-radius);
    border: var(--border-input);
    font-size: 1em;
    background: #fafcfb;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(19, 173, 85, 0.12);
    outline: none;
}
.login-container input[type="text"]:disabled,
.login-container input[type="password"]:disabled {
    background: #f7fcf8;
    opacity: 0.61;
    filter: grayscale(0.13);
}
.login-container button[type="submit"] {
    width: 100%;
    background: linear-gradient(180deg, #14b85a 0%, #109943 100%);
    color: #fff;
    padding: 14px 0;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--input-radius);
    font-size: 1em;
    margin-top: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(19, 173, 85, 0.25);
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
}
.login-container button[type="submit"]::after {
    content: "";
    display: block;
    position: absolute;
    left: 50%; top: 50%;
    width: 210%;
    height: 210%;
    pointer-events: none;
    background: radial-gradient(circle, #8ceeb5 0%, transparent 80%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
    transition: opacity 0.25s, transform 0.23s;
}
.login-container button[type="submit"]:active::after {
    opacity: .11;
    transform: translate(-50%,-50%) scale(1.02);
}
.login-container button[type="submit"]:hover,
.login-container button[type="submit"]:focus-visible {
    filter: brightness(1.025) contrast(1.12);
    box-shadow: 0 4px 20px #22b06222;
    transform: scale(1.025);
}
.login-container button[type="submit"]:active {
    filter: brightness(.965) contrast(1.11);
}
.login-container button[type="submit"]:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    filter: none;
}
.login-container .return-btn {
    margin-top: 12px;
    background: #fff;
    color: #2d5a42;
    border: 1.5px solid #d4ecdc;
    border-radius: var(--input-radius);
    padding: 12px 0;
    width: 100%;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    letter-spacing: 0.02em;
    position: relative;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.login-container .return-btn:hover, .login-container .return-btn:focus-visible {
    background: #f5fcf7;
    color: var(--green-deep);
    border-color: #a8dfb8;
}
.login-container .return-btn:active {
    filter: brightness(0.97);
}
.login-separator {
    margin: 14px auto 1px auto;
    background: linear-gradient(90deg,#dbf6e5 0%, #ecfaf4 55%, #def5ec 100%);
    height: 1.3px;
    border: none;
    width: 86%;
    border-radius: 2px;
    opacity: 0.55;
}
.login-footer {
    text-align: center;
}
.login-container .return-btn:hover {
    background: #ddf1e1;
    color: #159944;
}
.login-hint-banner {
    margin-top: 4px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff8e8;
    border: 1px solid #f0d48a;
    color: #7a5a12;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 500;
}
.login-hint-banner[hidden] {
    display: none;
}
.login-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    left: auto;
    min-width: 260px;
    max-width: min(360px, calc(100vw - 36px));
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #475569;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}
.login-toast--show {
    opacity: 1;
    transform: translateY(0);
}
.login-toast--success {
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}
.login-toast--error {
    border-color: #fecaca;
    border-left-color: #dc2626;
}
/* Responsive: tablet - stack panels, form first */
@media (max-width: 1024px) {
    .login-main {
        flex-direction: column;
    }
    .login-panel-form {
        flex: 0 0 auto;
        min-height: auto;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2rem);
        border-right: none;
        border-bottom: none;
        background:
            radial-gradient(circle at 20% 30%, #e0f7ef 0px, transparent 50%),
            linear-gradient(180deg, #f8fcf9 0%, #f0f9f4 100%);
    }
    .login-panel-form .login-container {
        max-width: min(420px, 100%);
        margin-left: auto;
        margin-right: auto;
    }
    .login-panel-hero {
        flex: 0 0 auto;
        order: -1;
        width: 100%;
        min-height: clamp(200px, 34vh, 320px);
        max-height: 360px;
    }
    .login-hero-tagline {
        font-size: clamp(1.2rem, 3vw, 1.35rem);
    }
}
/* Mobile: hero banner + floating login card */
@media (max-width: 768px) {
    body.login-body {
        background: #eef8f1;
    }
    .login-main {
        flex-direction: column;
        min-height: 100dvh;
        justify-content: flex-start;
        background: #eef8f1;
    }
    .login-panel-hero {
        display: flex;
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        aspect-ratio: 16 / 11;
        min-height: clamp(210px, 38vh, 300px);
        max-height: 42vh;
    }
    .login-panel-hero::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3.5rem;
        background: linear-gradient(180deg, transparent 0%, rgba(238, 248, 241, 0.85) 70%, #eef8f1 100%);
        pointer-events: none;
        z-index: 1;
    }
    .login-hero-bg {
        background:
            linear-gradient(180deg, rgba(8, 40, 24, 0.12) 0%, transparent 42%, rgba(16, 153, 67, 0.28) 100%),
            url('../../../resources/images/login-image.webp') center 32% / cover no-repeat;
        background-blend-mode: normal, normal;
    }
    .login-panel-form {
        flex: 0 0 auto;
        min-height: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        margin-top: -2.25rem;
        padding:
            0
            max(1rem, env(safe-area-inset-right, 0px))
            max(1.25rem, env(safe-area-inset-bottom, 0px))
            max(1rem, env(safe-area-inset-left, 0px));
        background: transparent;
        position: relative;
        z-index: 2;
        box-sizing: border-box;
    }
    .login-panel-form .login-container {
        max-width: min(400px, 100%);
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        border-radius: 18px;
        box-shadow:
            0 14px 36px rgba(19, 173, 85, 0.14),
            0 4px 14px rgba(0, 0, 0, 0.07);
    }
}
/* iPad Air & tablet portrait (769px–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    body.login-body {
        background: #eef8f1;
    }
    .login-main {
        flex-direction: column;
        min-height: 100dvh;
        justify-content: flex-start;
        align-items: stretch;
        background: #eef8f1;
        padding: 0;
    }
    .login-panel-hero {
        display: flex;
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        aspect-ratio: 16 / 10;
        min-height: clamp(240px, 30vh, 320px);
        max-height: 38vh;
    }
    .login-panel-hero::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3.5rem;
        background: linear-gradient(180deg, transparent 0%, rgba(238, 248, 241, 0.85) 70%, #eef8f1 100%);
        pointer-events: none;
        z-index: 1;
    }
    .login-hero-bg {
        background:
            linear-gradient(180deg, rgba(8, 40, 24, 0.12) 0%, transparent 42%, rgba(16, 153, 67, 0.28) 100%),
            url('../../../resources/images/login-image.webp') center 32% / cover no-repeat;
        background-blend-mode: normal, normal;
    }
    .login-panel-form {
        flex: 0 0 auto;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        margin-top: -2.25rem;
        padding:
            0
            max(1.5rem, env(safe-area-inset-right, 0px))
            max(1.5rem, env(safe-area-inset-bottom, 0px))
            max(1.5rem, env(safe-area-inset-left, 0px));
        border: none;
        background: transparent;
        position: relative;
        z-index: 2;
        box-sizing: border-box;
    }
    .login-panel-form .login-container {
        max-width: min(440px, 92vw);
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        border-radius: 18px;
        box-shadow:
            0 14px 36px rgba(19, 173, 85, 0.14),
            0 4px 14px rgba(0, 0, 0, 0.07);
    }
}
/* Responsive: mobile */
@media (max-width: 600px) {
    .login-panel-form {
        margin-top: -2rem;
        padding:
            0
            max(0.85rem, env(safe-area-inset-right, 0px))
            max(1rem, env(safe-area-inset-bottom, 0px))
            max(0.85rem, env(safe-area-inset-left, 0px));
    }
    .login-panel-hero {
        aspect-ratio: 16 / 10;
        min-height: clamp(200px, 36vh, 280px);
    }
    .login-container {
        padding: 20px 18px 18px;
        box-shadow: 0 6px 24px rgba(19, 173, 85, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    }
    .login-logo-wrapper {
        margin-bottom: 12px;
    }
    .login-logo-wrapper img {
        width: clamp(108px, 32vw, 132px);
    }
    .login-container h2 {
        font-size: 1.3em;
        margin-bottom: 4px;
    }
    .login-subtitle {
        margin-bottom: 14px;
        font-size: 0.85em;
        line-height: 1.4;
    }
    .login-container form {
        gap: 14px;
    }
    .login-container input[type="text"],
    .login-container input[type="password"] {
        padding: 12px 14px;
        font-size: 16px;
    }
    .login-container button[type="submit"] {
        padding: 13px 0;
        min-height: 48px;
    }
    .login-container .return-btn {
        padding: 12px 0;
        min-height: 44px;
        margin-top: 8px;
    }
    .login-hint-banner {
        font-size: 0.84rem;
        padding: 10px 12px;
    }
    .login-toast {
        top: max(12px, env(safe-area-inset-top, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        max-width: none;
        min-width: 0;
    }
}
@media (max-width: 380px) {
    body.login-body {
        font-size: 15px;
    }
    .login-container {
        padding: 18px 14px 16px;
        border-radius: 14px;
    }
    .login-logo-wrapper img {
        width: 96px;
    }
}
/* Short viewports (e.g. iPhone SE) */
@media (max-height: 700px) and (max-width: 768px) {
    .login-panel-hero {
        aspect-ratio: 16 / 9;
        min-height: clamp(170px, 32vh, 220px);
        max-height: 38vh;
    }
    .login-panel-form {
        margin-top: -1.75rem;
    }
    .login-logo-wrapper {
        margin-bottom: 8px;
    }
    .login-logo-wrapper img {
        width: 92px;
    }
    .login-container h2 {
        font-size: 1.2em;
    }
    .login-subtitle {
        margin-bottom: 12px;
        font-size: 0.82em;
    }
    .login-container form {
        gap: 12px;
    }
    .login-container {
        padding: 16px 14px 14px;
    }
}

/* --- assets/css/components/pages/auth/register.css --- */
/* Register Page Custom Styles */
body.register-body {
    background:
        linear-gradient(120deg, #f7ffe3 0%, #e7facf 48%, #f3fff8 100%);
    min-height: 100vh;
    margin: 0;
    font-family: var(--ui-font);
}
.register-main {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: unset;
    position: relative;
}
.register-main::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 120px;
    width: 244px;
    height: 244px;
    transform: translateX(-50%);
    background: url('resources/icon/logo.webp') center/contain no-repeat;
    opacity: 0.065;
    pointer-events: none;
    z-index: 0;
    filter: blur(0.8px);
}
.register-container {
    z-index: 2;
    background: rgba(255,255,255, 0.98);
    border-radius: 28px;
    box-shadow: 0 10px 60px 0 #27ae601c, 0 3px 16px 0 #7fd28e2a, 0 1px 1px 0 #ffffff;
    padding: 50px 40px 38px 40px;
    min-width: 350px;
    max-width: 440px;
    width: 93vw;
    backdrop-filter: blur(2.5px) saturate(1.15);
    border: 2px solid #eeffe6;
    position: relative;
}
.register-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 22px;
    margin-top: -22px;
}
.register-logo-wrapper img {
    width: 120px;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
    filter: none;
    box-shadow: none;
}
.register-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 1.55em;
    color: #226f42;
}
.register-desc {
    text-align: center;
    color: #4a7a5c;
    margin-bottom: 16px;
    font-size: 1em;
}
.register-form label {
    display: block;
    margin-bottom: 6px;
    margin-top: 20px;
    color: #238d46;
    font-weight: 500;
    font-size: 1.03em;
    letter-spacing: 0.01em;
}
.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"] {
    display: block;
    width: 100%;
    margin-bottom: 7px;
    padding: 12px 11px;
    font-size: 1em;
    border-radius: 10px;
    border: 1.4px solid #d7f6e5;
    background: #fbfffd;
    transition: border .22s;
}
.register-form input:focus {
    border-color: #13ad55;
    outline: none;
}
.register-form button[type="submit"] {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: linear-gradient(97deg, #18cd6f 0%, #13ad55 60%, #109943 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    font-size: 1.09em;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 2px 9px 0 #44ca9e13;
    transition: background .14s, box-shadow .16s;
}
.register-form button[type="submit"]:hover {
    background: linear-gradient(96deg, #13ad55 0%, #109943 100%);
    box-shadow: 0 6px 22px 0 #10994316;
}
.register-form .form-help {
    margin-top: -7px;
    margin-bottom: 13px;
    color: #707f72;
    font-size: 0.87em;
    display: block;
}
.register-message {
    padding: 12px 18px 12px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    margin-top: 0;
    font-size: 1em;
}
.register-message.error {
    background: #fff3f3;
    color: #b03232;
    border: 1.4px solid #ffd7dd;
}
.register-message.success {
    background: #f0fff3;
    color: #1d853a;
    border: 1.4px solid #a9ffbb;
}
.register-bottom-link {
    text-align: center;
    margin-top: 30px;
    font-size: 0.97em;
}
.register-bottom-link a {
    color: #13ad55;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.14s;
}
.register-bottom-link a:hover {
    color: #109943;
    text-decoration: underline;
}
.register-return-btn {
    display: block;
    width: 100%;
    margin-top: 29px;
    text-align: center;
    background: transparent;
    border: none;
    color: #59b650;
    font-size: 1em;
    padding: 10px 0 6px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.11s, color 0.13s;
    font-weight: 500;
}
.register-return-btn:hover {
    background: #d0fbde;
    color: #109943;
}
@media (max-width: 490px) {
    .register-container {
        padding: 28px 6vw 18px 6vw;
        min-width: unset;
    }
}

