:root {
    color-scheme: light;
    --brand: #6b21c9;
    --brand-light: #8b47e6;
    --brand-dark: #1c0640;
    --ink: #17131f;
    --muted: #6b6478;
    --line: #e9e4f0;
    --paper: #ffffff;
    --canvas: #f3f1f8;
    --gold: #c9a24b;
    --gold-soft: #f4ead2;
    --gold-deep: #9c7a2e;
    --success: #0d7d5b;
    --success-soft: #eefaf5;
    --danger: #ad3350;
    --danger-soft: #fdf2f4;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(107, 33, 201, 0.07), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(201, 162, 75, 0.09), transparent 55%),
        var(--canvas);
    font-family: "Segoe UI", Tahoma, Geneva, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.site-shell {
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 20px 0 0;
}

/* ---------- Topbar ---------- */

.topbar {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.identity { display: flex; align-items: center; gap: 14px; }

.logo-frame {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(107, 33, 201, 0.14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(28, 6, 64, 0.10);
}

.logo-frame img { width: 53px; height: 48px; object-fit: contain; }
.identity strong, .identity span { display: block; }
.identity strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--brand-dark);
}
.identity > div span { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }

.secure-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #fdfbf5);
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(28, 6, 64, 0.05);
}

.secure-pill svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* ---------- Portal shell ---------- */

.portal {
    flex: 1;
    min-height: 620px;
    margin: 20px 0 40px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    overflow: hidden;
    border: 1px solid rgba(28, 6, 64, 0.08);
    border-radius: 30px;
    background: var(--paper);
    box-shadow: 0 34px 80px rgba(28, 6, 64, 0.14);
}

/* ---------- Hero ---------- */

