*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: rgb(79, 50, 10);
    --primary-2: #6b4818;
    --white: #fff;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    background: #100b05;
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 38vw);
    background:
        linear-gradient(90deg, rgba(12, 7, 2, 0.10) 0%, rgba(12, 7, 2, 0.16) 43%, rgba(8, 5, 2, 0.82) 100%),
        url("../images/oasis-baklawa-login-bg.png") center / cover no-repeat;
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 2vw, 55px);
}

.login-panel {
    display: grid;
    place-items: center;
    padding: clamp(25px, 2vw, 62px);
}

.login-card {
    width: min(430px, 100%);
    color: white;
    padding: clamp(28px, 2vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(8, 5, 2, 0.28);
}

.login-card h2 {
    margin: 22px 0 7px;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.login-card > .muted {
    margin: 0 0 31px;
    color: rgba(255, 255, 255, 0.52);
    text-align: center;
    font-size: 12px;
}

.mobile-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.mobile-logo img {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.login-card label {
    display: grid;
    gap: 7px;
    margin-bottom: 17px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 400;
}

.login-card input {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.045);
    outline: none;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.27);
}

.login-card input:focus {
    border-color: #b88d50;
    box-shadow: 0 0 0 3px rgba(184, 141, 80, 0.12);
}

.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: #211a12;
    box-shadow: 0 0 0 1000px #f4ead9 inset;
    border-color: rgba(255, 255, 255, 0.13);
    transition: background-color 5000s ease-in-out 0s;
}

.button {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 650;
    font-size: 13px;
    transition: 0.2s;
}

.button.full {
    width: 100%;
    padding: 13px;
}

.button.primary {
    color: white;
    background: var(--primary);
}

.login-card .button.primary {
    margin-top: 3px;
    background: linear-gradient(135deg, #6b4818, #a97937);
    box-shadow: 0 8px 24px rgba(122, 80, 24, 0.32);
}

.login-card .button.primary:hover {
    transform: translateY(-1px);
}

.text-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.login-card .text-button {
    color: #d8ba8c;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 52px;
}

.password-wrap .password-toggle {
    width: 38px;
    height: 38px;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #f0d4a8;
    outline: none;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: block;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: none;
}

.alert {
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 9px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert.error {
    color: #91312b;
    border-color: #e5c2bf;
    background: #fff0ef;
}

.login-footer {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    font-size: 11px;
    line-height: 1.45;
}

.login-footer p {
    margin: 0;
}

.login-footer p + p {
    margin-top: 3px;
}

.login-footer strong {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.login-footer span {
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.25);
}

.login-footer a:hover,
.login-footer a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-toast {
    position: fixed;
    top: calc(1rem + env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 1000;
    width: max-content;
    max-width: min(92vw, 360px);
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    color: #f9fafb;
    background: linear-gradient(135deg, #4f320a 0%, #211a12 100%);
    border: 1px solid rgba(184, 141, 80, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateX(-50%) translateY(-120%);
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}

.login-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.login-toast.is-hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(-120%);
}

@media (max-width: 800px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        padding: 25px;
    }
}

@media (max-width: 560px) {
    .login-panel {
        align-items: start;
        padding-top: 35px;
    }

    .login-card h2 {
        font-size: 29px;
    }
}

.pwa-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    background: #4d2f0d;
    color: #fff8ee;
    box-shadow: 0 8px 24px rgba(77, 47, 13, 0.28);
}

.pwa-banner[hidden] {
    display: none !important;
}

.pwa-install-banner,
.pwa-notif-banner {
    top: 0;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.pwa-banner-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.pwa-banner-text strong {
    display: block;
    font-size: 0.9rem;
}

.pwa-banner-text p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.pwa-banner-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.pwa-banner-btn {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
}

.pwa-banner-btn--primary {
    background: #fff;
    color: #4d2f0d;
    font-weight: 700;
}

.pwa-install-banner[data-platform="ios"] .pwa-banner-android,
.pwa-install-banner[data-platform="android"] .pwa-banner-ios {
    display: none;
}
