@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');
:root{--primary:#5145cd;--primary-dark:#3d32b1;--ink:#19182b;--muted:#85849a;--line:#ecebf4;--bg:#f7f7fc;--white:#fff;--green:#168a63;--amber:#b66a0b;--red:#c34242}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"Vazirmatn",Tahoma,sans-serif;font-size:14px;padding-bottom:92px}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 17px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:800}.brand small{display:block;font-size:10px;color:var(--muted);font-weight:500}.brand-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;color:white;background:linear-gradient(145deg,#6659ed,#4437bc);font-size:23px}.icon-btn{border:0;background:#f6f5ff;color:var(--primary);border-radius:12px;width:39px;height:39px;font-size:20px}.app-main{max-width:650px;margin:auto;padding:16px}.hero{background:linear-gradient(140deg,#5145cd,#7166e9);color:#fff;border-radius:24px;padding:24px 19px 20px;overflow:hidden;position:relative}.hero:after{content:"";position:absolute;width:180px;height:180px;border:1px solid #ffffff24;border-radius:50%;left:-65px;top:-75px;box-shadow:0 0 0 25px #ffffff0a,0 0 0 50px #ffffff08}.eyebrow{font-size:11px;background:#ffffff20;padding:6px 10px;border-radius:20px}.hero h1{font-size:27px;line-height:1.6;margin:16px 0 5px;font-weight:800}.hero p{font-size:12px;line-height:2;color:#e5e2ff;margin:0 0 17px}.search-box{background:#fff;padding:5px;border-radius:13px;display:flex;gap:5px;position:relative;z-index:1}.search-box input{border:0;outline:0;min-width:0;flex:1;padding:0 9px;color:var(--ink);font-size:12px}.primary{border:0;background:var(--primary);color:white;border-radius:10px;padding:11px 15px;font-weight:700}.hero .primary{background:#5145cd;white-space:nowrap}.section{margin-top:26px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}.section-head h2{font-size:16px;margin:0;font-weight:800}.muted{font-size:10px;color:var(--muted)}.text-btn{border:0;background:transparent;color:var(--primary);font-size:11px;font-weight:700}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.category{border:1px solid var(--line);background:#fff;border-radius:15px;padding:13px 3px 11px;font-size:10px;font-weight:600;display:flex;align-items:center;gap:8px;flex-direction:column;min-height:90px}.category span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#f0efff;color:var(--primary);font-size:22px}.listing-list{display:grid;gap:10px}
.listing-card{
  background:#fff;
  border:1px solid #e9eaf2;
  border-radius:20px;
  padding:17px;
  display:flex;
  gap:13px;
  align-items:flex-start;
  box-shadow:0 4px 14px rgba(35,32,80,.045);
  transition:box-shadow .2s ease,border-color .2s ease;
}
.listing-symbol{width:43px;height:43px;border-radius:13px;background:#f0efff;color:var(--primary);display:grid;place-items:center;font-size:21px;flex-shrink:0}.listing-info{min-width:0;flex:1}
.listing-info h3{
  font-size:14px;
  font-weight:800;
  color:var(--ink);
  margin:1px 0 8px;
  line-height:1.9;
}

.meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 12px;
  color:var(--muted);
  font-size:11px;
  line-height:1.9;
}

.tag{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  background:#e9f8f1;
  color:var(--green);
  border:1px solid #d5f0e4;
  border-radius:8px;
  font-size:11px;
  font-weight:700;
  line-height:1.7;
  margin-top:10px;
}

.salary{
  display:inline-block;
  margin-top:10px;
  padding:6px 10px;
  background:#f0efff;
  border:1px solid #e5e2ff;
  border-radius:9px;
  color:var(--primary);
  font-size:12px;
  font-weight:800;
  line-height:1.8;
}
.notice{display:flex;gap:11px;padding:15px;background:#f0efff;border:1px solid #e5e2ff;border-radius:16px;margin-top:24px}.notice-icon{display:grid;place-items:center;width:34px;height:34px;background:#fff;color:var(--primary);border-radius:10px;flex-shrink:0}.notice b{font-size:12px}.notice p{font-size:10px;color:#6d6a89;line-height:1.9;margin:4px 0 0}.bottom-nav{position:fixed;bottom:0;left:0;right:0;height:76px;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom));background:#ffffffed;backdrop-filter:blur(12px);border-top:1px solid var(--line);display:flex;justify-content:space-around;z-index:10}
.nav-item{
  position:relative;
  flex:1;
  min-width:0;
  min-height:56px;
  padding:7px 3px 5px;
  background:transparent;
  border:0;
  border-radius:14px;
  color:#7b8497;
  font-size:11px;
  font-weight:500;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex-direction:column;
  transition:color .2s ease, background .2s ease;
  -webkit-tap-highlight-color:transparent;
}
.nav-item span{
  font-size:22px;
  line-height:1.2;
  transition:transform .2s ease;
}
.nav-item.active{
  color:var(--primary);
  background:#5145cd12;
  font-weight:700;
}
.nav-item.active span{
  transform:translateY(-1px);
}
.add-nav span{width:37px;height:37px;background:var(--primary);color:white;border-radius:13px;display:grid;place-items:center;font-size:26px;box-shadow:0 5px 12px #5145cd35}.page-title{font-size:21px;margin:9px 0 5px}.page-subtitle{color:var(--muted);font-size:12px;line-height:1.9;margin:0 0 19px}.panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:16px;margin-bottom:12px}.field{display:grid;gap:7px;margin-bottom:14px}.field label{font-size:12px;font-weight:700}.field input,.field select,.field textarea,.filter-input{width:100%;border:1px solid #e7e6f0;border-radius:11px;background:#fff;padding:12px;color:var(--ink);outline:none;min-height:45px}.field textarea{resize:vertical;min-height:120px;line-height:2}.field input:focus,.field select:focus,.field textarea:focus{border-color:#938cf0;box-shadow:0 0 0 3px #5145cd12}.full{width:100%}.secondary{background:#fff;color:var(--primary);border:1px solid #dcd9ff;border-radius:11px;padding:11px 14px;font-weight:700}.row-actions{display:flex;gap:8px;margin-top:10px}.status{font-size:10px;padding:4px 8px;border-radius:7px;background:#fff2d9;color:var(--amber);display:inline-block}.status.approved{background:#e5f7ef;color:var(--green)}.status.rejected{background:#ffeded;color:var(--red)}.status.closed{background:#eeeef3;color:#777}.empty,.loading{background:#fff;border:1px dashed #dddbea;border-radius:15px;text-align:center;padding:26px 14px;color:var(--muted);font-size:12px;line-height:2}.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.stat{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px}.stat b{font-size:24px;color:var(--primary);display:block}.stat span{font-size:11px;color:var(--muted)}.toolbar{display:flex;gap:8px;margin:13px 0}.toolbar input,.toolbar select{min-width:0;flex:1;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px}.modal{border:0;border-radius:20px;padding:22px;width:min(92vw,440px);box-shadow:0 20px 80px #201b5033}.modal::backdrop{background:#17142c80;backdrop-filter:blur(3px)}.modal h2{font-size:18px;margin:0 0 15px}.toast{position:fixed;bottom:90px;right:16px;left:16px;max-width:600px;margin:auto;background:#24213d;color:#fff;padding:13px 16px;border-radius:12px;z-index:30;transform:translateY(20px);opacity:0;pointer-events:none;transition:.2s;font-size:12px}.toast.show{transform:translateY(0);opacity:1}.detail-content{line-height:2.1;font-size:13px;white-space:pre-wrap}.admin-label{font-size:10px;color:var(--primary);background:#f0efff;border-radius:8px;padding:5px 8px}
@media(min-width:700px){body{padding-bottom:0}.topbar{padding-inline:max(24px,calc((100vw - 900px)/2))}.app-main{padding-top:24px}.bottom-nav{left:50%;right:auto;transform:translateX(-50%);width:min(100%,650px);border:1px solid var(--line);border-bottom:0;border-radius:20px 20px 0 0}.hero{padding:30px}.hero h1{font-size:32px}}

/* فیلتر استان در صفحه اصلی دفتر‌یار */
#homeProvinceFilter {
  width: 100%;
  min-width: 0;
  padding: 13px 42px 13px 14px;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background-color: #f7faff;
  color: #243b5a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
              background-color 0.2s ease;
}

#homeProvinceFilter:hover {
  border-color: #9bbce8;
  background-color: #ffffff;
}

#homeProvinceFilter:focus {
  border-color: #3678d4;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(54, 120, 212, 0.12);
}

