/* ==========================================================================
   PK JOBS ALERTS — inner pages (job detail, forms, admin)
   ========================================================================== */

@font-face {
    font-family: 'Jameel Local Nastaleeq';
    src: url('../fonts/JameelNooriNastaleeq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ---------- page shell ---------- */
.page { padding: 32px 0 76px; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted-2);
    font-size: 13px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .18s var(--ease); }

.breadcrumb a:hover { color: var(--brand-bright); }

.breadcrumb .sep { color: var(--muted-2); opacity: .6; }

.breadcrumb .current {
    color: var(--ink-2);
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- job detail layout ---------- */
.job-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--surface);
    overflow-wrap: break-word;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
}

.panel + .panel { margin-top: 20px; }

.detail-title {
    font-size: clamp(24px, 3vw, 33px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.03em;
    color: var(--ink);
    margin-bottom: 12px;
}

.detail-company {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 15px;
}

.detail-company svg { width: 16px; height: 16px; flex: none; color: var(--muted-2); }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chips-row .chip { cursor: default; }

/* sector chip — baqi chips ke saath matching, sirf chhota colored dot */
.chip-sector { gap: 8px; }

.chip-sector .dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--muted);
}

.chip-sector.is-gov .dot { background: #818cf8; }

.chip-sector.is-private .dot { background: #fb923c; }

.chip-urgent {
    border-color: var(--amber-line);
    background: var(--amber-soft);
    color: var(--amber);
}

.chip-closed {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: var(--danger);
}

.chips-row .chip.chip-urgent:hover {
    border-color: var(--amber-line);
    background: var(--amber-soft);
    color: var(--amber);
}

.chips-row .chip.chip-closed:hover {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: var(--danger);
}

/* Urdu buttons (modal) */
.btn-urdu {
    font-family: 'Jameel Local Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.9;
    padding-top: 2px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 0 16px;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.015em;
    color: var(--ink);
}

.section-title::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: var(--brand);
}

.desc-box {
    position: relative;
    margin-top: 4px;
}

.desc {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: 13.5px;
    line-height: 1.75;
    white-space: normal;
    overflow-wrap: anywhere;
}

.desc p { margin: 0 0 10px; }

.desc p:last-child { margin-bottom: 0; }

.desc ul,
.desc ol { margin: 0 0 10px; padding-left: 22px; }

.desc li { margin-bottom: 4px; }

.desc b,
.desc strong { color: var(--ink); }

.desc-fade { display: none; }

.desc-urdu {
    padding: 20px 22px;
    font-size: 18px;
    line-height: 2.1;
}

@media (max-width: 560px) {
    .desc { padding: 14px 14px 16px; font-size: 13px; }

    .desc-urdu { padding: 16px 16px 18px; font-size: 16px; }
}

.desc-urdu {
    font-family: 'Jameel Local Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: right;
    font-size: 21px;
    line-height: 2.3;
    color: var(--ink);
}

.ad-gallery { margin-top: 24px; }

/* ek se zyada images — neeche thumbnails, upar badi image */
.ad-thumbs-inline {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.ad-thumb-inline {
    flex: none;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--surface-2);
    overflow: hidden;
    cursor: pointer;
    opacity: .6;
    transition: opacity .18s var(--ease), border-color .18s var(--ease);
}

.ad-thumb-inline img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ad-thumb-inline:hover { opacity: .9; }

.ad-thumb-inline.is-active { border-color: var(--brand); opacity: 1; }

.ad-figure {
    margin-top: 0;
    height: min(78vh, 680px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-2);
}

.ad-figure .ad-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* poori ad dikhe — kutni nahi chahiye */
.ad-figure .ad-link img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .45s var(--ease);
}

.ad-figure .ad-link:hover img { transform: scale(1.01); }

/* mobile par thora chhota box */
@media (max-width: 640px) {
    .ad-figure { height: min(64vh, 470px); }
}

.ad-caption {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
    text-align: center;
    direction: rtl;
    font-family: 'Noto Nastaliq Urdu', 'Jameel Local Nastaleeq', 'Urdu Typesetting', Tahoma, serif;
}

/* "3 images" pill heading ke saath */
.ad-count {
    margin-left: 10px;
    padding: 2px 9px;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-bright);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
    vertical-align: middle;
}

/* admin: maujooda images manage karna */
.image-manage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.image-manage-item {
    display: grid;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer;
}

.image-manage-item img {
    width: 100%;
    height: 84px;
    border-radius: 6px;
    object-fit: cover;
}

