@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #0D72FF;
    --color-primary-hover: #0A5FDB;
    --color-primary-active: #0851BC;
    --color-text: #0A0E1F;
    --color-text-muted: #6B7280;
    --color-text-soft: #9CA3AF;
    --color-border: #C9D8F1;
    --color-border-focus: #0D72FF;
    --color-bg: #F4F7FB;
    --color-card: #FFFFFF;
    --color-error: #DC2626;
    --color-error-bg: #FEF2F2;
    --color-error-border: #FECACA;
    --color-success: #047857;
    --color-success-bg: #ECFDF5;
    --color-success-border: #A7F3D0;
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-card: 0 20px 60px -10px rgba(13, 114, 255, 0.10), 0 4px 12px rgba(13, 114, 255, 0.04);
    --transition-base: 0.18s ease;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.banner {
    display: none;
}

.card {
    width: 100%;
    max-width: 480px;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 36px 28px 28px;
    box-shadow: var(--shadow-card);
}

.card-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    display: block;
    margin: 0 auto 28px;
    height: 36px;
    width: auto;
}

h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--color-text);
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

.lead {
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.95;
    max-width: 36ch;
    margin-inline: auto;
}

.field {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    font-size: 14px;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--color-text-soft);
    pointer-events: none;
    transition: color var(--transition-base);
}

input {
    width: 100%;
    height: 54px;
    padding-inline-start: 46px;
    padding-inline-end: 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 15px;
    background: var(--color-card);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input::placeholder {
    color: var(--color-text-soft);
}

input:hover:not(:focus) {
    border-color: #A8C0EB;
}

input:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 4px rgba(13, 114, 255, 0.10);
}

input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--color-primary);
}

input[aria-invalid="true"] {
    border-color: var(--color-error);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

input[type="tel"] {
    font-family: 'Segoe UI', 'Vazirmatn', sans-serif;
    letter-spacing: 0.02em;
}

.error {
    color: var(--color-error);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.submit-btn {
    width: 100%;
    height: 56px;
    background: var(--color-primary);
    color: white;
    font: inherit;
    font-weight: 700;
    font-size: 17px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 8px;
    transition: background-color var(--transition-base), transform var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: var(--color-primary-hover);
}

.submit-btn:active {
    background: var(--color-primary-active);
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    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;
}

.submit-btn.loading .btn-spinner {
    display: inline-block;
}

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

.status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.7;
}

.status.success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}

.status.error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error-border);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #EEF2F7;
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}

.shield-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-text-soft);
}

@media (min-width: 1024px) {
    .content {
        flex: 0 0 56%;
        max-width: 56%;
        padding: 40px;
    }

    .banner {
        display: block;
        flex: 1;
        background-image: url('side-banner.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 100vh;
    }

    .card {
        padding: 48px 40px 36px;
        max-width: 520px;
    }

    h1 {
        font-size: 30px;
    }
}

@media (min-width: 1440px) {
    .content {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .card {
        max-width: 540px;
    }
}

@media (max-width: 380px) {
    .card {
        padding: 28px 20px 24px;
    }

    h1 {
        font-size: 22px;
    }
}

/* Gift page: no side banner, so keep the card centered in the full viewport
   (overrides the 56%/50% .content widths from the large-screen media queries
   via higher selector specificity). */
.page--centered .content {
    flex: 1 1 auto;
    max-width: none;
}

.gift-info {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #EFF5FF;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.gift-info.error {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.status.info {
    background: #EFF5FF;
    color: var(--color-primary-active);
    border: 1px solid var(--color-border);
}
