/* Oriental Warranty — 2026 Design System */
@import url('fonts.css');

:root {
    --font: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --accent: #7c3aed;
    --accent-dark: #6d28d9;
    --accent-2: #06b6d4;
    --accent-glow: rgba(124, 58, 237, 0.35);
    --text-on-accent: #ffffff;
    --link: #7c3aed;
    --link-hover: #6d28d9;
    --success: #10b981;
    --success-dark: #059669;
    --success-glow: rgba(16, 185, 129, 0.35);
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg-1: #f8fafc;
    --bg-2: #eef2ff;
    --bg-gradient-1: #e9d5ff;
    --bg-gradient-2: #bae6fd;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --border: rgba(255, 255, 255, 0.45);
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 10px 40px rgba(2, 6, 23, 0.08);
    --input-bg: rgba(255, 255, 255, 0.9);
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-text: var(--text);

    --btn-gradient-start: #7c3aed;
    --btn-gradient-end: #6d28d9;
    --tag-gradient-start: #7c3aed;
    --tag-gradient-end: #06b6d4;
    --badge-gradient-start: rgba(124, 58, 237, 0.12);
    --badge-gradient-end: rgba(6, 182, 212, 0.12);
    --badge-border: rgba(124, 58, 237, 0.2);
    --chip-gradient-start: rgba(124, 58, 237, 0.1);
    --chip-gradient-end: rgba(6, 182, 212, 0.1);
    --chip-border: rgba(124, 58, 237, 0.2);
    --chip-text: var(--accent);
    --surface-tint-start: rgba(124, 58, 237, 0.08);
    --surface-tint-end: rgba(6, 182, 212, 0.08);
    --ring-track: rgba(124, 58, 237, 0.12);
    --progress-track: rgba(124, 58, 237, 0.12);
    --support-fab-start: #7c3aed;
    --support-fab-end: #06b6d4;
    --support-fab-icon: #ffffff;
}

[data-theme="dark"] {
    --accent: #a78bfa;
    --accent-dark: #8b5cf6;
    --accent-2: #22d3ee;
    --accent-glow: rgba(167, 139, 250, 0.25);
    --text-on-accent: #ffffff;
    --link: #a78bfa;
    --link-hover: #c4b5fd;
    --bg-1: #0b0f1a;
    --bg-2: #111827;
    --bg-gradient-1: rgba(124, 58, 237, 0.15);
    --bg-gradient-2: rgba(6, 182, 212, 0.1);
    --surface: rgba(17, 24, 39, 0.85);
    --surface-solid: #1f2937;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --input-bg: rgba(31, 41, 55, 0.9);
    --header-bg: rgba(11, 15, 26, 0.9);
    --header-text: var(--text);

    --btn-gradient-start: #8b5cf6;
    --btn-gradient-end: #6d28d9;
    --tag-gradient-start: #a78bfa;
    --tag-gradient-end: #22d3ee;
    --badge-gradient-start: rgba(167, 139, 250, 0.15);
    --badge-gradient-end: rgba(34, 211, 238, 0.12);
    --badge-border: rgba(167, 139, 250, 0.25);
    --chip-gradient-start: rgba(167, 139, 250, 0.12);
    --chip-gradient-end: rgba(34, 211, 238, 0.1);
    --chip-border: rgba(167, 139, 250, 0.25);
    --chip-text: #c4b5fd;
    --surface-tint-start: rgba(167, 139, 250, 0.12);
    --surface-tint-end: rgba(34, 211, 238, 0.08);
    --ring-track: rgba(167, 139, 250, 0.15);
    --progress-track: rgba(167, 139, 250, 0.15);
    --support-fab-start: #8b5cf6;
    --support-fab-end: #22d3ee;
    --support-fab-icon: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-1);
    line-height: 1.6;
}

.app-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link, var(--accent));
    transition: color var(--transition);
}

a:hover {
    color: var(--link-hover, var(--accent-dark, var(--accent)));
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 10% -20%, var(--bg-gradient-1) 0%, transparent 60%),
        radial-gradient(800px 500px at 110% 10%, var(--bg-gradient-2) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.container {
    width: min(100% - 2rem, 1100px);
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: var(--header-bg, rgba(255, 255, 255, 0.8));
    border-bottom: 1px solid var(--border);
    color: var(--header-text, var(--text));
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--tag-gradient-start), var(--tag-gradient-end));
    color: var(--text-on-accent);
}

