@font-face {
    font-family: "Shabnam";
    src: url("/assets/fonts/Shabnam.woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --zw-bg: #f7f7f5;
    --zw-surface: #ffffff;
    --zw-text: #18181a;
    --zw-muted: #717177;
    --zw-soft: #99999f;

    --zw-border: #e5e5e3;
    --zw-border-hover: #cececb;

    --zw-primary: #18181a;
    --zw-primary-hover: #303034;

    --zw-danger-bg: #fff7f6;
    --zw-danger-border: #edd6d3;
    --zw-danger-text: #9a352e;

    --zw-success-bg: #f5faf6;
    --zw-success-border: #d5e7d9;
    --zw-success-text: #346244;

    --zw-radius: 8px;
    --zw-control: 44px;
}

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

html {
    min-height: 100%;
    background: var(--zw-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--zw-bg);
    color: var(--zw-text);
    font-family:
        "Shabnam",
        Tahoma,
        Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

img,
svg {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ---------------------------------------------------------
   Login shell
   --------------------------------------------------------- */

.zw-login {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 76px 1fr 64px;
    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(255, 255, 255, 0.95),
            transparent 32%
        ),
        var(--zw-bg);
}

.zw-login__header {
    display: flex;
    align-items: center;
    padding: 0 30px;
}

.zw-login__brand {
    display: inline-flex;
    align-items: center;
}

.zw-login__logo {
    width: auto;
    max-width: 132px;
    height: 30px;
    object-fit: contain;
}

.zw-login__main {
    display: grid;
    place-items: center;
    padding: 44px 24px 80px;
}

.zw-auth {
    width: min(100%, 390px);
}

.zw-auth__header {
    margin-bottom: 30px;
}

.zw-auth__product {
    display: block;
    margin-bottom: 10px;
    color: var(--zw-soft);
    direction: ltr;
    text-align: right;
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.095em;
}

.zw-auth__title {
    margin: 0;
    color: var(--zw-text);
    font-size: 26px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.zw-auth__description {
    max-width: 345px;
    margin: 8px 0 0;
    color: var(--zw-muted);
    font-size: 12.5px;
    line-height: 1.95;
}

.zw-alert {
    margin-bottom: 20px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: var(--zw-radius);
    font-size: 12px;
    line-height: 1.8;
}

.zw-alert--error {
    border-color: var(--zw-danger-border);
    background: var(--zw-danger-bg);
    color: var(--zw-danger-text);
}

.zw-alert--success {
    border-color: var(--zw-success-border);
    background: var(--zw-success-bg);
    color: var(--zw-success-text);
}

.zw-form {
    display: grid;
    gap: 17px;
}

.zw-field {
    display: grid;
    gap: 7px;
}

.zw-field__label {
    color: #444447;
    font-size: 12px;
    font-weight: 400;
}

.zw-input {
    width: 100%;
    height: var(--zw-control);
    padding: 0 13px;
    border: 1px solid var(--zw-border);
    border-radius: var(--zw-radius);
    outline: none;
    background: var(--zw-surface);
    color: var(--zw-text);
    font-size: 13px;
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.zw-input:hover {
    border-color: var(--zw-border-hover);
}

.zw-input:focus {
    border-color: #aaa9a5;
    box-shadow:
        0 0 0 3px
        rgba(20, 20, 22, 0.07);
}

.zw-input::placeholder {
    color: #aaa9ae;
}

.zw-input--ltr {
    direction: ltr;
    text-align: left;
}

.zw-button {
    width: 100%;
    min-height: var(--zw-control);
    margin-top: 2px;
    border: 0;
    border-radius: var(--zw-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    background: var(--zw-primary);
    color: #fff;
    font-size: 12.5px;
    font-weight: 400;
    transition:
        background 120ms ease,
        transform 80ms ease;
}

.zw-button:hover {
    background: var(--zw-primary-hover);
}

.zw-button:active {
    transform: translateY(1px);
}

.zw-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px
        rgba(20, 20, 22, 0.12);
}

.zw-button svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.zw-auth__security {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    color: var(--zw-soft);
    font-size: 10.5px;
}

.zw-auth__security svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    flex: 0 0 auto;
}

.zw-login__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.045);
    color: var(--zw-soft);
    font-size: 10.5px;
}

.zw-login__footer-en {
    direction: ltr;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 640px) {
    .zw-login {
        grid-template-rows: 68px 1fr auto;
    }

    .zw-login__header {
        padding: 0 20px;
    }

    .zw-login__logo {
        height: 27px;
    }

    .zw-login__main {
        place-items: start center;
        padding: 58px 20px 64px;
    }

    .zw-auth {
        width: 100%;
    }

    .zw-auth__title {
        font-size: 23px;
    }

    .zw-login__footer {
        min-height: 72px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 3px;
        padding: 16px 20px;
    }
}

@media (max-width: 380px) {
    .zw-login__header,
    .zw-login__main,
    .zw-login__footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

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