:root{
  --sidebar-w: 220px;
  --sidebar-collapsed-w: 64px;
  --header-h: 50px;
  --function-h: 84px;
  --app-vh: 100vh;

  /* Global design scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);

  /* Unified button density */
  --btn-h-sm: 30px;
  --btn-h-md: 36px;
  --btn-h-lg: 40px;
  --btn-px-sm: 10px;
  --btn-px-md: 14px;
  --btn-font-sm: 12px;
  --btn-font-md: 13px;
  --btn-radius: var(--radius-md);

  /* Unified tab density */
  --tab-h: 40px;
  --tab-font-size: 14px;
  --tab-gap: 12px;
  --tab-px: 12px;

  /* Unified badge tokens */
  --badge-font-size: 11px;
  --badge-font-weight: 700;
  --badge-line-height: 1.2;
  --badge-py-sm: 2px;
  --badge-px-sm: 8px;
  --badge-py-md: 4px;
  --badge-px-md: 10px;
  --badge-radius: 999px;
  --badge-gap: 6px;

  --badge-neutral-bg: #f1f5f9;
  --badge-neutral-fg: #475569;
  --badge-neutral-border: rgba(148, 163, 184, 0.34);

  --badge-primary-bg: rgba(37, 99, 235, 0.12);
  --badge-primary-fg: #1d4ed8;
  --badge-primary-border: rgba(37, 99, 235, 0.26);

  --badge-success-bg: rgba(16, 185, 129, 0.14);
  --badge-success-fg: #047857;
  --badge-success-border: rgba(16, 185, 129, 0.28);

  --badge-warn-bg: rgba(249, 115, 22, 0.14);
  --badge-warn-fg: #b45309;
  --badge-warn-border: rgba(249, 115, 22, 0.28);

  --badge-danger-bg: rgba(239, 68, 68, 0.14);
  --badge-danger-fg: #b91c1c;
  --badge-danger-border: rgba(239, 68, 68, 0.28);

  --badge-purple-bg: rgba(139, 92, 246, 0.14);
  --badge-purple-fg: #6d28d9;
  --badge-purple-border: rgba(139, 92, 246, 0.28);

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --royal-blue: #2f5aa8;
  --royal-blue-strong: #23488f;
  --soft-red: #e35d6a;
  --soft-red-bg: rgba(227, 93, 106, 0.16);

  --text-primary: var(--slate-900);
  --text-secondary: var(--slate-700);
  --text-muted: var(--slate-500);
  --border-subtle: #e2e8f0;
  --bg-subtle: #f8fafc;

  /* Typography scale */
  --font-title-page: 20px;
  --font-title-section: 16px;
  --font-body: 14px;
  --font-body-sm: 13px;
  --font-caption: 12px;
  --font-caption-xs: 11px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Unified button state tokens */
  --btn-primary-bg: #245db7;
  --btn-primary-border: #2154a7;
  --btn-primary-bg-hover: #1f529f;
  --btn-primary-border-hover: #1b4a90;
  --btn-primary-shadow-hover: 0 4px 10px rgba(36, 93, 183, 0.24);

  --btn-secondary-bg: #ebeef2;
  --btn-secondary-border: #c6cbd3;
  --btn-secondary-bg-hover: #dfe3e6;
  --btn-secondary-border-hover: #adb5bd;
  --btn-secondary-shadow-hover: 0 4px 10px rgba(148, 163, 184, 0.2);

  --btn-outline-bg: #ffffff;
  --btn-outline-fg: #334155;
  --btn-outline-border: #d1dbe7;
  --btn-outline-bg-hover: #f8fafc;
  --btn-outline-border-hover: #b8c7dc;
  --btn-outline-fg-hover: #1f2937;

  --btn-focus-ring: 0 0 0 3px rgba(36, 93, 183, 0.2);
  --btn-press-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.12);
  --btn-disabled-opacity: 0.5;

  /* Unified table tokens */
  --table-head-bg: #f8fafc;
  --table-head-fg: #334155;
  --table-head-border: #d9e2ef;
  --table-row-bg: #ffffff;
  --table-row-alt-bg: #f8fafc;
  --table-row-hover-bg: #f1f5f9;
  --table-cell-fg: #1f2937;
  --table-cell-border: #e2e8f0;
  --table-head-size: 12px;
  --table-body-size: 13px;
  --table-head-weight: 700;
  --table-body-weight: 500;

  /* Semantic state tokens */
  --state-info-bg: rgba(37, 99, 235, 0.12);
  --state-info-fg: #1d4ed8;
  --state-info-border: rgba(37, 99, 235, 0.26);
  --state-info-bg-strong: #245db7;
  --state-info-border-strong: #2154a7;

  --state-success-bg: rgba(16, 185, 129, 0.14);
  --state-success-fg: #047857;
  --state-success-border: rgba(16, 185, 129, 0.28);
  --state-success-bg-strong: #0b9a67;
  --state-success-border-strong: #0a865b;

  --state-warn-bg: rgba(249, 115, 22, 0.14);
  --state-warn-fg: #b45309;
  --state-warn-border: rgba(249, 115, 22, 0.28);
  --state-warn-bg-strong: #d97706;
  --state-warn-border-strong: #b35f04;

  --state-danger-bg: rgba(239, 68, 68, 0.14);
  --state-danger-fg: #b91c1c;
  --state-danger-border: rgba(239, 68, 68, 0.28);
  --state-danger-bg-strong: #d92d20;
  --state-danger-border-strong: #bf2418;

  /* Empty/Loading tokens */
  --empty-bg: #f8fafc;
  --empty-border: #e2e8f0;
  --empty-title: #334155;
  --empty-text: #64748b;
  --loading-overlay-bg: rgba(15, 23, 42, 0.55);
  --loading-dialog-bg: rgba(15, 23, 42, 0.65);
  --loading-text: #e0e7ff;

}