.hero-panel {
    position: relative;
    min-height: 620px;
    padding: clamp(44px, 6vw, 78px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(155deg, #1c0640 0%, #3a0f80 46%, #6b21c9 100%);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(120deg, transparent 40%, rgba(201, 162, 75, 0.08) 42%, transparent 44%),
        linear-gradient(120deg, transparent 60%, rgba(201, 162, 75, 0.06) 62%, transparent 64%);
    pointer-events: none;
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    top: -190px;
    left: -160px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
}

.ring-deco {
    position: absolute;
    width: 230px;
    height: 230px;
    right: -130px;
    bottom: 90px;
    border: 1px solid rgba(201, 162, 75, 0.28);
    border-radius: 50%;
    pointer-events: none;
}

.ring-deco::before {
    content: "";
    position: absolute;
    inset: 34px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
}

.hero-content, .privacy-note, .trust-row { position: relative; z-index: 1; }

.eyebrow {
    width: max-content;
    margin: 0 0 26px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(201, 162, 75, 0.45);
    border-radius: 999px;
    background: rgba(201, 162, 75, 0.10);
    color: var(--gold-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.eyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

h1 {
    margin: 0;
    font-size: clamp(34px, 4.2vw, 54px);
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: -0.03em;
}

h1 span {
    background: linear-gradient(90deg, #f1d98b, #c9a24b 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy {
    max-width: 430px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.95;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 34px;
}

.trust-row div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12.5px;
    font-weight: 700;
}

.trust-row svg { width: 15px; height: 15px; color: var(--gold); flex: 0 0 auto; }

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.privacy-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    margin-top: 1px;
    border: 1px solid rgba(201, 162, 75, 0.45);
    border-radius: 10px;
    background: rgba(201, 162, 75, 0.10);
}

.privacy-icon svg { width: 16px; height: 16px; color: var(--gold-soft); }

.privacy-note p { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 12px; line-height: 1.8; }
.privacy-note strong { color: #fff; font-size: 13.5px; font-weight: 800; }

/* ---------- Query panel ---------- */

.query-panel {
    padding: clamp(44px, 6vw, 78px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-heading { margin-bottom: 32px; }

.step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gold-deep);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.step::before {
    content: "";
    width: 16px;
    height: 1.5px;
    background: var(--gold);
}

.panel-heading h2 {
    margin: 12px 0 8px;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--brand-dark);
}

.panel-heading p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }

form { display: grid; gap: 20px; }

.label-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 9px; }
.label-row b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.label-row small { color: #9992a3; font-size: 11px; font-weight: 600; }

.field {
    position: relative;
}

input {
    width: 100%;
    height: 58px;
    padding: 0 46px 0 17px;
    border: 1px solid #ddd5e8;
    border-radius: 13px;
    outline: none;
    background: #fbfaff;
    color: var(--ink);
    direction: ltr;
    text-align: right;
    font: 700 17px "Segoe UI", Tahoma, Arial, sans-serif;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field svg {
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #b7aecb;
    pointer-events: none;
}

input::placeholder { color: #b0aab8; font-weight: 500; }
input:hover { border-color: #c9bcdb; }
input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(107, 33, 201, 0.10); }
input:focus + svg,
.field:focus-within svg { color: var(--brand); }

button {
    width: 100%;
    min-height: 59px;
    margin-top: 4px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--brand) 0%, #4a0fa0 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(107, 33, 201, 0.26);
    cursor: pointer;
    font: 800 15.5px "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: 0.01em;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button svg { width: 18px; height: 18px; transform: scaleX(-1); }
button:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 18px 36px rgba(107, 33, 201, 0.30); }
button:active { transform: translateY(0); }
button:focus-visible { outline: 3px solid rgba(201, 162, 75, 0.55); outline-offset: 3px; }

.trap {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Notices & result ---------- */

.notice {
    margin-top: 22px;
    padding: 15px 17px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #f2ccd4;
    border-radius: 13px;
    background: var(--danger-soft);
    color: #86253a;
    animation: rise 220ms ease both;
}

.notice > span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font: 800 13px Arial, sans-serif;
}

.notice p { margin: 1px 0 0; font-size: 13px; font-weight: 700; line-height: 1.7; }

.result {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #cdeade;
    border-radius: 16px;
    background: var(--success-soft);
    animation: rise 260ms ease both;
}

.result.expired { border-color: #f2ccd4; background: var(--danger-soft); }

.status-line { display: flex; align-items: center; gap: 13px; }

.status-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: var(--success);
    color: #fff;
    box-shadow: 0 8px 18px rgba(13, 125, 91, 0.28);
}

.status-icon svg { width: 21px; height: 21px; }
.expired .status-icon { background: var(--danger); box-shadow: 0 8px 18px rgba(173, 51, 80, 0.28); }

.status-label { margin: 0 0 2px; color: #6f8a80; font-size: 11px; font-weight: 700; }
.expired .status-label { color: #9c7580; }
.result h3 { margin: 0; color: var(--success); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.result.expired h3 { color: var(--danger); }

dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 19px 0 0; }
dl div {
    padding: 13px 14px;
    border: 1px solid rgba(20, 56, 43, 0.08);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.75);
}
.result.expired dl div { border-color: rgba(89, 20, 36, 0.08); }
dl .wide { grid-column: 1 / -1; }
dt { color: var(--muted); font-size: 10px; font-weight: 700; }
dd { margin: 5px 0 0; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.ltr { direction: ltr; text-align: right; }

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

/* ---------- Footer ---------- */

.page-footer {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #948d9f;
    font-size: 11.5px;
    font-weight: 600;
}

.page-footer .brand-mark { color: var(--brand-dark); font-weight: 800; }

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

@media (max-width: 860px) {
    .site-shell { width: min(680px, calc(100% - 28px)); }
    .topbar { min-height: 90px; }
    .portal { grid-template-columns: 1fr; min-height: 0; margin: 16px 0 32px; }
    .hero-panel { min-height: 300px; padding: 42px; }
    .hero-panel::after, .ring-deco { display: none; }
    .trust-row { margin-top: 26px; }
    .privacy-note { margin-top: 40px; }
    .query-panel { padding: 42px; }
}

@media (max-width: 540px) {
    .site-shell { width: 100%; padding-top: 0; }
    .topbar { min-height: 82px; padding: 0 17px; }
    .logo-frame { width: 50px; height: 50px; border-radius: 14px; }
    .logo-frame img { width: 45px; height: 41px; }
    .secure-pill { padding: 8px 10px; font-size: 0; }
    .secure-pill::after { content: "آمنة"; font-size: 11px; }
    .secure-pill svg { display: none; }
    .portal { border-right: 0; border-left: 0; border-radius: 0; box-shadow: none; margin-top: 8px; }
    .hero-panel { min-height: 270px; padding: 34px 24px; }
    .eyebrow { margin-bottom: 18px; }
    h1 { font-size: 32px; }
    .hero-copy { margin-top: 14px; font-size: 13.5px; line-height: 1.8; }
    .trust-row { margin-top: 20px; gap: 8px 18px; }
    .privacy-note { display: none; }
    .query-panel { padding: 34px 22px 40px; }
    .panel-heading { margin-bottom: 24px; }
    .panel-heading h2 { font-size: 24px; }
    .label-row small { display: none; }
    input { height: 55px; }
    .page-footer { min-height: 64px; padding: 0 18px; justify-content: center; }
    .page-footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
