/* UI_THEME_PRECISION_V27_20260730
   Final theme coverage for /admin, AI saved conversations/API/provider panels,
   administrator summary/account areas, synchronized sidebar handle and square remember-ID boxes.
*/

/* --------------------------------------------------------------------------
   /admin login page and authenticated administrator page
   -------------------------------------------------------------------------- */
html[data-dashboard-theme] body[data-page-key="admin"] .page,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-only,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-layout{
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-only{
  background:transparent!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-card,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-settings-panel{
  border:1px solid var(--theme-line)!important;
  background:linear-gradient(155deg,var(--theme-surface),var(--theme-surface-soft))!important;
  color:var(--theme-text)!important;
  box-shadow:0 18px 46px var(--theme-shadow)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-card__head{
  border-color:var(--theme-line)!important;
  background:linear-gradient(135deg,var(--theme-primary-soft),var(--theme-surface))!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-card__head h2,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-settings-head h2,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-field>span{
  color:var(--theme-heading)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-card__head p,
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-help{
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-field,
html[data-dashboard-theme] body[data-page-key="admin"] .secret-input--clean{
  color:var(--theme-heading)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] :is(#adminUsername,#adminPassword),
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-field input,
html[data-dashboard-theme] body[data-page-key="admin"] .secret-input--clean{
  border-color:var(--theme-line-strong)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
  box-shadow:none!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] :is(#adminUsername,#adminPassword):focus{
  border-color:var(--theme-primary)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .secret-toggle--clean{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-soft)!important;
  color:var(--theme-primary-strong)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-login-submit{
  border:1px solid color-mix(in srgb,var(--theme-primary) 72%,var(--theme-line))!important;
  background:var(--theme-button-gradient)!important;
  color:#fff!important;
  box-shadow:0 10px 24px var(--theme-shadow)!important;
}

/* Administrator hub cards and the small status/result areas inside each card. */
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-hub{
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card{
  border-color:var(--theme-line)!important;
  background:linear-gradient(155deg,var(--theme-surface),var(--theme-surface-soft))!important;
  color:var(--theme-text)!important;
  box-shadow:0 8px 24px var(--theme-shadow-soft)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card::after{
  background:radial-gradient(circle,var(--theme-primary-soft),transparent 70%)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card:hover{
  border-color:var(--theme-primary)!important;
  background:linear-gradient(155deg,var(--theme-surface-soft),var(--theme-surface))!important;
  box-shadow:0 16px 34px var(--theme-shadow)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card__icon{
  border:1px solid var(--theme-line)!important;
  background:var(--theme-icon-surface)!important;
  color:var(--theme-primary-strong)!important;
  box-shadow:0 8px 20px var(--theme-shadow-soft)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card__body{
  background:transparent!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card strong{
  color:var(--theme-heading)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card small{
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] :is(
  #adminSummaryDashboardCount,
  #adminSummaryNoticeStatus,
  #adminSummaryNewsCount,
  #adminSummaryThemeName,
  #openDashboardNameSettingsBtn em
){
  border:1px solid var(--theme-line)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,var(--theme-primary-soft),var(--theme-accent-soft))!important;
  color:var(--theme-primary-strong)!important;
  box-shadow:none!important;
}
html[data-dashboard-theme] body[data-page-key="admin"] .admin-setting-card>b{
  border:1px solid color-mix(in srgb,var(--theme-primary) 60%,var(--theme-line))!important;
  background:var(--theme-button-gradient)!important;
  color:#fff!important;
}

/* Account-management dialog: super administrator/protected account areas. */
html[data-dashboard-theme] :is(.account-manage-card,.account-manage-body,.account-manage-list){
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .account-manage-notice{
  border:1px solid var(--theme-line)!important;
  background:linear-gradient(135deg,var(--theme-warning-soft),var(--theme-surface))!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .account-manage-notice strong{color:var(--theme-warning)!important}
html[data-dashboard-theme] .account-manage-notice span{color:var(--theme-muted)!important}
html[data-dashboard-theme] .account-manage-toolbar{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-soft)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] .account-manage-item{
  border:1px solid var(--theme-line)!important;
  background:linear-gradient(155deg,var(--theme-surface),var(--theme-surface-soft))!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .account-manage-item.is-protected{
  border-color:color-mix(in srgb,var(--theme-warning) 52%,var(--theme-line))!important;
  background:linear-gradient(155deg,var(--theme-warning-soft),var(--theme-surface))!important;
}
html[data-dashboard-theme] .account-manage-user strong{color:var(--theme-heading)!important}
html[data-dashboard-theme] .account-manage-meta{color:var(--theme-muted)!important}
html[data-dashboard-theme] .account-role-badge.is-super,
html[data-dashboard-theme] .account-manage-protected{
  border:1px solid color-mix(in srgb,var(--theme-warning) 52%,var(--theme-line))!important;
  background:var(--theme-warning-soft)!important;
  color:var(--theme-warning)!important;
}
html[data-dashboard-theme] .account-role-badge.is-admin{
  border:1px solid color-mix(in srgb,var(--theme-primary) 48%,var(--theme-line))!important;
  background:var(--theme-primary-soft)!important;
  color:var(--theme-primary-strong)!important;
}

/* --------------------------------------------------------------------------
   AI assistant: saved conversation, read-only summary, API status, provider
   -------------------------------------------------------------------------- */
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-side-panel,.ai-chat-panel,.ai-intro-card,.ai-quick-card,.ai-lookup-card){
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-intro-card,.ai-quick-card,.ai-lookup-card,.ai-chat-panel){
  border-color:var(--theme-line)!important;
  background:linear-gradient(155deg,var(--theme-surface),var(--theme-surface-soft))!important;
  box-shadow:0 10px 28px var(--theme-shadow-soft)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-intro-card,.ai-quick-card,.ai-lookup-card) :is(h2,h3,strong){color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-intro-card,.ai-quick-card,.ai-lookup-card) :is(p,small,.muted){color:var(--theme-muted)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-quick-list button,
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-lookup-example-list button{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-quick-list button:hover,
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-lookup-example-list button:hover{
  border-color:var(--theme-primary)!important;
  background:var(--theme-primary-soft)!important;
  color:var(--theme-primary-strong)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-readonly-note{
  border-color:var(--theme-line)!important;
  background:linear-gradient(135deg,var(--theme-primary-soft),var(--theme-surface-inset))!important;
  color:var(--theme-primary-strong)!important;
}

/* The conversation list is the browser-saved conversation area. */
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-chat-head{
  border-color:var(--theme-line)!important;
  background:linear-gradient(135deg,var(--theme-surface),var(--theme-primary-soft))!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-chat-head :is(h2,strong){color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-chat-head :is(p,small){color:var(--theme-muted)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-message-list{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-soft)!important;
  color:var(--theme-text)!important;
  scrollbar-color:var(--theme-line-strong) var(--theme-surface-soft)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-empty-chat{
  border:1px dashed var(--theme-line-strong)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-empty-chat :is(strong,h3){color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-empty-chat__examples span{
  border:1px solid var(--theme-line)!important;
  background:var(--theme-primary-soft)!important;
  color:var(--theme-primary-strong)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-message__head,
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-message__identity{
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-message__identity strong{color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-message__identity small,.ai-message__user-meta,.ai-message__user-meta small){color:var(--theme-muted)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] :is(.ai-assistant-card,.ai-answer-content,.ai-message--assistant .ai-message__bubble){
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-message--user .ai-message__bubble{
  border-color:color-mix(in srgb,var(--theme-primary) 75%,var(--theme-line))!important;
  background:var(--theme-button-gradient)!important;
  color:#fff!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-content :is(h2,h3,h4,strong){color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-content :is(p,li){color:var(--theme-text)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-keyline{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-keyline>span{
  background:var(--theme-primary-soft)!important;
  color:var(--theme-primary-strong)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-keyline>strong{color:var(--theme-heading)!important}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-foot{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-answer-foot span{
  border:1px solid var(--theme-line)!important;
  border-radius:999px!important;
  background:var(--theme-primary-soft)!important;
  color:var(--theme-primary-strong)!important;
  padding:4px 8px!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-compose{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-compose textarea{
  border-color:var(--theme-line-strong)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-compose textarea:focus{
  border-color:var(--theme-primary)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-dashboard-theme] body[data-page-key="ai_assistant"] .ai-compose-foot{color:var(--theme-muted)!important}

/* AI provider configuration dialog and selected-model token panel. */
html[data-dashboard-theme] :is(.ai-settings-dialog,.ai-api-status-dialog) .settings-card{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] :is(.ai-settings-body,.ai-api-status-body){
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-soft)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .ai-settings-body label{color:var(--theme-heading)!important}
html[data-dashboard-theme] .ai-settings-body :is(input,select,.secret-input){
  border-color:var(--theme-line-strong)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .ai-key-status{
  border:1px solid var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] .ai-key-status.is-configured{
  border-color:color-mix(in srgb,var(--theme-success) 50%,var(--theme-line))!important;
  background:var(--theme-success-soft)!important;
  color:var(--theme-success)!important;
}
html[data-dashboard-theme] .ai-key-status.is-unconfigured{
  border-color:color-mix(in srgb,var(--theme-danger) 50%,var(--theme-line))!important;
  background:var(--theme-danger-soft)!important;
  color:var(--theme-danger)!important;
}
html[data-dashboard-theme] :is(.ai-token-panel,.ai-api-livebar,.ai-api-selected-summary){
  border-color:var(--theme-line)!important;
  background:linear-gradient(155deg,var(--theme-surface),var(--theme-surface-soft))!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .ai-token-panel__head{
  border-color:var(--theme-line)!important;
  background:transparent!important;
}
html[data-dashboard-theme] .ai-token-panel__head h3,
html[data-dashboard-theme] .ai-api-selected-summary__copy strong{color:var(--theme-heading)!important}
html[data-dashboard-theme] .ai-token-panel__eyebrow,
html[data-dashboard-theme] .ai-api-selected-summary__copy>span{color:var(--theme-primary-strong)!important}
html[data-dashboard-theme] :is(.ai-token-model,.ai-token-stat,.ai-api-selected-summary__metrics span){
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .ai-token-model{
  color:var(--theme-primary-strong)!important;
}
html[data-dashboard-theme] .ai-token-stat span,
html[data-dashboard-theme] .ai-api-selected-summary__metrics span,
html[data-dashboard-theme] .ai-api-selected-summary__copy small{color:var(--theme-muted)!important}
html[data-dashboard-theme] .ai-token-stat strong,
html[data-dashboard-theme] .ai-api-selected-summary__metrics b{color:var(--theme-heading)!important}
html[data-dashboard-theme] :is(.ai-token-note,.ai-api-status-note){
  border:1px solid var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}

/* API status guide, current model, Groq models and last-response rows. */
html[data-dashboard-theme] .ai-api-status-guide{
  border:1px solid var(--theme-line)!important;
  border-radius:12px!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
  padding:10px!important;
}
html[data-dashboard-theme] :is(.ai-api-status-guide .is-live,.ai-api-row-badge.is-live){
  border-color:color-mix(in srgb,var(--theme-success) 48%,var(--theme-line))!important;
  background:var(--theme-success-soft)!important;
  color:var(--theme-success)!important;
}
html[data-dashboard-theme] :is(.ai-api-status-guide .is-wait,.ai-api-row-badge.is-wait){
  border-color:color-mix(in srgb,var(--theme-warning) 48%,var(--theme-line))!important;
  background:var(--theme-warning-soft)!important;
  color:var(--theme-warning)!important;
}
html[data-dashboard-theme] .ai-api-model-list{
  color:var(--theme-text)!important;
}
html[data-dashboard-theme] .ai-api-model-row{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  box-shadow:0 7px 18px var(--theme-shadow-soft)!important;
}
html[data-dashboard-theme] .ai-api-model-row.is-selected{
  border-color:var(--theme-primary)!important;
  box-shadow:0 10px 24px var(--theme-shadow)!important;
}
html[data-dashboard-theme] .ai-api-model-row__head{
  border-color:var(--theme-line)!important;
  background:linear-gradient(90deg,var(--theme-surface-soft),var(--theme-primary-soft))!important;
}
html[data-dashboard-theme] .ai-api-model-row__head strong{color:var(--theme-heading)!important}
html[data-dashboard-theme] .ai-api-model-row__head small{color:var(--theme-muted)!important}
html[data-dashboard-theme] .ai-api-model-row__grid>div{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface)!important;
}
html[data-dashboard-theme] .ai-api-model-row__grid span{color:var(--theme-muted)!important}
html[data-dashboard-theme] .ai-api-model-row__grid b{color:var(--theme-heading)!important}
html[data-dashboard-theme] .ai-api-model-row__grid small{color:var(--theme-muted)!important}
html[data-dashboard-theme] .ai-api-model-row__rate b{color:var(--theme-primary-strong)!important}
html[data-dashboard-theme] .ai-api-ratebar{background:var(--theme-surface-inset)!important}
html[data-dashboard-theme] .ai-api-ratebar i{background:linear-gradient(90deg,var(--theme-primary),var(--theme-success))!important}
html[data-dashboard-theme] .ai-api-model-row footer{
  border-color:var(--theme-line)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] .ai-api-empty{
  border-color:var(--theme-line-strong)!important;
  background:var(--theme-surface-inset)!important;
  color:var(--theme-muted)!important;
}
html[data-dashboard-theme] .ai-api-livebar__state :is(strong,small){color:inherit!important}
html[data-dashboard-theme] .ai-api-selected-summary__mark{
  border:1px solid var(--theme-line)!important;
  background:var(--theme-brand-gradient)!important;
  color:#fff!important;
}

/* --------------------------------------------------------------------------
   Sidebar animation: handle follows the real border every animation frame.
   -------------------------------------------------------------------------- */
:root{
  --sidebar-motion-duration:220ms;
  --sidebar-motion-ease:cubic-bezier(.22,.61,.36,1);
}
@media(min-width:901px){
  body{
    transition:grid-template-columns var(--sidebar-motion-duration) var(--sidebar-motion-ease)!important;
  }
  .sidebar{
    transition:width var(--sidebar-motion-duration) var(--sidebar-motion-ease),padding var(--sidebar-motion-duration) var(--sidebar-motion-ease)!important;
  }
  .sidebar-edge-toggle{
    /* left is updated from the actual sidebar boundary by layout_v27.js. */
    transition:background .16s ease,border-color .16s ease,box-shadow .16s ease!important;
    will-change:left!important;
  }
}

/* Square remember-ID controls on both /admin and the top-bar login panel. */
html[data-dashboard-theme] :is(#rememberAdminId,#topbarRememberUsername){
  appearance:none!important;
  -webkit-appearance:none!important;
  box-sizing:border-box!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  aspect-ratio:1/1!important;
  flex:0 0 18px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid var(--theme-line-strong)!important;
  border-radius:2px!important;
  background:var(--theme-surface)!important;
  display:grid!important;
  place-content:center!important;
  box-shadow:none!important;
}
html[data-dashboard-theme] :is(#rememberAdminId,#topbarRememberUsername):checked{
  border-color:var(--theme-primary)!important;
  background:var(--theme-primary)!important;
}
html[data-dashboard-theme] :is(#rememberAdminId,#topbarRememberUsername):checked::after{
  content:"✓"!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
}
html[data-dashboard-theme] :is(.admin-remember-id,.topbar-login-remember){
  align-items:center!important;
}

@media(prefers-reduced-motion:reduce){
  body,.sidebar,.sidebar-edge-toggle{transition:none!important}
}

/* ===== V27.2: 창을 줄여도 메뉴 이름 유지 =====
   예전 app.css의 1120px 규칙은 메뉴바를 86px 아이콘 폭으로 줄이면서 이름을 숨겼지만,
   이후 버전에서 메뉴바 폭이 264px로 고정되어 "폭은 그대로인데 이름만 사라지는" 상태가 되었습니다.
   넓은 화면과 같은 모양으로 되돌립니다. 사용자가 직접 메뉴바를 접은 경우(sidebar-collapsed)는 그대로 둡니다. */
@media (max-width:1120px) and (min-width:901px){
  html body:not(.sidebar-collapsed) .nav__label{display:block!important;}
  html body:not(.sidebar-collapsed) :is(.nav__link,.nav__link--locked){justify-content:flex-start!important;}
  html body:not(.sidebar-collapsed) .brand{justify-content:flex-start!important;}
}
/* 900px 이하: 메뉴가 화면 위쪽 가로 격자로 바뀔 때도 아이콘 옆에 이름을 표시합니다. */
@media (max-width:900px){
  html body .nav__label,
  html body.sidebar-collapsed .nav__label{display:block!important;}
  html body :is(.nav__link,.nav__link--locked),
  html body.sidebar-collapsed :is(.nav__link,.nav__link--locked){justify-content:flex-start!important;}
}
/* 760px 이하: 칸이 좁아 "관리자" 이름이 잘리지 않도록 잠금 항목의 "로그인 필요" 보조 문구는 숨깁니다(자물쇠 아이콘으로 표시). */
@media (max-width:760px){
  html body .nav__link--locked small{display:none!important;}
}
/* 560px 이하(휴대폰): 아이콘 전용으로 만들어진 4열 배치 대신 2열로 바꿔 메뉴 이름이 잘리지 않게 합니다. */
@media (max-width:560px){
  html body .nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* ===== V27.2: 좁은 화면 배치 보정 ===== */
/* 웹 모니터링: app.css의 ".preview-card{grid-column:2!important}" 때문에 화면이 좁아도 미리보기가 2번째 칸으로 밀려
   카드 목록이 36~236px까지 줄어들던 문제. 1120px 이하에서는 원래 의도대로 카드 목록 아래에 미리보기를 놓습니다. */
@media (max-width:1120px){
  html body .dashboard-layout--classic .preview-card.preview-card{grid-column:1 / -1!important;grid-row:auto!important;}
}
/* 웹 모니터링 카드: 마지막 확인 시각을 자르지 않고, 칸이 모자라면 HTTP 배지를 다음 줄로 내립니다. */
html body .site-card__meta{flex-wrap:wrap!important;row-gap:4px!important;}
html body .site-card__time{overflow:visible!important;text-overflow:clip!important;}
/* 보안권고문 상태 상자: 항목명과 값을 한 줄에 나란히 두면 값 칸이 38px까지 좁아져 날짜·문구가 조각나므로 위아래로 배치합니다. */
html body .page dl.info-list.info-list>div{grid-template-columns:minmax(0,1fr)!important;row-gap:3px!important;align-content:start!important;}
html body .page dl.info-list.info-list dd{word-break:keep-all!important;overflow-wrap:anywhere!important;}
/* 760px 이하: 위쪽 메뉴 상자가 오른쪽으로 10px 삐져나가던 문제, 요약 카드의 큰 날짜 글자가 이름과 겹치던 문제 */
@media (max-width:760px){
  html body .sidebar{width:auto!important;}
  html body .summary-card strong{font-size:20px!important;}
}
/* 파일분석: 640px 이하에서도 도구 영역이 3열(칸당 약 105px)로 남아 글자·버튼이 짓눌리던 문제 → 1열 */
@media (max-width:640px){
  html body .page .hex-main-grid aside.hex-side-panel.panel{grid-template-columns:minmax(0,1fr)!important;}
}

/* ===== V27.3: 웹 모니터링 카드 SSL 인증서 만료 임박 표시 ===== */
html body .site-card__ssl{display:inline-flex!important;align-items:center!important;padding:2px 8px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important;line-height:1.5!important;white-space:nowrap!important;}
html body .site-card__ssl.warn{background:#fff1e6!important;color:#c2410c!important;border:1px solid #fdba74!important;}
html body .site-card__ssl.ok{background:#e9f8ef!important;color:#15803d!important;border:1px solid #a7e3bd!important;}
html body .site-card__ssl.bad{background:#fdecec!important;color:#b42318!important;border:1px solid #f5b5b0!important;}

/* ===== V27.3: 관리자 작업 기록 창 ===== */
html body dialog.audit-log-dialog.account-manage-dialog{width:min(980px,calc(100vw - 28px))!important;}
html body dialog.audit-log-dialog.account-manage-dialog .settings-card.account-manage-card{width:100%!important;max-width:none!important;}
html body .audit-log-tools{display:inline-flex!important;align-items:center!important;gap:10px!important;}
html body .audit-log-filter{display:inline-flex!important;align-items:center!important;gap:6px!important;font-size:12px!important;font-weight:700!important;}
html body .audit-log-list{max-height:60vh!important;overflow:auto!important;}
html body .audit-log-table{display:grid!important;min-width:640px!important;font-size:12.5px!important;}
html body .audit-log-row{display:grid!important;grid-template-columns:150px 110px minmax(180px,1fr) 64px 130px!important;gap:10px!important;align-items:center!important;padding:8px 10px!important;border-bottom:1px solid var(--theme-line,#e5e7eb)!important;}
html body .audit-log-row--head{position:sticky!important;top:0!important;z-index:1!important;background:var(--theme-surface,#fff)!important;font-weight:800!important;}
html body .audit-log-row small{opacity:.75!important;}
html body .audit-result{display:inline-block!important;padding:1px 8px!important;border-radius:999px!important;font-size:11px!important;}
html body .audit-result.ok{background:#e8f7ef!important;color:#127a46!important;}
html body .audit-result.warn{background:#fff6e0!important;color:#9a6200!important;}
html body .audit-result.bad{background:#fdecec!important;color:#b42318!important;}

/* SSL 표시는 사이트 이름 바로 오른쪽: 이름만 줄어들고(…) SSL·상태 표시는 잘리지 않게 합니다. */
html body .site-card__head .site-card__name{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important;flex:1 1 auto!important;overflow:hidden!important;}
html body .site-card__head .site-card__name .site-card__title{min-width:0!important;flex:0 1 auto!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
html body .site-card__head .site-card__ssl{flex:0 0 auto!important;padding:1px 6px!important;font-size:10.5px!important;gap:3px!important;}
html body .site-card__head .status-pill{flex:0 0 auto!important;}
/* 카드 폭이 180px 이하로 좁을 때(예: 1280px 화면의 3열 카드)는 이름이 잘리지 않도록 "SSL " 글자를 숨기고 "D-29"만, 상태 표시 여백도 줄입니다. */
html body .site-card{container-type:inline-size;}
@container (max-width:180px){
  html body .site-card__head{gap:4px!important;}
  html body .site-card__head .site-card__ssl-label{display:none!important;}
  html body .site-card__head .site-card__name{gap:4px!important;}
  html body .site-card__head .site-card__ssl{padding:1px 4px!important;font-size:10px!important;}
  html body .site-card__head .status-pill{padding-left:5px!important;padding-right:5px!important;gap:3px!important;}
}


/* ===== V27.4: 스크롤할 때 상단바는 페이지와 함께 올라가고, 왼쪽 메뉴바는 화면에 붙어 따라옵니다 =====
   예전에는 상단바도 따라오면서 카드·내용을 가렸고, 메뉴바는 화면 높이(100vh)에 위쪽 여백 14px이 더해져
   스크롤할수록 위가 14px 잘렸습니다. 메뉴바 높이를 위아래 여백만큼 줄여 항상 전체가 보이게 합니다. */
html body .topbar{position:relative!important;top:auto!important;}
@media (min-width:901px){
  html body .sidebar,
  html body.sidebar-collapsed .sidebar{position:sticky!important;top:14px!important;height:calc(100vh - 28px)!important;min-height:0!important;max-height:calc(100vh - 28px)!important;overflow-y:auto!important;}
}
@media (max-width:900px){
  html body .sidebar{position:relative!important;top:auto!important;}
}

/* ===== V27.5: 웹 모니터링 요약 카드(전체·정상·장애·최근 체크) 크기 축소 =====
   예전 249x141px·숫자 28px로 공간을 많이 차지했고, 최근 체크 시각은 28px라 두 줄로 쪼개졌습니다. */
html body .page .summary-grid{gap:10px!important;margin-bottom:12px!important;}
html body .page .summary-grid > .summary-card{min-height:0!important;height:auto!important;padding:10px 16px!important;align-items:center!important;border-radius:14px!important;}
html body .page .summary-grid > .summary-card > span{font-size:12px!important;white-space:nowrap!important;}
html body .page .summary-grid > .summary-card > strong{font-size:22px!important;line-height:1.15!important;}
html body .page .summary-grid > .summary-card > strong#lastUpdated{font-size:14px!important;font-weight:700!important;white-space:nowrap!important;letter-spacing:0!important;}

/* ===== V27.5: 메뉴바 접기 손잡이 — 메뉴바 경계선에 마우스를 가까이 대면 커지는 방식 =====
   평소에는 얇고 흐린 막대, 경계선 근처(약 20px)로 마우스가 오면 경계선이 빛나고 손잡이가 커지며 화살표가 보입니다.
   (layout_v27.js가 마우스 위치를 보고 is-near 클래스를 붙입니다. 마우스가 없는 터치 화면은 예전처럼 항상 큰 손잡이) */
@media (hover:hover) and (min-width:901px){
  html body button.sidebar-edge-toggle#sidebarToggle{width:10px!important;min-width:0!important;height:46px!important;padding:0!important;opacity:.55!important;overflow:visible!important;box-shadow:none!important;
    transition:width .18s ease,height .18s ease,opacity .18s ease,box-shadow .18s ease,background-color .18s ease,border-color .18s ease!important;}
  html body button.sidebar-edge-toggle#sidebarToggle .sidebar-toggle__icon{opacity:0!important;transform:scale(.6)!important;transition:opacity .15s ease,transform .18s ease!important;}
  html body button.sidebar-edge-toggle#sidebarToggle::before{content:""!important;position:absolute!important;left:-2px!important;top:50%!important;width:2px!important;height:min(70vh,640px)!important;transform:translateY(-50%)!important;
    background:linear-gradient(to bottom,transparent,var(--theme-primary,#7c5cd6) 30%,var(--theme-primary,#7c5cd6) 70%,transparent)!important;opacity:0!important;transition:opacity .2s ease!important;pointer-events:none!important;border-radius:2px!important;}
  html body button.sidebar-edge-toggle#sidebarToggle:is(.is-near,:hover,:focus-visible){width:28px!important;height:68px!important;opacity:1!important;box-shadow:0 6px 18px rgba(76,52,140,.22)!important;}
  html body button.sidebar-edge-toggle#sidebarToggle:is(.is-near,:hover,:focus-visible) .sidebar-toggle__icon{opacity:1!important;transform:scale(1)!important;}
  html body button.sidebar-edge-toggle#sidebarToggle:is(.is-near,:hover)::before{opacity:.55!important;}
}

/* ===== V27.6: 메뉴바 접기 손잡이 — 튀어나온 탭 제거, 경계선 위 일자 막대 =====
   평소에는 메뉴바 경계선과 같은 색의 짧은 일자 막대로 선에 녹아 있고,
   마우스를 가져다 대면 그 막대만 길어지고 강조색으로 빛납니다. 화살표 탭은 표시하지 않습니다.
   클릭 영역(16x112px)은 투명하게 경계선 중앙에 걸쳐 있어 잡기 쉽습니다. */
@media (hover:hover) and (min-width:901px){
  html body button.sidebar-edge-toggle#sidebarToggle,
  html body button.sidebar-edge-toggle#sidebarToggle:is(.is-near,:hover,:focus-visible,:active){
    width:16px!important;min-width:0!important;height:112px!important;padding:0!important;
    transform:translate(-50%,-50%)!important;
    background:transparent!important;border:0!important;border-radius:0!important;
    box-shadow:none!important;outline:none!important;opacity:1!important;filter:none!important;
    transition:none!important;
  }
  html body button.sidebar-edge-toggle#sidebarToggle .sidebar-toggle__icon,
  html body button.sidebar-edge-toggle#sidebarToggle .sidebar-edge-toggle__line,
  html body button.sidebar-edge-toggle#sidebarToggle::after{display:none!important;content:none!important;}
  html body button.sidebar-edge-toggle#sidebarToggle::before{
    content:""!important;position:absolute!important;left:50%!important;top:50%!important;bottom:auto!important;
    width:3px!important;height:44px!important;min-height:0!important;
    transform:translate(-50%,-50%)!important;border-radius:999px!important;
    background:var(--theme-line-strong,#d9cce4)!important;opacity:1!important;box-shadow:none!important;
    pointer-events:none!important;
    transition:height .2s ease,width .2s ease,background-color .2s ease,box-shadow .2s ease!important;
  }
  html body button.sidebar-edge-toggle#sidebarToggle.is-near::before{
    background:color-mix(in srgb,var(--theme-primary,#7c5cd6) 45%,var(--theme-line-strong,#d9cce4))!important;
  }
  html body button.sidebar-edge-toggle#sidebarToggle:is(:hover,:focus-visible)::before{
    width:4px!important;height:76px!important;
    background:var(--theme-primary,#7c5cd6)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-primary,#7c5cd6) 16%,transparent),0 0 12px color-mix(in srgb,var(--theme-primary,#7c5cd6) 45%,transparent)!important;
  }
  html body button.sidebar-edge-toggle#sidebarToggle:active::before{height:64px!important;}
}
@media (hover:hover) and (min-width:901px) and (prefers-reduced-motion:reduce){
  html body button.sidebar-edge-toggle#sidebarToggle::before{transition:none!important;}
}

/* ===== V27.8 (SIDEBAR_PERSIST_V28_14): 페이지 이동 시 저장된 접기 상태를 애니메이션 없이 바로 적용 ===== */
body.sidebar-preload,
body.sidebar-preload .sidebar,
body.sidebar-preload .sidebar *,
body.sidebar-preload .sidebar-edge-toggle,
body.sidebar-preload .shell{transition:none!important;animation:none!important}