.ui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--badge-gap);
  padding: var(--badge-py-sm) var(--badge-px-sm);
  border-radius: var(--badge-radius);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  line-height: var(--badge-line-height);
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}

.ui-badge--sm {
  padding: var(--badge-py-sm) var(--badge-px-sm);
}

.ui-badge--md {
  padding: var(--badge-py-md) var(--badge-px-md);
}

.ui-badge--neutral {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-fg);
  border-color: var(--badge-neutral-border);
}

.ui-badge--primary {
  background: var(--state-info-bg);
  color: var(--state-info-fg);
  border-color: var(--state-info-border);
}

.ui-badge--success {
  background: var(--state-success-bg);
  color: var(--state-success-fg);
  border-color: var(--state-success-border);
}

.ui-badge--warn {
  background: var(--state-warn-bg);
  color: var(--state-warn-fg);
  border-color: var(--state-warn-border);
}

.ui-badge--danger {
  background: var(--state-danger-bg);
  color: var(--state-danger-fg);
  border-color: var(--state-danger-border);
}

.ui-badge--purple {
  background: var(--badge-purple-bg);
  color: var(--badge-purple-fg);
  border-color: var(--badge-purple-border);
}

.ui-badge--upper {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@supports (height: 100dvh) {
  :root {
    --app-vh: 100dvh;
  }
}

#layout { width: 100%; min-height: var(--app-vh); box-sizing: border-box; }

body{
  width: 100vw !important;
  height: var(--app-vh);
  font-family: 'Inter', 'Noto Sans KR', 맑은 고딕, 돋움, malgun gothic, dotum, Apple Gothic, Helvetica, sans-serif;
  font-size: 14px;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  overflow-x: hidden;
}

.text-muted,
.form-text {
  color: var(--text-muted) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus {
  border-color: #5b7bd5;
  box-shadow: 0 0 0 3px rgba(47, 90, 168, 0.18);
  outline: none;
}

body.first-login-blur #content {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

#appShell{
  display: flex;
  width: 100vw;
  min-height: var(--app-vh);
  position: relative;
}

/* ===== Sidebar ===== */
.sidebar{
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  flex-shrink: 0;
  height: var(--app-vh);

  position: fixed;
  left: 0;
  top: 0;

  background: #fff;
  border-right: 1px solid #e6e9ef;
  overflow: hidden;
  z-index: 900;

  /* ✅ footer를 바닥에 붙이기 위해 flex */
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed{
  width: var(--sidebar-collapsed-w);
  flex-basis: var(--sidebar-collapsed-w);
}

.sidebar-top{
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between; /* ✅ 오른쪽 끝으로 보내기 */
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f6;
  box-sizing: border-box;
  position: relative;
}

.sidebar-top-main{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1 1 auto;
  width:100%;
  min-width:0;
}

.sidebar-brand-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  width:100%;
  min-width:0;
}

.sidebar-home-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  width:auto;
  flex:0 0 auto;
  min-height:36px;
  padding:2px 0;
}

