:root {
  --paper: #fff8ef;
  --paper-deep: #f3dfc7;
  --ink: #4f4037;
  --muted: #927d6d;
  --line: rgba(145, 101, 72, 0.18);
  --brand: #bc6548;
  --brand-deep: #8e3f2d;
  --green: #779060;
  --shadow: 0 24px 70px rgba(92, 58, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "LXGW WenKai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(242, 162, 110, 0.28), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(119, 144, 96, 0.22), transparent 28%),
    linear-gradient(135deg, #fffaf3 0%, #f4e2cd 48%, #fff6e9 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 36px 0 54px;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background: rgba(255, 251, 245, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  margin-bottom: 24px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 0.98;
}

h2 {
  font-size: 28px;
}

.subtitle,
.login-card p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-badge {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  flex: 0 0 auto;
  border: 3px dashed rgba(188, 101, 72, 0.5);
  border-radius: 35% 27% 36% 29%;
  color: var(--brand-deep);
  transform: rotate(-6deg);
  background: rgba(255, 244, 232, 0.76);
}

.hero-badge span {
  display: block;
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}

.hero-badge small {
  color: var(--muted);
  font-weight: 800;
}

.login-card {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 26px;
  align-items: end;
  padding: 30px;
}

.login-form {
  display: grid;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

input:focus,
textarea:focus {
  border-color: rgba(188, 101, 72, 0.62);
  box-shadow: 0 0 0 4px rgba(188, 101, 72, 0.1);
}

input {
  height: 52px;
  padding: 0 18px;
}

textarea {
  min-height: 92px;
  padding: 16px;
  resize: vertical;
  line-height: 1.65;
}

.login-form button,
.create-actions button,
.row-actions button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fffaf4;
  background: linear-gradient(135deg, #c7775a, #9e4f37);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(158, 79, 55, 0.2);
}

.workspace {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar,
.editor {
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-head,
.toolbar,
.create-actions,
.row-head,
.row-actions,
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sidebar-head {
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 900;
}

.text-button {
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 900;
}

.category-tabs {
  display: grid;
  gap: 10px;
}

.category-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  text-align: left;
  font-weight: 900;
}

.category-tab.active {
  color: var(--ink);
  border-color: rgba(188, 101, 72, 0.24);
  background: rgba(255, 244, 232, 0.88);
}

.category-tab small {
  color: var(--brand);
}

.toolbar {
  align-items: flex-start;
  margin-bottom: 20px;
}

.search-box {
  display: grid;
  min-width: 260px;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.create-box {
  padding: 18px;
  margin-bottom: 18px;
  border: 1px dashed rgba(188, 101, 72, 0.26);
  border-radius: 24px;
  background: rgba(255, 244, 232, 0.54);
}

.create-actions {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.notice {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 18px;
  color: #6f4b36;
  background: rgba(255, 235, 208, 0.82);
  font-weight: 850;
}

.template-list {
  display: grid;
  gap: 14px;
}

.template-row {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
}

.row-head {
  margin-bottom: 12px;
}

.row-index {
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.status-line {
  justify-content: flex-start;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch input {
  width: 18px;
  height: 18px;
}

.row-actions {
  margin-top: 14px;
  justify-content: flex-end;
}

.row-actions button.secondary {
  color: var(--brand-deep);
  background: rgba(255, 234, 215, 0.9);
  box-shadow: none;
}

.row-actions button.danger {
  color: #9e3325;
  background: rgba(255, 224, 216, 0.92);
  box-shadow: none;
}

.empty {
  padding: 46px 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.42);
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .hero,
  .login-card,
  .workspace,
  .toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-badge {
    width: 112px;
    height: 112px;
  }

  .sidebar {
    position: static;
  }

  .search-box {
    min-width: 0;
  }
}
