html {
  background: #eef8ff;
}

body {
  margin: 0;
  font-feature-settings: "kern" 1;
}

* {
  box-sizing: border-box;
}

/* Global dashed focus outline — Figma signature pattern */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px dashed #0ea5e9;
  outline-offset: 2px;
}

/* ── Shell Content: Light Work Panel Base ── */

.shell-content {
  word-break: keep-all;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 165, 233, 0.22) transparent;
}

.shell-content::-webkit-scrollbar {
  width: 8px;
}

.shell-content::-webkit-scrollbar-track {
  background: transparent;
}

.shell-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.22);
}

aside {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.3s;
}

aside:hover {
  scrollbar-color: rgba(14, 165, 233, 0.22) transparent;
}

aside::-webkit-scrollbar {
  width: 4px;
}

aside::-webkit-scrollbar-track {
  background: transparent;
}

aside::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
  transition: background 0.3s;
}

aside:hover::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.22);
}

/* Grid gap rhythm */
.shell-content > section,
.shell-content > main,
.shell-content > article,
.shell-content > div {
  display: grid;
  gap: 1.5rem;
}

/* Card border-radius: 1.75rem (Design Context contract) */
.shell-content section,
.shell-content article,
.shell-content details,
.shell-content form,
.shell-content pre {
  border-radius: 1.75rem;
}

/* White card surfaces with minimal border */
.shell-content > section,
.shell-content > main,
.shell-content article,
.shell-content details,
.shell-content form,
.shell-content ul > li > article,
.shell-content pre {
  border: 1px solid rgba(228, 228, 231, 0.82);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px -30px rgba(14, 116, 144, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.shell-content > section,
.shell-content > main,
.shell-content article,
.shell-content details,
.shell-content form,
.shell-content ul > li > article {
  padding: 1.5rem;
}

/* ── Typography: Pretendard + Geist ── */

.shell-content h1,
.shell-content h2,
.shell-content h3 {
  margin: 0;
  color: #0f172a;
  font-family: "Geist", "Pretendard", system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.shell-content h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
}

.shell-content h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 540;
}

.shell-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.shell-content p,
.shell-content li,
.shell-content label,
.shell-content summary,
.shell-content dd,
.shell-content dt {
  margin: 0;
  color: #3f3f46;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.shell-content a {
  color: #0369a1;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.shell-content a:hover {
  color: #334155;
}

.shell-content ul,
.shell-content ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.shell-content pre {
  margin: 0;
  padding: 1.15rem;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #1e293b;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}

/* ── Mono Labels ── */
.shell-content .mono-label {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

/* ── Forms ── */

.shell-content form {
  display: grid;
  gap: 1rem;
}

.shell-content input,
.shell-content textarea,
.shell-content select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(212, 212, 216, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font: inherit;
  letter-spacing: -0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shell-content textarea {
  min-height: 7rem;
  resize: vertical;
}

/* Dashed focus outline — Figma signature pattern */
.shell-content input:focus,
.shell-content textarea:focus,
.shell-content select:focus {
  outline: none;
  border-color: #0ea5e9;
  outline: 2px dashed #0ea5e9;
  outline-offset: 1px;
}

/* ── Buttons: Pill Geometry ── */

.shell-content .button_to {
  display: inline-block;
  max-width: 100%;
}

.shell-content button,
.shell-content input[type="submit"],
.shell-content .button_to button {
  min-height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: #0ea5e9;
  color: #f8fafc;
  cursor: pointer;
  padding: 0 1.5rem;
  font-family: "Pretendard", system-ui, sans-serif;
  font-weight: 450;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 36px -24px rgba(14, 165, 233, 0.38);
}

.shell-content :where(
  button,
  input[type="submit"],
  .button_to button,
  a[class*="rounded-full"],
  a[class*="rounded-pill"]
) {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-content button:hover,
.shell-content input[type="submit"]:hover,
.shell-content .button_to button:hover {
  background: #0284c7;
}

/* Dashed focus for buttons */
.shell-content button:focus-visible,
.shell-content input[type="submit"]:focus-visible,
.shell-content .button_to button:focus-visible {
  outline: 2px dashed #0ea5e9;
  outline-offset: 2px;
}

/* White/outline button variant */
.shell-content .btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.shell-content .btn-outline:hover {
  background: #f5f5f5;
}

/* Glass button variant */
.shell-content .btn-glass {
  background: rgba(14, 165, 233, 0.1);
  color: #075985;
  border: none;
}

.shell-content .btn-glass:hover {
  background: rgba(14, 165, 233, 0.16);
}

/* ── Admin data tables ── */

.shell-content .admin-data-table {
  table-layout: fixed;
}

.shell-content .admin-data-table th,
.shell-content .admin-data-table td {
  min-width: 0;
}

.shell-content .admin-data-table .admin-action-column {
  width: 10rem;
  min-width: 10rem;
}

.shell-content .admin-data-table .admin-action-column--compact {
  width: 7.5rem;
  min-width: 7.5rem;
}

.shell-content .admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.shell-content .admin-table-actions :where(a, button, input[type="submit"], .button_to button) {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.shell-content .admin-table-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-shell {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8fdff 0%, #eef8ff 48%, #f3fbf6 100%);
}

/* ── Dashed Focus: Global ── */
.shell-content *:focus-visible {
  outline: 2px dashed #0ea5e9;
  outline-offset: 2px;
}

/* Override for inputs which have their own focus style */
.shell-content input:focus-visible,
.shell-content textarea:focus-visible,
.shell-content select:focus-visible {
  outline: 2px dashed #0ea5e9;
  outline-offset: 1px;
}

/* ── Responsive ── */

@media (max-width: 860px) {
  .shell-content {
    padding-bottom: 1rem;
  }

  header[role="banner"] {
    inset: 0.75rem 0.75rem auto;
    min-height: 4.75rem;
    padding-inline: 1rem;
  }

  aside[aria-label] {
    bottom: 4.25rem;
    left: 0.75rem;
    top: 6rem;
    width: 4.75rem;
    padding: 0.75rem;
  }

  main#main-content {
    bottom: 4.25rem;
    left: 6rem;
    right: 0.75rem;
    top: 6rem;
    padding: 1rem 1rem 2rem;
  }

  footer[role="contentinfo"] {
    inset-inline: 0.75rem;
    bottom: 0.75rem;
  }
}

@media (max-width: 560px) {
  aside[aria-label] {
    bottom: auto;
    right: 0.75rem;
    width: auto;
    max-height: 5.25rem;
  }

  main#main-content {
    left: 0.75rem;
    top: 12rem;
  }
}