.brand-icon svg { width: 22px; height: 22px; }

.brand-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-solid);
    border: 1px solid var(--border);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-title {
    color: var(--header-text, var(--text));
}

.brand-subtitle {
    color: var(--header-text, var(--text-muted));
    opacity: 0.85;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong { font-size: 0.95rem; letter-spacing: 0.05em; }
.brand-text small { font-size: 0.72rem; color: var(--text-muted); }

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}

.theme-toggle:hover { border-color: var(--accent); }

.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun { display: none; }

.main-content { flex: 1; padding: 1.5rem 0 3rem; }

/* Cards */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.page-enter {
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero / Serial entry */
.hero-card {
    padding: clamp(1.5rem, 5vw, 3rem);
    margin-top: 1rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--badge-gradient-start), var(--badge-gradient-end));
    border: 1px solid var(--badge-border);
    color: var(--chip-text, var(--accent));
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.hero-subtitle {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
}

.serial-form { max-width: 480px; margin: 0 auto 2rem; text-align: right; }

.field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: right;
}

.input-group-modern {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.input-modern {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: var(--transition);
    direction: ltr;
    text-align: center;
    letter-spacing: 0.1em;
}

.input-modern:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.inline-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    text-align: center;
}

.inline-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

/* Index — activation steps */
.flow-steps {
    list-style: none;
    margin: 2rem 0 0;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.85rem;
    text-align: right;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: var(--surface-solid);
    border: 1px solid var(--border);
}

.flow-step-num {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-on-accent);
    background: linear-gradient(135deg, var(--tag-gradient-start), var(--tag-gradient-end));
}

.flow-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.88rem;
}

.flow-step-body strong {
    font-size: 0.92rem;
}

.flow-step-body span {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    min-height: 48px;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
    color: var(--text-on-accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
    background: var(--surface-solid);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
}

.btn-ghost:hover { color: var(--accent); }

.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.82rem; min-height: 40px; }
.btn-block { width: 100%; }

.btn-link {
    background: none;
    border: none;
    color: var(--link, var(--accent));
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.btn-link:disabled { color: var(--text-muted); cursor: not-allowed; }

.btn.loading .btn-text { visibility: hidden; }
.btn.loading .btn-loader { display: block !important; }

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Product page */
.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-layout { grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr); }
}

@media (min-width: 1024px) {
    .product-layout { grid-template-columns: 1.05fr 1fr; }
}

.product-media {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 1.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(320px, 55vw, 480px);
}

.product-image-trigger {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font: inherit;
    color: inherit;
}

.product-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: clamp(280px, 52vw, 520px);
    object-fit: contain;
    transition: transform 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.product-image-trigger:hover .product-image,
.product-image-trigger:focus-visible .product-image {
    transform: scale(1.02);
}

.zoom-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
}

.zoom-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Image zoom lightbox */
.image-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    -webkit-tap-highlight-color: transparent;
}

.image-zoom-overlay.is-open {
    display: flex;
}

body.zoom-open {
    overflow: hidden;
}

.image-zoom-close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    left: max(1rem, env(safe-area-inset-left));
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.image-zoom-stage {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    touch-action: none;
}

.image-zoom-img {
    max-width: 96vw;
    max-height: 78dvh;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.image-zoom-toolbar {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    margin: 0;
    text-align: center;
    pointer-events: none;
}

/* Warranty terms */
.warranty-terms {
    margin-top: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.terms-title {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.terms-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}

.terms-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.terms-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-solid);
    overflow: hidden;
}

.terms-summary {
    padding: 0.9rem 1rem;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terms-summary::-webkit-details-marker { display: none; }

.terms-summary::after {
    content: '+';
    font-size: 1.1rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.terms-block[open] .terms-summary::after {
    content: '−';
}

.terms-list {
    margin: 0;
    padding: 0 1rem 1rem 1.75rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.terms-list li + li {
    margin-top: 0.35rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    pointer-events: none;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--tag-gradient-start), var(--tag-gradient-end));
    color: var(--text-on-accent);
}

.product-info { padding: 1.5rem; }

.service-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
    color: var(--text-on-accent);
}

.service-badge.outline {
    background: transparent;
    color: var(--success);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
}

.activation-cta {
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.activation-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.7;
}

