:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
    --color-primary: #3366cc;
    --color-primary-light: #eef3ff;
    --color-primary-border: #c5d5f0;
    --color-panel-bg: #e8eef8;
    --color-panel-border: #d0d7e3;
    --color-page-bg: #f4f5f7;
}
* { margin: 0; padding: 0; box-sizing: border-box; border-color: hsl(var(--border)); }
body { background: var(--color-page-bg); color: hsl(var(--foreground)); }

.custom-scrollbar { scrollbar-width: auto; scrollbar-color: hsl(var(--border)) transparent; }
.custom-scrollbar::-webkit-scrollbar { width: 10px; height: 10px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: hsl(var(--border)); border-radius: 3px; }

.search-input:focus { outline: none; border-color: #000 !important; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }

select.filter-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
select.filter-select:focus { outline: none; border-color: var(--color-primary) !important; box-shadow: 0 0 0 2px rgba(51,102,204,0.1); }

.sidebar-collapsed { width: 64px !important; }
.sidebar-collapsed .nav-label, .sidebar-collapsed .nav-badge, .sidebar-collapsed .logo-text { display: none !important; }
.sidebar-collapsed .logo-small { display: block !important; }
.sidebar-collapsed nav { padding-left: 6px !important; padding-right: 6px !important; }
.sidebar-collapsed .nav-link { gap: 0; justify-content: center !important; padding-left: 0 !important; padding-right: 0 !important; }
.sidebar-collapsed .logo-link { padding: 0 !important; justify-content: center; }
.sidebar-collapsed .sidebar-bottom-label { display: none !important; }
.sidebar-collapsed .sidebar-bottom-btn { gap: 0; justify-content: center !important; padding-left: 0 !important; padding-right: 0 !important; }
.sidebar-collapsed .sidebar-warehouse-info { display: none !important; }
.sidebar-collapsed #settingsChevron { display: none !important; }
.sidebar-collapsed #settingsSubmenu { display: none !important; }
.sidebar-collapsed #settingsCollapsedIcons.open { display: flex !important; }
#settingsCollapsedIcons .sc-icon-btn { display:flex;align-items:center;justify-content:center;height:36px;border-radius:8px;color:#8899aa;font-size:18px;font-weight:700;cursor:pointer;transition:background 0.15s; }
#settingsCollapsedIcons .sc-icon-btn:hover { background:#2a3a4f; }
.sidebar-collapsed .sidebar-divider { margin-left: 0.5rem; margin-right: 0.5rem; }
.sidebar-collapsed .nav-label { display: none !important; }
.header-collapsed { left: 64px !important; }
.main-collapsed { margin-left: 64px !important; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 45; }
.sidebar-overlay.show { display: block; }


/* -- Tab Navigation A: Browser Tabs -- */
.tab-nav-a { background:#dee1e6; padding:0; display:flex; align-items:flex-end; flex-shrink:0; height:42px; position:relative; overflow:hidden; z-index:10; }
.tab-nav-a.collapsed { height:0; }
.tab-scroll-area { flex:1; min-width:0; overflow:hidden; position:relative; }
.tab-list-a { display:flex; flex-wrap:nowrap; align-items:flex-end; padding:8px 8px 0 24px; height:42px; transition:transform 0.25s ease; position:relative; border-bottom:1px solid #c8cad0; }
.tab-a { position:relative; display:inline-flex; align-items:center; gap:0px; padding:7px 2px 7px 10px; font-size:12px; font-weight:400; color:#5f6368; background:transparent; border:1px solid transparent; border-bottom:1px solid #c8cad0; border-radius:8px 8px 0 0; cursor:default; white-space:nowrap; overflow:hidden; transition:background 0.15s; height:34px; margin-bottom:-1px; flex-shrink:0; max-width:240px; min-width:60px; z-index:1; }
.tab-a:hover { background:rgba(255,255,255,0.4); }
.tab-a.active { background:#f3f3f4; color:#202124; border:1px solid #c8cad0; border-bottom:1px solid #f3f3f4; font-weight:500; z-index:2; box-shadow:0 -1px 4px rgba(0,0,0,0.06); }
.tab-a .tab-title { overflow:hidden; text-overflow:ellipsis; }
.tab-a .tab-x { margin-left:0px; display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; font-size:14px; color:#5f6368; cursor:pointer; border:none; background:none; flex-shrink:0; padding:0; transition:background 0.15s; padding-bottom: 1px;}
.tab-a .tab-x:hover { background:#d4d6da; color:#202124; }
.tab-a.active .tab-x:hover { background:#c8cad0; }
/* tab separator */
.tab-a::after { content:''; position:absolute; right:0; top:8px; bottom:8px; width:1px; background:#b8bcc2; z-index:1; }
.tab-a:last-child::after, .tab-a.active::after, .tab-a:has(+ .tab-a.active)::after { display:none; }
/* tab arrow buttons */
.tab-arrow { flex-shrink:0; width:28px; height:34px; border:none; background:#cdd0d5; color:#5f6368; cursor:pointer; font-size:12px; display:none; align-items:center; justify-content:center; margin-top:auto; z-index:3; transition:background 0.15s; }
.tab-arrow:hover { background:#b8bcc2; color:#202124; }
/* sortable ghost */
.sortable-ghost { opacity:0.5; }
/* tab content iframe */
.tab-pane { width:100%; height:100%; display:none; }
.tab-pane iframe { width:100%; height:100%; border:none; }
/* confirm overlay */
#tabConfirmOverlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.3); z-index:99999; display:flex; justify-content:center; align-items:center; }
#tabConfirmBox { background:#fff; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,0.2); padding:24px 32px 18px; min-width:280px; text-align:center; }
#tabConfirmMsg { font-size:13px; color:#333; margin-bottom:18px; }
#tabConfirmBtns { display:flex; justify-content:center; gap:10px; }
.confirm-btn { display:inline-flex; align-items:center; justify-content:center; height:32px; padding:0 18px; border-radius:6px; font-size:13px; font-weight:500; cursor:pointer; border:none; transition:opacity 0.15s; }
.confirm-btn-primary { background:#3366cc; color:#fff; }
.confirm-btn-primary:hover { opacity:0.9; }
.confirm-btn-default { background:#e5e7eb; color:#333; }
.confirm-btn-default:hover { background:#d1d5db; }
body { overflow:hidden; }

/* 사이드바/헤더 영역 Bootstrap 간섭 방지 */
#sidebar, #sidebar *,
header, header * {
    border: none;
    border-color: transparent;
    box-shadow: none;
}
#sidebar button, header button {
    background: transparent;
    border: none;
    outline: none;
    line-height: normal;
}
#sidebar a, header a {
    text-decoration: none;
    color: inherit;
}
#sidebar svg, header svg {
    vertical-align: baseline;
}
#sidebar .nav-link,
#sidebar .sidebar-bottom-btn {
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 16px;
    gap: 12px;
    height: auto;
    min-height: 40px;
}
#sidebar .nav-link svg,
#sidebar .sidebar-bottom-btn svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
}
header .border-b {
    border-bottom: 1px solid hsl(var(--border)) !important;
}
header .rounded-full { border-radius: 9999px; }
header .border { border: 1px solid !important; }
header .border-blue-300 { border-color: #93c5fd !important; }

#movingLayer {
    position: absolute;
    background-color: rgba(0, 0, 0, 0);
    padding: 1px;
    cursor: move;
    z-index: 9999;
    top:140px;
    left:240px;
    width: 42%;
    min-width: 500px;
    min-height: 400px;
    height: calc(100vh - 258px);
    display:none;
}
#transparentBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
}