* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: #f5f7f2;
    color: #17212b;
}

:root {
    --green-dark: #082f1d;
    --green: #147b34;
    --green-light: #65b83c;
    --lime: #b7ff73;
    --border: #dfe5df;
    --muted: #7f8894;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 47% 53%;
    overflow: hidden;
    background: linear-gradient( 90deg, rgba(5, 40, 22, 0.95) 0%, rgba(5, 40, 22, 0.82) 48%, rgba(5, 40, 22, 0.35) 100% ), url("/assets/images/login_bg.png") center center / cover no-repeat;
}

/* =========================================================
   LEFT / HERO
========================================================= */

.hero-section {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    padding: 30px 55px 70px;
    overflow: hidden;
    color: #fff;
}

    .hero-section::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient( circle at 30% 25%, rgba(102, 206, 64, 0.12), transparent 26% );
        pointer-events: none;
    }

.brand,
.hero-content,
.hero-footer {
    position: relative;
    z-index: 2;
}

/* Brand */

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-box {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

    .logo-box img {
        max-width: 50px;
        max-height: 50px;
        width: auto;
        height: auto !important;
    }

.brand-info {
    min-width: 0;
}

    .brand-info h2 {
        margin: 0;
        font-family: "Cormorant Garamond", serif;
        font-size: 31px;
        font-weight: 700;
        line-height: 1.1;
    }

    .brand-info p {
        margin: 4px 0 0;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.82);
    }

/* Hero Content */

.hero-content {
    width: 100%;
    max-width: 570px;
    margin-top: 35px;
}

.hero-title {
    margin-bottom: 14px;
    font-family: "Great Vibes", cursive;
    font-size: clamp(48px, 4.2vw, 70px);
    font-weight: 400;
    line-height: 1.05;
}

    .hero-title span {
        color: var(--lime);
    }

.hero-description {
    max-width: 460px;
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

/* Features */

.feature-list {
    display: grid;
    gap: 11px;
}

.feature-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(26, 116, 50, 0.18);
    border: 1px solid rgba(181, 255, 112, 0.25);
    color: var(--lime);
    font-size: 18px;
}

.feature-info {
    min-width: 0;
}

    .feature-info strong {
        display: block;
        margin-bottom: 2px;
        font-size: 15px;
        font-weight: 700;
    }

    .feature-info span {
        display: block;
        font-size: 12px;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.70);
    }

/* Stats */

.stats {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 22px;
}

.stat-item {
    min-width: 130px;
    padding-right: 22px;
}

    .stat-item + .stat-item {
        padding-left: 22px;
        border-left: 1px solid rgba(255, 255, 255, 0.22);
    }

.stat-number {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

/* Footer */

.hero-footer {
    position: absolute;
    left: 55px;
    right: 30px;
    bottom: 18px;
    font-size: 9px;
    letter-spacing: 3px;
    line-height: 1.5;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

/* =========================================================
   RIGHT / FORM
========================================================= */

.form-section {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 55px;
    overflow: hidden;
}

    .form-section::before {
        content: "";
        position: absolute;
        left: -55px;
        top: -80px;
        width: 170px;
        height: 120%;
        border-radius: 48%;
        transform: rotate(8deg);
        opacity: 0.95;
    }

    .form-section::after {
        content: "❧";
        position: absolute;
        right: 40px;
        top: 20px;
        font-size: 80px;
        color: #65ae39;
        opacity: 0.12;
        transform: rotate(-18deg);
    }

/* Login Card */

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    padding: 28px 42px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 25px 70px rgba(13, 73, 36, 0.14);
}

.login-title {
    margin: 0 0 4px;
    font-family: "Cormorant Garamond", serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
}

    .login-title span {
        color: var(--green);
    }

.login-subtitle {
    margin-bottom: 18px;
    font-size: 20px;
    color: #086e33;
    font-weight: 600;
}

/* =========================================================
   FORM
========================================================= */

.form-group {
    margin-bottom: 13px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.field-wrapper {
    position: relative;
    width: 100%;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    font-size: 16px;
    color: #137737;
    pointer-events: none;
}

.field-wrapper .form-control,
.field-wrapper .form-select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding-left: 50px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    box-shadow: none;
}

    .field-wrapper .form-control:focus,
    .field-wrapper .form-select:focus {
        border-color: #83ca60;
        box-shadow: 0 0 0 4px rgba(131, 202, 96, 0.12);
    }

/* =========================================================
   ROLE DROPDOWN
========================================================= */

.role-dropdown {
    position: relative;
    width: 100%;
}

.role-dropdown-btn {
    width: 100%;
    height: 48px;
    padding: 0 45px 0 50px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
    text-align: left;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: none;
}

    .role-dropdown-btn:hover,
    .role-dropdown-btn:focus {
        background: #fff;
        border-color: #00843d;
        box-shadow: 0 0 0 4px rgba(0, 132, 61, 0.08);
    }

.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.role-dropdown.show .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.role-menu {
    width: 100%;
    max-height: 250px;
    margin-top: 5px !important;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    overflow-y: auto;
}

    .role-menu .dropdown-item {
        padding: 8px 10px;
        border-radius: 6px;
        font-size: 14px;
        color: #1f2937;
        white-space: normal;
    }

        .role-menu .dropdown-item:hover {
            background: #f0fdf4;
            color: #00843d;
        }

        .role-menu .dropdown-item.active {
            background: #00843d;
            color: #fff;
        }

/* Password */

.password-control {
    padding-right: 50px !important;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    cursor: pointer;
    color: #66717c;
}

/* =========================================================
   OPTIONS
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 4px 0 16px;
}

.remember-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

    .remember-box input {
        width: 17px;
        height: 17px;
        accent-color: var(--green);
    }

.forgot-link {
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .forgot-link:hover {
        color: #085b27;
    }

/* =========================================================
   BUTTON
========================================================= */

.login-btn {
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient( 90deg, #056b33, #51ad35 );
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(29, 135, 58, 0.22);
    transition: all 0.2s ease;
}

    .login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 28px rgba(29, 135, 58, 0.27);
    }

    .login-btn i {
        margin-left: 10px;
    }

/* =========================================================
   BACK HOME
========================================================= */

.back-home-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #00843d;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

    .back-home-link:hover {
        color: #006c32;
    }

    .back-home-link i {
        font-size: 14px;
        transition: transform 0.25s ease;
    }

    .back-home-link:hover i {
        transform: translateX(-3px);
    }

/* =========================================================
   SECURITY
========================================================= */

.secure-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 19px 0 15px;
    color: #7e8791;
    font-size: 12px;
}

    .secure-title::before,
    .secure-title::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #dce2dc;
    }

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 3fr);
    gap: 10px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #727b84;
    font-size: 10px;
    line-height: 1.3;
}