#homeProvinceFilter option {
  background-color: #ffffff;
  color: #243b5a;
  font-family: inherit;
  padding: 10px;
}

/* Prevent automatic zoom on mobile when focusing form fields */
@media (max-width: 699px) {
  input,
  select,
  textarea,
  .filter-input,
  .toolbar input,
  .toolbar select,
  .search-box input {
    font-size: 16px;
  }
}

/* Reduce accidental double-tap zoom on interactive controls */
button,
a,
[role="button"],
nav,
nav * {
  touch-action: manipulation;
}

/* DaftarYar iOS installation guide */
.ios-install-overlay{position:fixed;inset:0;z-index:9999;background:#17152a99;display:flex;align-items:flex-end;justify-content:center;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
.ios-install-card{width:100%;max-width:430px;background:#fff;border-radius:24px;padding:24px 20px;color:#24213d;box-shadow:0 12px 50px #0003}
.ios-install-card h2{font-size:20px;margin:0 0 10px}
.ios-install-card p{font-size:14px;line-height:1.9;margin:8px 0}
.ios-install-card ol{padding-right:22px;font-size:14px;line-height:2.1}
.ios-install-card .ios-install-close{width:100%;border:0;border-radius:12px;padding:13px;background:#5145cd;color:#fff;font:inherit;font-size:16px;margin-top:10px}
.ios-install-card .ios-install-share{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d8d5f5;border-radius:8px;padding:2px 9px;color:#5145cd;font-weight:bold}

/* HOME REDESIGN V1 — DaftarYar */
:root {
  --home-surface: #ffffff;
  --home-soft: #f4f2ff;
  --home-border: #e8e5fa;
}

/* Hero: refined purple gradient */
.hero {
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(135deg, #4338a9 0%, #5145cd 55%, #7569e8 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 30px rgba(69,57,173,.13);
}

.hero:after {
  pointer-events: none;
  opacity: .8;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}

.hero h1 {
  letter-spacing: -.35px;
}

.hero p {
  max-width: 38ch;
}

/* Keep search and province filter usable on small screens */
.hero .search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 17px;
  box-shadow: 0 7px 22px rgba(30,22,91,.12);
}

.hero .search-box input,
.hero .search-box #homeProvinceFilter {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 11px;
}

.hero .search-box input {
  padding: 0 12px;
  background: #fff;
}

.hero .search-box #homeProvinceFilter {
  padding: 10px 12px;
  border-color: #e4e1f6;
  background-color: #f8f7ff;
  color: #302b63;
}

.hero .search-box #searchBtn {
  width: 100%;
  min-height: 45px;
  border-radius: 11px;
  background: linear-gradient(135deg, #5145cd, #3d32b1);
  box-shadow: 0 4px 10px rgba(81,69,205,.2);
}

/* Job categories: two columns on mobile, retain every existing category */
.category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category {
  min-height: 94px;
  padding: 14px 9px;
  border-color: var(--home-border);
  border-radius: 17px;
  box-shadow: 0 3px 12px rgba(35,32,80,.035);
  font-size: 12px;
  transition: transform .18s ease, border-color .18s ease,
              box-shadow .18s ease;
}

.category span {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #f1efff, #e8e4ff);
}

.category:active {
  transform: scale(.98);
}

/* Cleaner listing cards */
.listing-list {
  gap: 12px;
}

.listing-card {
  position: relative;
  gap: 12px;
  border-color: #e9e7f4;
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(35,32,80,.045);
}

.listing-symbol {
  background: linear-gradient(145deg, #f1efff, #e8e4ff);
  border: 1px solid #e6e1ff;
}

.listing-info h3 {
  overflow-wrap: anywhere;
}

.listing-card .tag {
  border-radius: 9px;
}

/* Future visual style only; no paid listing feature is enabled */
.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid #e7d9a6;
  border-radius: 8px;
  background: #fff8df;
  color: #795b0b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.8;
}

/* Section rhythm */
.section {
  margin-top: 28px;
}

.section-head {
  margin-bottom: 14px;
}

.notice {
  border-radius: 17px;
  border-color: #e5e0ff;
}

/* Desktop layout */
@media (min-width: 700px) {
  .hero .search-box {
    grid-template-columns: minmax(0, 1fr) minmax(155px, .7fr) auto;
    align-items: center;
  }

  .hero .search-box #searchBtn {
    width: auto;
    min-width: 100px;
  }

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


/* HOME CATEGORY + LOCATION TAG UPDATE */
.category {
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.9;
}
.category span { display: none; }
.location-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid #d9d5ff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0eeff, #e7e5ff);
  color: #4035ad;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.9;
}
#phoneHelp { display: block; margin-top: 5px; line-height: 1.9; }


/* CARD CALL UPDATE 20261017 */
.public-listing-card {
  position: relative;
  overflow: hidden;
  padding-right: 20px;
}
.public-listing-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  background: #b9d9ff;
}
.public-listing-card.kind-resume::before {
  background: #b9e4d1;
}
.public-listing-card.kind-job::before {
  background: #b9d9ff;
}
.public-listing-card .listing-info {
  width: 100%;
  min-width: 0;
}
.detail-phone {
  direction: rtl;
  overflow-wrap: anywhere;
}
.detail-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.detail-modal-actions .call-action,
.detail-modal-actions .close-action {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  text-align: center;
}
.detail-modal-actions .close-action {
  font-weight: 700;
}
@media (max-width: 360px) {
  .detail-modal-actions { gap: 7px; }
  .detail-modal-actions .call-action,
  .detail-modal-actions .close-action { padding: 10px 8px; }
}


