/* ===================== Reset & Base ===================== */
@import "tailwindcss";
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

.bigIcon { width: 4rem; }
.mediumIcon { width: 3rem; }
.smallIcon { width: 2rem; }

/* ===================== Header ===================== */
.headerContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 2px solid #2c5530;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0 auto;
    width: 100%;
}

.leftHeader {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    display: block;
}

.logo img.logo-img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
}

.logo h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    color: #2c5530;
}

/* Center Navigation */
.centerNav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navLink {
    color: #2c5530;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.03em;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    background: transparent;
}

.navLink:hover {
    color: #1a3d1f;
    border-bottom-color: #2c5530;
    background: transparent;
}

.navLink.active {
    color: #1a3d1f;
    border-bottom-color: #2c5530;
    background: transparent;
}

.rightHeader {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.headerAction {
    gap: 0.5rem;
    display: flex;
    align-items: center;
    position: relative;
}

.headerAction p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c5530;
}

/* ===================== Main Content ===================== */
main {
    min-height: calc(100vh - 30rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

/* ===================== Login Page ===================== */
.login-page-container {
    background: transparent;
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    max-width: 50rem;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 1.2rem;
    padding: 4rem;
}

.login-form-header {
    margin-bottom: 3rem;
}

.login-form-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2c5530;
    margin-bottom: 1rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

.login-form-body {
    text-align: left;
}

.login-form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.login-form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #333;
    font-size: 1.6rem;
}

.login-form-group input {
    width: 100%;
    padding: 1.5rem;
    border: 0.2rem solid #ddd;
    border-radius: 0.4rem;
    font-size: 1.6rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    color: #333;
}

.login-form-group input::placeholder {
    color: #999;
}

.login-form-group input:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 0.3rem rgba(44, 85, 48, 0.1);
}

.forgot-password-link {
    color: #2c5530;
    text-decoration: underline;
    font-size: 1.4rem;
    margin-top: 0.5rem;
    display: inline-block;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.login-error-message {
    color: #e74c3c;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: none;
    text-align: center;
    background: #ffe6e6;
    padding: 1.5rem;
    border-radius: 0.4rem;
    border: 1px solid #ffcccc;
}

.login-success-message {
    color: #27ae60;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: none;
    text-align: center;
    background: #e6ffe6;
    padding: 1.5rem;
    border-radius: 0.4rem;
    border: 1px solid #ccffcc;
}

.captcha-section {
    margin: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    width: 100%;
}

button[type="submit"] {
    background: #2c5530;
    color: white;
    border: none;
    padding: 1.8rem 4rem;
    border-radius: 0.4rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    min-height: 5.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

button[type="submit"]:hover {
    background: #1a3d1f;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 0.8rem rgba(44, 85, 48, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-register-text {
    margin-top: 2rem;
    text-align: center;
    font-size: 1.4rem;
    color: #666;
}

.login-register-link {
    color: #2c5530;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-register-link:hover {
    color: #1a3d1f;
}

/* Loading animation */
.login-loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.2rem solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: loginSpin 1s ease-in-out infinite;
    margin-right: 1rem;
}

@keyframes loginSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================== Forgot Password Modal ===================== */
.forgot-password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.forgot-password-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 0.8rem;
    max-width: 40rem;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 2rem;
    color: #2c5530;
    font-size: 2.4rem;
    font-weight: 700;
}

.modal-content p {
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.4rem;
}

.modal-content input {
    width: 100%;
    padding: 1.5rem;
    border: 0.2rem solid #ddd;
    border-radius: 0.4rem;
    margin-bottom: 2rem;
    font-size: 1.6rem;
}

.modal-content input:focus {
    outline: none;
    border-color: #2c5530;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 1.2rem 2.4rem;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: #2c5530;
    color: white;
}

.modal-btn-primary:hover {
    background: #1a3d1f;
}

.modal-btn-secondary {
    background: #ddd;
    color: #333;
}

.modal-btn-secondary:hover {
    background: #ccc;
}

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
    .centerNav {
        gap: 1.5rem;
    }
    
    .navLink {
        font-size: 15px;
    }
    
    .rightHeader {
        gap: 2rem;
    }

    main {
        padding: 5rem 2rem;
    }

    .login-form-wrapper {
        max-width: 60rem;
        padding: 3.5rem;
    }

    .login-form-header h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .headerContainer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .centerNav {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid #efe3b8;
    }
    
    .navLink {
        font-size: 14px;
    }
    
    .rightHeader {
        gap: 15px;
    }
    
    .headerAction p {
        font-size: 14px;
    }

    main {
        padding: 4rem 1.5rem;
        min-height: calc(100vh - 20rem);
    }

    .login-form-wrapper {
        padding: 3rem 2.5rem;
        box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.08);
        border-radius: 0.6rem;
    }

    .login-form-header {
        margin-bottom: 2.5rem;
    }

    .login-form-header h1 {
        font-size: 2.4rem;
        letter-spacing: 0.05rem;
    }

    .login-form-group {
        margin-bottom: 2rem;
    }

    .login-form-group label {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }

    .login-form-group input {
        padding: 1.2rem;
        font-size: 1.5rem;
        border-width: 0.15rem;
    }

    .captcha-section {
        margin: 2.5rem 0;
    }

    button[type="submit"] {
        padding: 1.5rem 3rem;
        font-size: 1.5rem;
        min-height: 5rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 3.5rem;
        height: 3.5rem;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .rightHeader {
        gap: 10px;
    }

    .headerAction p {
        font-size: 14px;
    }

    .headerAction {
        gap: 0.3rem;
    }

    main {
        padding: 3rem 1rem;
        min-height: calc(100vh - 15rem);
    }

    .login-form-wrapper {
        padding: 2.5rem 1.8rem;
        border-radius: 0.5rem;
        box-shadow: 0 0.3rem 1.5rem rgba(0, 0, 0, 0.1);
    }

    .login-form-header {
        margin-bottom: 2rem;
    }

    .login-form-header h1 {
        font-size: 2rem;
        letter-spacing: 0.05rem;
    }

    .login-form-group {
        margin-bottom: 1.8rem;
    }

    .login-form-group label {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .login-form-group input {
        font-size: 1.4rem;
        padding: 1.1rem;
        border-radius: 0.3rem;
    }

    .captcha-section {
        margin: 2rem 0;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }

    button[type="submit"] {
        font-size: 1.4rem;
        padding: 1.4rem 2rem;
        min-height: 4.8rem;
        letter-spacing: 0.08rem;
    }

    button[type="submit"]:hover {
        transform: none;
    }

    .login-loading {
        width: 1.6rem;
        height: 1.6rem;
        margin-right: 0.8rem;
    }

    .login-register-text {
        font-size: 1.2rem;
    }
}

/* Very Small Mobile */
@media (max-width: 375px) {
    main {
        padding: 2.5rem 0.8rem;
    }

    .login-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .login-form-header h1 {
        font-size: 1.8rem;
    }

    .login-form-group label {
        font-size: 1.3rem;
    }

    .login-form-group input {
        font-size: 1.3rem;
        padding: 1rem;
    }

    button[type="submit"] {
        font-size: 1.3rem;
        padding: 1.3rem 1.8rem;
    }

    .cf-turnstile {
        transform: scale(0.85);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    main {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .login-form-wrapper {
        padding: 2rem;
    }

    .login-form-header {
        margin-bottom: 1.5rem;
    }

    .login-form-header h1 {
        font-size: 2rem;
    }

    .login-form-group {
        margin-bottom: 1.5rem;
    }
}
