/* =========================================================
   H-CHAT V3 — MAIN MENU 200
   ========================================================= */

.main-menu-backdrop{
  position:fixed;
  inset:0;
  z-index:181;
  background:rgba(16,22,29,.18);
  opacity:0;
  transition:opacity .15s ease;
}
.main-menu-backdrop.show{
  opacity:1;
}

.main-menu-panel{
  position:fixed;
  z-index:185;
  top:70px;
  right:16px;
  width:340px;
  max-height:calc(100dvh - 86px);
  overflow:auto;
  background:var(--theme-surface,#fff);
  color:var(--theme-text,#18202a);
  border:1px solid var(--theme-line,#dfe4ea);
  border-radius:12px;
  box-shadow:0 24px 70px var(--theme-shadow,rgba(25,33,43,.13));
  opacity:0;
  visibility:hidden;
  transform:translateY(-7px) scale(.985);
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
}
.main-menu-panel.open{
  opacity:1;
  visibility:visible;
  transform:none;
}

.main-menu-head{
  height:60px;
  padding:0 13px 0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--theme-line,#dfe4ea);
  position:sticky;
  top:0;
  z-index:2;
  background:var(--theme-surface,#fff);
}
.main-menu-head small{
  display:block;
  color:var(--theme-brand,#4f68e8);
  font-size:7.5px;
  font-weight:900;
  letter-spacing:.12em;
}
.main-menu-head b{
  display:block;
  margin-top:3px;
  font-size:14px;
}
.main-menu-head button{
  width:32px;
  height:32px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--theme-muted,#6d7785);
  font-size:20px;
  cursor:pointer;
}

.main-menu-user{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--theme-line-2,#edf0f4);
  background:var(--theme-panel-copy,#f8f9fb);
}
.main-menu-user>span{
  width:38px;
  height:38px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:var(--theme-role,#252e39);
  color:#fff;
  font-size:13px;
  font-weight:900;
}
.main-menu-user b{
  display:block;
  font-size:11px;
}
.main-menu-user small{
  display:block;
  margin-top:2px;
  color:var(--theme-muted,#6d7785);
  font-size:8.5px;
}
.main-menu-user i{
  padding:4px 6px;
  border-radius:5px;
  background:#e8f5ed;
  color:#318151;
  font-size:7px;
  font-weight:900;
  font-style:normal;
}
html[data-theme="dark"] .main-menu-user i{
  background:#20372a;
  color:#7fd09d;
}
.main-menu-user i.offline{
  background:#f2f3f5;
  color:#8c96a2;
}

.main-menu-group{
  padding:9px 8px;
  border-bottom:1px solid var(--theme-line-2,#edf0f4);
}
.main-menu-group:last-child{
  border-bottom:0;
}
.main-menu-group>label{
  display:block;
  padding:3px 7px 6px;
  color:var(--theme-faint,#9aa3ae);
  font-size:7px;
  font-weight:900;
  letter-spacing:.09em;
}

.main-menu-item{
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 18px;
  gap:8px;
  align-items:center;
  padding:5px 7px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--theme-text,#18202a);
  text-align:left;
  cursor:pointer;
}
.main-menu-item:hover{
  background:var(--theme-hover,#fafbfd);
}
.main-menu-item>span{
  width:32px;
  height:32px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:var(--theme-brand-soft,#eef1ff);
  color:var(--theme-brand,#4f68e8);
  font-size:13px;
  font-weight:800;
}
.main-menu-item div{
  min-width:0;
}
.main-menu-item div b{
  display:block;
  font-size:10.5px;
}
.main-menu-item div small{
  display:block;
  margin-top:2px;
  color:var(--theme-muted,#6d7785);
  font-size:8.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.main-menu-item>em{
  color:var(--theme-faint,#9aa3ae);
  font-size:17px;
  font-style:normal;
}
.main-menu-item.danger>span{
  background:#fff0f0;
  color:#c84d4d;
}
.main-menu-item.danger div b{
  color:#b54848;
}
html[data-theme="dark"] .main-menu-item.danger>span{
  background:#392427;
  color:#ef9098;
}

/* ---------- Shared action dialog ---------- */
.v3-action-dialog,
.about-dialog{
  position:fixed;
  inset:0;
  z-index:220;
  display:grid;
  place-items:center;
  padding:16px;
  background:rgba(15,20,27,.30);
  backdrop-filter:blur(2px);
}
.v3-action-dialog[hidden],
.about-dialog[hidden]{
  display:none!important;
}

.v3-action-card{
  width:min(390px,100%);
  overflow:hidden;
  background:var(--theme-surface,#fff);
  color:var(--theme-text,#18202a);
  border:1px solid var(--theme-line,#dfe4ea);
  border-radius:13px;
  box-shadow:0 28px 90px var(--theme-shadow,rgba(25,33,43,.18));
}
.v3-action-head{
  min-height:61px;
  padding:0 13px 0 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--theme-line,#dfe4ea);
}
.v3-action-head small{
  display:block;
  color:var(--theme-brand,#4f68e8);
  font-size:7.5px;
  font-weight:900;
  letter-spacing:.11em;
}
.v3-action-head b{
  display:block;
  margin-top:3px;
  font-size:14px;
}
.v3-action-head button{
  width:32px;
  height:32px;
  border:0;
  background:transparent;
  color:var(--theme-muted,#6d7785);
  font-size:20px;
  cursor:pointer;
}
.v3-action-body{
  padding:15px;
}

.menu-form-field{
  display:block;
  margin-bottom:12px;
}
.menu-form-field:last-child{
  margin-bottom:0;
}
.menu-form-field>span{
  display:block;
  margin-bottom:6px;
  color:var(--theme-muted,#6d7785);
  font-size:8px;
  font-weight:800;
}
.menu-form-field input{
  width:100%;
  height:40px;
  box-sizing:border-box;
  padding:0 11px;
  border:1px solid var(--theme-line,#dfe4ea);
  border-radius:7px;
  outline:0;
  background:var(--theme-input,#fbfcfd);
  color:var(--theme-text,#18202a);
  font-size:11.5px;
}
.menu-form-field input:focus{
  border-color:var(--theme-brand,#4f68e8);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-brand,#4f68e8) 11%,transparent);
}
.menu-form-field small{
  display:block;
  margin-top:5px;
  color:var(--theme-faint,#9aa3ae);
  font-size:7.8px;
  line-height:1.4;
}

.v3-action-foot{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  padding:0 14px;
  border-top:1px solid var(--theme-line-2,#edf0f4);
  background:var(--theme-panel-copy,#f8f9fb);
}
.v3-action-foot button{
  min-width:82px;
  height:35px;
  padding:0 12px;
  border-radius:7px;
  font-size:9.5px;
  font-weight:800;
  cursor:pointer;
}
.v3-action-cancel{
  border:1px solid var(--theme-line,#dfe4ea);
  background:var(--theme-surface,#fff);
  color:var(--theme-muted,#6d7785);
}
.v3-action-submit{
  border:1px solid var(--theme-brand,#4f68e8);
  background:var(--theme-brand,#4f68e8);
  color:#fff;
}

.menu-confirm{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin-bottom:14px;
  padding:11px;
  border:1px solid var(--theme-line-2,#edf0f4);
  background:var(--theme-panel-copy,#f8f9fb);
  border-radius:8px;
}
.menu-confirm>span{
  width:42px;
  height:42px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:#fff0f0;
  color:#c64e4e;
  font-size:19px;
}
.menu-confirm b{
  display:block;
  font-size:10.5px;
}
.menu-confirm small{
  display:block;
  margin-top:3px;
  color:var(--theme-muted,#6d7785);
  font-size:8.5px;
  line-height:1.4;
}

/* ---------- About ---------- */
.about-card{
  position:relative;
  width:min(350px,100%);
  padding:26px 22px 20px;
  border:1px solid var(--theme-line,#dfe4ea);
  border-radius:15px;
  background:var(--theme-surface,#fff);
  color:var(--theme-text,#18202a);
  text-align:center;
  box-shadow:0 28px 90px var(--theme-shadow,rgba(25,33,43,.18));
}
.about-close{
  position:absolute;
  top:10px;
  right:10px;
  width:32px;
  height:32px;
  border:0;
  background:transparent;
  color:var(--theme-muted,#6d7785);
  font-size:20px;
  cursor:pointer;
}
.about-logo{
  width:58px;
  height:58px;
  margin:0 auto 11px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:var(--theme-brand,#4f68e8);
  color:#fff;
  font-size:24px;
  font-weight:900;
}
.about-card>small{
  color:var(--theme-brand,#4f68e8);
  font-size:7.5px;
  font-weight:900;
  letter-spacing:.13em;
}
.about-card h2{
  margin:5px 0 4px;
  font-size:20px;
}
.about-card p{
  margin:0;
  color:var(--theme-muted,#6d7785);
  font-size:9.5px;
}
.about-info{
  margin:17px 0 14px;
  border-top:1px solid var(--theme-line-2,#edf0f4);
  border-bottom:1px solid var(--theme-line-2,#edf0f4);
}
.about-info span{
  min-height:37px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--theme-line-2,#edf0f4);
}
.about-info span:last-child{
  border-bottom:0;
}
.about-info b{
  color:var(--theme-muted,#6d7785);
  font-size:8.5px;
}
.about-info em{
  font-size:9px;
  font-style:normal;
  font-weight:700;
}
#aboutOk{
  width:100%;
  height:37px;
  border:0;
  border-radius:7px;
  background:var(--theme-brand,#4f68e8);
  color:#fff;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

@media (max-width:760px){
  .main-menu-panel{
    top:auto;
    left:8px;
    right:8px;
    bottom:66px;
    width:auto;
    max-height:78dvh;
    border-radius:14px;
    transform:translateY(12px);
  }
  .main-menu-panel.open{
    transform:none;
  }

  .main-menu-item{
    min-height:51px;
  }
  .main-menu-item div b{
    font-size:11px;
  }
  .main-menu-item div small{
    font-size:9px;
  }

  .v3-action-dialog,
  .about-dialog{
    align-items:end;
    padding:8px;
  }
  .v3-action-card,
  .about-card{
    width:100%;
    border-radius:15px;
  }
}

/* SOHBERA brand integration */
.about-logo-image{
  display:block;
  width:min(230px,78%);
  height:auto;
  margin:4px auto 8px;
  object-fit:contain;
}
html[data-theme="dark"] .about-logo-image{
  background:#fff;
  border-radius:10px;
  padding:7px 11px;
}
.main-menu-head small,
.v3-action-head small{
  color:var(--brand);
  letter-spacing:.12em;
}
