:root {
    --auth-primary: #1b8b7b;
    --auth-primary-dark: #157266;
    --auth-primary-soft: rgba(27, 139, 123, 0.16);
    --auth-text: #1a1f1e;
    --auth-muted: #6b7371;
    --auth-border: #d7e0de;
    --auth-panel: #0c4a43;
}

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

html,
body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    font-family: Inter, "Poppins", sans-serif;
    color: var(--auth-text);
    background: #f4f5f3;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 64px 36px;
    background: #f4f5f3;
}

.auth-brand-logo img {
    height: 150px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.auth-brand-copy {
    max-width: 520px;
    padding: 24px 0 48px;
}

.auth-brand-copy h1 {
    margin: 0 0 18px;
    color: #141918;
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.18;
}

.auth-brand-copy p {
    margin: 0;
    max-width: 46ch;
    color: #6d7472;
    font-size: 1.02rem;
    font-weight: 400;
    line-height: 1.55;
}

.auth-brand-footer {
    margin: 0;
    color: #8a918f;
    font-size: 0.78rem;
    line-height: 1.5;
}

.auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background-color: var(--auth-panel);
    background-image: url("https://amiosp.com/public/storage/photos/shares/Home%20(O)/Images/LOGIN%20Image.webp");
    background-size: cover;
    background-position: center;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11, 64, 58, 0.62) 0%,
        rgba(8, 46, 42, 0.72) 100%
    );
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
}

.auth-card,
.auth-card.card {
    width: 100%;
    margin: 0;
    background: #fff;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
}

.auth-card::before {
    display: none;
}

.auth-card .card-body,
.auth-body {
    padding: 36px 36px 32px;
}

.auth-title {
    margin: 0 0 6px;
    color: var(--auth-text);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-align: left;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label,
.auth-body label {
    display: block;
    margin-bottom: 8px;
    color: #2b3332;
    font-size: 0.84rem;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a9694;
    font-size: 13px;
    pointer-events: none;
}

.auth-card .form-control,
.auth-body .form-control {
    height: 46px;
    padding: 10px 42px 10px 40px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--auth-text);
    font-size: 0.92rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:focus,
.auth-body .form-control:focus {
    background-color: #fff;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-soft);
}

.auth-card .form-control::placeholder,
.auth-body .form-control::placeholder {
    color: #9aa6a4;
}

.auth-card .form-control.is-invalid,
.auth-body .form-control.is-invalid {
    border-color: #d64545;
    background-color: #fff;
    background-image: none;
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #8a9694;
    padding: 4px;
    cursor: pointer;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}

.toggle-password:hover,
.toggle-password:focus {
    color: var(--auth-primary);
    outline: none;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 22px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #3d4544;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
}

.auth-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.forgot-btn {
    color: var(--auth-primary) !important;
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.forgot-btn:hover {
    color: var(--auth-primary-dark) !important;
    text-decoration: underline;
}

.auth-submit,
.auth-card .btn-primary,
.auth-body .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--auth-primary) !important;
    color: #fff !important;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none;
    transition: background-color 0.2s ease;
}

.auth-submit:hover,
.auth-card .btn-primary:hover,
.auth-body .btn-primary:hover {
    background: var(--auth-primary-dark) !important;
}

.auth-secondary {
    display: block;
    margin-top: 18px;
    color: var(--auth-primary);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.auth-secondary:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-notice {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f3faf8;
    border: 1px solid #d5ebe6;
    text-align: center;
}

.auth-notice h5 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-notice .btn {
    min-width: 140px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: var(--auth-text) !important;
    caret-color: var(--auth-text);
    transition: background-color 9999s ease-out 0s;
}

.alert-success,
.alert-danger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    min-width: 280px;
    max-width: calc(100% - 40px);
    padding: 12px 16px;
    font-size: 13px;
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.alert-success {
    background: var(--auth-primary);
}

.alert-danger {
    background: #d64545;
}

@media (max-width: 1199.98px) {
    .auth-brand {
        padding: 36px 40px 28px;
    }

    .auth-brand-copy h1 {
        font-size: 2.15rem;
    }
}

@media (max-width: 991.98px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 20px 24px 8px;
    }

    .auth-brand-copy,
    .auth-brand-footer {
        display: none;
    }

    .auth-brand-logo img {
        height: 64px;
    }

    .auth-panel {
        min-height: calc(100vh - 92px);
        padding: 24px 16px 40px;
    }

    .auth-card .card-body,
    .auth-body {
        padding: 28px 24px 24px;
    }
}

@media (max-width: 575.98px) {
    .auth-title {
        font-size: 1.45rem;
    }

    .auth-row {
        flex-wrap: wrap;
    }

    .alert-success,
    .alert-danger {
        left: 16px;
        right: 16px;
        min-width: 0;
        bottom: 16px;
    }
}
