/* ArtinAI 3.2.12 — macOS-inspired compact account and preferences dialogs.
   Scoped to the two personal dialogs: admin and workspace modules are untouched. */
.artinai-body .n-modal:has(>.n-preferences),
.artinai-body .n-modal.n-profile-modal{
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:clamp(10px,2.2vw,24px)!important;
  overflow:hidden!important;background:rgba(16,24,36,.38)!important;
  backdrop-filter:blur(9px)!important;-webkit-backdrop-filter:blur(9px)!important;
}
.artinai-body .n-modal>.n-preferences{
  box-sizing:border-box!important;width:min(800px,100%)!important;
  height:min(600px,calc(100dvh - 36px))!important;max-height:calc(100dvh - 36px)!important;
  min-height:0!important;display:flex!important;flex-direction:column!important;
  overflow:hidden!important;padding:0!important;border-radius:18px!important;
  background:var(--surface)!important;border:1px solid var(--border)!important;
  box-shadow:0 24px 70px rgba(13,23,37,.23)!important;color:var(--text)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.artinai-body .n-preferences .n-preferences-topbar{
  box-sizing:border-box!important;position:relative!important;top:auto!important;z-index:3!important;
  flex:0 0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:12px!important;align-items:center!important;min-height:83px!important;
  padding:15px 20px!important;border:0!important;border-bottom:1px solid var(--border)!important;
  border-radius:0!important;background:var(--surface)!important;
  box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.artinai-body .n-preferences .n-preferences-topbar::before,
.artinai-body .n-preferences .n-preferences-topbar::after{display:none!important;content:none!important}
.artinai-body .n-preferences .n-preferences-titletext h2{
  margin:0!important;font-size:19px!important;font-weight:700!important;letter-spacing:0!important;
  line-height:1.55!important;color:var(--text)!important;
}
.artinai-body .n-preferences .n-preferences-titletext>p{font-size:11px!important;line-height:1.6!important;color:var(--muted)!important}
.artinai-body .n-preferences #preferencesStatus{font-size:11px!important;min-height:0!important;margin:2px 0 0!important}
.artinai-body .n-preferences .n-preferences-topbar-actions{
  display:flex!important;gap:7px!important;flex-wrap:nowrap!important;justify-content:flex-start!important;
}
.artinai-body .n-preferences .n-preferences-topbar-actions button{
  min-height:36px!important;height:36px!important;padding:0 12px!important;
  font-size:11px!important;font-weight:600!important;border-radius:10px!important;
  background:var(--hover)!important;border:1px solid var(--border)!important;
  box-shadow:none!important;white-space:nowrap!important;backdrop-filter:none!important;
}
.artinai-body .n-preferences .n-preferences-topbar-actions .n-panel-primary{
  background:#3977ce!important;color:#fff!important;border-color:#3977ce!important;
  box-shadow:none!important;
}
.artinai-body .n-preferences .n-preferences-topbar .n-close{
  position:static!important;order:0!important;display:grid!important;place-items:center!important;
  width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;
  margin:0!important;padding:0!important;border-radius:10px!important;
  background:var(--hover)!important;border:1px solid var(--border)!important;
  box-shadow:none!important;font-size:20px!important;backdrop-filter:none!important;
}
.artinai-body .n-preferences .n-preferences-body{
  padding:0!important;min-height:0!important;flex:1 1 auto!important;overflow:hidden!important;
}
.artinai-body .n-preferences .n-pref-layout{
  display:grid;grid-template-columns:194px minmax(0,1fr);height:100%;min-height:0;
  direction:rtl;
}
.artinai-body .n-preferences .n-pref-nav{
  display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:18px 10px;
  min-width:0;overflow-y:auto;border-left:1px solid var(--border);
  background:var(--artin-sidebar,var(--hover));
}
.artinai-body .n-preferences .n-pref-nav-item{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:10px!important;width:100%!important;min-height:42px!important;
  padding:8px 11px!important;border:1px solid transparent!important;border-radius:10px!important;
  background:transparent!important;box-shadow:none!important;color:var(--text)!important;
  font-size:12px!important;font-weight:500!important;text-align:right!important;
  cursor:pointer!important;
}
.artinai-body .n-preferences .n-pref-nav-item:hover{background:var(--hover)!important}
.artinai-body .n-preferences .n-pref-nav-item.is-active{
  background:var(--surface)!important;border-color:var(--border)!important;
  font-weight:700!important;box-shadow:0 1px 3px rgba(15,23,42,.035)!important;
}
.artinai-body .n-preferences .n-pref-nav-mark{
  flex:none;display:grid;place-items:center;width:24px;height:24px;
  border-radius:8px;background:var(--hover);color:var(--muted);font-size:11px;
}
.artinai-body .n-preferences .n-pref-nav-item.is-active .n-pref-nav-mark{
  background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent);
}
.artinai-body .n-preferences .n-pref-content{
  min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:20px 24px 28px;scrollbar-width:thin;scrollbar-color:var(--border) transparent;
}
.artinai-body .n-preferences .n-pref-section{
  display:block;margin:0!important;padding:0!important;border:0!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
.artinai-body .n-preferences .n-pref-section[hidden]{display:none!important}
.artinai-body .n-preferences .n-pref-section h3{
  margin:0 0 16px!important;font-size:15px!important;font-weight:700!important;
  line-height:1.7!important;color:var(--text)!important;
}
.artinai-body .n-preferences .n-pref-section>p{
  font-size:11px!important;line-height:1.8!important;color:var(--muted)!important;
  margin:0 0 16px!important;
}
.artinai-body .n-preferences .n-preference-row{
  padding:12px 2px!important;min-height:60px;gap:15px!important;
  border-bottom:1px solid var(--border)!important;
}
.artinai-body .n-preferences .n-preference-row:last-child{border-bottom:0!important}
.artinai-body .n-preferences .n-preference-row>span{min-width:0;max-width:calc(100% - 65px)}
.artinai-body .n-preferences .n-preference-row b{font-size:12px!important;font-weight:600!important;color:var(--text)!important}
.artinai-body .n-preferences .n-preference-row small{font-size:10px!important;line-height:1.7!important;color:var(--muted)!important}
.artinai-body .n-preferences .n-preference-select{
  margin:0 0 16px!important;gap:7px!important;font-size:12px!important;color:var(--text)!important;
}
.artinai-body .n-preferences .n-preference-select select{
  width:100%!important;min-height:41px!important;height:41px!important;
  border-radius:10px!important;background:var(--surface)!important;
  border:1px solid var(--border)!important;box-shadow:none!important;
  padding:6px 12px!important;color:var(--text)!important;
}
.artinai-body .n-preferences .n-pref-columns{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.artinai-body .n-preferences .n-preference-row i{width:38px;height:23px;box-shadow:none}
.artinai-body .n-preferences .n-preference-row i::after{width:17px;height:17px}
.artinai-body .n-preferences .n-preference-row input:checked+i::after{transform:translateX(15px)}
/* Profile: one compact window, real sections and clear navigation. */
.artinai-body .n-profile-modal>.n-profile-card{
  box-sizing:border-box!important;width:min(445px,100%)!important;max-height:calc(100dvh - 36px)!important;
  padding:17px 20px!important;border-radius:18px!important;
  border:1px solid var(--border)!important;background:var(--surface)!important;
  color:var(--text)!important;box-shadow:0 24px 70px rgba(13,23,37,.23)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.artinai-body .n-profile-modal .n-profile-card::before{display:none!important}
.artinai-body .n-profile-modal .n-profile-header{
  min-height:32px!important;padding:0 0 12px!important;border-bottom:1px solid var(--border)!important;
  font-size:11px!important;color:var(--muted)!important;
}
.artinai-body .n-profile-modal .n-profile-card .n-close{
  width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important;
  border-radius:9px!important;background:var(--hover)!important;box-shadow:none!important;font-size:20px!important;
}
.artinai-body .n-profile-modal .n-profile-identity{
  display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;align-items:center!important;column-gap:12px!important;
  padding:16px 0 12px!important;text-align:right!important;
}
.artinai-body .n-profile-modal .n-profile-orbit{
  grid-row:1/3!important;grid-column:1!important;padding:0!important;border:0!important;
  border-radius:13px!important;background:transparent!important;box-shadow:none!important;
}
.artinai-body .n-profile-modal .n-profile-avatar{
  width:48px!important;height:48px!important;border-radius:13px!important;
  background:color-mix(in srgb,var(--accent) 15%,var(--surface))!important;
  box-shadow:none!important;color:var(--accent)!important;font-size:21px!important;
}
.artinai-body .n-profile-modal .n-profile-identity h2{
  grid-column:2!important;grid-row:1!important;margin:0!important;font-size:17px!important;
  font-weight:700!important;text-align:right!important;line-height:1.7!important;
}
.artinai-body .n-profile-modal .n-profile-identity p{
  grid-column:2!important;grid-row:2!important;margin:0!important;
  text-align:right!important;font-size:11px!important;line-height:1.6!important;
}
.artinai-body .n-profile-modal .n-profile-navigation{display:grid!important;gap:12px!important}
.artinai-body .n-profile-modal .n-profile-group{display:grid;gap:2px}
.artinai-body .n-profile-modal .n-profile-group-heading{
  margin:0!important;padding:2px 5px 6px!important;font-size:10px!important;
  font-weight:600!important;color:var(--muted)!important;text-align:right!important;
}
.artinai-body .n-profile-modal .n-profile-action{
  display:flex!important;min-height:56px!important;gap:11px!important;
  padding:8px 9px!important;border:1px solid transparent!important;
  border-radius:11px!important;background:transparent!important;box-shadow:none!important;
}
.artinai-body .n-profile-modal .n-profile-action:hover{
  border-color:var(--border)!important;background:var(--hover)!important;
}
.artinai-body .n-profile-modal .n-profile-action-icon{
  width:34px!important;height:34px!important;border-radius:10px!important;
  background:var(--hover)!important;border:1px solid var(--border)!important;
}
.artinai-body .n-profile-modal .n-profile-action-icon svg{width:18px!important;height:18px!important}
.artinai-body .n-profile-modal .n-profile-action b{font-size:12px!important}
.artinai-body .n-profile-modal .n-profile-action small{font-size:10px!important;line-height:1.5!important}
.artinai-body .n-profile-modal .n-profile-action i{font-size:18px!important}
.artinai-body .n-profile-modal .n-profile-footer{
  margin-top:13px!important;padding-top:12px!important;gap:8px!important;
}
.artinai-body .n-profile-modal .n-profile-footer button{
  min-height:38px!important;padding:8px!important;border-radius:10px!important;font-size:11px!important;
}
@media(max-width:720px){
 .artinai-body .n-modal>.n-preferences{height:min(740px,calc(100dvh - 20px))!important;max-height:calc(100dvh - 20px)!important;border-radius:15px!important}
 .artinai-body .n-preferences .n-preferences-topbar{grid-template-columns:minmax(0,1fr) auto!important;padding:12px!important;gap:9px!important}
 .artinai-body .n-preferences .n-preferences-titletext h2{font-size:16px!important}
 .artinai-body .n-preferences .n-preferences-topbar .n-close{grid-column:2!important;grid-row:1!important}
 .artinai-body .n-preferences .n-preferences-topbar-actions{grid-column:1/-1!important;grid-row:2!important;justify-content:stretch!important}
 .artinai-body .n-preferences .n-preferences-topbar-actions button{width:auto!important;flex:1 1 0!important;min-width:0!important;padding:0 8px!important}
 .artinai-body .n-preferences .n-pref-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
 .artinai-body .n-preferences .n-pref-nav{flex-direction:row;overflow-x:auto;overflow-y:hidden;white-space:nowrap;border-left:0;border-bottom:1px solid var(--border);padding:7px;gap:4px}
 .artinai-body .n-preferences .n-pref-nav-item{width:auto!important;flex:none!important;min-height:36px!important;padding:6px 9px!important;font-size:11px!important}
 .artinai-body .n-preferences .n-pref-nav-mark{display:none}
 .artinai-body .n-preferences .n-pref-content{padding:17px 15px 24px!important}
 .artinai-body .n-preferences .n-pref-columns{grid-template-columns:1fr!important;gap:0!important}
 .artinai-body .n-profile-modal>.n-profile-card{padding:13px 15px!important;max-height:calc(100dvh - 20px)!important}
}
@media(prefers-reduced-motion:reduce){.artinai-body .n-preferences *,.artinai-body .n-profile-modal *{transition:none!important;animation:none!important}}