.image-manage-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.image-manage-remove input { accent-color: #ef4444; }

/* ---------- sidebar ---------- */
/* sticky sidebar — sticky header (strip + header = 136px) ke neeche rehna chahiye */
.sidebar {
    position: sticky;
    top: 152px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

/* mobile par panel apne column se bahar na jaye */
.sidebar > * { min-width: 0; }

.job-layout > * { min-width: 0; }

.sidebar .panel + .panel { margin-top: 0; }

.chips-row .chip:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .02);
    color: var(--ink-2);
}

.apply-card { padding: 24px; }

.apply-card h2 { font-size: 17px; font-weight: 750; letter-spacing: -.015em; margin-bottom: 6px; }

.apply-card p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }

.apply-card .btn { width: 100%; height: 48px; font-size: 15px; }

.apply-note {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted-2);
    font-size: 12px;
    line-height: 1.55;
}

.apply-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--brand); }

.overview { display: grid; gap: 13px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }

.overview-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
}

.overview-row .k { color: var(--muted-2); flex: none; }

.overview-row .v { color: var(--ink); font-weight: 650; text-align: right; overflow-wrap: anywhere; }

.overview-row .v.is-closed { color: var(--danger); }

.overview-row .v.is-urgent { color: var(--amber); }

/* ---------- status strip ---------- */
.status-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
}

.status-strip svg { width: 16px; height: 16px; flex: none; }

.status-strip.is-closed {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: #fecaca;
}

.status-strip.is-urgent {
    border-color: var(--amber-line);
    background: var(--amber-soft);
    color: var(--amber);
}

/* ---------- modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 6, 12, .8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal.is-open { display: flex; }

.modal-box {
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow: auto;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}

.modal-box.is-danger { border-color: var(--danger-line); }

.modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.015em;
    color: var(--ink);
}

.modal-head svg { width: 20px; height: 20px; flex: none; color: var(--brand-bright); }

.modal-box.is-danger .modal-head svg { color: var(--danger); }

.modal-text { color: var(--muted); font-size: 14.5px; line-height: 1.7; }

.modal-address {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--brand-bright);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.modal-actions .btn { flex: 1; min-width: 130px; }

.modal-urdu {
    font-family: 'Jameel Local Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: right;
    font-size: 20px;
    line-height: 2.2;
    color: var(--ink);
}

.modal-title-urdu {
    font-family: 'Jameel Local Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: right;
    font-size: 24px;
    line-height: 1.9;
    color: var(--brand-bright);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.modal-box.is-danger .modal-title-urdu { color: var(--danger); }

/* ---------- not found ---------- */
.not-found { max-width: 560px; margin: 40px auto; text-align: center; padding: 48px 28px; }
.not-found svg { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--muted-2); }
.not-found h2 { font-size: 22px; margin-bottom: 8px; }
.not-found p { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }

/* ---------- forms (post / edit) ---------- */
.form-panel { max-width: 760px; margin: 0 auto; padding: 34px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field.is-full { grid-column: 1 / -1; }

.field label { color: var(--ink-2); font-size: 13px; font-weight: 650; }

.field .hint { color: var(--muted-2); font-size: 12px; }

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--ink);
    font-size: 14.5px;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.input::placeholder, .textarea::placeholder { color: var(--muted-2); }

/* Title / company hamesha capital letters mein */
.u-upper { text-transform: uppercase; }

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}

.select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9aae' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.select option { background: #111a2b; color: var(--ink); }

.textarea { min-height: 150px; resize: vertical; line-height: 1.7; }

.textarea.is-urdu {
    font-family: 'Jameel Local Nastaleeq', 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    text-align: right;
    font-size: 19px;
    line-height: 2.1;
}

.form-actions { display: flex; gap: 12px; margin-top: 26px; }

/* ---------- table (admin) ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.data-table th {
    padding: 12px 14px;
    text-align: left;
    color: var(--muted-2);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: rgba(255, 255, 255, .02); }

.data-table .cell-title { color: var(--ink); font-weight: 650; }

.table-wrap { overflow-x: auto; }

/* ---------- content pages (contact) ---------- */
.page-head { max-width: 660px; margin: 0 0 30px; }

.page-title {
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.12;
    margin-bottom: 10px;
}

.page-sub { color: var(--muted); font-size: 15.5px; line-height: 1.65; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
    align-items: stretch;
}

/* .panel + .panel wala margin grid ke andar cards ko neeche kar deta tha */
.contact-grid .panel + .panel { margin-top: 0; }

