:root {
    color-scheme: light;
    --bg: #f5f7f6;
    --surface: #ffffff;
    --surface-muted: #edf3f1;
    --text: #14211d;
    --muted: #65736e;
    --line: #dbe5e1;
    --primary: #0f7b5c;
    --primary-dark: #07543f;
    --accent: #b78b2f;
    --info: #1b7895;
    --danger: #b42318;
    --success: #14855f;
    --shadow: 0 18px 45px rgba(20, 33, 29, 0.09);
    --radius: 8px;
    --sidebar: 292px;
    --font: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111a18;
    --surface: #182522;
    --surface-muted: #21332f;
    --text: #edf7f3;
    --muted: #a6b8b1;
    --line: #2c413b;
    --primary: #26a97f;
    --primary-dark: #6ee0b8;
    --accent: #d8ad55;
    --info: #69c2d9;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.65;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 24px;
    background: var(--surface);
    border-inline-end: 1px solid var(--line);
    z-index: 20;
}

.brand,
.nav-item {
    color: inherit;
    text-decoration: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: var(--radius);
}

.brand-mark svg {
    width: 28px;
    height: 28px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.15rem;
    line-height: 1.2;
}

.brand small,
.eyebrow,
.metric-card span,
.metric-card small {
    color: var(--muted);
}

.nav-list {
    display: grid;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--radius);
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--surface-muted);
    color: var(--primary-dark);
}

.nav-item.active {
    font-weight: 700;
}

.sidebar-card {
    margin-top: auto;
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.sidebar-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    margin-top: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(20, 133, 95, 0.14);
}

.main {
    margin-inline-start: var(--sidebar);
    padding: 24px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -24px -24px 24px;
    padding: 18px 24px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.topbar h1,
.topbar p,
.hero h2,
.hero p,
.section-heading h2,
.section-heading p {
    margin: 0;
}

.topbar h1 {
    font-size: 1.55rem;
}

.topbar-actions,
.hero-actions,
.form-actions,
.otp-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
}

.icon-button,
.primary-button,
.secondary-button {
    border: 0;
    border-radius: var(--radius);
    min-height: 44px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
}

.primary-button,
.secondary-button {
    padding: 0 18px;
    font-weight: 800;
}

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

.secondary-button {
    color: var(--primary-dark);
    background: var(--surface);
    border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.compact {
    min-height: 40px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    gap: 28px;
    min-height: 560px;
    padding: 34px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-content {
    align-self: center;
    max-width: 700px;
    z-index: 1;
}

.eyebrow {
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0;
}

.hero h2 {
    max-width: 700px;
    margin-top: 10px;
    font-size: clamp(2rem, 4.4vw, 4.8rem);
    line-height: 1.08;
}

.hero-copy {
    max-width: 640px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    margin-top: 26px;
    flex-wrap: wrap;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.trust-strip span {
    padding: 8px 12px;
    color: var(--primary-dark);
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-visual {
    position: relative;
    align-self: stretch;
    min-height: 420px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.floating-panel {
    position: absolute;
    inset-inline-start: 24px;
    inset-block-end: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .floating-panel {
    background: rgba(24, 37, 34, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
}

.panel-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: var(--success);
    border-radius: 50%;
    font-weight: 800;
}

.floating-panel strong,
.floating-panel p {
    display: block;
    margin: 0;
}

.floating-panel p {
    color: var(--muted);
    font-size: 0.9rem;
}

.metrics-grid,
.support-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.metric-card,
.form-panel,
.verification-panel,
.status-board,
.support-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(20, 33, 29, 0.05);
}

.metric-card {
    padding: 18px;
}

.metric-card strong {
    display: block;
    margin: 4px 0;
    font-size: 2rem;
    line-height: 1.1;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.form-panel,
.verification-panel,
.status-board,
.support-grid article {
    padding: 24px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 1.45rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 123, 92, 0.13);
}

.checklist {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--surface-muted);
    border-radius: var(--radius);
}

.check-row input {
    width: 18px;
    min-height: 18px;
    margin-top: 4px;
}

.form-actions {
    margin-top: 22px;
    flex-wrap: wrap;
}

.identity-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface-muted);
    border-radius: var(--radius);
}

.avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    background: var(--info);
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 800;
}

.identity-card p {
    margin: 2px 0 0;
    color: var(--muted);
}

.otp-box {
    margin-top: 18px;
}

.otp-row {
    align-items: stretch;
}

.otp-row input {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    direction: ltr;
}

#otpHint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.rules-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.rules-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.rules-list span {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
}

.status-board {
    margin-top: 18px;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.timeline-step {
    min-height: 160px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.timeline-step span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    color: var(--muted);
    background: var(--surface);
    border-radius: 50%;
    font-weight: 800;
}

.timeline-step.done span,
.timeline-step.active span {
    color: #ffffff;
    background: var(--primary);
}

.timeline-step.active {
    border-color: var(--primary);
}

.timeline-step p {
    margin: 8px 0 0;
    color: var(--muted);
}

.support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-grid h3,
.support-grid p {
    margin: 0;
}

.support-grid p {
    margin-top: 8px;
    color: var(--muted);
}

.toast {
    position: fixed;
    inset-inline-start: 24px;
    inset-block-end: 24px;
    max-width: min(420px, calc(100vw - 48px));
    padding: 14px 16px;
    color: #ffffff;
    background: var(--primary-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 40;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .hero,
    .workspace {
        grid-template-columns: 1fr;
    }

    .metrics-grid,
    .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-inline-start: 0;
        padding: 16px;
    }

    .topbar {
        margin: -16px -16px 16px;
        padding: 14px 16px;
    }

    .menu-toggle {
        display: grid;
    }

    .topbar-actions .compact {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 22px;
    }

    .hero h2 {
        font-size: 2.35rem;
    }

    .form-grid,
    .metrics-grid,
    .timeline,
    .support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .topbar h1 {
        font-size: 1.15rem;
    }

    .hero h2 {
        font-size: 1.95rem;
    }

    .hero-actions,
    .form-actions,
    .otp-row {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .floating-panel {
        position: static;
        margin-top: 12px;
        min-width: 0;
    }
}