.security-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eff8eb;
    color: var(--green);
    font-size: 15px;
}

/* =========================================================
   LARGE LAPTOP
========================================================= */

@media (max-width: 1200px) {

    .login-page {
        grid-template-columns: 45% 55%;
    }

    .hero-section {
        padding-left: 35px;
        padding-right: 35px;
    }

    .form-section {
        padding-left: 30px;
        padding-right: 30px;
    }

    .hero-title {
        font-size: clamp(45px, 5vw, 62px);
    }

    .login-card {
        padding: 25px 32px 22px;
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991.98px) {

    html,
    body {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-page {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        height: auto;
        overflow: visible;
        background: linear-gradient( 180deg, rgba(5, 40, 22, 0.96), rgba(5, 40, 22, 0.88) ), url("/assets/images/login_bg.png") center / cover no-repeat;
    }

    /* Hero becomes top section */

    .hero-section {
        width: 100%;
        min-height: auto;
        padding: 35px 30px 40px;
        overflow: visible;
    }

    .hero-content {
        max-width: 700px;
        margin-top: 30px;
    }

    .hero-title {
        font-size: clamp(45px, 8vw, 65px);
    }

    .hero-description {
        max-width: 600px;
    }

    .hero-footer {
        position: static;
        margin-top: 35px;
    }

    /* Form */

    .form-section {
        width: 100%;
        min-height: auto;
        padding: 45px 30px;
        overflow: visible;
    }

        .form-section::before,
        .form-section::after {
            display: none;
        }

    .login-card {
        width: 100%;
        max-width: 650px;
        margin: 0 auto;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 960px) {

    .hero-section {
        padding: 28px 20px 35px;
    }

    .brand {
        gap: 12px;
    }

    .logo-box {
        width: 55px;
        height: 55px;
        flex-basis: 55px;
        border-radius: 16px;
    }

        .logo-box img {
            max-width: 42px;
            max-height: 42px;
        }

    .brand-info h2 {
        font-size: 25px;
    }

    .brand-info p {
        font-size: 12px;
    }

    .hero-content {
        margin-top: 28px;
        display:none;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 55px);
        line-height: 1.05;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.5;
    }

    .feature-list {
        gap: 14px;
    }

    .feature-item {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
    }

    .feature-icon {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .feature-info strong {
        font-size: 14px;
    }

    .feature-info span {
        font-size: 11px;
    }

    .stats {
        gap: 15px;
    }

    .stat-item,
    .stat-item + .stat-item {
        min-width: 0;
        flex: 1 1 30%;
        padding: 0;
        border: none;
    }

    .stat-number {
        font-size: 27px;
    }

    .stat-label {
        font-size: 11px;
    }

    .hero-footer {
        margin-top: 14px;
        font-size: 8px;
        letter-spacing: 2px;
    }

    /* Form */

    .form-section {
        padding: 30px 15px 35px;
    }

    .login-card {
        padding: 24px 18px 22px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 36px;
    }

    .login-subtitle {
        font-size: 17px;
        margin-bottom: 18px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 12px;
    }

    /* Role */

    .role-dropdown-btn {
        height: 48px;
        min-height: 48px;
        padding-left: 48px;
        padding-right: 42px;
        border-radius: 8px;
        font-size: 14px;
    }

    .field-icon {
        left: 15px;
        font-size: 15px;
    }

    .dropdown-arrow {
        right: 15px;
    }

    /* Login options */

    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .forgot-link {
        align-self: flex-end;
    }

    /* Security */

    .security-grid {
        gap: 7px;
    }

    .security-item {
        font-size: 11px;
    }

    .security-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .hero-section {
        padding: 22px 15px 9px;
    }

    .brand-info h2 {
        font-size: 22px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-description {
        font-size: 13px;
    }

    .stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }

    .form-section {
        padding: 20px 10px 30px;
    }

    .login-card {
        padding: 22px 9px 20px;
        border-radius: 14px;
    }

    .login-title {
        font-size: 32px;
    }

    .login-subtitle {
        font-size: 16px;
    }

    .login-btn {
        min-height: 50px;
        font-size: 14px;
    }

    .back-home-link {
        font-size: 13px;
    }
}

/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 360px) {

    .logo-box {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

        .logo-box img {
            max-width: 36px;
            max-height: 36px;
        }

    .brand-info h2 {
        font-size: 20px;
    }

    .brand-info p {
        font-size: 11px;
    }

    .hero-title {
        font-size: 36px;
    }

    .login-card {
        padding-left: 13px;
        padding-right: 13px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-item {
        text-align: left;
    }

    .login-options {
        font-size: 12px;
    }
}
