:root {
    --page-background: #f4f2ee;
    --card-background: #ffffff;
    --text-primary: #211f1c;
    --text-secondary: #716b64;
    --border-color: #ddd7ce;
    --border-strong: #bdb4a8;
    --brand-dark: #28231e;
    --brand-soft: #f0ebe4;
    --success: #16784b;
    --danger: #b42318;
    --warning: #946200;
    --shadow: 0 22px 65px rgba(38, 32, 26, 0.1);
    --radius-large: 28px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top right,
            #ffffff 0,
            var(--page-background) 42%
        );
    color: var(--text-primary);
    font-family:
        Vazirmatn,
        IRANSans,
        Tahoma,
        Arial,
        sans-serif;
    line-height: 1.7;
}

button,
input {
    font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(40, 35, 30, 0.2);
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.is-hidden {
    display: none !important;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin-inline: auto;
}











.login-main {
    padding-block: 54px 76px;
}

.login-shell {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(380px, 0.75fr);
    align-items: center;
    gap: 64px;
}

.login-introduction {
    padding: 24px;
}

.eyebrow,
.step-number {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 900;
}

.login-introduction h1 {
    margin: 5px 0 12px;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.3;
}

.login-introduction > p:last-of-type {
    max-width: 600px;
    margin: 0;
    color: var(--text-secondary);
}

.security-list {
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.security-list li {
    position: relative;
    padding-right: 28px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 800;
}

.security-list li::before {
    position: absolute;
    top: 0.4em;
    right: 0;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(22, 120, 75, 0.1);
    color: var(--success);
    content: "✓";
    font-size: 0.68rem;
}

.login-card {
    min-height: 470px;
    padding: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    background: var(--card-background);
    box-shadow: var(--shadow);
}

.state-panel {
    min-height: 400px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    text-align: center;
}

.state-panel h2,
.state-panel p {
    margin: 0;
}

.state-panel p {
    color: var(--text-secondary);
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--brand-soft);
    border-top-color: var(--brand-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.form-step {
    display: grid;
    align-content: start;
}

.step-heading {
    margin-bottom: 24px;
}

.step-heading h2 {
    margin: 4px 0 2px;
    font-size: 1.65rem;
}

.step-heading > p:last-child {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.field {
    display: grid;
    gap: 8px;
}

.field > span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 900;
}

.field input {
    width: 100%;
    min-height: 56px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-medium);
    background: #ffffff;
    color: var(--text-primary);
    direction: ltr;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
}

#codeInput {
    font-size: 1.45rem;
    letter-spacing: 0.45em;
}

.form-status {
    min-height: 29px;
    margin: 10px 0 4px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 900;
}

.form-status.is-error {
    color: var(--danger);
}

.form-status.is-warning {
    color: var(--warning);
}

.form-status.is-success {
    color: var(--success);
}

.button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--brand-dark);
    border-radius: var(--radius-medium);
    cursor: pointer;
    font-weight: 900;
    text-decoration: none;
}

.button-primary {
    background: var(--brand-dark);
    color: #ffffff;
}

.development-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px dashed var(--warning);
    border-radius: var(--radius-small);
    background: rgba(148, 98, 0, 0.06);
    color: var(--warning);
    font-size: 0.82rem;
}

.development-code strong {
    direction: ltr;
    font-size: 1.1rem;
    letter-spacing: 0.16em;
}

.secondary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.text-button {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 900;
}

.text-button:hover:not(:disabled) {
    color: var(--text-primary);
    text-decoration: underline;
}

.success-symbol {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(22, 120, 75, 0.1);
    color: var(--success);
    font-size: 2rem;
    font-weight: 900;
}

.noscript-message {
    position: fixed;
    z-index: 100;
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 16px;
    border: 1px solid var(--danger);
    border-radius: var(--radius-medium);
    background: #ffffff;
    color: var(--danger);
    text-align: center;
}

@media (max-width: 850px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .login-introduction {
        padding: 8px;
    }

    .login-introduction h1 {
        font-size: clamp(1.9rem, 9vw, 3rem);
    }
}

@media (max-width: 540px) {
    .container {
        width: min(100% - 20px, 1080px);
    }



    .login-main {
        padding-block: 24px 46px;
    }

    .login-card {
        min-height: 440px;
        padding: 24px 16px;
        border-radius: 22px;
    }

    .state-panel {
        min-height: 360px;
    }
}