.contact-grid > * { height: 100%; }

.contact-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.contact-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-line);
    color: var(--brand-bright);
}

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

.contact-card h3 { font-size: 16.5px; font-weight: 750; letter-spacing: -.015em; margin-bottom: 6px; }

.contact-card p { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin-bottom: 14px; }

.contact-card p:last-of-type { margin-bottom: 16px; }

.contact-card .link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--brand-bright);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.contact-card .link:hover { text-decoration: underline; }

.contact-card .link svg { width: 14px; height: 14px; }

.contact-form-panel { margin-top: 0; padding: 32px; }

.notice-success {
    margin-bottom: 22px;
    border-color: var(--brand-line);
    background: var(--brand-soft);
    color: #a7f3d0;
}

.notice-success h3 { color: #d1fae5; }

.notice-success h3 svg,
.notice-error h3 svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: -3px;
    margin-right: 4px;
}

.notice-error { margin-bottom: 22px; }

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

/* ---------- pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 41px;
    height: 41px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .18s var(--ease), background-color .18s var(--ease),
        color .18s var(--ease);
}

.page-link:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-bright);
}

.page-link.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #04140e;
}

.page-link.is-disabled { opacity: .4; pointer-events: none; }

.page-ellipsis { color: var(--muted-2); padding: 0 2px; font-weight: 600; }

/* ---------- admin ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.stat .k {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.stat .v {
    margin-top: 4px;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--ink);
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-toolbar h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }

.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.main-nav a.nav-logout { color: #fca5a5; }

.main-nav a.nav-logout:hover { background: rgba(239, 68, 68, .14); color: #fecaca; }

.search-inline { display: flex; gap: 8px; align-items: center; }

.search-inline .input { min-width: 270px; height: 42px; }

.btn-danger {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .32);
    color: #fca5a5;
}

.btn-danger:hover { background: rgba(239, 68, 68, .22); border-color: rgba(239, 68, 68, .5); }

.cell-actions { display: flex; gap: 8px; justify-content: flex-end; }

.cell-sub { display: block; color: var(--muted-2); font-size: 12.5px; margin-top: 2px; }

.admin-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    margin-left: 10px;
    border-radius: 6px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-line);
    color: var(--brand-bright);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    vertical-align: 3px;
}

/* ---------- latest jobs slider ---------- */
.slider-card { padding: 22px; }

.slider-card h2 {
    margin-bottom: 16px;
    font-size: 16.5px;
    font-weight: 750;
    letter-spacing: -.015em;
}

.job-slider { overflow: hidden; min-width: 0; margin: 0 -4px; }

.slider-track { display: flex; min-width: 0; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }

.job-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    padding: 0 4px;
}

/* panel ke andar card ko flatten karo */
.job-slide .job-card {
    width: 100%;
    min-width: 0;
    padding: 0;
    gap: 12px;
    background: transparent;
    border: 0;
}

.job-slide .job-card:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    border-color: transparent;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.slider-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    cursor: pointer;
    transition: width .2s var(--ease), background-color .2s var(--ease);
}

.slider-dot.is-active { width: 18px; border-radius: 999px; background: var(--brand); }

.slider-all {
    display: inline-block;
    margin-top: 16px;
    color: var(--brand-bright);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.slider-all:hover { text-decoration: underline; }

.slider-empty { margin-bottom: 16px; color: var(--muted); font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .job-layout { grid-template-columns: 1fr; }

    /* Mobile order: title -> advertisement image -> description -> apply card */
    .sidebar { position: static; }

    .panel { padding: 22px; }

    .form-grid { grid-template-columns: 1fr; }

    .contact-grid { grid-template-columns: 1fr; }

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

    .stat-grid { grid-template-columns: 1fr 1fr; }

    .admin-toolbar { align-items: flex-start; flex-direction: column; }

    .search-inline { width: 100%; }

    .search-inline .input { min-width: 0; flex: 1; }

    .breadcrumb .current { max-width: 200px; }
}

@media (max-width: 560px) {
    .page { padding: 22px 0 56px; }

    .detail-title { font-size: 24px; }

    .desc-urdu { font-size: 19px; }

    /* iOS Safari focus par page zoom na kare */
    .input, .select, .textarea { font-size: 16px; }

    .modal-actions .btn { flex: 1 1 100%; }
}

/* ---------- advertisement image: enlarge + zoom ---------- */
.ad-link {
    position: relative;
    display: block;
    cursor: zoom-in;
}

.ad-link img { display: block; width: 100%; height: auto; transition: transform .45s var(--ease); }

.ad-link:hover img { transform: scale(1.012); }

.ad-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(6, 12, 10, .82);
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 600;
}