.sidebar-home-logo img{
  max-width:132px;
  max-height:34px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.sidebar-home-logo__img--dark{
  display:none;
}

body.sidebar-admin .sidebar-home-logo__img--light{
  display:none;
}

body.sidebar-admin .sidebar-home-logo__img--dark{
  display:block;
}

.sidebar-admin-badge{
  align-self:flex-start;
}

.sidebar-mini-copy{
  padding: 2px 12px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #94a3b8;
  border-bottom: 1px solid #eef1f6;
  user-select: none;
}

.sidebar-toggle{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  border: 1px solid #e3e7ed;
  background:#f8f9fb;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: background .15s ease, transform .06s ease;
  position:absolute;
  top:10px;
  right:12px;
  align-self:flex-start;
}
.sidebar-toggle:hover{ background:#eef1f6; }
.sidebar-toggle:active{ transform: translateY(1px); }

.toolbar-icon-btn{
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid #dfe3eb;
  background: #ffffff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  position: relative;
}
.toolbar-icon-btn svg{
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.toolbar-icon-btn:hover{
  background: #f5f7fb;
  border-color: #cbd2e1;
  color: #111827;
}
.toolbar-icon-btn.has-indicator::after{
  content:"";
  position:absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: transparent;
  top: 6px;
  right: 6px;
  transition: background .2s ease;
}
.toolbar-icon-btn.is-active{
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.35);
}
.toolbar-icon-btn.has-indicator.is-active::after{
  background:#facc15;
}
.toolbar-icon-btn.is-active:hover{
  background: #1a46c7;
}

#generalTable tbody td {
  user-select: none;
}

.sidebar-title-wrapper{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

/* 메뉴(스크롤) */
.sidebar-body{
  padding: 10px 12px;
  overflow: auto;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}

/* 그룹/아이템 */
.sidebar-group{ margin-bottom: 14px; }
.sidebar-group-title{
  font-size: 12px;
  font-weight: 900;
  color: #6b7684;
  margin: 10px 6px 8px;
}
.sidebar-item{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  color:#334155;
  text-decoration:none;
  font-weight: 800;
  border: 1px solid transparent;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sidebar-item:hover{ background:#f3f6fb; }
.sidebar-item.active{
  background:#e9f1ff;
  color:#255cc3;
  border-color:#79a8ff;
}

/* 아이콘이 있는 sidebar-item */
.sidebar-item i {
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

/* ✅ footer(계정) */
.sidebar-footer{
  flex: 0 0 auto;
  border-top: 1px solid #eef1f6;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.sidebar-account{
  flex: 1 1 auto;
  border: 1px solid #e3e7ed;
  background: #f8f9fb;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.sidebar-account:hover{ background:#eef1f6; }
.sidebar-account-name{
  font-weight: 900;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-account-id{
  font-weight: 800;
  color: #6b7684;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-logout{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid #e3e7ed;
  background:#f8f9fb;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#3a3f47;
}
.sidebar-logout:hover{ background:#eef1f6; }

/* ✅ 접으면: 타이틀/카피/푸터는 숨기고 메뉴는 아이콘만 노출 */
.sidebar.collapsed .sidebar-title-wrapper{ display:none; }
.sidebar.collapsed .sidebar-home-logo{ display:none; }
.sidebar.collapsed .sidebar-admin-badge{ display:none; }
.sidebar.collapsed .sidebar-mini-copy{ display:none; }
.sidebar.collapsed .sidebar-footer{ display:none; }
.sidebar.collapsed .sidebar-body{
  display:block;
  padding: 10px 6px;
}
.sidebar.collapsed .sidebar-group{
  margin-bottom: 8px;
}
.sidebar.collapsed .sidebar-group-title{
  display: none;
}
.sidebar.collapsed .sidebar-item{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 8px 0;
  font-size: 0;
  line-height: 0;
}
.sidebar.collapsed .sidebar-item i{
  margin-right: 0;
  font-size: 18px;
  line-height: 1;
}
.sidebar.collapsed .sidebar-item::after{
  content: attr(data-sidebar-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  transition: opacity .12s ease;
}
.sidebar.collapsed .sidebar-item:hover::after{
  opacity: 1;
}

/* ===== Sidebar Dark Mode (Admin) ===== */
body.sidebar-admin .sidebar{
  background: #0f172a;
  color: #e2e8f0;
  border-right-color: #1f2937;
}

body.sidebar-admin .sidebar-top{
  border-bottom-color: #1f2937;
}

body.sidebar-admin .sidebar-mini-copy{
  color: #64748b;
  border-bottom-color: #1f2937;
}

body.sidebar-admin .sidebar-group-title{
  color: #94a3b8;
}

body.sidebar-admin .sidebar-item{
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-item:hover{
  background: #1f2937;
}

body.sidebar-admin .sidebar-item.active{
  background: #1d4ed8;
  color: #ffffff;
  border-color: rgba(37, 99, 235, 0.6);
}

body.sidebar-admin .sidebar-toggle{
  background: #0b1220;
  border-color: #243041;
  color: #cbd5f5;
}

body.sidebar-admin .sidebar-toggle:hover{
  background: #162133;
}

body.sidebar-admin .header-app-selector-btn{
  background: #0b1220;
  border-color: #243041;
  color: #e2e8f0;
}

body.sidebar-admin .header-app-selector-btn:hover{
  background: #162133;
  border-color: #334155;
}

body.sidebar-admin .header-appmenu-panel{
  background: #0b1220;
  border-color: #243041;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.45);
}

body.sidebar-admin .header-appmenu-item{
  color: #e2e8f0;
}

body.sidebar-admin .header-appmenu-item:hover{
  background: #111827;
}

body.sidebar-admin .header-appmenu-item.is-active{
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: none;
}

body.sidebar-admin .sidebar-user{
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-user:hover,
body.sidebar-admin .sidebar-user:focus-visible{
  background: #111827;
}

body.sidebar-admin .sidebar-user:hover .sidebar-user-name,
body.sidebar-admin .sidebar-user:focus-visible .sidebar-user-name{
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-user:hover .sidebar-user-id,
body.sidebar-admin .sidebar-user:focus-visible .sidebar-user-id{
  color: #94a3b8;
}

body.sidebar-admin .sidebar-avatar{
  background: #1e293b;
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-account-menu{
  background: #0b1220;
  border-color: #243041;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
}

body.sidebar-admin .sidebar-account-menu-item{
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-account-menu-item:hover,
body.sidebar-admin .sidebar-account-menu-item:focus-visible{
  background: #111827;
  color: #e2e8f0;
}

body.sidebar-admin .sidebar-account-menu-item-text span{
  color: #94a3b8;
}

/* ===== Main area: 100vw 유지 ===== */
.main-area{
  position: relative;
  left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  min-height: var(--app-vh);
  transition: left .2s ease, width .2s ease;
}
#appShell.sidebar-collapsed .main-area{
  left: var(--sidebar-collapsed-w);
  width: calc(100vw - var(--sidebar-collapsed-w));
}

/* ===== Mobile: sidebar overlays, content should not be pushed ===== */
@media (max-width: 768px) {
  .main-area{
    left: 0 !important;
    width: 100vw !important;
  }
  #appShell.sidebar-collapsed .main-area{
    left: 0 !important;
    width: 100vw !important;
  }

  body.sidebar-mobile-open{
    overflow: hidden;
    touch-action: none;
  }

  /* Sidebar becomes off-canvas on mobile */
  #sidebar{
    position: fixed !important;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  #sidebar.mobile-open{
    left: 0;
  }

  /* If user previously collapsed sidebar on desktop, still show menu when opened on mobile */
  #sidebar.collapsed.mobile-open .sidebar-title-wrapper{ display: flex !important; }
  #sidebar.collapsed.mobile-open .sidebar-body{ display: block !important; }
  #sidebar.collapsed.mobile-open .sidebar-footer{ display: flex !important; }

  /* Sidebar overlay */
  .sidebar-overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  .sidebar-overlay.active{
    display: block;
  }

  /* Mobile policy: hide analytics/report/compliance menus in sidebar. */
  #sidebar #sidebarAnalyticsGroup,
  #sidebar #sidebarComplianceGroup {
    display: none !important;
  }

	  /* Mobile hamburger button */
	  .mobile-menu-btn{
    display: block !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 998;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e3e7ed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
	  }

	  /* Mobile: only use the external hamburger button (avoid duplicate toggle inside the drawer) */
	  #sidebar .sidebar-toggle{
	    display: none !important;
	  }
	}

/* Content */
#content{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  padding: 20px 20px 0;

  min-height: calc(var(--app-vh) - var(--header-h));
  height: auto;
  overflow-y: visible;
  overflow-x: hidden;
}

#mainContent{
  display: flex;
  flex-direction: column;
  min-height: calc(var(--app-vh) - var(--header-h));
  width: 100%;
}

/* ===== 자산목록 화면 고정 ===== */
#management{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  height: calc(var(--app-vh) - var(--header-h));
  min-height: 0;
  overflow: hidden;
  gap: 12px;
}

#management .table-wrapper{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 4px;
  height: calc(var(--app-vh) - var(--header-h) - 170px);
  max-height: calc(var(--app-vh) - var(--header-h) - 170px);
}

.function-container{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;

  min-height: 48px;
  background-color: rgba(249, 249, 249, 0.98);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0));
  z-index: 50;
  border-top: 1px solid #dfe3e8;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.07);

  margin-top: auto;

  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.function-left{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#management .function-container{
  min-height: 44px !important;
  padding: 10px 14px calc(8px + env(safe-area-inset-bottom, 0)) !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

#management .function-container .btn-modern{
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.2;
}

#management #bulk-action-container{
  margin-bottom: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1200px) {
  #management .function-container{
    flex-wrap: wrap !important;
  }
}

.function-right{
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

#management .function-left,
#management .function-right{
  flex-wrap: nowrap;
}

/* ✅ sidebar가 footer 바닥 고정되도록 */
.sidebar{
  display: flex;
  flex-direction: column;
}

/* 메뉴 스크롤 영역 */
.sidebar-body{
  flex: 1 1 auto;
  min-height: 0;
}

/* ✅ footer: 구글/GPT 느낌 */
.sidebar-footer{
  flex: 0 0 auto;
  padding: 12px 12px 14px;
  background: transparent;
  border-top: none; /* ✅ 선 제거 */
}

.sidebar-account{
  position: relative;
}

/* 계정 row(테두리 없음) */
.sidebar-user{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
}
.sidebar-user:hover,
.sidebar-user:focus-visible{
  background: #f3f6fb;
}

/* 원형 아바타 */
.sidebar-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #255cc3;
  background: #e9f1ff;
  flex-shrink: 0;
}

/* 텍스트 */
.sidebar-user-text{
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  flex: 1;
}
.sidebar-user-name{
  font-weight: 900;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-id{
  margin-top: 2px;
  font-weight: 800;
  color: #6b7684;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-chevron{
  color: #9aa0b1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.sidebar-user[aria-expanded="true"] .sidebar-user-chevron{
  transform: rotate(180deg);
}

.sidebar-account-menu{
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.sidebar-account-menu.open{
  display: flex;
}

.sidebar-account-menu-item{
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-account-menu-item:hover,
.sidebar-account-menu-item:focus-visible{
  background: #eef2ff;
  color: #2f5be7;
}
.sidebar-account-menu-item i{
  font-size: 18px;
  color: inherit;
}
.sidebar-account-menu-item-text{
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sidebar-account-menu-item-text strong{
  font-size: 14px;
  font-weight: 700;
}
.sidebar-account-menu-item-text span{
  font-size: 12px;
  color: #6b7280;
}

/* 접힘이면 footer도 숨김(서브메뉴 사라져야 한다는 기존 요구 유지) */
.sidebar.collapsed .sidebar-footer{ display:none; }

/* ===== NEW 뱃지 스타일 ===== */
.badge-new {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

/* NEW 자산 행 스타일 (선택사항 - 미묘한 효과) */
.asset-row-new {
  background-color: rgba(91, 141, 239, 0.05) !important;
  border-left: 3px solid rgba(91, 141, 239, 0.45);
}

.asset-row-new td {
  color: var(--slate-900);
  font-weight: 600;
}

.asset-row-new:hover {
  background-color: rgba(91, 141, 239, 0.08) !important;
}


.sidebar-avatar.has-image {
  background-size: cover;
  background-position: center;
  color: transparent;
}

#accountSettingsModal .modal-dialog {
  max-width: 860px;
}

#accountSettingsModal .modal-content {
  border-radius: var(--modal-radius);
  border: 1px solid var(--modal-border-color);
  box-shadow: var(--modal-shadow);
  background: var(--modal-surface);
}

#accountSettingsModal .modal-header {
  padding: var(--modal-header-padding);
  background: var(--modal-surface);
  border-bottom: var(--modal-header-border);
}

#accountSettingsModal .modal-header .btn-close {
  width: var(--modal-close-size);
  height: var(--modal-close-size);
  padding: 0;
  border-radius: 999px;
  border: 1px solid #dfe7f4;
  background-color: #f4f8ff;
  background-position: center;
  background-size: var(--modal-close-icon-size);
  opacity: 1;
}

#personalPreferencesModal .modal-header .btn-close {
  width: var(--modal-close-size);
  height: var(--modal-close-size);
  padding: 0;
  border-radius: 999px;
  border: 1px solid #dfe7f4;
  background-color: #f4f8ff;
  background-position: center;
  background-size: var(--modal-close-icon-size);
  opacity: 1;
}

#accountSettingsModal .modal-title {
  font-size: var(--modal-title-size);
  font-weight: 700;
  color: #0f172a;
}

