:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-body: #f8fafc;
    --bg-sidebar: #ffffff;  /* Changed to match header */
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sidebar: #0f172a; /* New variable for sidebar text on light bg */
    --text-inverse: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 180px;
    --sidebar-collapsed-width: 70px;
    --header-height: 55px;
    --transition-speed: 0.3s;

    /* header.jsp 등에서 사용하는 별칭 변수 */
    --bg-hover: #f1f5f9;
    --text-primary: #0f172a;
    --border-color: #e2e8f0;

    --mainlineonColor: #dcf1f4;
    --grayDarkColor: #3c4651;
    --grayLightColor: #8d96a1;
    --pointtxtColor: #fe4e13;
}

[data-theme='dark'] {
    --bg-body: #020617;
    --bg-sidebar: #1e293b; /* Dark mode sidebar */
    --bg-header: #1e293b;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sidebar: #f8fafc;
    --text-inverse: #f8fafc;
    --border: #334155;

    /* header.jsp 등에서 사용하는 별칭 변수 */
    --bg-hover: #334155;
    --text-primary: #f8fafc;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    transition: none;
    z-index: 1000;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background-color: var(--bg-sidebar); /* Ensure background match */
}

.sidebar.collapsed .sidebar-header {
    padding: 0.75rem 0.5rem;
    justify-content: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 1;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sidebar.collapsed .logo-area {
    display: none;
}

.sidebar.collapsed .sidebar-header button {
    margin: 0 auto;
}

.logo-img {
    height: 100px;
    width: 100px;
    object-fit: contain;
}

/* .logo-text removed */

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
    background-color: var(--bg-sidebar);
}

.sidebar-nav ul {
    list-style: none;
}

.nav-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted); /* Updated color */
    font-weight: 700;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    white-space: nowrap;
}

.sidebar.collapsed .nav-header {
    display: none;
}

.nav-item {
    margin-bottom: 0.125rem;
}

/* 2-depth menu support */
.nav-sub-menu {
    padding-left: 0.5rem;
    display: none; /* Hidden by default */
    margin-top: 0.125rem;
}

.nav-item.open .nav-sub-menu {
    display: block;
}

.nav-sub-menu li {
    position: relative;
}

.nav-sub-menu .nav-link {
    padding: 0.4rem 0.75rem 0.4rem 1.5rem;
    font-size: 0.8125rem;
}

.nav-sub-menu .nav-link::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-size: 0.875rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted); /* Default text color */
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.8125rem;
}

.nav-link i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-link:hover {
    background-color: #f1f5f9; /* Lighter hover for light sidebar */
    color: var(--primary);
    font-weight: 500;
}

/* 현재 진입한 메뉴 강조 (펼침 여부와 무관하게 active만) */
.nav-item.active > .nav-link {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.nav-item.active > .nav-link i {
    color: #ffffff;
}

.nav-item.open > .nav-link .nav-arrow {
    transform: rotate(180deg);
}

/* 하위 메뉴(nav-sub-menu) 내 active 링크 스타일 */
.nav-sub-menu li.active .nav-link,
.nav-sub-menu .nav-link.active {
    color: var(--primary);
    font-weight: 600;
    background-color: #e0f2fe;
}

[data-theme='dark'] .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

[data-theme='dark'] .nav-item.active > .nav-link {
    background-color: var(--primary);
    color: #ffffff;
}

[data-theme='dark'] .nav-sub-menu li.active .nav-link,
[data-theme='dark'] .nav-sub-menu .nav-link.active {
    background-color: rgba(37, 99, 235, 0.2);
}


.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-sub-menu,
.sidebar.collapsed .nav-arrow {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

/* collapsed 사이드바: 서브메뉴 플라이아웃 */
.sidebar.collapsed .nav-sub-menu {
    position: fixed;
    min-width: 160px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 6px;
    margin: 0;
    z-index: 2100;
}

.sidebar.collapsed .nav-sub-menu.flyout {
    display: block;
}

.sidebar.collapsed .nav-sub-menu .nav-link {
    justify-content: flex-start;
    padding: 0.45rem 0.75rem;
}

/* 플라이아웃 안의 텍스트는 표시 */
.sidebar.collapsed .nav-sub-menu .nav-text {
    display: inline;
}

.sidebar.collapsed .nav-sub-menu .nav-link::before {
    display: none;
}

.nav-sub-title {
    display: none;
}

.sidebar.collapsed .nav-sub-menu .nav-sub-title {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    white-space: nowrap;
}

/* Layout Main */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    padding-top: var(--header-height);
}

/* Header Styles */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 2000;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 12px;
}

