:root {
  /* Brand */
  --corp: #2563eb;
  --corp-bg: #eff6ff;
  --corp-border: #bfdbfe;
  
  /* Surfaces */
  --bg: #f8fafc;
  --surface: #ffffff;
  
  /* Text */
  --fg: #1e293b;
  --fg-secondary: #64748b;
  --muted: #94a3b8;
  
  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Status Colors */
  --success: #10b981;
  --success-bg: #d1fae5;
  --error: #ef4444;
  --error-bg: #fee2e2;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  
  /* Dashboard Specific */
  --web: #8b5cf6;
  --web-bg: #ede9fe;
  
  /* Radius - Unified */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  
  /* Typography */
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  
  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
  --gnb-height: 64px;
  --footer-height: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--fg); line-height: 1.5; overflow: hidden; }

.gnb {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--gnb-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; z-index: 100;
}
.gnb-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.gnb-logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, #3a7bd5, #00d2ff); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 11px; }
.gnb-logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.5px; }
.gnb-logo-text span { color: var(--corp); }
.gnb-badge { margin-left: 8px; padding: 3px 8px; background: var(--fg); color: white; border-radius: var(--radius-sm); font-size: 10px; font-weight: 600; letter-spacing: 0.5px; }
.gnb-spacer { flex: 1; }
.gnb-user { display: flex; align-items: center; gap: 12px; }
.gnb-avatar { width: 36px; height: 36px; background: var(--corp-bg); color: var(--corp); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.gnb-user-info { text-align: right; }
.gnb-user-name { font-size: 14px; font-weight: 600; }
.gnb-user-role { font-size: 12px; color: var(--fg-secondary); }
.gnb-logout { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-md); font-size: 13px; font-weight: 500; color: var(--fg-secondary); cursor: pointer; transition: all var(--transition); margin-left: 16px; }
.gnb-logout:hover { background: var(--bg); border-color: var(--muted); }

.sidebar {
  position: fixed; top: var(--gnb-height); left: 0; bottom: var(--footer-height);
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 90;
  transition: width var(--transition-slow);
}
.sidebar-search { padding: 16px; border-bottom: 1px solid var(--border-light); }
.sidebar-search-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-md); color: var(--muted); font-size: 13px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-section { padding: 8px 12px; }
.nav-section-title { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 12px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--fg-secondary); font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition); position: relative; text-decoration: none; }
.nav-item:hover { background: var(--bg); color: var(--fg); }
.nav-item.active { background: var(--corp-bg); color: var(--corp); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: var(--corp); border-radius: 0 3px 3px 0; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

.footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--footer-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; font-size: 12px; color: var(--muted); z-index: 100;
}
.footer a { color: var(--fg-secondary); text-decoration: none; }
.footer a:hover { color: var(--corp); }

.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--gnb-height);
  margin-bottom: var(--footer-height);
  height: calc(100vh - var(--gnb-height) - var(--footer-height));
  overflow-y: auto; padding: 24px;
}

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--fg-secondary); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition); border: none; }
.btn-primary { background: var(--corp); color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: var(--surface); color: var(--fg-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); border-color: var(--muted); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden; transition: all var(--transition-slow); }
.filter-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.filter-header:hover { background: var(--bg); }
.filter-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.filter-toggle { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fg-secondary); }
.filter-toggle svg { transition: transform var(--transition); }
.filter-panel.collapsed .filter-toggle svg { transform: rotate(-90deg); }
.filter-body { padding: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; transition: all var(--transition-slow); }
.filter-panel.collapsed .filter-body { display: none; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 12px; font-weight: 600; color: var(--fg-secondary); }
.filter-input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; font-family: inherit; transition: all var(--transition); background: var(--surface); }
.filter-input:focus { outline: none; border-color: var(--corp); box-shadow: 0 0 0 3px var(--corp-bg); }
.filter-input::placeholder { color: var(--muted); }
.filter-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.filter-timestamp { font-size: 12px; color: var(--muted); }
.filter-buttons { display: flex; gap: 8px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.panel-title { font-size: 14px; font-weight: 600; }
.panel-count { font-size: 13px; color: var(--fg-secondary); }
.panel-count strong { color: var(--corp); font-weight: 600; }
.panel-body { flex: 1; overflow-y: auto; }
.panel-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-light); background: var(--bg); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { position: sticky; top: 0; background: var(--bg); padding: 12px 16px; text-align: left; font-weight: 600; color: var(--fg-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); color: var(--fg); }
.data-table tr { cursor: pointer; transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr.selected { background: var(--corp-bg); }

.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.inactive { background: var(--bg); color: var(--muted); }
.status-badge.locked { background: var(--error-bg); color: var(--error); }

.checkbox-cell { width: 40px; text-align: center; }
.checkbox-cell input { width: 18px; height: 18px; accent-color: var(--corp); cursor: pointer; }

.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 14px 24px; background: var(--fg); color: white; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); opacity: 0; transition: all var(--transition-slow); z-index: 1000; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }

.info-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--corp-bg); border: 1px solid var(--corp-border); border-radius: var(--radius-md); margin-bottom: 20px; font-size: 14px; color: var(--corp); }
.info-banner svg { flex-shrink: 0; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; color: var(--muted); text-align: center; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty-state-desc { font-size: 14px; }

.dirty-indicator { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--warning-bg); color: var(--warning); border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; }

/* Utility Classes */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.font-mono { font-family: monospace; font-size: 12px; }
.font-semibold { font-weight: 600; }
.row-error { background: var(--error-bg); }