#accountSettingsModal .admin-modal-header-ident {
  display: flex;
  align-items: center;
  gap: 12px;
}

#accountSettingsModal .admin-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

#accountSettingsModal .admin-modal-icon--indigo {
  background: #eae8ff;
  color: #4f46e5;
}

#accountSettingsModal .admin-modal-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#accountSettingsModal .admin-modal-subtitle {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.account-settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--modal-body-padding);
  background: #f7f9fc;
}

.account-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
}

.account-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.account-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.account-avatar-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.account-avatar-preview {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: linear-gradient(145deg, #f8fbff 0%, #e7eef9 100%);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  color: #0f172a;
}

.account-avatar-preview.has-image {
  background-size: cover;
  background-position: center;
  color: transparent;
}

.account-avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-avatar-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cfe0ff;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.account-avatar-help {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.password-change-section {
  display: none;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.password-change-section.is-open {
  display: block;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.password-help-text,
.password-status-message {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.password-help-text {
  color: #64748b;
}

.password-status-message {
  min-height: 17px;
  color: #64748b;
}

.password-status-message.is-valid {
  color: #15803d;
}

.password-status-message.is-invalid {
  color: #b91c1c;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #d5dbe5;
  background-color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 10px 42px 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.password-input-wrap .form-control:hover {
  border-color: #c0c8d6;
}

.password-input-wrap .form-control:focus {
  border-color: #0b5ed7;
  box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.16), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn:hover {
  background: #eef2f7;
  color: #334155;
}

.btn-danger-soft {
  background: #dc2626;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.2);
}

.btn-danger-soft:hover,
.btn-danger-soft:focus-visible {
  background: #b91c1c;
}

.theme-option-list {
  display: grid;
  gap: 12px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.theme-option input {
  accent-color: #2f5aa8;
}

.theme-option-card {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.theme-dark {
  background-color: #0b1120;
  color: #e2e8f0;
  --state-info-bg: rgba(59, 130, 246, 0.22);
  --state-info-fg: #bfdbfe;
  --state-info-border: rgba(59, 130, 246, 0.36);
  --state-info-bg-strong: #1d4ed8;
  --state-info-border-strong: #1e40af;

  --state-success-bg: rgba(16, 185, 129, 0.2);
  --state-success-fg: #a7f3d0;
  --state-success-border: rgba(16, 185, 129, 0.34);
  --state-success-bg-strong: #059669;
  --state-success-border-strong: #047857;

  --state-warn-bg: rgba(245, 158, 11, 0.24);
  --state-warn-fg: #fde68a;
  --state-warn-border: rgba(245, 158, 11, 0.4);
  --state-warn-bg-strong: #d97706;
  --state-warn-border-strong: #b45309;

  --state-danger-bg: rgba(239, 68, 68, 0.24);
  --state-danger-fg: #fecaca;
  --state-danger-border: rgba(239, 68, 68, 0.4);
  --state-danger-bg-strong: #dc2626;
  --state-danger-border-strong: #b91c1c;

  --empty-bg: #0b1220;
  --empty-border: #1f2937;
  --empty-title: #e2e8f0;
  --empty-text: #94a3b8;
  --loading-overlay-bg: rgba(2, 6, 23, 0.7);
  --loading-dialog-bg: rgba(15, 23, 42, 0.9);
  --loading-text: #e2e8f0;
}

body.theme-dark #layout,
body.theme-dark #appShell,
body.theme-dark .main-area,
body.theme-dark #content {
  background-color: #0b1120;
}

body.theme-dark .sidebar {
  background: #0f172a;
  border-right-color: #1f2937;
}

body.theme-dark .sidebar-top,
body.theme-dark .sidebar-footer {
  border-color: #1f2937;
}

body.theme-dark .sidebar-user-text,
body.theme-dark .sidebar-user-name,
body.theme-dark .sidebar-user-id,
body.theme-dark .sidebar-account-menu-item-text strong,
body.theme-dark .sidebar-account-menu-item-text span {
  color: #e2e8f0;
}

body.theme-dark .summary-card,
body.theme-dark .chart-card,
body.theme-dark .asset-card,
body.theme-dark .action-required-card,
body.theme-dark .asset-view-basic-card,
body.theme-dark .group-block,
body.theme-dark .account-section,
body.theme-dark .theme-option-card {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .chart-card-header,
body.theme-dark .action-required-card .card-header {
  background: #0b1220;
  border-bottom-color: #1f2937;
}

body.theme-dark .modal-content,
body.theme-dark .modal-header,
body.theme-dark .modal-body {
  background: #0f172a !important;
  color: #e2e8f0;
}

body.theme-dark .modal-header {
  border-bottom-color: #1f2937;
}

body.theme-dark .modal-body .form-control,
body.theme-dark .modal-body .form-select,
body.theme-dark .modal-body textarea {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark #generalTable {
  background-color: #0f172a;
}

body.theme-dark #generalTable thead th {
  background-color: #111827;
  border-bottom-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark #generalTable tbody td {
  border-bottom-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark #generalTable tbody tr:nth-child(even) {
  background-color: #0b1220;
}

body.theme-dark #generalTable tbody tr:hover td {
  background-color: rgba(59, 130, 246, 0.16);
  color: #e2e8f0;
}


.account-section-title {
  border: 0;
  padding-left: 0;
}

.avatar-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 8px;
}

.avatar-emoji-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 10px;
  font-size: 18px;
  padding: 6px 0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.avatar-emoji-btn:hover {
  border-color: #cbd5f5;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.avatar-emoji-btn.is-selected {
  border-color: #5b7bd5;
  box-shadow: 0 0 0 2px rgba(47, 90, 168, 0.2);
}


body.theme-dark .page-title,
body.theme-dark .section-header,
body.theme-dark .section-header-actions,
body.theme-dark .section-header-main,
body.theme-dark .section-header-sub,
body.theme-dark .asset-side-title,
body.theme-dark .asset-side-sub {
  color: #e2e8f0;
}

body.theme-dark .asset-list-hint {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: #bfdbfe;
}

body.theme-dark .search-input,
body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark textarea,
body.theme-dark input[type="text"],
body.theme-dark input[type="search"],
body.theme-dark input[type="number"] {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .search-input::placeholder,
body.theme-dark .form-control::placeholder,
body.theme-dark textarea::placeholder {
  color: #94a3b8;
}

body.theme-dark .btn-modern,
body.theme-dark .btn-modern.btn-outline,
body.theme-dark .toolbar-icon-btn,
body.theme-dark .sidebar-toggle {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .btn-modern.btn-primary {
  background: var(--state-info-bg-strong);
  border-color: var(--state-info-border-strong);
  color: #fff;
}

body.theme-dark .btn-modern.btn-secondary {
  background: #111827;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .action-menu-panel {
  background: #0f172a;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .action-menu-panel button {
  color: #e2e8f0;
}

body.theme-dark .table-wrapper {
  background: #0f172a;
}

body.theme-dark #generalTable th,
body.theme-dark #generalTable td {
  color: #e2e8f0;
}

body.theme-dark .sidebar-account-menu {
  background: #0f172a;
  border-color: #1f2937;
}

body.theme-dark .sidebar-account-menu-item:hover {
  background: rgba(148, 163, 184, 0.12);
}

body.theme-dark .account-avatar-preview,
body.theme-dark .avatar-emoji-btn,
body.theme-dark .avatar-type-btn,
body.theme-dark .theme-option-card {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark #accountSettingsModal .modal-header {
  background: #0f172a;
  border-bottom-color: #1f2937;
}

body.theme-dark #accountSettingsModal .modal-header .btn-close {
  background-color: #0b1220;
  border-color: #1f2937;
  filter: invert(1) grayscale(1);
}

body.theme-dark #personalPreferencesModal .modal-header .btn-close {
  background-color: #0b1220;
  border-color: #1f2937;
  filter: invert(1) grayscale(1);
}

body.theme-dark #accountSettingsModal .admin-modal-icon--indigo {
  background: rgba(79, 70, 229, 0.22);
  color: #c7d2fe;
}

body.theme-dark .account-avatar-badge {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.42);
  color: #bfdbfe;
}

body.theme-dark .account-avatar-help {
  color: #94a3b8;
}

body.theme-dark .password-input-wrap .form-control {
  background: #0b1220;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .password-toggle-btn {
  color: #94a3b8;
}

body.theme-dark .password-toggle-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

body.theme-dark .avatar-emoji-btn.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

body.theme-dark .asset-view-basic-card,
body.theme-dark .group-block,
body.theme-dark .asset-view-group-card,
body.theme-dark .asset-view-tabs,
body.theme-dark .asset-view-section-title {
  color: #e2e8f0;
}

body.theme-dark .group-grid .item .label {
  color: #94a3b8;
}

body.theme-dark .group-grid .item .value {
  color: #e2e8f0;
}


.avatar-emoji-header {
  margin-bottom: 6px;
}

body.theme-dark .sidebar-group-title {
  color: #94a3b8;
}

body.theme-dark .sidebar-item {
  color: #94a3b8;
}

body.theme-dark .sidebar-item:hover {
  background: #111827;
  color: #e2e8f0;
}

body.theme-dark .sidebar-item.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #334155;
}

body.theme-dark .summary-label,
body.theme-dark .summary-meta,
body.theme-dark .summary-meta--muted {
  color: #cbd5e1;
}

body.theme-dark .summary-value,
body.theme-dark .summary-value-sub,
body.theme-dark .summary-delta,
body.theme-dark .summary-metric__value {
  color: #f8fafc;
}

body.theme-dark .summary-chip,
body.theme-dark .summary-chip.primary,
body.theme-dark .summary-chip.warning,
body.theme-dark .summary-chip.danger,
body.theme-dark .summary-chip.neutral {
  background: #1e293b;
  color: #bfdbfe;
  border: 1px solid #334155;
}

body.theme-dark .ui-badge--neutral {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

body.theme-dark .ui-badge--primary {
  background: var(--state-info-bg);
  color: var(--state-info-fg);
  border-color: var(--state-info-border);
}

body.theme-dark .ui-badge--success {
  background: var(--state-success-bg);
  color: var(--state-success-fg);
  border-color: var(--state-success-border);
}

body.theme-dark .ui-badge--warn {
  background: var(--state-warn-bg);
  color: var(--state-warn-fg);
  border-color: var(--state-warn-border);
}

body.theme-dark .ui-badge--danger {
  background: var(--state-danger-bg);
  color: var(--state-danger-fg);
  border-color: var(--state-danger-border);
}

body.theme-dark .ui-badge--purple {
  background: rgba(139, 92, 246, 0.24);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.4);
}

body.theme-dark .chart-card-title,
body.theme-dark .action-required-card .card-title,
body.theme-dark .kpi-title,
body.theme-dark .asset-card-header,
body.theme-dark .asset-card-metrics,
body.theme-dark .asset-card-grid {
  color: #f8fafc;
}

body.theme-dark .chart-card-desc,
body.theme-dark .asset-card-metrics small,
body.theme-dark .summary-diff,
body.theme-dark .summary-meta {
  color: #94a3b8;
}

body.theme-dark .asset-card-chart,
body.theme-dark .chart-card-body {
  background: #0b1220;
  border-color: #1f2937;
}

body.theme-dark .action-required-card .table thead th {
  background: #111827;
  color: #e2e8f0;
  border-bottom-color: #1f2937;
}

body.theme-dark .action-required-card .table tbody td {
  color: #e2e8f0;
}

body.theme-dark #generalTable {
  background-color: #0f172a !important;
}