.ad-zoom-hint svg { width: 13px; height: 13px; }

.ad-modal {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.ad-modal-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 16px 16px 4px;
    overflow: auto;
}

.ad-modal img {
    width: auto;
    max-width: 100%;
    max-height: 76vh;
    height: auto;
    border-radius: 10px;
    cursor: zoom-in;
    transition: width .25s var(--ease);
}

.ad-modal img.is-zoomed {
    width: 220%;
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

/* zoomed state mein body top-left se scroll ho (warna upar ka hissa kat jata hai) */
.ad-modal-body.is-zoomed {
    display: block;
    padding: 16px;
}

.ad-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(10, 16, 24, .9);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ad-modal-close:hover { background: rgba(239, 68, 68, .85); border-color: transparent; }

.ad-modal-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    background: rgba(8, 13, 22, .96);
    border-top: 1px solid var(--line);
}

/* ek se zyada images ke thumbnails */
.ad-thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.ad-thumb {
    flex: none;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    background: var(--surface-2);
    overflow: hidden;
    cursor: pointer;
    opacity: .55;
    transition: opacity .18s var(--ease), border-color .18s var(--ease);
}

.ad-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ad-thumb:hover { opacity: .85; }

.ad-thumb.is-active { border-color: var(--brand); opacity: 1; }

.ad-bar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* zoom controls */
.ad-zoom {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
}

.ad-zoom-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-2);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .16s var(--ease), color .16s var(--ease);
}

.ad-zoom-btn:hover { background: var(--brand-soft); color: var(--brand-bright); }

