:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-soft: #fafbfd;
  --line: #dfe5ee;
  --line-strong: #2563eb;
  --text: #18212f;
  --muted: #6b7280;
  --muted-soft: #9aa4b2;
  --success: #1f9d55;
  --danger: #dc2626;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --color-surface: var(--panel);
  --color-surface-soft: var(--panel-soft);
  --color-border: var(--line);
  --color-text: var(--text);
  --color-muted: var(--muted);
  --shadow-panel: var(--shadow);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Pretendard", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
}

#workspace-root {
  min-height: 100%;
  height: 100%;
}

.workspace-legacy-shell {
  height: 100%;
  min-height: 0;
}

.workspace-settings-popover {
  top: 82px;
  right: 24px;
  left: auto;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toast button {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.workspace-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg);
}

.workspace-topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.workspace-topbar__brand {
  min-width: 0;
}

.workspace-topbar__title {
  font-size: 1.2rem;
  font-weight: 800;
}

.workspace-topbar__subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-topbar__dialect {
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.workspace-command-btn,
.workspace-icon-btn {
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 700;
}

.workspace-command-btn:disabled,
.workspace-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.workspace-command-btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.workspace-command-btn--accent {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.workspace-content {
  display: grid;
  grid-template-columns: minmax(360px, 34%) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.workspace-view__editor,
.workspace-view__diagram {
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

.workspace-view__editor {
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.workspace-view__diagram {
  background: var(--panel-soft);
}

.workspace-diagram-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.workspace-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workspace-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.workspace-panel__header h2 {
  margin: 0;
  font-size: 1rem;
}

.workspace-panel__header span {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.workspace-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-panel__actions button {
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 0 10px;
}

.workspace-panel__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.workspace-canvas {
  position: relative;
  height: 360px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.11) 1px, transparent 1px),
    #f8fafc;
  background-size: 24px 24px;
  overflow: hidden;
}

.workspace-panel--sql {
  min-height: 260px;
}

.workspace-sql-output {
  margin: 0;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 18px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.workspace-sql-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.workspace-settings {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 30;
  width: min(340px, calc(100vw - 48px));
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.workspace-settings__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.workspace-settings__header h2 {
  margin: 0;
  font-size: 1rem;
}

.workspace-settings__header p,
.workspace-settings__note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.workspace-settings__field {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: #334155;
}

.workspace-settings__field select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel-soft);
}

.workspace-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.workspace-toast--success {
  background: #166534;
}

.workspace-toast--error {
  background: #991b1b;
}

.workspace-toast button {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.workspace-empty-lines {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.workspace-empty-lines__number {
  color: var(--muted-soft);
  font-size: 0.875rem;
  text-align: right;
}

.workspace-empty-lines__input {
  width: 100%;
  min-width: 0;
  border: 1px dashed var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  padding: 8px 10px;
  font: inherit;
}

.workspace-empty-lines__message {
  grid-column: 2 / -1;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-block {
  margin-right: 10px;
}

.brand-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.brand-subtitle {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.toolbar-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-btn,
.account-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.toolbar-btn:hover,
.account-btn:hover,
.icon-btn:hover,
.dropdown-item:hover {
  border-color: #c5d1e3;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.toolbar-btn.primary,
.toolbar-btn.accent,
.auth-submit {
  border: none;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.toolbar-btn.accent {
  background: linear-gradient(135deg, #0f766e, #0d9488);
}

.toolbar-control {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
}

.control-label {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.control-input {
  min-width: 170px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--panel-soft);
  outline: none;
}

.control-input:focus,
.auth-field input:focus,
.input-field:focus {
  border-color: #7aa2ff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.compact-control .control-input {
  min-width: 190px;
}

.user-pill {
  padding-right: 6px;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.caret {
  font-size: 0.8rem;
  color: var(--muted);
}

.switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #d4dae4;
  border-radius: 999px;
  transition: 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  transition: 0.2s ease;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.main-container {
  display: flex;
  height: calc(100vh - 78px);
}

.left-panel,
.right-panel {
  padding: 28px 30px;
  overflow-y: auto;
}

.left-panel {
  width: 30%;
  background: #fff;
  border-right: 1px solid var(--line);
}

.right-panel {
  width: 70%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #3b82f6;
}

.panel-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.panel-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 38px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #c7dbff;
}

.status-pill {
  background: #f8fafc;
  color: #475569;
  border-color: var(--line);
}

.status-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-banner.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.card-surface {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.editor-toolbar {
  margin-bottom: 18px;
}

.editor-hint-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #d4e3ff;
  color: #345;
  font-size: 0.92rem;
}

.hint-strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.editor-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.line-item {
  --indent-size: 0px;
}

.line-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: var(--indent-size);
  transition: margin-left 0.18s ease;
}

.line-number {
  width: 30px;
  text-align: right;
  color: var(--muted-soft);
  font-weight: 700;
  user-select: none;
}

.input-field {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2px solid #d7dee9;
  outline: none;
  background: #fff;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.95rem;
  transition: 0.18s ease;
}

.line-item[data-indent="1"] .input-field,
.line-item[data-indent="2"] .input-field,
.line-item[data-indent="3"] .input-field,
.line-item[data-indent="4"] .input-field {
  background: #fbfdff;
  border-left-color: #3b82f6;
}

.delete-line-btn,
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.delete-line-btn:hover {
  color: var(--danger);
  border-color: #fecaca;
}

.response-msg {
  display: none;
  margin-left: calc(42px + var(--indent-size));
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.response-msg.status-success {
  display: block;
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #b7ebc6;
}

.response-msg.status-error {
  display: block;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.response-msg.status-loading {
  display: block;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.diagram-section {
  padding: 18px;
}

.section-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
}

.section-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.section-collapse-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
}

.section-action-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
}

.collapsible-content {
  display: block;
}

.collapsible-content.collapsed {
  display: none;
}

.diagram-root {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 18px;
  border: 1px solid #e6eaf0;
  background: linear-gradient(180deg, #fff, #fbfdff);
  overflow: hidden;
}

.diagram-canvas-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.diagram-canvas-shell > svg {
  width: 100%;
  height: 100%;
  display: block;
}

.diagram-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.diagram-zoom-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.diagram-zoom-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

#diagram-canvas,
#relational-diagram-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.diagram-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-soft);
  font-size: 1.05rem;
}

.repo-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.repo-col {
  padding: 18px;
}

.repo-primary .repo-view {
  min-height: 420px;
  max-height: 420px;
}

.repo-secondary .repo-view {
  min-height: 248px;
  max-height: 248px;
}

.repo-view {
  min-height: 248px;
  max-height: 248px;
  overflow: auto;
}

.repo-empty {
  margin: 0;
  color: var(--muted-soft);
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
}

.sql-output {
  margin: 0;
  min-height: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #0f172a;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.storage-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.storage-card + .storage-card {
  margin-top: 12px;
}

.storage-line {
  font-size: 0.75rem;
  color: var(--muted-soft);
  margin-bottom: 6px;
}

.storage-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.storage-details {
  font-size: 0.87rem;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.dropdown-menu {
  position: fixed;
  z-index: 50;
  min-width: 220px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.dropdown-header {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.dropdown-content {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
  padding: 6px 2px;
}

.dropdown-item {
  width: 100%;
  height: 38px;
  text-align: left;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 10px;
  padding: 0 10px;
}

.dropdown-item.danger {
  color: var(--danger);
}

.settings-dropdown {
  min-width: 260px;
}

.export-dropdown {
  min-width: 180px;
}

.settings-field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #334155;
}

.settings-save-btn {
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.34);
  display: grid;
  place-items: center;
}

.modal-panel {
  width: min(720px, calc(100vw - 40px));
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

.modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.project-create-box {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.project-create-box .control-input {
  flex: 1;
  min-width: 0;
}

.project-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfcfe;
}

.project-row.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.project-row-main {
  min-width: 0;
}

.project-row-title {
  font-weight: 700;
}

.project-row-meta {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.project-row-actions {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  min-width: 240px;
  max-width: calc(100vw - 40px);
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: white;
  z-index: 80;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, #dbeafe, #f3f5f9 38%);
}

.auth-shell {
  width: min(460px, 100%);
}

.auth-card {
  background: white;
  padding: 34px;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.auth-brand {
  font-size: 1rem;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 14px;
}

.auth-card h1 {
  margin: 0;
  font-size: 2rem;
}

.auth-description {
  margin: 10px 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: #334155;
}

.auth-field input {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: none;
  background: #fcfdff;
}

.auth-submit {
  height: 48px;
  border-radius: 14px;
  font-weight: 700;
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.auth-message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  display: none;
}

.auth-message.visible {
  display: block;
}

.auth-message.error {
  background: #fef2f2;
  color: #b91c1c;
}

.workspace-select-page {
  padding: 32px 16px;
}

.workspace-select-shell {
  max-width: 960px;
  margin: 0 auto;
}

.workspace-select-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.workspace-select-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.workspace-select-create {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.workspace-select-create .control-input {
  flex: 1;
  min-width: 0;
}

.workspace-select-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.workspace-select-list {
  display: grid;
  gap: 12px;
}

.workspace-select-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px 20px;
  text-align: left;
  transition: 0.2s ease;
}

.workspace-select-item:hover {
  border-color: #c5d1e3;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.workspace-select-item-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace-select-item-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.workspace-select-item-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.workspace-selected-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-weight: 700;
}

.workspace-select-item-action {
  color: #1d4ed8;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-select-empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 20px;
}

.landing-page {
  min-height: 100vh;
  padding: 36px 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(13, 148, 136, 0.14), transparent 24%),
    linear-gradient(180deg, #f8fbff, #eef3f9);
}

.landing-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.landing-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.landing-copy {
  padding: 24px 8px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.landing-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.landing-description {
  max-width: 680px;
  margin: 22px 0 0;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.8;
}

.landing-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.landing-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-decoration: none;
  font-weight: 700;
}

.landing-preview {
  padding: 24px;
  border-radius: 28px;
}

.landing-preview-header {
  margin-bottom: 18px;
}

.landing-preview-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #334155;
}

.landing-flow {
  display: grid;
  gap: 14px;
}

.landing-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
}

.landing-step-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

.landing-step strong {
  display: block;
  margin-bottom: 6px;
}

.landing-step p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .topbar {
    height: auto;
    padding: 18px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .topbar-left,
  .topbar-right {
    flex-wrap: wrap;
  }

  .main-container {
    height: calc(100vh - 128px);
  }
}

@media (max-width: 980px) {
  .main-container {
    flex-direction: column;
    height: auto;
  }

  .left-panel,
  .right-panel {
    width: 100%;
    height: auto;
  }

  .repo-section {
    grid-template-columns: 1fr;
  }

  .workspace-select-header,
  .workspace-select-create,
  .workspace-select-item {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-select-item-action {
    text-align: right;
  }
}

@media (max-width: 980px) {
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px 0;
  }

  .landing-copy,
  .landing-preview {
    padding-left: 0;
    padding-right: 0;
  }
}

/* 서버 장애 안내. 화면 내용을 지우지 않고 위에 띄운다 (serviceNotice.js) */
.service-notice {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.service-notice-button {
  flex-shrink: 0;
  border: 1px solid #b91c1c;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 4px 10px;
  cursor: pointer;
}
