/* Dashboard Mahya P64 — compact time-aware personal greeting */
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{
 display:block;max-width:min(320px,34vw);min-width:0;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font:400 11.5px/1.45 MahyaR11IranSans,"Vazirmatn",Tahoma,sans-serif;
 color:var(--mh11-muted,#727687);margin-top:-5px;text-align:right;
 letter-spacing:0;direction:rtl;opacity:.91;
}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish[hidden]{display:none}
@media(max-width:850px){
 body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{max-width:min(92vw,360px);font-size:11px}
}
.mh64-admin{direction:rtl;min-width:0}
.mh64-admin-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
 margin:12px 0 16px;flex-wrap:wrap}
.mh64-admin-head>div{display:grid;gap:5px}
.mh64-admin-head h2{font-size:16px;line-height:1.5;margin:0;color:var(--mahya-text,#30354b)}
.mh64-admin-head p{font-size:11px;color:var(--mahya-muted,#70778a);margin:0}
.mh64-admin-total{font-size:10px;padding:5px 11px;border:1px solid var(--mahya-border,#e3e5ed);
 background:var(--mahya-soft,#f8f7fb);border-radius:20px;white-space:nowrap}
.mh64-admin-form{display:grid;gap:9px;min-width:0}
.mh64-period{border:1px solid var(--mahya-border,#e3e7ef);border-radius:12px;
 background:var(--mahya-surface,#fff);overflow:clip}
.mh64-period>summary{cursor:pointer;list-style:none;display:flex;align-items:center;
 min-height:42px;padding:8px 14px;gap:11px;user-select:none}
.mh64-period>summary::-webkit-details-marker{display:none}
.mh64-period>summary strong{font-size:12px;color:var(--mahya-text,#33384b)}
.mh64-period>summary small{font-size:10px;color:var(--mahya-muted,#8490a3)}
.mh64-period-chevron{margin-inline-start:auto;font-size:18px;color:var(--mahya-muted,#778097);transition:transform .18s}
.mh64-period[open] .mh64-period-chevron{transform:rotate(180deg)}
.mh64-period>summary:focus-visible,.mh64-add:focus-visible{outline:2px solid var(--mahya-primary,#376cdb);outline-offset:-2px}
.mh64-period-inner{border-top:1px solid var(--mahya-border,#e3e7ef);padding:12px;display:grid;gap:10px}
.mh64-rows{display:grid;gap:7px}
.mh64-edit-row{display:flex;flex-wrap:wrap;align-items:center;gap:7px;
 min-width:0;padding:8px 10px;border:1px solid var(--mahya-border,#e9eaf1);
 border-radius:9px;background:var(--mahya-surface,#fff)}
.mh64-text-field{flex:1 1 310px;min-width:160px}
.mh64-text-field input{min-height:39px;width:100%;box-sizing:border-box;
 border:1px solid var(--mahya-border,#dfe3eb);border-radius:8px;
 background:var(--mahya-surface,#fff);color:var(--mahya-text,#394256);
 padding:6px 10px;font:12px/1.55 MahyaR11IranSans,Tahoma,sans-serif;text-align:right;direction:rtl}
.mh64-text-field input:focus-visible{border-color:var(--mahya-primary,#4b73c4);outline:2px solid rgba(85,112,209,.2)}
.mh64-tone-chips{display:inline-flex;gap:4px;align-items:center}
.mh64-tone-chips button,.mh64-row-active,.mh64-row-delete{
 min-height:33px;border:1px solid var(--mahya-border,#dedfe9);border-radius:8px;
 background:var(--mahya-surface,#fff);font:10px MahyaR11IranSans,Tahoma,sans-serif;
 color:var(--mahya-muted,#707588);padding:5px 9px;cursor:pointer}
.mh64-tone-chips button[aria-pressed=true],.mh64-row-active[aria-pressed=true]{
 color:var(--mahya-primary,#336acc);background:rgba(78,112,222,.07);border-color:rgba(78,112,222,.26)}
.mh64-row-delete{color:var(--mahya-danger,#b42318);border-color:transparent}
.mh64-edit-row.is-deleted{background:var(--mahya-soft,#f8f9fb);opacity:.63;border-style:dashed}
.mh64-edit-row.is-deleted .mh64-tone-chips,.mh64-edit-row.is-deleted .mh64-row-active{display:none}
.mh64-add{justify-self:start;min-height:34px;font-size:11px}
.mh64-admin-footer{display:flex;justify-content:space-between;gap:14px;align-items:center;
 padding:12px 0;margin-top:5px;border-top:1px solid var(--mahya-border,#e3e7ef)}
.mh64-admin-footer span{font-size:10.5px;color:var(--mahya-muted,#778299);line-height:1.7}
.mh64-admin-footer button{min-height:38px}
.mh64-tone-chips button:focus-visible,.mh64-row-active:focus-visible,.mh64-row-delete:focus-visible{
 outline:2px solid var(--mahya-primary,#4a74c8);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:650px){
 .mh64-admin-footer{flex-direction:column;align-items:stretch}
 .mh64-edit-row{padding:9px}
 .mh64-text-field{flex-basis:100%}
}
/* P64B — keep the two-level Home greeting compact at narrow widths. */
@media(max-width:850px){
 body.mh11-layout.mahya-home-dig .mh11-greeting{row-gap:1px}
 body.mh11-layout.mahya-home-dig .mh11-greeting>h1{line-height:1.6}
 body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{margin-top:-7px}
 body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content{padding-block:3px 4px}
}


/* P65: very short second line under salutation, with safe admin style tokens. */
body.mh11-layout.mahya-home-dig .mh11-greeting>h1{line-height:1.53}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{
   margin-top:-9px;
   font-size:var(--mh65-wish-size,11px);
   font-weight:400;
   line-height:1.25;
   color:var(--mh65-wish-color,#727687);
   opacity:1;
   max-width:min(380px,36vw);
}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish.mh65-font-iransans,
.mh65-style-preview.mh65-font-iransans {font-family:MahyaR11IranSans,"Vazirmatn",Tahoma,sans-serif}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish.mh65-font-vazirmatn,
.mh65-style-preview.mh65-font-vazirmatn {font-family:"Vazirmatn",Tahoma,sans-serif}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish.mh65-font-katibeh,
.mh65-style-preview.mh65-font-katibeh {font-family:"Mahya Katibeh","Vazirmatn",Tahoma,sans-serif}
@media(max-width:850px){
 body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{
    max-width:min(90vw,380px);margin-top:-8px;
    font-size:var(--mh65-wish-size,11px);
 }
}
.mh65-style-editor{padding:12px 14px;display:grid;gap:10px;background:var(--mahya-soft,#fbfaff);
 border:1px solid var(--mahya-border,#e5e7ef);border-radius:12px;margin:0 0 4px}
.mh65-style-head{display:grid;gap:3px}
.mh65-style-head strong{font-size:12px;color:var(--mahya-text,#35384b)}
.mh65-style-head small{font-size:10px;color:var(--mahya-muted,#767e8f)}
.mh65-style-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.mh65-style-field{display:grid;align-items:center;gap:6px}
.mh65-style-field>span{font-size:10px;color:var(--mahya-muted,#70778b)}
.mh65-choice-chips,.mh65-color-choices{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.mh65-choice-chips button{border:1px solid var(--mahya-border,#dde0ea);background:var(--mahya-surface,#fff);
 border-radius:8px;min-height:32px;padding:5px 10px;cursor:pointer;font:11px MahyaR11IranSans,"Vazirmatn",Tahoma,sans-serif;color:var(--mahya-text,#434760)}
.mh65-choice-chips button[aria-pressed=true],.mh65-color-choices button[aria-pressed=true]{
 border-color:var(--mahya-primary,#7861c7);background:rgba(113,95,201,.08)}
.mh65-color-choices button{display:grid;place-items:center;width:31px;height:31px;cursor:pointer;
 border:1px solid var(--mahya-border,#dde0ea);background:var(--mahya-surface,#fff);border-radius:8px;padding:3px}
.mh65-color-choices button span{width:19px;height:19px;border-radius:6px;background:var(--mh65-color-chip)}
.mh65-color-choices button[aria-pressed=true]{outline:2px solid var(--mahya-primary,#7861c7);outline-offset:2px}
.mh65-custom-color{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:var(--mahya-muted,#737c8b)}
.mh65-custom-color input{width:33px;height:31px;padding:1px;border:1px solid var(--mahya-border,#dde0ea);
 background:transparent;border-radius:8px;cursor:pointer}
.mh65-style-preview{display:block;margin:1px 0 0;min-width:0;max-width:100%;
 color:var(--mh65-wish-color,#727687);font-size:var(--mh65-wish-size,11px);
 font-weight:400;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
.mh65-choice-chips button:focus-visible,.mh65-color-choices button:focus-visible,.mh65-custom-color input:focus-visible{
 outline:2px solid var(--mahya-primary,#7861c7);outline-offset:2px}


/* P66 — Separate visual baselines instead of pulling welcome text into the name.
   Independent rows and small positive gap prevent glyph collision at EVERY admin font size.
   This supersedes P65's -9px/-8px overrides without touching settings or the scheduler. */
body.mh11-layout.mahya-home-dig .mh11-greeting>h1{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  row-gap:4px;
  min-width:0;
  margin:0;
  line-height:normal;
}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh65-greeting-name{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  max-width:100%;
  white-space:nowrap;
  font:inherit;
  font-size:21px;
  line-height:1.5;
}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{
  display:block;
  margin-block:0;
  margin-inline:0;
  padding:0;
  flex:0 0 auto;
  font-size:var(--mh65-wish-size,11px);
  line-height:1.42;
  font-weight:400;
  max-width:min(380px,36vw);
}
@media(max-width:850px){
  body.mh11-layout.mahya-home-dig .mh11-greeting>h1{row-gap:4px;}
  body.mh11-layout.mahya-home-dig .mh11-greeting>h1 .mh64-wish{
    margin-block:0;
    max-width:min(90vw,380px);
  }
}


/* P66 — independent admin global visibility toggles without deleting message banks. */
.mh66-visibility{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:12px 14px;border:1px solid var(--mahya-border,#e5e7ef);
 border-radius:12px;background:var(--mahya-surface,#fff);min-width:0;
}
.mh66-visibility>div{display:grid;gap:3px;min-width:0}
.mh66-visibility strong{font-size:12px;font-weight:650;color:var(--mahya-text,#36384c)}
.mh66-visibility small{font-size:10px;color:var(--mahya-muted,#73788a);line-height:1.6}
.mh66-enable-toggle{
 border:1px solid var(--mahya-border,#dfe1ea);background:var(--mahya-surface,#fff);
 border-radius:9px;min-height:36px;min-width:68px;padding:6px 12px;
 font:11px MahyaR11IranSans,Tahoma,sans-serif;color:var(--mahya-muted,#72788b);
 cursor:pointer;flex:0 0 auto;
}
.mh66-enable-toggle[aria-pressed=true]{
 border-color:#bcb0dd;background:#f4efff;color:#655099;
}
.mh66-enable-toggle:focus-visible{outline:2px solid var(--mahya-primary,#6c5bc6);outline-offset:3px}
@media(max-width:600px){.mh66-visibility{gap:8px;padding:10px 12px}}


/* MH67 / the optional first-name variable is inserted directly in each message. */
.mh64-edit-row .mh67-name-insert{
 min-height:33px;flex:0 0 auto;padding:5px 9px;
 border:1px solid var(--mahya-border,#dce2ee);
 background:var(--mahya-soft,#f8f7fb);color:var(--mahya-primary,#4468bb);
 border-radius:8px;white-space:nowrap;
 font:10px MahyaR11IranSans,Tahoma,sans-serif;
 cursor:pointer;
}
.mh64-edit-row .mh67-name-insert:hover{
 background:var(--mahya-primary-weak,#eef3ff);
 border-color:var(--mahya-primary,#5f78c8);
}
.mh64-edit-row .mh67-name-insert:focus-visible{
 outline:2px solid var(--mahya-primary,#4468bb);outline-offset:2px;
}
.mh64-edit-row.is-deleted .mh67-name-insert{display:none}
