:root {
  --bg: #f5f7fa;
  --panel: #fff;
  --panel2: #f0f3f7;
  --line: #dfe5ec;
  --text: #1c2530;
  --muted: #687585;
  --blue: #2d65c8;
  --bluebg: #e8f0ff;
  --green: #2b8a57;
  --danger: #b42318;
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.45 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
.shell {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}
.side {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 15px;
  margin: 0 8px 28px;
}
.brandmark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #214e9a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.workspace {
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: var(--radius);
  margin: 0 4px 22px;
}
.workspace small,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.workspace strong {
  display: block;
  margin-top: 4px;
}
.nav-label {
  color: #8894a3;
  font-size: 11px;
  text-transform: uppercase;
  margin: 17px 8px 7px;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav button {
  background: transparent;
  text-align: left;
  color: #506070;
  border-radius: 6px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav button:hover,
.nav button.active {
  background: var(--bluebg);
  color: var(--blue);
}
.nav .count {
  margin-left: auto;
  color: #8a97a6;
  font-size: 11px;
}
.side-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 7px 0;
  color: var(--muted);
  font-size: 12px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
}
.main {
  min-width: 0;
}
.top {
  height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  background: #ffffffee;
  backdrop-filter: blur(12px);
  z-index: 2;
}
.top-title {
  font-weight: 650;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.server {
  color: var(--muted);
  font-size: 12px;
}
.icon-btn,
.secondary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  color: #526273;
}
.icon-btn:hover,
.secondary:hover {
  border-color: #9ab2d7;
  background: #f8fbff;
}
.content {
  max-width: 1420px;
  margin: 0 auto;
  padding: 32px;
}
.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.heading h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 3px 0 0;
}
.heading p {
  color: var(--muted);
  margin: 7px 0 0;
}
.primary {
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  padding: 10px 15px;
  font-weight: 700;
}
.primary:hover {
  background: #2455aa;
}
.page-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  min-width: 210px;
  outline: none;
}
.search:focus,
input:focus,
textarea:focus {
  border-color: #7397d1;
  outline: 2px solid #dbe8fb;
  outline-offset: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  min-height: 150px;
  box-shadow: 0 1px 2px #1c253008;
}
.editable-card {
  cursor: pointer;
}
.editable-card:hover,
.editable-card:focus {
  border-color: #82a5d9;
  box-shadow: 0 4px 16px #3568a51a;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.card h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.preview {
  height: 145px;
  border-radius: 6px;
  background: #f0f3f7;
  border: 1px solid var(--line);
  margin: 14px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.preview img,
.preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-icon {
  font-size: 38px;
  color: var(--blue);
}
.meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  gap: 10px;
}
.edit-hint {
  color: var(--blue);
}
.badge {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf2fa;
  color: #46648f;
}
.badge.green {
  background: #e3f4e9;
  color: #247447;
}
.empty {
  border: 1px dashed #afbdcd;
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  color: var(--text);
  display: block;
  margin-bottom: 5px;
}
.upload-zone {
  border: 1px dashed #8da9cf;
  border-radius: var(--radius);
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f1f6ff;
  margin-bottom: 18px;
}
.upload-zone label {
  cursor: pointer;
}
.tabs {
  display: flex;
  gap: 7px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--blue);
  border-color: var(--blue);
}
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 16px;
}
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 245px;
}
.hero-card h2 {
  font-size: 24px;
  margin: 10px 0;
}
.hero-card p {
  color: var(--muted);
  max-width: 600px;
}
.progress {
  height: 8px;
  background: #e8edf3;
  border-radius: 99px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: #4d83d7;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0 7px;
}
.stage-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}
.stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.stage .state {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9edf2;
  color: var(--muted);
  font-size: 11px;
}
.stage.done .state {
  background: #e0f2e7;
  color: var(--green);
}
.stage span:nth-child(2) {
  flex: 1;
}
.stage small {
  display: block;
}
.continue {
  font-size: 11px;
  background: transparent;
  color: var(--blue);
  padding: 4px;
}
.continue:disabled {
  color: #a9b3bf;
  cursor: not-allowed;
}
.note-box {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.note-box textarea {
  flex: 1;
  min-height: 80px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px;
  resize: vertical;
}
.note-box button {
  align-self: end;
  background: var(--bluebg);
  color: var(--blue);
  padding: 9px 13px;
  border-radius: 6px;
}
.note {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 9px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #e4f3e9;
  color: #175b36;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 10px 35px #172b3a22;
  z-index: 9;
}
.toast.bad {
  background: #fde9e7;
  color: var(--danger);
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(420px, calc(100% - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.login-card h1 {
  margin: 0 0 8px;
}
.login-card p {
  color: var(--muted);
}
.login-card input {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #16233766;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
}
.editor {
  width: min(760px, 100%);
  max-height: min(900px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 70px #16233755;
}
.editor-head,
.editor-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.editor-head h2 {
  margin: 4px 0;
  font-size: 20px;
}
.editor-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.editor-body {
  padding: 20px 22px;
  overflow: auto;
  display: grid;
  gap: 14px;
}
.editor-body label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}
.editor-body input,
.editor-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  font-weight: 400;
}
.editor-body textarea {
  min-height: 75px;
  resize: vertical;
}
.code-editor {
  min-height: 260px !important;
  font:
    12px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  white-space: pre;
}
.editor-preview {
  max-height: 260px;
  background: #f2f5f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.editor-preview img,
.editor-preview video {
  max-width: 100%;
  max-height: 260px;
}
.editor-preview audio {
  width: 90%;
}
.editor-actions {
  display: flex;
  gap: 8px;
}
.editor-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}
.history {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: sticky;
    top: 0;
    z-index: 3;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }
  .brand {
    margin-bottom: 10px;
  }
  .workspace,
  .nav-label,
  .side-foot {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
  }
  .nav button {
    white-space: nowrap;
  }
  .main .top {
    padding: 0 16px;
  }
  .content {
    padding: 22px 16px;
  }
  .overview {
    grid-template-columns: 1fr;
  }
  .top .server {
    display: none;
  }
}
@media (max-width: 560px) {
  .heading {
    align-items: start;
    flex-direction: column;
  }
  .heading h1 {
    font-size: 23px;
  }
  .page-tools {
    width: 100%;
  }
  .search {
    flex: 1;
    min-width: 0;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 0;
  }
  .editor {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }
  .editor-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .editor-actions {
    justify-content: flex-end;
  }
}
