:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --button-tooltip-delay: 0.7s;
  --semantic-tooltip-delay: 0.28s;
  --panel-header-height: 2.25rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #1f2933;
  height: 100vh;
  overflow: hidden;
}

body.studio-layout-pending .studio-page {
  visibility: hidden;
}

.page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  background: #111827;
  border-bottom: 1px solid #020617;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  min-width: 12rem;
  color: #f8fafc;
  text-decoration: none;
}

.toolbar-brand:hover,
.toolbar-brand:focus-visible {
  text-decoration: none;
  outline: none;
}
.toolbar-brand:focus-visible {
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.5);
  border-radius: 4px;
}

.toolbar-brand .brand-mark {
  position: relative;
  top: -1px;
  flex: none;
  color: #a78bfa;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.35));
}

.title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  background: linear-gradient(120deg, #93c5fd 0%, #c4b5fd 60%, #e9d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  position: relative;
  left: 0.4rem;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.class-filter {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}

.filter-box {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-box input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.38rem 2rem 0.38rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  width: 100%;
  max-width: none;
  background: #ffffff;
}

.filter-box input::placeholder {
  color: #94a3b8;
}

.filter-box input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.input-clear {
  position: absolute;
  right: 0.38rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.input-clear.visible {
  opacity: 1;
  pointer-events: auto;
}

.input-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.input-clear:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.toolbar-icon {
  position: relative;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.toolbar-icon:hover {
  background: #334155;
  border-color: #475569;
  color: #ffffff;
}

.toolbar-icon.active {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
}

.toolbar-icon:disabled {
  color: #64748b;
  cursor: default;
  opacity: 0.8;
}

.toolbar-icon:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.toolbar-icon svg,
.toolbar-icon .app-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-icon.loading svg {
  animation: spin 0.9s linear infinite;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.12rem;
  border-left: 1px solid #cbd5e1;
  margin-left: 0;
  padding-left: 0.65rem;
}

.view-button {
  position: relative;
  width: auto;
  height: 1.75rem;
  border: 0;
  background: transparent;
  color: #475569;
  border-radius: 6px;
  padding: 0 0.48rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 650;
  transition: background 0.18s ease, color 0.18s ease;
}

.view-button:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.view-button.active {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.view-button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.view-button svg,
.view-button .app-icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.statusbar {
  min-height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.18rem 0.75rem;
  border-top: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 500;
}

.status-message {
  color: #334155;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.statusbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.status-warning {
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.72);
  color: #92400e;
  font: inherit;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
}

.status-warning.hidden {
  display: none;
}

.status-warning:hover,
.status-warning:focus-visible,
.status-warning[aria-expanded="true"] {
  background: rgba(253, 230, 138, 0.95);
  border-color: rgba(217, 119, 6, 0.52);
  outline: none;
}

.warnings-panel {
  position: fixed;
  left: 0.65rem;
  bottom: 2.2rem;
  z-index: 80;
  width: min(34rem, calc(100vw - 1.3rem));
  max-height: min(22rem, calc(100vh - 5rem));
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
}

.warnings-panel.hidden {
  display: none;
}

.warnings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warnings-list {
  max-height: 18rem;
  overflow: auto;
  padding: 0.45rem;
}

.warning-item {
  padding: 0.55rem 0.65rem;
  border-radius: 7px;
  background: rgba(254, 243, 199, 0.5);
}

.warning-item + .warning-item {
  margin-top: 0.4rem;
}

.warning-item-title {
  color: #92400e;
  font-weight: 750;
  font-size: 0.78rem;
}

.warning-item-message,
.warning-item-recommendation {
  margin-top: 0.25rem;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.4;
}

.warning-item-recommendation {
  color: #64748b;
}

.status-file {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #334155;
}

.status-file-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.status-file-icon svg {
  width: 0.82rem;
  height: 0.82rem;
}

.status-file-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.statusbar-right {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.theme-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  padding: 0.08rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
}

.theme-button {
  position: relative;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.theme-button:hover,
.theme-button:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
  outline: none;
}

.theme-button.active {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.theme-button .app-icon {
  width: 0.82rem;
  height: 0.82rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-item {
  color: #64748b;
  white-space: nowrap;
}

.status-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.status-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.status-link:disabled {
  color: #94a3b8;
  cursor: default;
  text-decoration: none;
}

.status-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
  border-radius: 3px;
}
