/* SCOP Platform — layout shell (hybrid: dark sidebar + light workspace) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns 200ms ease;
}

.app-shell > * {
  min-height: 0;
}

/* Sidebar shell → styles/sidebar.css */

/* ── Light workspace ─────────────────────────────────────── */

.main-workspace,
.main-pane {
  flex: 1;
  background: var(--color-workspace);
  color: var(--color-text-primary);
  padding: 0;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.workspace-pane {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.5rem 1.75rem;
}

#dashboard-workspace.workspace-pane {
  overflow: hidden;
  padding: 0;
}

.workspace-pane.is-hidden {
  display: none !important;
}

#dashboard-workspace.workspace-pane {
  overflow: hidden;
  padding: 0;
}

@media (max-width: 767px) {
  .workspace-pane {
    padding: 1rem;
  }
}

.main-workspace.case-view-active,
#imports-workspace.case-view-active {
  padding: 0;
  overflow: hidden;
  background: var(--color-surface);
}

.main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.main-header h1 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.search-input {
  flex: 1;
  max-width: 320px;
}

.table-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.table-wrap {
  overflow-x: auto;
}

.empty-row td {
  text-align: center;
  padding: 3rem 1.5rem !important;
  height: auto !important;
}

.empty-title {
  margin: 0 0 0.5rem;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.empty-hint {
  margin: 0 0 1rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  max-width: 36rem;
  margin-inline: auto;
}

.empty-hint code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.theme-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ── Light panel: detail empty state ─────────────────────── */

.detail-panel-content.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--color-text-secondary);
}

.detail-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  margin-bottom: 1.25rem;
  color: #9ca3af;
}

.detail-empty-icon svg {
  width: 100%;
  height: 100%;
}

.detail-empty-title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.detail-empty-desc {
  margin: 0 0 1.5rem;
  font-size: var(--font-size-base);
  line-height: 1.5;
  max-width: 20rem;
  color: var(--color-text-secondary);
}

.btn-detail-new {
  height: var(--btn-height);
  padding: 0 1.25rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-brand-primary);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.btn-detail-new:hover:not(:disabled) {
  background: var(--color-surface-muted);
}

.btn-detail-new:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-detail-new-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.btn-detail-new-icon svg {
  width: 100%;
  height: 100%;
}

/* ── Tam ekran işlem görünümü (wizard benzeri) ───────────── */

.case-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--color-surface);
}

.case-workspace-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.case-workspace-close:hover {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  border-color: #d1d5db;
}

.case-workspace-close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.case-workspace-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
