:root {
    --green: #0f3d2e;
    --green-2: #1a5c45;
    --gold: #d4a017;
    --gold-2: #f0c14b;
    --cream: #f6f1e8;
    --paper: #fffdf8;
    --ink: #1c1917;
    --muted: #6b6560;
    --line: #e6ddd0;
    --ok: #027a48;
    --warn: #b54708;
    --err: #b42318;
    --whatsapp: #128c7e;
    --shadow: 0 12px 40px rgba(15, 61, 46, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Tajawal", "Segoe UI", sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.7;
    min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--green-2); text-decoration: none; }
a:hover { color: var(--green); }

.skip-link {
    position: absolute;
    right: -999px;
    top: 8px;
    background: #fff;
    padding: 8px 12px;
    z-index: 100;
}
.skip-link:focus { right: 8px; }

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 241, 232, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green);
}

.brand-mark { color: var(--green); }

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

.brand-text strong { font-size: 1.25rem; }
.brand-text small { color: var(--muted); font-size: 0.78rem; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
}

.site-nav a.is-active,
.site-nav a:hover { background: #efe7d8; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--green);
    margin: 6px 0;
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); color: #fff; }
.btn-gold { background: var(--gold); color: #1c1400; }
.btn-gold:hover { background: var(--gold-2); color: #1c1400; }
.btn-light { background: #efe7d8; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { color: #fff; filter: brightness(1.05); }
.btn-block { width: 100%; }

.hero {
    padding: 40px 0 24px;
    background:
        radial-gradient(circle at 80% 10%, rgba(212, 160, 23, 0.18), transparent 36%),
        linear-gradient(180deg, #efe6d4 0%, var(--cream) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.eyebrow {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 800;
    color: var(--green);
    margin: 0 0 12px;
}

.hero h1, .page-head h1, .section-head h2, .profile h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 12px;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

.lead, .page-head p { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }

.search-card, .form-card, .worker-card, .profile, .filters, .stat-card, .empty, .notice {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-card, .form-card, .filters, .profile { padding: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-full { grid-column: 1 / -1; }
.field label, .choice legend { font-weight: 800; font-size: 0.95rem; }
.field small { color: var(--muted); }

input, select, textarea {
    font: inherit;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
}

input[inputmode="numeric"],
input[inputmode="tel"],
input[type="date"],
input[type="password"] {
    direction: ltr;
    text-align: right;
}

input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
    outline: 3px solid rgba(212, 160, 23, 0.45);
    outline-offset: 1px;
}

.search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.check input { width: auto; min-height: 0; }

.hero-panel {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.stat-card {
    padding: 18px 20px;
}

.stat-card span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--green);
}

.section { padding: 28px 0 48px; }

.section-head, .cta-inner, .profile-head, .card-top, .pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-head p, .muted { color: var(--muted); margin: 0; }

.chips, .cards, .grid-2 {
    display: grid;
    gap: 14px;
}

.chips {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.chip {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 14px;
    text-align: center;
    color: var(--ink);
    font-weight: 800;
}

.chip:hover { border-color: var(--gold); color: var(--green); }

.cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: 1fr 1fr; }

.worker-card, .empty, .notice { padding: 18px; }

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--green);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: 0 0 auto;
}

.avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; }

.card-top { align-items: flex-start; }
.card-top h3 { margin: 0; font-size: 1.15rem; }
.card-top h3 a { color: var(--ink); }

.badge {
    background: #eef8f1;
    color: var(--ok);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.meta {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    color: var(--muted);
}

.skills {
    background: #f3eee4;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 14px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-actions .btn { flex: 1 1 110px; }

.cta-band {
    background: var(--green);
    color: #f6f1e8;
    padding: 36px 0;
}

.cta-band p { color: #d7e6de; margin: 0; }
.cta-inner { flex-wrap: wrap; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 40px;
    color: var(--muted);
}

.footer-inner { display: grid; gap: 10px; }
.disclaimer { font-size: 0.92rem; }
.copy { margin: 0; }

.page-head { padding: 32px 0 0; }
.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    align-items: start;
}

.results-count { margin: 0 0 14px; }

.pager {
    margin-top: 22px;
    justify-content: center;
}

.pager a, .pager span {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
}

.details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 22px 0;
}

.details div {
    background: #f3eee4;
    border-radius: 14px;
    padding: 12px;
}

.details dt { color: var(--muted); font-size: 0.85rem; }
.details dd { margin: 0; font-weight: 800; }

.choice {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 16px 4px;
    margin: 0 0 18px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.field-hint {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 10px;
    max-width: 52ch;
}

.choice .field-hint {
    flex: 1 1 100%;
    margin: 0 0 8px;
}

.notice-ok { border-color: #abefc6; background: #f0fdf4; }
.notice-warn { border-color: #fedf89; background: #fffaeb; }
.notice-error { border-color: #fecdca; background: #fef3f2; color: var(--err); }
.notice ul { margin: 0; padding-right: 18px; }
.empty { text-align: center; padding: 40px 20px; }

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 860px) {
    .hero-grid, .layout, .grid-2, .details { grid-template-columns: 1fr; }
    .hero-panel { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        inset: 72px 16px auto;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: flex; }
    .header-inner { position: relative; }
}

.btn-danger { background: #b42318; color: #fff; }
.btn-danger:hover { background: #912018; color: #fff; }

.form-foot { text-align: center; margin: 16px 0 0; }
.form-card h2 { margin-top: 0; }

.otp-input {
    letter-spacing: 0.45em;
    font-size: 1.45rem;
    font-weight: 800;
    text-align: center !important;
    direction: ltr;
}
.otp-side {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.tabs a {
    flex: 1;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 800;
}
.tabs a.is-active { background: var(--green); color: #fff; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    background: #f3eee4;
    border-radius: 14px;
    padding: 12px;
}
.skill-item { font-weight: 700; }
.other-job-wrap[hidden] { display: none !important; }

.status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.form-card + .form-card { margin-top: 16px; }

.admin-body {
    background: #efe8db;
    margin: 0;
    min-height: 100vh;
}
.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}
.admin-side {
    background: var(--green);
    color: #f6f1e8;
    padding: 28px 18px;
}
.admin-side .brand {
    color: #fff;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-side .brand small {
    color: #d7e6de;
    font-size: 0.8rem;
    font-weight: 500;
}
.admin-side nav { display: grid; gap: 6px; }
.admin-side a {
    color: #d7e6de;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}
.admin-side a.is-active,
.admin-side a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.admin-main { min-width: 0; }
.admin-top { padding: 24px 24px 0; }
.admin-top h1 { margin: 0; }
.admin-content { padding: 20px 24px 40px; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.admin-stats .stat-card {
    color: inherit;
    display: block;
    text-decoration: none;
}
.admin-stats .stat-card:hover { color: inherit; border-color: var(--gold); }

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at 80% 0%, rgba(212, 160, 23, 0.22), transparent 40%),
        linear-gradient(180deg, #0f3d2e 0 42%, #efe8db 42%);
}
.admin-login-card {
    width: min(440px, 100%);
    margin: 0;
}
.admin-login-brand {
    text-align: center;
    color: #fff;
    margin-bottom: 18px;
}
.admin-login-brand strong {
    display: block;
    font-size: 1.6rem;
}
.admin-login-brand small {
    color: #d7e6de;
}
.admin-login .form-card h1 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}
.admin-login .form-card p { margin: 0 0 18px; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.data-table th { background: #f3eee4; }
.row-form, .row-actions, .inline-form, .toolbar, .filters-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: end;
}
.row-form input { min-height: 42px; }
.toolbar { justify-content: space-between; margin-bottom: 16px; }
.inline-form { margin-bottom: 18px; }
.inline-form .field { margin: 0; min-width: 220px; }

@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side nav { grid-template-columns: repeat(2, 1fr); }
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    display: flex;
    gap: 4px;
}

.lang-switch a {
    color: var(--ink);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    background: #fff;
}

.lang-switch a.is-active,
.lang-switch a:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

html[lang="ur"] body {
    font-family: "Noto Naskh Arabic", Tajawal, "Segoe UI", sans-serif;
}

html[dir="ltr"] body {
    font-family: Inter, Tajawal, "Segoe UI", sans-serif;
}

html[dir="ltr"] .skip-link { left: -999px; right: auto; }
html[dir="ltr"] .skip-link:focus { left: 8px; right: auto; }
html[dir="ltr"] input[inputmode="numeric"],
html[dir="ltr"] input[inputmode="tel"],
html[dir="ltr"] input[type="date"],
html[dir="ltr"] input[type="password"] {
    text-align: left;
}
html[dir="ltr"] .notice ul { padding-left: 18px; padding-right: 0; }
html[dir="ltr"] .data-table th,
html[dir="ltr"] .data-table td { text-align: left; }

@media (max-width: 860px) {
    .header-tools { margin-inline-start: auto; }
}

@media (min-width: 861px) {
    .site-nav { margin-inline-start: auto; }
}