.warranty-intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.product-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.product-serial {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.chip {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--chip-gradient-start), var(--chip-gradient-end));
    border: 1px solid var(--chip-border);
    color: var(--chip-text, var(--accent));
    margin-bottom: 1.25rem;
}

.spec-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.spec-table th,
.spec-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
}

.spec-table th { color: var(--text-muted); font-weight: 500; width: 40%; }
.spec-table td { font-weight: 600; }

.warranty-active { margin-bottom: 1rem; }

.success-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success);
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-banner svg { width: 24px; height: 24px; flex-shrink: 0; }

.warranty-details {
    display: grid;
    gap: 0.5rem;
}

.warranty-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.warranty-details .detail-row span:first-child { color: var(--text-muted); }

/* States */
.state-card {
    text-align: center;
    padding: 3rem 1.5rem;
    margin-top: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}

.error-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

/* Modal */
.modal-overlay,
.modal-overlay.modal-closed {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: none !important;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.modal-overlay.is-open {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    animation: fadeIn 0.2s ease;
}

body.modal-open {
    overflow: hidden;
}

.phone-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
        padding: 1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-sheet {
    width: 100%;
    max-width: 440px;
    padding: 1.75rem;
    position: relative;
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90dvh;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .modal-sheet { border-radius: var(--radius-lg); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.modal-step form { display: flex; flex-direction: column; gap: 1rem; }

/* OTP autofill (iOS / Android keyboard suggestion) */
.otp-autofill {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.modal-step {
    position: relative;
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    direction: ltr;
}

.otp-digit {
    width: clamp(44px, 14vw, 56px);
    height: clamp(52px, 16vw, 64px);
    text-align: center;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 700;
    font-family: var(--font);
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--text);
    transition: var(--transition);
    caret-color: var(--accent);
}

.otp-digit:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: scale(1.04);
}

.otp-digit.filled {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface-tint-start), var(--surface-tint-end));
}

.otp-digit.error {
    border-color: var(--danger);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.otp-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

#otpTimer { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Success page */
.success-card {
    text-align: center;
    padding: clamp(2rem, 6vw, 3.5rem);
    margin-top: 2rem;
    max-width: 560px;
    margin-inline: auto;
}

.success-check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--text-on-accent);
    display: grid;
    place-items: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 32px var(--success-glow);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-check svg { width: 40px; height: 40px; }

.success-card h1 {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    margin: 0 0 0.75rem;
}

.success-desc {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    line-height: 1.7;
}

.success-meta {
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Footer */
.site-footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-inner p { margin: 0.25rem 0; }
.site-footer a { color: var(--link, var(--accent)); text-decoration: none; }
.footer-credit { opacity: 0.85; }
.footer-slogan { opacity: 0.65; font-size: 0.78rem; margin-top: 0.15rem; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(90vw, 400px);
    pointer-events: none;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    animation: toastIn 0.35s ease;
    pointer-events: auto;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CRM / Customer club */
.crm-page { margin-top: 0.5rem; }

.crm-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.crm-title {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 800;
    margin: 0.5rem 0 0.35rem;
}

.crm-subtitle {
    color: var(--text-muted);
    margin: 0;
    max-width: 520px;
    font-size: 0.92rem;
    line-height: 1.7;
}

.loyalty-ring {
    --ring-size: 108px;
    width: var(--ring-size);
    height: var(--ring-size);
    border-radius: 50%;
    background: conic-gradient(
        var(--accent) calc(var(--progress, 0) * 1%),
        var(--ring-track) 0
    );
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.loyalty-ring-inner {
    width: calc(var(--ring-size) - 16px);
    height: calc(var(--ring-size) - 16px);
    border-radius: 50%;
    background: var(--surface-solid);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.loyalty-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.loyalty-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.crm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .crm-grid { grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr); }
}

.crm-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.warranty-wallet {
    padding: 1.25rem;
    background: linear-gradient(145deg, var(--surface-tint-start), var(--surface-tint-end));
    overflow: hidden;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.wallet-brand {
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
}

.wallet-chip {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--accent);
    color: var(--text-on-accent);
}

.wallet-product {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.wallet-product img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
}

.wallet-product strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}

.wallet-product span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.wallet-meta {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.wallet-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
}

.wallet-meta span { color: var(--text-muted); }

.wallet-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wallet-canvas { display: none; }

.crm-benefits { padding: 1.25rem; }

.crm-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.benefit-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.benefit-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--surface-tint-start), var(--surface-tint-end));
    display: grid;
    place-items: center;
}