.top-menu {
    display: flex;
    gap: 1.5rem;
}

.top-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.top-link:hover {
    color: var(--primary);
}

.divider-vertical {
    width: 1px;
    height: 24px;
    background-color: var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    background-color: var(--bg-body);
}

/* Reusing Card & Badge Styles from previous */
.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.role-USER {
    background: #dcfce7;
    color: #166534;
}

.role-OPERATOR {
    background: #fef9c3;
    color: #854d0e;
}

.role-ADMIN {
    background: #dbeafe;
    color: #1e40af;
}

.btn-icon {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar .btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Adjusted for light sidebar */
}

.sidebar.collapsed .sidebar-header .collapse-btn i {
    transform: rotate(180deg);
}

/* 사이드바 하단 최소화 버튼 */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
}

.sidebar-footer .collapse-btn-bottom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    color: var(--text-muted);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--bg-hover);
}

.sidebar-footer .collapse-btn-bottom:hover {
    color: var(--text-main);
}

.sidebar-footer .collapse-btn-bottom i {
    width: 16px;
    height: 16px;
}

.sidebar.collapsed .sidebar-footer .collapse-btn-text {
    display: none;
}

.sidebar.collapsed .sidebar-footer .collapse-btn-bottom {
    justify-content: center;
}

.card {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-width: 0;
    /* Allow shrinking */
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    min-width: 0;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-ok {
    color: var(--success);
    background: #ecfdf5;
}

.status-warn {
    color: var(--warning);
    background: #fffbeb;
}

.status-danger {
    color: var(--danger);
    background: #fef2f2;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px dotted var(--border);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    overflow: hidden;
    /* Critical for resizing */
}

.role-alert {
    text-align: center;
    padding: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}


/* :: glDatePicker */
.yearText:after { content: '년'; }
.gldp-flatwhite { position: fixed; padding: 6px 0 6px 6px; background-color: #fff; font-size: 12px; margin: 0 0 0 6px; border-radius: 5px !important; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); -ms-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); -o-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); }
.gldp-flatwhite .prev-arrow,
.gldp-flatwhite .next-arrow { font-size: 16px; }
.gldp-flatwhite .core { float: left; position: relative; background-color: #ffffff; text-align: center; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; }
.gldp-flatwhite .monyear,
.gldp-flatwhite .monyear select { margin-top: 0px; background-color: #fff; color: #414141; }
.gldp-flatwhite .monyear span { margin: 0 5px; }
.gldp-flatwhite .prev-arrow,
.gldp-flatwhite .next-arrow { text-shadow: none; font-size: 18px; width: 20px; height: 20px; display: block; overflow: hidden; font-size: 0px; line-height: 0; text-indent: -9999px; }
.gldp-flatwhite .prev-arrow { background: url("/static/images/common/cal-prev.gif") no-repeat; background-size: 8px auto; background-position: top 10px right; }
.gldp-flatwhite .next-arrow { background: url("/static/images/common/cal-next.gif") no-repeat; background-size: 8px auto; background-position: top 10px right; }
.gldp-flatwhite .prev-arrow:hover,
.gldp-flatwhite .prev-arrow:focus,
.gldp-flatwhite .prev-arrow:active,
.gldp-flatwhite .next-arrow:hover
 .gldp-flatwhite .next-arrow:focus,
 .gldp-flatwhite .next-arrow:active { color: #fff; }
.gldp-flatwhite .prev-arrow-off, .gldp-flatwhite .next-arrow-off { color: #cfcfcf; }
.gldp-flatwhite .dow { background-color: var(--mainlineonColor); cursor: default; color: #414141; font-weight: bold; }
.gldp-flatwhite .sat { color: var(--grayLightColor); }
.gldp-flatwhite .sun { color: var(--pointtxtColor); }
.gldp-flatwhite .outday { color: #cfcfcf !important; }
.gldp-flatwhite .mon
.gldp-flatwhite .tue,
.gldp-flatwhite .wed,
.gldp-flatwhite .thu,
.gldp-flatwhite .fri,
.gldp-flatwhite .sat,
.gldp-flatwhite .sun,
.gldp-flatwhite .selected { border: 2px solid #ffffff; -webkit-border: 2px solid #ffffff; -moz-border: 2px solid #ffffff; -ms-border: 2px solid #ffffff; -o-border: 2px solid #ffffff; }
.gldp-flatwhite .mon:hover,
.gldp-flatwhite .tue:hover,
.gldp-flatwhite .wed:hover,
.gldp-flatwhite .thu:hover,
.gldp-flatwhite .fri:hover,
.gldp-flatwhite .sat:hover,
.gldp-flatwhite .sun:hover { background-color: var(--mainlineonColor); border-radius: 5px; }
.gldp-flatwhite .noday { color: #f9f9f9; cursor: wait !important; }
.gldp-flatwhite .selected { background-color: var(--grayLightColor); color: #ffffff; font-weight: bold; border-radius: 5px; }
.gldp-flatwhite .today { background-color: var(--mainlineonColor); border: 1px solid var(--grayLightColor); color: var(--pointtxtColor); font-weight: bold; }


/* :: wickedpicker */
.wickedpicker__title { background: #edf5fc !important; padding: 10px !important; text-align: left !important; font-size: 13px !important; }
.wickedpicker__close { top: 50% !important; font-size: 20px !important; margin-top: -7px !important; }
.wickedpicker__controls { height: calc(100% - 34px); }
.wickedpicker__controls__control,
.wickedpicker__controls__control--separator { width: calc(50% - 40px) !important; margin: 8px auto !important; }
.wickedpicker__controls__control span { display: block; font-size: 14px; margin: 5px 0; color: #5a6b79; }
.fileWrap { position: relative; }
.fileWrap.comment { background-color: #fff; border-bottom: 1px solid  #d4d5d6; border-right: 1px solid #d4d5d6; border-left: 1px solid #d4d5d6; padding: 7px; }
.input-upload-wrap { margin-top: 5px; }
.input-upload-wrap .input-box { height: 17px; line-height: 17px; margin-top: 2px; }
.input-upload-wrap .input-remove { width: 15px; margin-right: 5px; }



/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    line-height: 1;
}

.btn > i,
.btn > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* AJAX 로딩 오버레이 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary, #2563eb);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =======================================================
   유틸리티 클래스 (inline style 제거용)
   ======================================================= */

/* 레이아웃 */
.d-none              { display: none; }
.d-flex              { display: flex; }
.d-inline-block      { display: inline-block; }
.d-inline-flex       { display: inline-flex; }
.flex-col            { flex-direction: column; }
.flex-1              { flex: 1; }
.flex-wrap           { flex-wrap: wrap; }
.items-center        { align-items: center; }
.items-stretch       { align-items: stretch; }
.items-start         { align-items: flex-start; }
.justify-center      { justify-content: center; }
.justify-between     { justify-content: space-between; }
.justify-end         { justify-content: flex-end; }
.gap-xs              { gap: 4px; }
.gap-sm              { gap: 0.5rem; }
.gap-md              { gap: 1rem; }
.gap-lg              { gap: 1.5rem; }

/* 간격 */
.m-0                 { margin: 0; }
.mt-0                { margin-top: 0; }
.mt-xs               { margin-top: 0.25rem; }
.mt-sm               { margin-top: 0.5rem; }
.mt-md               { margin-top: 1rem; }
.mt-lg               { margin-top: 2rem; }
.mb-0                { margin-bottom: 0; }
.mb-sm               { margin-bottom: 0.5rem; }
.mb-md               { margin-bottom: 1rem; }
.mr-xs               { margin-right: 4px; }
.ml-sm               { margin-left: 0.5rem; }
.ml-md               { margin-left: 1rem; }
.p-0                 { padding: 0; }
.p-sm                { padding: 0.5rem; }
.p-md                { padding: 1rem; }
.px-sm               { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-sm               { padding-top: 0.5rem; padding-bottom: 0.5rem; }

/* 크기 */
.w-full              { width: 100%; }
.w-30                { width: 30%; }
.w-40                { width: 40%; }
.h-full              { height: 100%; }

/* 텍스트 */
.text-center         { text-align: center; }
.text-left           { text-align: left; }
.text-right          { text-align: right; }
.text-xs             { font-size: 0.75rem; }
.text-sm             { font-size: 0.875rem; }
.text-base           { font-size: 1rem; }
.text-lg             { font-size: 1.125rem; }
.fw-500              { font-weight: 500; }
.fw-600              { font-weight: 600; }
.fw-700              { font-weight: 700; }
.text-nowrap         { white-space: nowrap; }
.text-truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 색상 */
.text-success        { color: var(--success); }
.text-danger         { color: var(--danger); }
.text-primary        { color: var(--primary); }
.text-warning        { color: var(--warning); }
.text-muted          { color: var(--text-muted); }
.text-main           { color: var(--text-main); }
.text-white          { color: white; }
.bg-primary          { background: var(--primary); }
.bg-transparent      { background: transparent; }
.bg-body             { background: var(--bg-body); }

/* 테두리 */
.util-border          { border: 1px solid var(--border); }
.border-0            { border: none; }
.rounded-sm          { border-radius: 4px; }
.rounded-md          { border-radius: 6px; }
.rounded-lg          { border-radius: 8px; }
.rounded-full        { border-radius: 9999px; }

/* 기타 */
.cursor-pointer      { cursor: pointer; }
.overflow-hidden     { overflow: hidden; }
.relative            { position: relative; }
.absolute            { position: absolute; }
.outline-none        { outline: none; }
.transition-all      { transition: all 0.2s; }
.opacity-hover:hover { opacity: 0.9; }

/* 아이콘 크기 */
.icon-sm              { width: 14px; height: 14px; }
.icon-md              { width: 16px; height: 16px; }
.icon-lg              { width: 20px; height: 20px; }
.spinner-sm           { width: 1rem; height: 1rem; }

/* 공통 폼 입력 필드 */
.form-input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    font-size: 0.875rem;
    background: var(--bg-card);
    color: var(--text-main);
}

/* 공통 라벨드 인풋 (코드 관리 등) */
.labeled-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    overflow: hidden;
}
.labeled-input-group .input-label {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #4b5563;
    background: #f3f4f6;
    width: 75px;
    padding: 0 8px;
    white-space: nowrap;
}
.labeled-input-group .input-field {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 6px 10px;
    font-size: 12px;
    background: white;
}

/* 공통 action 버튼 바 */
.action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── 공통 로딩 오버레이 ─── */
.global-loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}
.global-loading-overlay.active {
    display: flex;
}
.global-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 2rem 2.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.global-loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: globalSpin 0.7s linear infinite;
}
.global-loading-text {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}
@keyframes globalSpin {
    to { transform: rotate(360deg); }
}
