:root {
    color-scheme: light;
    --ink: #1c1915;
    --muted: #5c564c;
    --line: #e4ddd2;
    --paper: #f7f3ec;
    --card: #fffdf9;
    --accent: #0f6e6e;
    --accent-ink: #ffffff;
    --danger: #8d2f2f;
    --ok: #1d6b3a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

body::before {
    width: 34rem;
    height: 34rem;
    inset-inline-end: -10rem;
    top: -12rem;
    background: radial-gradient(circle, rgba(15, 110, 110, 0.38), transparent 68%);
}

body::after {
    width: 26rem;
    height: 26rem;
    inset-inline-start: -8rem;
    top: 18rem;
    background: radial-gradient(circle, rgba(214, 154, 42, 0.42), transparent 70%);
}

a { color: var(--accent); }

.wrap { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; text-decoration: none; color: var(--ink); }

.nav { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.nav form { margin: 0; }

button, .button {
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.button.ghost, button.ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.hero { padding: 2.75rem 0 0.5rem; }

.kicker, .board-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.12;
    margin: 0 0 0.6rem;
    max-width: 14ch;
}

.lede { font-size: 1.15rem; max-width: 38rem; color: var(--muted); }

.finder {
    margin-top: 1.4rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 253, 249, 0.86);
    border: 1px solid rgba(28, 25, 21, 0.08);
    box-shadow: 0 18px 50px rgba(28, 25, 21, 0.08);
}

.search input {
    min-height: 3.3rem;
    font-size: 1.15rem;
    border-radius: 16px;
    border-color: transparent;
    box-shadow: inset 0 0 0 2px #d9c7a4;
}

.search input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--accent);
}

.finder-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; min-height: 1.2rem; }

#label-result { margin: 0.8rem 0 0; }
#label-result:empty { display: none; }
#label-result[data-state] {
    margin-top: 0.85rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
}
#label-result[data-state="ok"] { background: #e7f6ec; color: var(--ok); }
#label-result[data-state="bad"] { background: #fdecec; color: var(--danger); }

.board {
    margin: 1.5rem 0 0.4rem;
    padding: 1.25rem;
    border-radius: 28px;
    color: #f7f3ec;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
        #123c3c;
    box-shadow: 0 24px 60px rgba(18, 60, 60, 0.28);
}

.board-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.board h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.board-kicker { color: #f0c36a; }
.board-lead { margin: 0.35rem 0 0; max-width: 36rem; color: rgba(247, 243, 236, 0.78); }
.board-empty { margin: 1.1rem 0 0.2rem; color: rgba(247, 243, 236, 0.8); }

.private-badge {
    min-width: 9.5rem;
    padding: 0.85rem 1rem;
    border-radius: 20px;
    background: linear-gradient(160deg, #f6d78a, #e0a43a);
    color: #3a2508;
    display: grid;
    justify-items: start;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.private-num { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.private-caption { font-weight: 800; }
.private-hint { font-size: 0.78rem; line-height: 1.35; max-width: 14rem; }

.name-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1.1rem;
}

.name-card {
    position: relative;
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1rem 0.95rem;
    border-radius: 18px;
    text-decoration: none;
    color: var(--ink);
    background: #fffdf9;
    border-inline-start: 6px solid #e0a43a;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.name-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.name-host { color: var(--muted); font-size: 0.82rem; }
.name-title { font-size: 1.25rem; font-weight: 800; line-height: 1.3; padding-inline-end: 1.4rem; }
.name-go {
    position: absolute;
    inset-inline-end: 0.85rem;
    inset-block-start: 0.9rem;
    font-size: 1.2rem;
    color: var(--accent);
}
html[dir="rtl"] .name-go { transform: scaleX(-1); }

.price-card { display: grid; gap: 0.15rem; }
.price-length { font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
.price-amount { font-size: 1.35rem; }
.price-meta { color: var(--muted); font-size: 0.85rem; }

.steps { display: grid; gap: 0.7rem; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.offer { padding: 2.5rem 0 3rem; max-width: 46rem; }
.offer-host {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #123c3c;
}
.offer h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0.4rem 0; }
.offer-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.7rem;
    margin: 1.2rem 0;
}
.offer-facts div {
    background: #fffdf9;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.85rem 1rem;
}
.offer-facts span { display: block; color: var(--muted); font-size: 0.82rem; }
.offer-facts strong { font-size: 1.45rem; }
.offer-price {
    background: linear-gradient(160deg, #f6d78a, #e0a43a) !important;
    border-color: transparent !important;
    color: #3a2508;
}
.offer-price span { color: #6a4a12; }
.offer-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.offer-actions button { font-size: 1.05rem; padding: 0.8rem 1.3rem; }

.steps li::before {
    content: counter(step);
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #123c3c;
    color: #f6d78a;
    font-weight: 800;
}

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

input, select, textarea {
    font: inherit;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
    width: 100%;
}

.search input { flex: 1; min-width: 12rem; }

.card, .grid article, form.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1.1rem;
}

.grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.section { margin: 2rem 0; }

table { width: 100%; border-collapse: collapse; }

th, td { text-align: start; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }

.muted { color: var(--muted); }

.flash { padding: 0.7rem 0.9rem; border-radius: 12px; margin: 1rem 0; }
.flash.ok { background: #e7f6ec; color: var(--ok); }
.flash.error { background: #fdecec; color: var(--danger); }

.pay-code { font-size: 2rem; letter-spacing: 0.12em; font-weight: 700; margin: 0.2rem 0; }
.pay-methods { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 0.6rem 0; }
.pay-methods label { display: flex; gap: 0.4rem; align-items: center; font-weight: 700; }
.shamcash-image { width: min(100%, 320px); border-radius: 16px; background: white; }
.admin .nav { flex-wrap: wrap; }

.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.stack { display: grid; gap: 0.8rem; }

label span, .field-label { display: block; font-weight: 600; margin-bottom: 0.25rem; }

.editor-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.6rem 1rem;
    background: white;
    border-bottom: 1px solid var(--line);
}

#gjs { height: calc(100vh - 58px); }

.admin { background: white; }

.admin body, body.admin { background: #f4f6f8; }

.error { color: var(--danger); font-size: 0.92rem; }