.benefit-icon::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
}

.benefit-shield .benefit-icon::after { border-radius: 4px; }
.benefit-gift .benefit-icon::after { border-radius: 2px; transform: rotate(45deg); }

.benefit-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.benefit-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.crm-form-card { padding: clamp(1.25rem, 4vw, 1.75rem); }

.crm-form-head { margin-bottom: 1.25rem; }

.profile-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--progress-track);
    overflow: hidden;
    margin: 0.75rem 0 0.35rem;
}

.profile-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.35s ease;
}

.profile-progress-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.crm-success-panel {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.crm-success-panel h3 {
    margin: 0.5rem 0 0.25rem;
    color: var(--success);
    font-size: 1rem;
}

.crm-success-panel p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.success-check.sm {
    width: 48px;
    height: 48px;
    margin: 0 auto;
}

.success-check.sm svg { width: 24px; height: 24px; }

.crm-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 560px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.field-group { min-width: 0; }

.field-readonly label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.select-modern {
    text-align: right;
    direction: rtl;
    cursor: pointer;
}

.optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.crm-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.crm-footer-links a {
    color: var(--link, var(--accent));
    text-decoration: none;
}

.crm-footer-links a:hover { text-decoration: underline; }

/* Splash screen */
body.splash-active { overflow: hidden; }

body.splash-active .app-shell {
    visibility: hidden;
    pointer-events: none;
}

.app-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.app-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    max-width: 320px;
}

.app-splash-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.app-splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-splash-title {
    margin: 0;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.app-splash-subtitle {
    margin: 0;
    font-size: 0.92rem;
    opacity: 0.9;
    line-height: 1.6;
}

.app-splash-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-top: 0.5rem;
}

.app-splash-progress {
    width: min(220px, 70vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin-top: 0.25rem;
}

.app-splash-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: currentColor;
    animation: splashProgress 2.2s ease forwards;
}

@keyframes splashProgress {
    to { width: 100%; }
}

/* Floating support call button */
.support-fab {
    position: fixed;
    bottom: var(--support-fab-bottom, 1.25rem);
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--support-fab-icon, #fff);
    background: linear-gradient(135deg, var(--support-fab-start), var(--support-fab-end));
    box-shadow: 0 8px 28px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform var(--transition), box-shadow var(--transition);
    max-width: calc(100vw - 2rem);
    isolation: isolate;
    z-index: 5000;
}

.support-fab--left {
    left: var(--support-fab-side, 1.25rem);
    right: auto;
}

.support-fab--right {
    right: var(--support-fab-side, 1.25rem);
    left: auto;
}

.support-fab--start {
    inset-inline-start: var(--support-fab-side, 1.25rem);
    inset-inline-end: auto;
}

.support-fab--end {
    inset-inline-end: var(--support-fab-side, 1.25rem);
    inset-inline-start: auto;
}

.support-fab:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 36px var(--accent-glow), 0 6px 16px rgba(0, 0, 0, 0.15);
    color: var(--support-fab-icon);
}

.support-fab-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    flex-shrink: 0;
}

.support-fab-icon svg {
    width: 22px;
    height: 22px;
}

.support-fab-text {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    padding-left: 0.15rem;
}

.support-fab--labeled .support-fab-text {
    display: flex;
    padding-inline: 0.15rem 0.65rem;
}

.support-fab-text,
.support-fab-text strong,
.support-fab-text small {
    color: #fff;
}

.support-fab-text strong {
    font-size: 0.82rem;
    font-weight: 700;
}

.support-fab-text small {
    font-size: 0.72rem;
    opacity: 0.9;
    margin-top: 0.1rem;
}

.support-fab--pulse {
    animation: supportFabGlow 2.6s ease-in-out infinite;
}

@keyframes supportFabGlow {
    0%, 100% {
        box-shadow:
            0 8px 28px var(--accent-glow),
            0 4px 12px rgba(0, 0, 0, 0.12),
            0 0 0 0 rgba(255, 255, 255, 0.28);
    }
    50% {
        box-shadow:
            0 10px 32px var(--accent-glow),
            0 4px 12px rgba(0, 0, 0, 0.12),
            0 0 0 12px rgba(255, 255, 255, 0);
    }
}

.support-fab--mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .support-fab--mobile-only {
        display: inline-flex;
    }
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
