/* ============================================
   레이아웃 공통 스타일 — mia 디자인 시스템
   hub.html 원본 라인 16~681 그대로 이관
   ============================================ */

:root {
  --brand: #2C3344;
  --secondary: #3B4256;
  --tertiary: #6B7285;
  --light: #9CA1B4;
  --tint: #CDD0D9;
  --bg-light: #ECEDF1;
  --background: #F5F6F8;
}

* {
  font-family: 'Noto Sans KR', 'Manrope', sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   SIDEBAR VARIANTS (sb-1 through sb-6)
   ============================================ */

/* SB-1: Dark Sidebar (Default) */
.sb-1 {
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  color: #F3F4F6;
}

.sb-1 .sb-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.sb-1 .sb-logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.sb-1 .sb-logo-subtitle {
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-top: 0.25rem;
  font-weight: 400;
}

.sb-1 .sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sb-1 .sb-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: #D1D5DB;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  margin: 0.25rem 0;
}

.sb-1 .sb-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.sb-1 .sb-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border-left-color: #3B82F6;
  font-weight: 600;
}

.sb-1 .sb-link i {
  width: 1.25rem;
  text-align: center;
}

.sb-1 .sb-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sb-1 .sb-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.sb-1 .sb-user-info {
  flex: 1;
  min-width: 0;
}

.sb-1 .sb-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  display: block;
}

.sb-1 .sb-user-role {
  font-size: 0.75rem;
  color: #9CA3AF;
  display: block;
}

/* SB-2: Light Sidebar */
.sb-2 {
  background: #FFFFFF;
  color: var(--brand);
  border-right: 1px solid var(--tint);
}

.sb-2 .sb-logo { padding: 1.5rem 1.25rem; border-bottom: 1px solid var(--tint); }
.sb-2 .sb-logo-title { font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.sb-2 .sb-logo-subtitle { font-size: 0.75rem; color: var(--light); margin-top: 0.25rem; }
.sb-2 .sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0; }
.sb-2 .sb-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; color: var(--tertiary); text-decoration: none; font-size: 0.9375rem; transition: all 0.3s ease; border-left: 3px solid transparent; margin: 0.25rem 0; }
.sb-2 .sb-link:hover { background: var(--bg-light); color: var(--brand); }
.sb-2 .sb-link.active { background: rgba(59, 130, 246, 0.08); color: #3B82F6; border-left-color: #3B82F6; font-weight: 600; }
.sb-2 .sb-link i { width: 1.25rem; text-align: center; }
.sb-2 .sb-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--tint); display: flex; align-items: center; gap: 0.75rem; }
.sb-2 .sb-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sb-2 .sb-user-info { flex: 1; min-width: 0; }
.sb-2 .sb-user-name { font-size: 0.875rem; font-weight: 600; color: var(--brand); }
.sb-2 .sb-user-role { font-size: 0.75rem; color: var(--light); }

/* SB-3: Left Accent Sidebar */
.sb-3 { background: #FFFFFF; color: var(--brand); border-right: 1px solid var(--tint); }
.sb-3 .sb-logo { padding: 1.5rem 1.25rem; border-bottom: 2px solid #3B82F6; background: rgba(59, 130, 246, 0.03); }
.sb-3 .sb-logo-title { font-size: 1.25rem; font-weight: 700; color: #3B82F6; }
.sb-3 .sb-logo-subtitle { font-size: 0.75rem; color: var(--light); margin-top: 0.25rem; }
.sb-3 .sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0; }
.sb-3 .sb-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; padding-left: 1rem; color: var(--tertiary); text-decoration: none; font-size: 0.9375rem; transition: all 0.3s ease; border-left: 4px solid transparent; margin: 0.25rem 0; }
.sb-3 .sb-link:hover { background: var(--bg-light); color: var(--brand); border-left-color: #06B6D4; }
.sb-3 .sb-link.active { background: rgba(59, 130, 246, 0.08); color: #3B82F6; border-left-color: #3B82F6; font-weight: 600; }
.sb-3 .sb-link i { width: 1.25rem; text-align: center; }
.sb-3 .sb-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--tint); display: flex; align-items: center; gap: 0.75rem; }
.sb-3 .sb-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sb-3 .sb-user-info { flex: 1; min-width: 0; }
.sb-3 .sb-user-name { font-size: 0.875rem; font-weight: 600; color: var(--brand); }
.sb-3 .sb-user-role { font-size: 0.75rem; color: var(--light); }

/* SB-4: Rounded Pill Sidebar */
.sb-4 { background: #FFFFFF; color: var(--brand); border-right: 1px solid var(--tint); }
.sb-4 .sb-logo { padding: 1.5rem 1.25rem; border-bottom: 1px solid var(--tint); }
.sb-4 .sb-logo-title { font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.sb-4 .sb-logo-subtitle { font-size: 0.75rem; color: var(--light); margin-top: 0.25rem; }
.sb-4 .sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0.75rem; }
.sb-4 .sb-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--tertiary); text-decoration: none; font-size: 0.9375rem; transition: all 0.3s ease; border-radius: 24px; margin: 0.25rem 0; }
.sb-4 .sb-link:hover { background: var(--bg-light); color: var(--brand); }
.sb-4 .sb-link.active { background: rgba(59, 130, 246, 0.1); color: #3B82F6; font-weight: 600; }
.sb-4 .sb-link i { width: 1.25rem; text-align: center; }
.sb-4 .sb-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--tint); display: flex; align-items: center; gap: 0.75rem; }
.sb-4 .sb-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sb-4 .sb-user-info { flex: 1; min-width: 0; }
.sb-4 .sb-user-name { font-size: 0.875rem; font-weight: 600; color: var(--brand); }
.sb-4 .sb-user-role { font-size: 0.75rem; color: var(--light); }