body.theme-dark #generalTable thead th {
  background-color: #111827 !important;
  border-bottom-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

body.theme-dark #generalTable tbody td {
  color: #e2e8f0 !important;
  border-bottom-color: #1f2937 !important;
}

body.theme-dark #generalTable tbody tr:nth-child(even) {
  background-color: #0b1220 !important;
}

body.theme-dark #generalTable tbody tr:hover td {
  background-color: rgba(59, 130, 246, 0.2) !important;
  color: #f8fafc !important;
}

body.theme-dark .asset-view-basic-card,
body.theme-dark .group-block,
body.theme-dark .asset-view-group-card,
body.theme-dark .account-section,
body.theme-dark .theme-option-card,
body.theme-dark .account-settings-modal,
body.theme-dark .personal-preferences-modal {
  background: #0f172a;
  border-color: #1f2937;
  color: #e2e8f0;
}

body.theme-dark .asset-view-section-title,
body.theme-dark .group-title,
body.theme-dark .asset-view-group-title {
  color: #f8fafc;
}

body.theme-dark .asset-view-basic-grid .item,
body.theme-dark .group-grid .item {
  border-top-color: #1f2937;
}

body.theme-dark .asset-view-basic-grid .item .label,
body.theme-dark .group-grid .item .label {
  color: #94a3b8;
}

