* {
  box-sizing: border-box;
}
body.workspace-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}
.workspace-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }
  .workspace-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: none;
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: center;
  }
  .workspace-nav h2 {
    width: 100%;
    margin-bottom: 8px;
  }
  .workspace-nav a {
    padding: 8px 12px;
    border-radius: 6px;
  }
}
.workspace-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 0;
}
.workspace-nav h2 {
  margin: 0 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #94a3b8;
}
.workspace-nav a {
  display: block;
  padding: 10px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.workspace-nav a[hidden] {
  display: none;
}
.workspace-nav a:hover,
.workspace-nav a.active {
  background: rgb(255 255 255 / 8%);
  color: #fff;
  border-left-color: #38bdf8;
}
.workspace-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.workspace-header .meta {
  font-size: 13px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.workspace-page-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}
.workspace-meta-sep {
  color: #cbd5e1;
  font-weight: 400;
}
.workspace-header .actions button {
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.workspace-header .actions button.primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.workspace-content {
  padding: 24px;
  flex: 1;
  overflow-x: auto;
  min-width: 0;
}
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}
.card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #334155;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}
.stat .n {
  font-size: 22px;
  font-weight: 800;
  color: #2563eb;
}
.stat .l {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
table.data th {
  color: #64748b;
  font-weight: 600;
}
.row-actions button {
  margin-right: 6px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}
.form-row {
  margin-bottom: 10px;
}
.form-row label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  max-width: 480px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}
.form-actions {
  margin-top: 12px;
}
.form-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.msg-error {
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.workspace-reminders {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-left: 4px solid #0f766e;
  background: #f0fdfa;
  color: #123f3d;
  font-size: 14px;
}
.workspace-reminders[hidden] { display: none; }
.workspace-reminders__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.workspace-reminders ul { list-style: none; margin: 0; padding: 0; }
.workspace-reminders li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid #cce7e4; }
.workspace-reminders li span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.workspace-reminders li small { display: block; color: #456562; }
.workspace-reminders a { color: #075985; font-weight: 600; white-space: nowrap; }
.workspace-reminders button { border: 1px solid #0f766e; background: transparent; color: #0f766e; padding: 5px 9px; cursor: pointer; }
@media (max-width: 640px) {
  .workspace-reminders li { flex-wrap: wrap; }
  .workspace-reminders li span:first-child { flex-basis: 100%; }
}
.msg-error--auth {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.workspace-content .card {
  max-width: 100%;
  overflow-x: auto;
}
.msg-warn {
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-warn a {
  color: #b45309;
  font-weight: 600;
}
.suggestion {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}
.suggestion.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.suggestion.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.dev-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
}
