.auth-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  background: var(--surface-sidebar);
}

.sidebar-head { display: none; }

.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-2);
  gap: var(--space-2);
}

.sidebar-link {
  position: relative;
  min-height: var(--height-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  font-size: var(--font-size-main);
  font-weight: var(--font-weight-base);
  color: var(--text-main);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-ui);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.sidebar-link-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
}

.sidebar-link-svg { width: 18px; height: 18px; display: block; }
.sidebar-link-label { min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-link:hover {
  background: var(--interactive-hover-bg);
  color: var(--text-main);
}
.sidebar-link:hover .sidebar-link-icon { color: var(--text-main); }

.sidebar-link.active {
  background: var(--interactive-selected-bg);
  color: var(--text-main);
  font-weight: var(--font-weight-strong);
}
.sidebar-link.active .sidebar-link-icon { color: var(--text-main); }

.sidebar-link:focus-visible {
  outline: none;
  box-shadow: var(--interactive-shadow-focus);
}

.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

.main-shell {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-4) var(--space-4);
  gap: var(--space-4);
}

.work-page {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: grid;
  gap: var(--panel-gap);
  align-items: stretch;
}

.work-page.layout-66 {
  display: flex !important;
  gap: 0 !important;
}
.work-page.layout-66 > .panel:first-child { flex: 0 0 auto; width: 50%; min-width: 200px; }
.work-page.layout-66 > .panel:last-child { flex: 1 1 0; min-width: 300px; }

/* 리사이즈 핸들 — 좌우 여백(12px)과 동일 */
.panel-resize-handle {
  flex: 0 0 var(--space-3, 12px);
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 5;
}
.panel-resize-handle:hover,
.panel-resize-handle.is-dragging {
  background: rgba(43, 58, 82, 0.06);
}
.panel-resize-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 28px;
  border-radius: 1px;
  background: rgba(43, 58, 82, 0.15);
  opacity: 0;
  transition: opacity 0.15s;
}
.panel-resize-handle:hover::after,
.panel-resize-handle.is-dragging::after {
  opacity: 1;
}
.work-page.one-col { grid-template-columns: 1fr; }

.min-h-work { min-height: 0; height: 100%; }

.sidebar-group { display: flex; flex-direction: column; }
.sidebar-bottom { margin-top: auto; padding: var(--space-2); }

@media (max-width: 600px) {
  .dashboard-shell { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-soft); }
  .main-area { height: auto; overflow: visible; }
  .main-shell { flex: none; min-height: unset; overflow: visible; }
  .work-page.layout-66 { grid-template-columns: 1fr !important; }
}