body.theme-dark .asset-view-basic-grid .item .value,
body.theme-dark .group-grid .item .value {
  color: #e2e8f0;
}


.account-settings-modal .avatar-inputs {
  display: grid !important;
}

.account-settings-modal .avatar-input.is-active {
  display: grid !important;
}

.account-settings-modal .avatar-emoji-grid {
  display: grid !important;
}


.account-section-title {
  border-left: 0 !important;
  border-bottom: 0 !important;
  padding-left: 0 !important;
  padding-bottom: 0 !important;
}


body.theme-dark .header-app-selector-btn,
body.theme-dark .header-app-selector-label,
body.theme-dark .header-app-selector-chevron {
  color: #f8fafc;
}

body.theme-dark .header-app-selector-btn {
  background: #0b1220;
  border-color: #243041;
}

body.theme-dark .header-app-selector-btn:hover {
  background: #162133;
  border-color: #334155;
}

body.theme-dark .dashboard-page .summary-card,
body.theme-dark .dashboard-page .chart-card,
body.theme-dark .dashboard-page .action-required-card {
  color: #f8fafc;
}

body.theme-dark .dashboard-page .summary-label,
body.theme-dark .dashboard-page .summary-meta,
body.theme-dark .dashboard-page .summary-meta--muted,
body.theme-dark .dashboard-page .chart-card-desc,
body.theme-dark .dashboard-page .kpi-title,
body.theme-dark .dashboard-page .kpi-section-title {
  color: #e2e8f0;
}