/* COMPACT PUBLIC CARDS UPDATE 20261017 */
.public-listing-card {
  padding: 11px 17px 11px 12px;
  border-radius: 15px;
  gap: 0;
}
.public-listing-card .listing-info h3 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.65;
  margin: 0 0 4px;
  color: #20213b;
}
.public-listing-card .location-tag {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 8px;
}
.public-listing-card .meta {
  gap: 4px 10px;
  font-size: 11px;
  line-height: 1.7;
}
.public-listing-card .category-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 7px;
  background: #f1f0ff;
  color: #5145cd;
  font-size: 11px;
  font-weight: 700;
}
.public-listing-card .listing-date {
  color: #77778c;
  font-size: 11px;
  white-space: nowrap;
}
.public-listing-card .salary {
  margin-top: 5px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.7;
}
.public-listing-card .tag {
  margin-top: 5px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.6;
}
.public-listing-card .card-detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #d8e4ff;
  border-radius: 9px;
  background: #f1f6ff;
  color: #2859a8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}
.public-listing-card.kind-resume .card-detail-btn {
  background: #eff9f4;
  border-color: #d5ecdf;
  color: #247451;
}
.public-listing-card .card-detail-btn:active {
  transform: scale(.99);
}
@media (max-width: 360px) {
  .public-listing-card { padding: 9px 15px 9px 10px; }
  .public-listing-card .listing-info h3 { font-size: 16px; }
}