/* SB-5: Gradient Round */
.sb-5 { background: linear-gradient(180deg, #1E3A5F 0%, #0F1B2D 100%); color: #E2E8F0; }
.sb-5 .sb-logo { padding: 1.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sb-5 .sb-logo-title { font-size: 1.25rem; font-weight: 700; color: #60A5FA; letter-spacing: -0.5px; }
.sb-5 .sb-logo-subtitle { font-size: 0.75rem; color: #64748B; margin-top: 0.25rem; }
.sb-5 .sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0.75rem; }
.sb-5 .sb-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: #94A3B8; text-decoration: none; font-size: 0.9375rem; transition: all 0.3s ease; border-radius: 12px; margin: 0.25rem 0; }
.sb-5 .sb-link:hover { background: rgba(255,255,255,0.05); color: #E2E8F0; }
.sb-5 .sb-link.active { background: rgba(59,130,246,0.2); color: #60A5FA; font-weight: 600; }
.sb-5 .sb-link i { width: 1.25rem; text-align: center; }
.sb-5 .sb-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 0.75rem; }
.sb-5 .sb-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sb-5 .sb-user-info { flex: 1; min-width: 0; }
.sb-5 .sb-user-name { font-size: 0.875rem; font-weight: 600; color: #E2E8F0; display: block; }
.sb-5 .sb-user-role { font-size: 0.75rem; color: #64748B; display: block; }

/* SB-6: Navy Portal */
.sb-6 { background: #0F172A; color: #CBD5E1; }
.sb-6 .sb-logo { padding: 1.5rem 1.25rem; border-bottom: 1px solid #1E293B; background: rgba(0,0,0,0.3); }
.sb-6 .sb-logo-title { font-size: 1.25rem; font-weight: 700; color: #F8FAFC; letter-spacing: -0.5px; }
.sb-6 .sb-logo-subtitle { font-size: 0.75rem; color: #64748B; margin-top: 0.25rem; }
.sb-6 .sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0; }
.sb-6 .sb-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; color: #94A3B8; text-decoration: none; font-size: 0.9375rem; transition: all 0.3s ease; border-left: 3px solid transparent; margin: 0.25rem 0; }
.sb-6 .sb-link:hover { background: #1E293B; color: #F1F5F9; }
.sb-6 .sb-link.active { background: rgba(56,189,248,0.1); color: #38BDF8; border-left-color: #38BDF8; font-weight: 600; }
.sb-6 .sb-link i { width: 1.25rem; text-align: center; }
.sb-6 .sb-footer { padding: 1rem 1.25rem; border-top: 1px solid #1E293B; background: rgba(0,0,0,0.3); display: flex; align-items: center; gap: 0.75rem; }
.sb-6 .sb-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sb-6 .sb-user-info { flex: 1; min-width: 0; }
.sb-6 .sb-user-name { font-size: 0.875rem; font-weight: 600; color: #F1F5F9; display: block; }
.sb-6 .sb-user-role { font-size: 0.75rem; color: #64748B; display: block; }

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--tint);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.topbar-left a {
  color: var(--tertiary);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.topbar-left a:hover {
  color: var(--brand);
}

.topbar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  margin-left: 1rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-search {
  position: relative;
}

.topbar-search input {
  background: var(--background);
  border: 1px solid var(--tint);
  border-radius: 8px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  width: 250px;
  transition: all 0.3s ease;
}

.topbar-search input:focus {
  outline: none;
  border-color: #3B82F6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.topbar-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light);
  font-size: 0.875rem;
}

.topbar-icon-btn {
  background: none;
  border: none;
  color: var(--tertiary);
  cursor: pointer;
  font-size: 1.125rem;
  transition: color 0.3s ease;
  position: relative;
}

.topbar-icon-btn:hover {
  color: var(--brand);
}

.topbar-icon-btn.has-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -8px;
  background: #EF4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================
   CONTENT WRAPPER
   ============================================ */

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