body.theme-dark .dashboard-page .summary-value,
body.theme-dark .dashboard-page .summary-metric__value {
  color: #ffffff;
}

body.theme-dark #eoslEquipmentTable {
  background: #0b1220;
  color: #e2e8f0;
}

body.theme-dark #eoslEquipmentTable thead th {
  background: #111827;
  color: #f8fafc;
  border-bottom-color: #1f2937;
}

body.theme-dark #eoslEquipmentTable tbody td {
  color: #e2e8f0;
  border-bottom-color: #1f2937;
}

body.theme-dark #eoslEquipmentTable tbody tr:nth-child(even) {
  background: #0f172a;
}

body.theme-dark #eoslEquipmentTable tbody tr:hover td {
  background: rgba(59, 130, 246, 0.18);
  color: #f8fafc;
}

body.theme-dark #generalTable thead th {
  background-color: transparent !important;
  color: #f8fafc !important;
  border-bottom-color: #1f2937 !important;
}


body.theme-dark table {
  background: transparent;
}

body.theme-dark table th,
body.theme-dark table td {
  background: transparent !important;
  color: #f8fafc;
  border-color: #1f2937;
}

body.theme-dark #eoslEquipmentTable thead th {
  background: transparent !important;
  color: #f8fafc;
}

body.theme-dark #eoslEquipmentTable tbody td {
  background: transparent !important;
  color: #f8fafc;
}

body.theme-dark #eoslEquipmentTable tbody tr:nth-child(even),
body.theme-dark #eoslEquipmentTable tbody tr:hover td {
  background: transparent !important;
}

body.theme-dark .eosl-detail-modal .modal-content {
  background: #0f172a;
  border-color: #1f2937;
}

body.theme-dark .eosl-detail-modal .modal-header {
  background: #0f172a;
  border-bottom-color: #1f2937;
}

body.theme-dark .eosl-detail-modal .modal-title {
  color: #f8fafc;
}

body.theme-dark .eosl-detail-modal .modal-body {
  background: #0f172a;
}

