
.hva-display,.hva-login,.hva-dept-dashboard{box-sizing:border-box}
.hva-display *,.hva-login *,.hva-dept-dashboard *{box-sizing:border-box}

/* صفحه لابی — تمام‌صفحه، روشن و مینیمال */
html:has(.hva-display),body:has(.hva-display){
  margin:0!important;padding:0!important;width:100%;min-height:100%;background:#fff!important;
}
body:has(.hva-display) .site-header,
body:has(.hva-display) header.site-header,
body:has(.hva-display) .site-footer,
body:has(.hva-display) footer.site-footer,
body:has(.hva-display) #wpadminbar,
body:has(.hva-display) .entry-header,
body:has(.hva-display) .page-header{display:none!important}
body:has(.hva-display) main,
body:has(.hva-display) .site-main,
body:has(.hva-display) .entry-content,
body:has(.hva-display) .wp-site-blocks{
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
}

.hva-display--minimal{
  width:100vw;
  min-height:100vh;
  margin:0;
  padding:4vh 4vw;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#18343a;
}
.hva-display__stage{
  width:min(1700px,95vw);
  min-height:36vh;
  padding:5vh 5vw;
  background:#fff;
  border:1px solid #e2e9eb;
  border-radius:24px;
  box-shadow:0 18px 55px rgba(29,61,69,.08);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.hva-display__message{
  max-width:1500px;
  margin:0;
  color:#16343a;
  font-size:clamp(44px,5.5vw,92px);
  font-weight:800;
  line-height:1.5;
  letter-spacing:-1px;
  text-wrap:balance;
}
.hva-display__meta{
  margin-top:18px;
  color:#7b8c91;
  font-size:clamp(15px,1.3vw,21px);
  font-weight:500;
}
.hva-display__audio-status{
  margin-top:10px;
  min-height:0;
  font-size:14px;
  color:#a32929;
}
.hva-display__audio-status:empty{display:none}
.hva-display__queue{
  margin-top:8px;
  color:#87979c;
  font-size:13px;
}
.hva-display[data-priority="urgent"] .hva-display__stage{border-color:#efb2b2}

/* لاگین کاربر بخش — تمام صفحه و سفید */
html:has(.hva-login),body:has(.hva-login),
html:has(.hva-dept-dashboard),body:has(.hva-dept-dashboard){
  margin:0!important;padding:0!important;min-height:100%;background:#fff!important;
}
body:has(.hva-login) .site-header,
body:has(.hva-login) header.site-header,
body:has(.hva-login) .site-footer,
body:has(.hva-login) footer.site-footer,
body:has(.hva-dept-dashboard) .site-header,
body:has(.hva-dept-dashboard) header.site-header,
body:has(.hva-dept-dashboard) .site-footer,
body:has(.hva-dept-dashboard) footer.site-footer,
body:has(.hva-dept-dashboard) #wpadminbar{display:none!important}

.hva-login{
  width:min(480px,92vw);
  margin:9vh auto;
  padding:26px;
  background:#fff;
  border:1px solid #e1e8ea;
  border-radius:18px;
  box-shadow:0 16px 46px rgba(24,54,62,.08);
  color:#18343a;
}
.hva-login h2{margin:0 0 18px;font-size:25px}
.hva-login label{display:block;margin-bottom:6px;font-weight:700;font-size:13px}
.hva-login input{
  width:100%;min-height:46px;padding:10px 12px;border:1px solid #cfdadd;border-radius:10px;background:#fff;font:inherit
}
.hva-login .hva-btn{
  width:100%;min-height:48px;border:0;border-radius:11px;background:#19545d;color:#fff;font:inherit;font-weight:800;cursor:pointer
}

/* داشبورد کاربر بخش — تمام صفحه، سفید، واید و باریک */
.hva-dept-dashboard{
  width:100vw;
  min-height:100vh;
  margin:0;
  padding:5vh 4vw;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#18343a;
}
.hva-dept-shell{
  width:min(1180px,94vw);
}
.hva-dept-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin:0 0 18px;
  padding:0;
  border:0;
}
.hva-dept-head span{display:block;color:#87979c;font-size:13px;margin-bottom:5px}
.hva-dept-head h2{margin:0;color:#15373e;font-size:clamp(27px,2.5vw,40px);font-weight:800}
.hva-dept-logout{
  color:#72848a;text-decoration:none;font-size:13px;padding:9px 12px;border:1px solid #dce5e7;border-radius:9px
}
.hva-dept-form{
  width:100%;
  padding:20px;
  background:#fff;
  border:1px solid #e0e8ea;
  border-radius:18px;
  box-shadow:0 15px 45px rgba(25,57,65,.07);
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px 16px;
}
.hva-field{min-width:0}
.hva-field--preview{grid-column:1/-1}
.hva-field label{
  display:block;margin:0 0 6px;color:#526a71;font-size:13px;font-weight:700
}
.hva-field input,.hva-field select,.hva-field textarea{
  width:100%;min-height:46px;padding:10px 12px;background:#fff;border:1px solid #ccd9dc;border-radius:10px;
  color:#1d383e;font:inherit;font-size:15px;outline:none
}
.hva-field input:focus,.hva-field select:focus{border-color:#5e949c;box-shadow:0 0 0 3px rgba(46,115,125,.08)}
.hva-field textarea{min-height:82px;resize:none;color:#51676d;background:#fafcfc}
.hva-btn--send{
  grid-column:1/-1;
  width:100%;
  min-height:50px;
  border:0;
  border-radius:11px;
  background:#19545d;
  color:#fff;
  font:inherit;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
}
.hva-btn--send:disabled{opacity:.45;cursor:not-allowed}
.hva-send-status{grid-column:1/-1;font-size:13px;min-height:0}
.hva-success{color:#176b35}
.hva-error{color:#9d2727}
@media(max-width:760px){
  .hva-display--minimal{padding:2vh 3vw}
  .hva-display__stage{min-height:54vh;padding:4vh 5vw}
  .hva-display__message{font-size:clamp(38px,10vw,62px)}
  .hva-dept-dashboard{padding:24px 14px}
  .hva-dept-form{grid-template-columns:1fr}
  .hva-field--preview,.hva-btn--send,.hva-send-status{grid-column:auto}
}

/* Lobby compact widescreen — fixed viewport, no scroll */
html:has(.hva-display),
body:has(.hva-display){
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  overflow:hidden!important;
  background:#fff!important;
}
body:has(.hva-display) main,
body:has(.hva-display) .site-main,
body:has(.hva-display) .entry-content,
body:has(.hva-display) .wp-site-blocks{
  min-height:0!important;
  height:100vh!important;
  overflow:hidden!important;
}
.hva-display--minimal{
  width:100vw!important;
  height:100vh!important;
  min-height:0!important;
  padding:2vh 3vw!important;
  overflow:hidden!important;
}
.hva-display__stage{
  width:min(1640px,94vw)!important;
  height:auto!important;
  min-height:0!important;
  max-height:72vh!important;
  padding:4vh 4vw!important;
  border-radius:20px!important;
  overflow:hidden!important;
}
.hva-display__message{
  font-size:clamp(38px,4.7vw,78px)!important;
  line-height:1.42!important;
  max-height:48vh;
  overflow:hidden;
}
.hva-display__meta{
  margin-top:12px!important;
  font-size:clamp(14px,1.1vw,18px)!important;
}
.hva-display__audio-status{margin-top:6px!important}
.hva-display__queue{margin-top:4px!important}
@media(max-width:760px){
  .hva-display--minimal{padding:1.5vh 2vw!important}
  .hva-display__stage{max-height:82vh!important;padding:3vh 4vw!important}
  .hva-display__message{font-size:clamp(32px,9vw,54px)!important;max-height:58vh}
}

/* تاریخچه اعلان‌های کاربر بخش */
.hva-dept-history{width:100%;margin-top:18px;background:#fff;border:1px solid #e2e9eb;border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(25,57,65,.045)}
.hva-dept-history__head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}
.hva-dept-history__head h3{margin:0;font-size:18px;color:#173b42}
.hva-dept-history__head span{font-size:12px;color:#819196}
.hva-history-list{display:flex;flex-direction:column;gap:8px}
.hva-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:11px 12px;border:1px solid #edf1f2;border-radius:11px;background:#fcfdfd}
.hva-history-text{font-size:14px;color:#29464c;line-height:1.7}
.hva-history-meta{font-size:12px;color:#839399;white-space:nowrap}
.hva-repeat-message{border:1px solid #1b5962;background:#fff;color:#1b5962;border-radius:9px;padding:8px 11px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.hva-repeat-message:hover{background:#f1f8f9}.hva-repeat-message:disabled{opacity:.6;cursor:wait}
.hva-empty-history{padding:14px;color:#7d8e93;background:#fafcfc;border-radius:10px;font-size:13px}
@media(max-width:760px){.hva-history-item{grid-template-columns:1fr}.hva-history-meta{white-space:normal}.hva-repeat-message{width:100%}}

/* Department portal 2.1 */
.hva-dept-head--rich{align-items:flex-start}
.hva-dept-head--rich small{display:block;color:#93a0a4;margin-top:5px;font-size:12px}
.hva-dept-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 14px}
.hva-dept-stats>div{border:1px solid #e3e9eb;background:#fff;border-radius:13px;padding:14px 16px}
.hva-dept-stats strong{display:block;font-size:26px;color:#184e57}
.hva-dept-stats span{display:block;color:#809095;font-size:12px;margin-top:4px}
.hva-dept-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,.9fr);gap:14px;align-items:start}
.hva-dept-card{background:#fff;border:1px solid #e0e8ea;border-radius:18px;padding:18px;box-shadow:0 12px 36px rgba(25,57,65,.055)}
.hva-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}
.hva-section-title span{display:block;color:#8b9a9f;font-size:11px;margin-bottom:3px}
.hva-section-title h3{margin:0;color:#193f47;font-size:20px}
.hva-dept-card .hva-dept-form{border:0;box-shadow:none;padding:0}
.hva-history-list{display:grid;gap:9px;max-height:460px;overflow:auto;padding-left:3px}
.hva-history-item{border:1px solid #e7ecee;border-radius:11px;padding:11px 12px;background:#fbfcfc}
.hva-history-text{color:#304d54;font-size:13px;line-height:1.85}
.hva-history-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.hva-history-foot span{color:#89979b;font-size:10px}
.hva-resend-btn{border:0;background:#eef6f7;color:#19545d;border-radius:8px;padding:7px 10px;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.hva-resend-btn:hover{background:#dcecef}
@media(max-width:900px){
 .hva-dept-layout{grid-template-columns:1fr}
 .hva-history-list{max-height:none}
}
@media(max-width:620px){.hva-dept-stats{grid-template-columns:1fr}}

/* Inline department login */
html:has(.hva-dept-login-page),body:has(.hva-dept-login-page){
  margin:0!important;padding:0!important;min-height:100%;background:#fff!important;
}
body:has(.hva-dept-login-page) .site-header,
body:has(.hva-dept-login-page) header.site-header,
body:has(.hva-dept-login-page) .site-footer,
body:has(.hva-dept-login-page) footer.site-footer,
body:has(.hva-dept-login-page) #wpadminbar{display:none!important}
.hva-dept-login-page{
  width:100vw;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#fff;
}
.hva-dept-login-card{
  width:min(460px,94vw);
  border:1px solid #e1e8ea;
  border-radius:20px;
  background:#fff;
  padding:26px;
  box-shadow:0 18px 50px rgba(24,54,62,.08);
}
.hva-dept-login-head span{display:block;color:#87979c;font-size:12px;margin-bottom:5px}
.hva-dept-login-head h2{margin:0;color:#173d45;font-size:28px}
.hva-dept-login-head p{margin:9px 0 20px;color:#73858b;font-size:13px;line-height:1.8}
.hva-dept-login-form{display:grid;gap:10px}
.hva-dept-login-form label{font-size:13px;font-weight:700;color:#4d666d}
.hva-dept-login-form input[type="text"],
.hva-dept-login-form input[type="password"]{
  width:100%;min-height:46px;border:1px solid #cfdadd;border-radius:10px;padding:10px 12px;background:#fff;font:inherit
}
.hva-remember-row{display:flex!important;align-items:center;gap:8px;font-weight:500!important;color:#6f8187!important}
.hva-remember-row input{width:auto!important}
.hva-login-submit{margin-top:6px}
.hva-login-error{margin-bottom:14px;padding:10px 12px;border-radius:9px;background:#fff1f1;color:#982b2b;font-size:13px}

/* ===== Department dashboard 2.3 — Elementor friendly ===== */
.hva-elementor-compatible{width:100%;min-height:auto!important;margin:0!important;padding:28px 0!important;background:transparent!important;color:#18343a}
.hva-elementor-compatible .hva-dept-shell{width:min(1180px,calc(100% - 32px));margin:0 auto}
.hva-dept-topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;padding:0 2px}
.hva-eyebrow{display:block;margin-bottom:4px;color:#769097;font-size:12px;font-weight:700}
.hva-dept-identity h2{margin:0;color:#123c45;font-size:clamp(26px,2.4vw,38px);line-height:1.25;font-weight:800}
.hva-dept-identity small{display:block;margin-top:5px;color:#8b9da2;font-size:12px}
.hva-dept-logout{border:1px solid #dce6e8;border-radius:10px;padding:9px 14px;background:#fff;color:#567078;text-decoration:none!important;font-size:12px}
.hva-dept-stats--compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.hva-mini-stat{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:74px;padding:14px 16px;border:1px solid #e1eaec;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(26,62,70,.04)}
.hva-mini-stat strong{color:#14515b;font-size:26px;line-height:1;font-weight:800}.hva-mini-stat span{color:#7d9096;font-size:12px}
.hva-dept-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:14px;align-items:start}
.hva-panel-card{border:1px solid #e0e9eb;border-radius:18px;background:#fff;box-shadow:0 12px 34px rgba(25,57,65,.055);padding:18px}
.hva-panel-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #eef3f4}
.hva-panel-title span{display:block;color:#8a9ba0;font-size:11px;font-weight:700}.hva-panel-title h3{margin:3px 0 0;color:#173f47;font-size:20px;font-weight:800}
.hva-panel-title--with-count b{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;padding:0 9px;border-radius:999px;background:#edf6f7;color:#19545d;font-size:12px}
.hva-dept-form--compact{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
.hva-dept-form--compact .hva-field--preview,.hva-dept-form--compact .hva-btn--send,.hva-dept-form--compact .hva-send-status,.hva-dept-form--compact .hva-error{grid-column:1/-1}
.hva-dept-form--compact .hva-field label{margin-bottom:5px;color:#526c73;font-size:12px;font-weight:700}
.hva-dept-form--compact input,.hva-dept-form--compact select,.hva-dept-form--compact textarea{min-height:44px;border:1px solid #cfdbde;border-radius:10px;background:#fff;color:#213d43;box-shadow:none;font:inherit}
.hva-dept-form--compact textarea{min-height:92px;background:#fbfcfc;resize:none}
.hva-dept-form--compact input:focus,.hva-dept-form--compact select:focus{border-color:#6f9fa6;box-shadow:0 0 0 3px rgba(32,102,112,.08);outline:none}
.hva-dept-form--compact .hva-btn--send{min-height:48px;border:0;border-radius:10px;background:#17555f;color:#fff;font-weight:800}
.hva-sent-list{display:grid;gap:9px;max-height:430px;overflow:auto;padding-left:2px}
.hva-sent-item{padding:12px;border:1px solid #e7edef;border-radius:12px;background:#fcfdfd}
.hva-sent-message{color:#314e55;font-size:13px;line-height:1.85}
.hva-sent-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}
.hva-sent-footer time{color:#91a0a4;font-size:10px;direction:ltr}
.hva-resend-btn{border:1px solid #cfe2e5;border-radius:8px;padding:7px 10px;background:#edf7f8;color:#15525b;font:inherit;font-size:11px;font-weight:800;cursor:pointer;transition:.15s ease}
.hva-resend-btn:hover{border-color:#9fc6cc;background:#e1f0f2}.hva-resend-btn.is-success{border-color:#b7ddc2;background:#edf8f0;color:#23703a}.hva-resend-btn.is-error{border-color:#e8b7b7;background:#fff0f0;color:#a12e2e}
.hva-empty{padding:24px;border-radius:12px;background:#f8fbfb;color:#85979c;text-align:center;font-size:12px}
body:has(.hva-elementor-compatible) .site-header,body:has(.hva-elementor-compatible) header.site-header,body:has(.hva-elementor-compatible) .site-footer,body:has(.hva-elementor-compatible) footer.site-footer{display:initial!important}
html:has(.hva-elementor-compatible),body:has(.hva-elementor-compatible){background:inherit!important;overflow:visible!important}
body:has(.hva-elementor-compatible) main,body:has(.hva-elementor-compatible) .site-main,body:has(.hva-elementor-compatible) .entry-content,body:has(.hva-elementor-compatible) .wp-site-blocks{width:auto!important;max-width:none!important;min-height:auto!important;height:auto!important;overflow:visible!important}
@media(max-width:900px){.hva-dept-grid{grid-template-columns:1fr}.hva-sent-list{max-height:none}}
@media(max-width:640px){.hva-elementor-compatible{padding:18px 0!important}.hva-elementor-compatible .hva-dept-shell{width:min(100% - 20px,1180px)}.hva-dept-topbar{align-items:flex-start}.hva-dept-stats--compact{grid-template-columns:1fr}.hva-dept-form--compact{grid-template-columns:1fr}.hva-dept-form--compact .hva-field--preview,.hva-dept-form--compact .hva-btn--send,.hva-dept-form--compact .hva-send-status,.hva-dept-form--compact .hva-error{grid-column:auto}.hva-sent-footer{align-items:flex-start;flex-direction:column}.hva-resend-btn{width:100%}}

/* ===== Department portal 2.5 — professional non-white surface ===== */
.hva-elementor-compatible{
  padding:30px 0!important;
  background:linear-gradient(135deg,#e9f0f2 0%,#f2f6f7 55%,#e8f0f2 100%)!important;
  border-radius:22px;
}
.hva-elementor-compatible .hva-dept-shell{
  width:min(1180px,calc(100% - 36px))!important;
}
.hva-dept-topbar{
  padding:18px 20px!important;
  margin-bottom:12px!important;
  border:1px solid rgba(255,255,255,.75);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 30px rgba(25,57,65,.055);
  backdrop-filter:blur(8px);
}
.hva-dept-stats--compact{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  margin-bottom:12px!important;
}
.hva-mini-stat{
  min-height:68px!important;
  border-color:rgba(210,225,229,.9)!important;
  background:rgba(255,255,255,.86)!important;
}
.hva-dept-grid{
  grid-template-columns:minmax(0,1fr) 350px!important;
  gap:12px!important;
}
.hva-panel-card{
  border-color:rgba(211,225,229,.95)!important;
  border-radius:17px!important;
  box-shadow:0 12px 34px rgba(25,57,65,.06)!important;
}
.hva-compose-card{
  background:rgba(255,255,255,.94)!important;
}
.hva-sent-card{
  padding:15px!important;
  background:rgba(249,252,252,.92)!important;
}
.hva-sent-card .hva-panel-title{
  margin-bottom:10px!important;
  padding-bottom:9px!important;
}
.hva-sent-card .hva-panel-title h3{
  font-size:17px!important;
}
.hva-sent-list{
  max-height:390px!important;
  gap:7px!important;
}
.hva-sent-item{
  padding:10px!important;
  border-radius:10px!important;
  background:#fff!important;
}
.hva-sent-message{
  font-size:12px!important;
  line-height:1.72!important;
}
.hva-sent-footer{
  margin-top:7px!important;
  gap:6px!important;
}
.hva-resend-btn{
  padding:6px 8px!important;
  font-size:10px!important;
}
@media(max-width:900px){
 .hva-dept-grid{grid-template-columns:1fr!important}
 .hva-sent-list{max-height:360px!important}
}
