.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;
  box-shadow: none;
  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);
  border-color: var(--interactive-hover-border);
  color: var(--text-main);
  box-shadow: var(--interactive-shadow-hover);
}

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

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


.sidebar-link.active .sidebar-link-icon {
  color: var(--text-main);
}

.sidebar-link.active:hover {
  background: var(--interactive-selected-bg);
  border-color: var(--interactive-selected-border);
}

.sidebar-link:focus-visible {
  outline: none;
  border-color: var(--interactive-selected-border);
  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);
}

.page-header {
  flex: 0 0 auto;
  min-height: var(--space-8);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
  margin: 0;
}

.page-title {
  align-self: center;
  font-size: var(--font-size-main);
  font-weight: var(--font-weight-strong);
  color: var(--text-main);
}

.page-header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  align-self: center;
  gap: var(--space-2);
}

.work-page {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  display: grid;
  gap: var(--panel-gap);
  align-items: stretch;
  --panel-span-3-width: calc(25% - (var(--panel-gap) * 0.75));
}

.work-page.one-col {
  grid-template-columns: 1fr;
}

.work-page.grid-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.work-page.layout-66,
.work-page.layout-39,
.work-page.layout-93,
.work-page.layout-633 {
  display: grid;
  width: 100%;
  gap: var(--panel-gap);
  height: 100%;
  min-height: 0;
}

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

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

.work-page.layout-39,
.work-page.layout-93,
.work-page.layout-633 {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.work-page.layout-39 > :nth-child(1) {
  grid-column: 1 / span 3;
}

.work-page.layout-39 > :nth-child(2) {
  grid-column: 4 / span 9;
}

.work-page.layout-93 > :nth-child(1) {
  grid-column: 1 / span 9;
}

.work-page.layout-93 > :nth-child(2) {
  grid-column: 10 / span 3;
}

.work-page.layout-633 > :nth-child(1) {
  grid-column: 1 / span 6;
}

.work-page.layout-633 > :nth-child(2) {
  grid-column: 7 / span 3;
}

.work-page.layout-633 > :nth-child(3) {
  grid-column: 10 / span 3;
}

.work-page.layout-66 > *,
.work-page.layout-39 > *,
.work-page.layout-93 > *,
.work-page.layout-633 > * {
  min-width: 0;
}
.panel-slot {
  position: static;
  min-height: 0;
  height: 100%;
}

.panel-slot > .panel {
  width: 100%;
  height: 100%;
}

.filter-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  display: grid;
  grid-template-rows: var(--panel-head-height) minmax(0, 1fr);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 40;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
}

.filter-overlay.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

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

/* 모바일은 /m/* 별도 라우트에서 처리 — 데스크탑 페이지는 모바일 변환 안 함 */