body.theme-dark .eosl-modal-tabs .nav-link {
  background: transparent;
  border-color: transparent;
  color: #94a3b8;
}

body.theme-dark .eosl-modal-tabs .nav-link.active {
  background: transparent;
  border-color: transparent;
  color: #60a5fa;
}

body.theme-dark .eosl-modal-tabs .nav-link.active .eosl-tab-count {
  background: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
}

body.theme-dark #eoslModalTable thead th {
  background: #111827;
  color: #f8fafc;
  border-bottom-color: #1f2937;
}

body.theme-dark #eoslModalTable tbody td {
  color: #e2e8f0;
  border-top-color: #1f2937;
}

body.theme-dark #eoslModalTable tbody tr:hover td {
  background: rgba(59, 130, 246, 0.16);
}


body.theme-dark .asset-type-stat {
  border-bottom-color: rgba(148, 163, 184, 0.25);
}

/*
***********************************************************************************
    System Tab Style (Underline + animated)
***********************************************************************************
*/
.nav.nav-tabs,
.nav.nav-pills {
  border-bottom: 1px solid #e5e7eb;
  gap: 18px;
}

.nav.nav-tabs .nav-link,
.nav.nav-pills .nav-link {
  position: relative;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b;
  font-weight: 700;
  padding: 10px 2px;
  transition: color 0.2s ease;
}

.nav.nav-tabs .nav-link::after,
.nav.nav-pills .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.nav.nav-tabs .nav-link:hover,
.nav.nav-pills .nav-link:hover {
  color: #1e3a8a;
}

.nav.nav-tabs .nav-link.active,
.nav.nav-pills .nav-link.active {
  color: #1d4ed8;
}

.nav.nav-tabs .nav-link.active::after,
.nav.nav-pills .nav-link.active::after {
  transform: scaleX(1);
}

body.theme-dark .nav.nav-tabs,
body.theme-dark .nav.nav-pills {
  border-bottom-color: #1f2937;
}

body.theme-dark .nav.nav-tabs .nav-link,
body.theme-dark .nav.nav-pills .nav-link {
  color: #94a3b8;
}

body.theme-dark .nav.nav-tabs .nav-link:hover,
body.theme-dark .nav.nav-pills .nav-link:hover {
  color: #e2e8f0;
}

body.theme-dark .nav.nav-tabs .nav-link.active,
body.theme-dark .nav.nav-pills .nav-link.active {
  color: #60a5fa;
}

body.theme-dark .nav.nav-tabs .nav-link::after,
body.theme-dark .nav.nav-pills .nav-link::after {
  background: #60a5fa;
}

body.theme-dark .asset-type-stat__label,
body.theme-dark .asset-type-stat__value {
  color: #f8fafc;
}

body.theme-dark .asset-type-stat__value em {
  color: #cbd5e1;
}


body.theme-dark .sidebar-footer {
  background: transparent;
}

body.theme-dark .sidebar-user {
  background: transparent;
  color: #f8fafc;
}

body.theme-dark .sidebar-user:hover,
body.theme-dark .sidebar-user:focus-visible {
  background: #111827;
}

body.theme-dark .sidebar-avatar {
  background: #1e293b;
  color: #f8fafc;
}

body.theme-dark .sidebar-user-chevron {
  color: #cbd5e1;
}

body.theme-dark .function-container,
body.theme-dark #management .function-container {
  background-color: rgba(15, 23, 42, 0.98);
  border-top-color: #1f2937;
  color: #f8fafc;
}

body.theme-dark .function-container .btn-modern,
body.theme-dark #management .function-container .btn-modern {
  color: #f8fafc;
}

body.theme-dark #generalTable tfoot th,
body.theme-dark #generalTable tfoot td {
  background: transparent !important;
  color: #f8fafc !important;
  border-top-color: #1f2937 !important;
}


body.theme-dark #generalTable thead tr + tr th {
  background: transparent !important;
  color: #f8fafc !important;
  border-bottom-color: #1f2937 !important;
}


body.theme-dark .sidebar-account-menu {
  background: #0f172a;
  border-color: #1f2937;
}

body.theme-dark .sidebar-account-menu-item {
  color: #f8fafc;
}

body.theme-dark .sidebar-account-menu-item-text span {
  color: #cbd5e1;
}

/*
***********************************************************************************
    iPad 가독성/밀도 보정
***********************************************************************************
*/
@media (min-width: 768px) and (max-width: 1180px) {
  body {
    font-size: 12px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .page-title {
    font-size: 24px;
  }

  .section-header-sub,
  .asset-side-sub,
  .admin-card-subtitle,
  .admin-modal-subtitle {
    font-size: 12px;
  }

  .btn-modern {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .form-control,
  .form-select,
  textarea,
  input[type="text"],
  input[type="search"],
  input[type="number"] {
    font-size: 12px;
    padding: 8px 12px;
  }

  .table th,
  .table td,
  .admin-table th,
  .admin-table td {
    font-size: 11.5px;
  }

  .table th,
  .table td {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://hera-client.grepp.co/c8ba52b05a9ef10f4758.woff2?v=3.19') format('woff2'),
       url('https://hera-client.grepp.co/8c206db99195777c6769.woff?v=3.19') format('woff');
  unicode-range: U+0030-0039, U+0041-005A, U+0061-007A;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://hera-client.grepp.co/ec64ea577b0349e055ad.woff2?v=3.19') format('woff2'),
       url('https://hera-client.grepp.co/93c1301bd9f486c573b3.woff?v=3.19') format('woff');
  unicode-range: U+0030-0039, U+0041-005A, U+0061-007A;
}