.ad-zoom-btn.is-fit {
    width: auto;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ad-zoom-level {
    min-width: 48px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* mobile browser ka address bar 100vh ko kaat deta hai */
@supports (height: 100dvh) {
    .modal { height: 100dvh; }
}

.ad-modal-hint { color: var(--muted); font-size: 12px; }

@media (max-width: 560px) {
    .ad-modal-body { padding: 10px 10px 0; }

    .ad-modal-bar { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }

    .ad-thumb { width: 46px; height: 46px; }

    .ad-bar-row { gap: 8px; }

    .ad-bar-row .btn { flex: 1 1 auto; height: 44px; }

    .ad-zoom-btn { width: 30px; height: 30px; font-size: 15px; }

    .ad-zoom-level { min-width: 42px; font-size: 11px; }

    .ad-zoom-hint { right: 8px; bottom: 8px; font-size: 10.5px; }
}

/* ---------- light theme: inner pages ---------- */
[data-theme="light"] .input,
[data-theme="light"] .select,
[data-theme="light"] .textarea { background: #ffffff; }

[data-theme="light"] .select option { background: #ffffff; color: var(--ink); }

[data-theme="light"] .data-table tbody tr:hover { background: rgba(16, 24, 40, .03); }

[data-theme="light"] .slider-dot { background: rgba(16, 24, 40, .15); }

[data-theme="light"] .slider-dot.is-active { background: var(--brand); }

[data-theme="light"] .notice-success { color: #065f46; }

[data-theme="light"] .notice-success h3 { color: #065f46; }

[data-theme="light"] .notice-error { color: #7a271a; }

[data-theme="light"] .ad-modal-bar { background: rgba(255, 255, 255, .97); }

[data-theme="light"] .ad-modal-close {
    background: rgba(255, 255, 255, .95);
    color: var(--ink);
}

[data-theme="light"] .ad-zoom-hint {
    background: rgba(255, 255, 255, .92);
    color: var(--ink-2);
}

/* ---------- admin: website traffic ---------- */
.traffic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.traffic-stat {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}

.traffic-k {
    display: block;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.traffic-v {
    display: block;
    margin: 6px 0 2px;
    color: var(--ink);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.traffic-note { color: var(--muted); font-size: 11.5px; }

.traffic-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    margin-top: 22px;
    padding-top: 10px;
    border-bottom: 1px solid var(--line);
}

.traffic-bar {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    min-width: 0;
}

.traffic-bar-fill {
    width: 100%;
    max-width: 26px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--brand-bright), rgba(16, 185, 129, .22));
    transition: height .3s var(--ease), background .2s var(--ease);
}

.traffic-bar:hover .traffic-bar-fill {
    background: linear-gradient(180deg, #ffffff, var(--brand-bright));
}

.traffic-bar-label {
    position: absolute;
    bottom: -19px;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 600;
}

.traffic-pages { margin-top: 36px; }

.traffic-pages-head {
    margin-bottom: 6px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.traffic-page-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
}

.traffic-page-row .p {
    color: var(--ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traffic-page-row .h { flex: none; color: var(--brand-bright); font-weight: 700; }

@media (max-width: 720px) {
    .traffic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .traffic-chart { height: 120px; gap: 4px; }

    .traffic-v { font-size: 20px; }
}

/* light theme: closed / urgent strips readable rahein */
[data-theme="light"] .status-strip.is-closed {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

[data-theme="light"] .status-strip.is-urgent {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

[data-theme="light"] .sidebar .panel,
[data-theme="light"] .job-layout .panel,
[data-theme="light"] .article-panel {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .07), 0 12px 28px -22px rgba(16, 24, 40, .45);
}

/* ---------- admin: rich text editor (job description) ---------- */
.rte {
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .16s var(--ease), color .16s var(--ease);
}

.rte-btn:hover { background: var(--brand-soft); color: var(--brand-bright); }

.rte-btn-plain { font-size: 11.5px; }

.rte-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }

.rte-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 12.5px;
    cursor: pointer;
}

.rte-editor {
    min-height: 170px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px 16px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.75;
    outline: 0;
}

.rte-editor:empty::before,
.rte-editor.is-empty::before {
    content: attr(data-placeholder);
    color: var(--muted-2);
    pointer-events: none;
}

.rte-editor:focus { background: rgba(16, 185, 129, .04); }

.rte-editor ul,
.rte-editor ol { margin: 6px 0; padding-left: 22px; }

.rte-editor li { margin-bottom: 3px; }

.rte.is-invalid { border-color: var(--danger-line); box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }

[data-theme="light"] .rte-editor:focus { background: rgba(16, 185, 129, .06); }

/* ---------- job page: share buttons (backlinks / traffic) ---------- */
.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.share-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.share-label svg { width: 13px; height: 13px; }

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}

.share-btn:hover { border-color: var(--brand); color: var(--brand-bright); background: var(--brand-soft); }

.share-btn.is-wa:hover { border-color: #25d366; color: #25d366; }
.share-btn.is-fb:hover { border-color: #1877f2; color: #1877f2; }
.share-btn.is-x:hover  { border-color: #e7e9ea; color: var(--ink); }

.share-btn.is-copy.is-done {
    border-color: var(--brand);
    color: var(--brand-bright);
    background: var(--brand-soft);
}

/* ---------- admin: SEO dashboard ---------- */
.seo-top {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin: 10px 0 18px;
}

.seo-score {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(closest-side, var(--surface) 75%, transparent 76% 100%),
        conic-gradient(var(--brand) calc(var(--score, 0) * 1%), var(--line) 0);
}

.seo-score span { color: var(--ink); font-size: 24px; font-weight: 800; line-height: 1; }

.seo-score small { color: var(--muted); font-size: 10px; margin-top: 2px; }

.seo-counts { display: flex; flex-wrap: wrap; gap: 8px; }

.seo-pill {
    padding: 5px 12px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.seo-pill.is-ok { color: #34d399; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .12); }
.seo-pill.is-warn { color: #fbbf24; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .12); }
.seo-pill.is-fail { color: #f87171; border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .12); }

.seo-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.seo-check {
    display: grid;
    grid-template-columns: 10px 190px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
}

.seo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }

.seo-check.is-ok .seo-dot { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.seo-check.is-warn .seo-dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.seo-check.is-fail .seo-dot { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .18); }

.seo-label { color: var(--ink); font-weight: 600; }

.seo-detail { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

.seo-link { color: var(--brand-bright); font-size: 11.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.seo-link:hover { text-decoration: underline; }

.seo-tools-head {
    margin: 24px 0 10px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.seo-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }

.seo-tool {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    text-decoration: none;
    transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.seo-tool strong { color: var(--ink); font-size: 12.5px; }

.seo-tool span { color: var(--muted); font-size: 11px; }

.seo-tool:hover { border-color: var(--brand); background: var(--brand-soft); }

@media (max-width: 640px) {
    .seo-check { grid-template-columns: 10px minmax(0, 1fr); }

    .seo-detail { grid-column: 2; }

    .seo-link { grid-column: 2; }
}
