:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #eef1f5;
  color: #1f2328;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(238,241,245,.96)),
    #eef1f5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.mac-panel {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(191, 199, 212, .8);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(33, 43, 54, .12);
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
}

.traffic-lights {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.red { background: #ff5f57; }
.yellow { background: #febc2e; }
.green { background: #28c840; }

.eyebrow {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.muted,
.panel-head p {
  color: #6b7280;
  line-height: 1.6;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255,255,255,.94);
  color: #111827;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5b8def;
  box-shadow: 0 0 0 3px rgba(91,141,239,.18);
}

.primary,
.ghost {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
}

.primary {
  background: #0a84ff;
  color: #fff;
}

.ghost {
  background: rgba(255,255,255,.54);
  color: #334155;
  border: 1px solid rgba(203,213,225,.9);
}

.ghost-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  color: #b42318;
}

.admin-view {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 14px;
  background: rgba(242,244,248,.88);
  border-right: 1px solid #d8dee8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 12px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #64748b;
  font-size: 12px;
}

.app-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a84ff, #0066cc);
  color: #fff;
  font-weight: 800;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 5px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  padding: 10px 12px;
  text-align: left;
  font-weight: 650;
}

.nav-item:hover {
  background: rgba(255,255,255,.7);
}

.nav-item.active {
  background: #dbeafe;
  color: #0f4fb8;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.pill.ok {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 16px;
}

.mac-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 2px;
}

.span-2 {
  grid-column: 1 / -1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.content-card,
.list-item {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  padding: 14px;
}

.content-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 10px;
}

.content-card audio {
  width: 100%;
  margin-top: 10px;
}

.card-title {
  margin: 0 0 6px;
  font-weight: 800;
}

.meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 6px;
}

.list-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.empty {
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  background: rgba(255,255,255,.55);
}

@media (max-width: 900px) {
  .admin-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 16px;
  }

  .form-grid,
  .toolbar,
  .panel-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }
}