/* NOTARY JOB — Home page visual redesign */
.hero {
  min-height: 0;
  padding: 0;
  background: #eef3fb;
  color: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(28, 48, 86, .10);
  overflow: hidden;
}

.hero:after {
  display: none;
}

/* The image will fill the banner once added to the home markup */
.hero .home-banner-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2.4 / 1;
  object-fit: cover;
  object-position: center;
}

.home-search-section {
  margin-top: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e9f3;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(27, 48, 82, .05);
}

.home-search-section .search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-search-section .search-box input,
.home-search-section .search-box #homeProvinceFilter {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e0e6f0;
  border-radius: 10px;
  background: #f8faff;
  color: #25344d;
  font-size: 14px;
}

.home-search-section .search-box #searchBtn {
  width: 100%;
  min-height: 43px;
  border-radius: 10px;
  background: linear-gradient(135deg, #245bb5, #172f68);
  box-shadow: none;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.category {
  min-width: 0;
  min-height: 66px;
  padding: 10px 3px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-size: 11px;
  line-height: 1.7;
  font-weight: 800;
  text-align: center;
  justify-content: center;
  box-shadow: 0 3px 9px rgba(30, 45, 75, .09);
}

.category:nth-child(1) { background: #3268b8; }
.category:nth-child(2) { background: #168a83; }
.category:nth-child(3) { background: #7955b5; }
.category:nth-child(4) { background: #d17a35; }
.category:nth-child(5) { background: #397c54; }
.category:nth-child(6) { background: #bd5475; }

.category span {
  display: none;
}

@media (min-width: 700px) {
  .hero .home-banner-image {
    aspect-ratio: 3.2 / 1;
  }

  .home-search-section .search-box {
    grid-template-columns: minmax(0, 1fr) minmax(155px, .7fr) auto;
    align-items: center;
  }

  .home-search-section .search-box #searchBtn {
    width: auto;
    min-width: 100px;
  }

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

/* PWA mobile: prevent iOS Safari automatic zoom on form focus */
@media (max-width: 699px) {
  input,
  select,
  textarea,
  .filter-input,
  .toolbar input,
  .toolbar select,
  .search-box input,
  .home-search-section .search-box input,
  .home-search-section .search-box select,
  #homeProvinceFilter {
    font-size: 16px !important;
  }
}
