/* =========================================================
   تنظیمات پایه
========================================================= */
* { box-sizing: border-box; }
html { direction: rtl; width: 100%; min-height: 100%; }
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: "Estedad", sans-serif;
    background: #fff;
    color: #222;
}
button, input { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; position: relative; }
button:focus, button:focus-visible { outline: none; }
button:active { transform: scale(.98); }

#app { width: 100%; min-height: 100vh; }

/* =========================================================
   هدر جدید: بدون منوی همبرگری
========================================================= */
.top-header {
    width: 100%;
    min-height: 76px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* انتخاب شهر در سمت چپ */
.city-selector {
    position: relative;
    width: 158px;
    min-width: 158px;
    direction: rtl;
}

.city-button {
    width: 100%;
    height: 54px;
    padding: 0 10px;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,.04);
    transition: .2s ease;
}
.city-button:hover { border-color: #ed1b2f; box-shadow: 0 7px 20px rgba(237,27,47,.10); }
.city-icon { font-size: 17px; line-height: 1; }
.city-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.city-chevron { font-size: 17px; color: #888; line-height: 1; }

/* پنل استان و شهر */
.city-selector-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 64px;
    width: min(390px, calc(100vw - 28px));
    max-height: min(70vh, 620px);
    padding: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    box-shadow: 0 18px 55px rgba(0,0,0,.16);
    z-index: 3000;
}
.city-selector-panel.active { display: block; }

.city-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 10px;
    direction: rtl;
}
.city-panel-head strong { display: block; font-size: 16px; font-weight: 900; }
.city-panel-head small { display: block; margin-top: 3px; color: #888; font-size: 11px; }
.clear-cities-button {
    border: 0;
    background: #fff1f3;
    color: #ed001b;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.city-search-box {
    width: 100%;
    height: 44px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    direction: rtl;
    border: 1px solid #eee;
    border-radius: 13px;
    background: #fafafa;
}
.city-search-icon { font-size: 20px; color: #ed001b; line-height: 1; }
.city-search-box input {
    width: 100%; height: 100%; padding: 0; border: 0; outline: 0;
    background: transparent; font-size: 12px; text-align: right;
}

.province-list {
    max-height: 430px;
    margin-top: 9px;
    overflow-y: auto;
    padding-left: 2px;
    direction: rtl;
}
.province-list::-webkit-scrollbar { width: 5px; }
.province-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 20px; }
.province-item {
    margin-bottom: 7px;
    border: 1px solid #eee;
    border-radius: 13px;
    overflow: hidden;
    background: #fff;
}
.province-row {
    min-height: 48px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    background: #fff;
}
.province-toggle {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #222;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
}
.province-toggle .province-arrow { color: #999; font-size: 18px; transition: .2s; }
.province-item.open .province-arrow { transform: rotate(180deg); color: #ed001b; }
.province-select, .city-select-all {
    width: 20px; height: 20px; min-width: 20px; margin: 0;
    accent-color: #ed001b;
    cursor: pointer;
}
.city-list-inner {
    display: none;
    border-top: 1px solid #eee;
    background: #fafafa;
    padding: 8px;
}
.province-item.open .city-list-inner { display: block; }
.city-all-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 9px;
    margin-bottom: 5px;
    border-radius: 9px;
    background: #fff4f5;
    color: #d90018;
    font-size: 12px;
    font-weight: 900;
}
.city-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.city-option {
    min-height: 37px;
    padding: 0 8px;
    border: 1px solid #eee;
    border-radius: 9px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    font-size: 11px;
    text-align: right;
    cursor: pointer;
}
.city-option:hover { border-color: #ed1b2f; }
.city-option input { width: 17px; height: 17px; min-width: 17px; accent-color: #ed001b; margin: 0; }
.city-loading, .city-error, .city-empty { padding: 18px 8px; text-align: center; color: #777; font-size: 12px; }
.city-error { color: #d90018; }

.city-panel-footer {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #eee;
    direction: rtl;
    text-align: center;
}
#selectedCitiesPreview { color: #777; font-size: 10px; line-height: 1.7; }

/* =========================================================
   سرچ مستقیم داخل هدر
========================================================= */
.job-search-inline {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    border: 1px solid #e6e6e6;
    border-radius: 18px;
    background: #fafafa;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 15px rgba(0,0,0,.03);
    transition: .2s ease;
}
.job-search-inline:focus-within {
    background: #fff;
    border-color: #ed1b2f;
    box-shadow: 0 8px 24px rgba(237,27,47,.10);
}
.inline-search-icon { font-size: 23px; line-height: 1; color: #ed001b; }
.job-search-input {
    width: 100%; height: 100%; min-width: 0;
    padding: 0; border: 0; outline: 0;
    background: transparent;
    color: #222;
    font-size: 14px;
    text-align: right;
}
.job-search-input::placeholder { color: #999; }
.clear-job-search {
    display: none;
    width: 28px; height: 28px; min-width: 28px;
    padding: 0; border: 0; border-radius: 50%;
    background: #eee; color: #666; font-size: 20px; line-height: 1;
    cursor: pointer;
}
.job-search-inline.has-value .clear-job-search { display: flex; align-items: center; justify-content: center; }

/* =========================================================
   پیام نبودن نتیجه جستجو
========================================================= */
.no-results-message {
    width: calc(100% - 44px);
    min-height: 180px;
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
    box-sizing: border-box;
    border: 1px solid #eeeeee;
    border-radius: 24px;
    background: #fff;
    color: #777;
    font-size: 17px;
    font-weight: 700;
    line-height: 2;
    box-shadow: 0 8px 25px rgba(0,0,0,.05);
}
.no-results-message[hidden] { display: none !important; }
#noResultsQuery { color: #ed001b; }

/* =========================================================
   عنوان کاریابی
========================================================= */
.province-title-box {
    width: calc(100% - 44px);
    height: 76px;
    min-height: 76px;
    margin: 38px auto 0;
    border-radius: 28px;
    background: #ed001b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 15px 35px rgba(237,0,27,.18);
}
.province-title-box span {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    color: #fff;
}

@media (max-width: 700px) {
    .top-header { min-height: 68px; padding: 8px 9px; gap: 7px; }
    .city-selector { width: 158px; min-width: 158px; }
    .city-button, .job-search-inline { height: 48px; }
    .city-button { font-size: 12px; border-radius: 15px; }
    .job-search-inline { border-radius: 15px; padding: 0 10px; }
    .job-search-input { font-size: 12px; }
    .inline-search-icon { font-size: 20px; }
    .city-selector-panel { top: 57px; width: min(390px, calc(100vw - 18px)); max-height: 72vh; }
    .province-list { max-height: 49vh; }
    .province-title-box { width: calc(100% - 24px); height: 56px; min-height: 56px; margin-top: 20px; border-radius: 28px; }
    .province-title-box span { font-size: 17px; }
}

@media (max-width: 380px) {
    .city-selector { width: 148px; min-width: 148px; }
    .city-button { padding: 0 7px; }
    .city-name { max-width: 105px; }
    .city-options { grid-template-columns: 1fr; }
}

/* آگهی‌های ثبت‌شده و تأییدشده */
.approved-ads-container{display:grid;gap:16px;margin:20px 16px 28px;}
.approved-ad-card{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:stretch;background:#fff;border:1px solid #eee;border-radius:20px;padding:12px;box-shadow:0 8px 24px rgba(0,0,0,.05);overflow:hidden;}
.approved-ad-image{width:110px;min-height:120px;border-radius:14px;overflow:hidden;background:#f5f5f5;display:flex;align-items:center;justify-content:center;}
.approved-ad-image img{width:100%;height:100%;object-fit:cover;display:block;}
.ad-no-image{font-size:12px;color:#999;text-align:center;padding:10px;}
.approved-ad-content{min-width:0;}
.approved-ad-content h3{margin:2px 0 8px;font-size:18px;line-height:1.5;}
.approved-ad-location,.approved-ad-details{font-size:13px;color:#666;margin-bottom:5px;}
.approved-ad-content p{font-size:13px;line-height:1.8;color:#555;margin:8px 0;}
.approved-ad-footer{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:8px;}
.approved-ad-footer span{font-size:12px;color:#16834b;background:#eaf8f0;padding:5px 9px;border-radius:999px;}
.approved-ad-footer small{font-size:11px;color:#999;}
.approved-empty{background:#fff;border:1px dashed #ddd;border-radius:18px;padding:24px 18px;text-align:center;margin:8px 0;color:#777;}
.approved-empty strong,.approved-empty span{display:block;}
.approved-empty strong{font-size:16px;color:#444;margin-bottom:7px;}
.approved-empty span{font-size:13px;line-height:1.8;}
@media(max-width:480px){.approved-ad-card{grid-template-columns:92px 1fr;gap:11px;padding:10px}.approved-ad-image{width:92px;min-height:105px}.approved-ad-content h3{font-size:16px}.approved-ad-content p{font-size:12px}}
/* اگر از چک‌باکس استاندارد استفاده شده */
input[type="checkbox"]:checked {
    accent-color: #e11d48; /* رنگ قرمز تم پروژه */
}

/* اگر کلاس اختصاصی برای آیتم یا تیک فعال دارید */
.city-item.active,
.province-item.active {
    color: #e11d48;
}

.city-checkbox:checked,
.custom-checkbox input:checked + .checkmark {
    background-color: #e11d48;
    border-color: #e11d48;
}
