:root {
    --dark-green: #0b3d2e;
    --deep-green: #082f24;
    --green: #145a46;
    --medium-green: #1c7659;
    --gold: #d4af37;
    --gold-light: #e8ca65;
    --gold-dark: #b89424;
    --cream: #f8f6ef;
    --white: #ffffff;
    --text-dark: #17241f;
    --text-gray: #718078;
    --border: #e2e8e4;
    --error: #dc4b4b;
    --shadow: 0 30px 80px rgba(4, 38, 28, 0.18);
    --radius-large: 28px;
    --radius-medium: 15px;
}

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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    overflow-x: hidden;
}

.page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(212, 175, 55, 0.10),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(20, 90, 70, 0.12),
            transparent 30%
        ),
        var(--cream);
}

.background-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.shape-one {
    width: 500px;
    height: 500px;
    top: -300px;
    left: -250px;
    border-radius: 50%;
    background: rgba(11, 61, 46, 0.05);
}

.shape-two {
    width: 420px;
    height: 420px;
    bottom: -250px;
    right: -180px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.07);
}

.background-circle {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.45;
    z-index: 0;
}

.circle-one {
    top: 15%;
    left: 12%;
}

.circle-two {
    bottom: 20%;
    right: 14%;
    width: 14px;
    height: 14px;
}

.login-container {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 44% 56%;
    background: var(--white);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    animation: containerAppear 0.8s ease forwards;
}

@keyframes containerAppear {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand-section {
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px;
    color: var(--white);
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(212, 175, 55, 0.18),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            var(--dark-green),
            var(--deep-green)
        );
    overflow: hidden;
}

.brand-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    right: -150px;
    bottom: -120px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.brand-section::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    right: -90px;
    bottom: -70px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: var(--white);
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
    margin-bottom: 42px;
    animation: logoFloat 4s ease-in-out infinite;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.small-heading {
    display: block;
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.brand-text h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.brand-text h1 span {
    color: var(--gold);
}

.brand-text p {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 400;
}

.brand-line {
    width: 65px;
    height: 3px;
    background: var(--gold);
    border-radius: 10px;
    margin: 38px 0;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    max-width: 250px;
    line-height: 1.5;
}

.brand-footer i {
    color: var(--gold);
    font-size: 16px;
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.mobile-logo {
    display: none;
}

.login-heading {
    margin-bottom: 34px;
}

.welcome-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-dark);
    margin-bottom: 17px;
}

.login-heading h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.7px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-heading p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.message {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #edf9f2;
    color: #247a49;
    border: 1px solid #d5efdf;
}

.message.error {
    background: #fff1f1;
    color: #b43838;
    border: 1px solid #f4d6d6;
}

.message.warning {
    background: #fff8e8;
    color: #8a691c;
    border: 1px solid #f2e2b5;
}

.message.info {
    background: #eef7fb;
    color: #286a84;
    border: 1px solid #d8ebf3;
}

.field {
    margin-bottom: 22px;
}

.input-wrapper {
    height: 58px;
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-medium);
    background: #fbfcfb;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.input-wrapper:hover {
    border-color: #cbd7d1;
}

.input-wrapper:focus-within {
    border-color: var(--green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(20, 90, 70, 0.08);
}

.input-wrapper.has-error {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(220, 75, 75, 0.07);
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 20px 48px 4px 48px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
}

.input-wrapper input::placeholder {
    color: transparent;
}

.input-wrapper label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 14px;
    pointer-events: none;
    transition:
        top 0.2s ease,
        transform 0.2s ease,
        font-size 0.2s ease,
        color 0.2s ease;
    background: transparent;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: 8px;
    transform: translateY(0);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--green);
}

.input-icon {
    position: absolute;
    left: 17px;
    color: #93a29b;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--green);
}

.password-toggle {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #89968f;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.password-toggle:hover {
    background: #edf3ef;
    color: var(--green);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.error {
    min-height: 17px;
    padding-left: 4px;
    margin-top: 6px;
    color: var(--error);
    font-size: 11px;
    font-weight: 500;
}

.login-button {
    width: 100%;
    height: 58px;
    position: relative;
    border: none;
    border-radius: var(--radius-medium);
    background:
        linear-gradient(
            135deg,
            var(--dark-green),
            var(--green)
        );
    color: var(--white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(11, 61, 46, 0.20);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.13),
            transparent
        );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.login-button:hover::before {
    left: 130%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(11, 61, 46, 0.26);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.button-icon {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.login-button:hover .button-icon {
    transform: translateX(4px);
}

.button-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.login-button.loading .button-text,
.login-button.loading .button-icon {
    display: none;
}

.login-button.loading .button-loader {
    display: block;
}

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

.security-info {
    margin-top: 27px;
    padding: 13px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f9f7;
    border: 1px solid #edf0ed;
}

.security-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(20, 90, 70, 0.08);
    color: var(--green);
    font-size: 14px;
}

.security-info strong {
    display: block;
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
}

.security-info span {
    display: block;
    color: var(--text-gray);
    font-size: 10px;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    color: #9aa49f;
    font-size: 10px;
}

.footer-dot {
    color: var(--gold);
}

@media (max-width: 900px) {
    .page-wrapper {
        padding: 25px;
    }

    .login-container {
        grid-template-columns: 40% 60%;
        min-height: 600px;
    }

    .brand-section {
        padding: 40px;
    }

    .login-section {
        padding: 45px;
    }

    .brand-text h1 {
        font-size: 44px;
    }
}

@media (max-width: 700px) {
    body {
        background: var(--cream);
    }

    .page-wrapper {
        min-height: 100vh;
        padding: 18px;
    }

    .login-container {
        width: 100%;
        min-height: auto;
        display: block;
        border-radius: 22px;
        box-shadow: 0 20px 55px rgba(4, 38, 28, 0.13);
    }

    .brand-section {
        display: none;
    }

    .login-section {
        padding: 34px 25px 25px;
    }

    .login-card {
        max-width: none;
    }

    .mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 25px;
    }

    .mobile-logo img {
        width: 76px;
        height: 76px;
        object-fit: cover;
        border-radius: 20px;
        padding: 5px;
        background: var(--white);
        box-shadow: 0 10px 25px rgba(11, 61, 46, 0.13);
    }

    .login-heading {
        text-align: center;
        margin-bottom: 28px;
    }

    .welcome-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .login-heading p {
        font-size: 13px;
    }

    .security-info {
        margin-top: 22px;
    }

    .login-footer {
        margin-top: 20px;
    }
}

@media (max-width: 380px) {
    .page-wrapper {
        padding: 10px;
    }

    .login-section {
        padding: 28px 18px 20px;
    }

    .login-container {
        border-radius: 18px;
    }

    .mobile-logo img {
        width: 68px;
        height: 68px;
    }

    .input-wrapper {
        height: 55px;
    }

    .login-button {
        height: 55px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}