:root {
  color: #211b14;
  background: #e8ebed;
  font-family: Inter, "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: #e8ebed;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  padding: 18px;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
}

.topbar,
.hero,
.card,
.soft-card {
  min-width: 0;
  border: 1px solid #d9d4ca;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 18px 60px rgba(64, 60, 54, 0.10);
}

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

.brand-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border: 1px solid #cdbb8d;
  border-radius: 8px;
  background: #3d3b38;
  object-fit: contain;
  padding: 4px;
}

.planet-logo {
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(60, 54, 48, 0.12);
}

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

.brand-text strong {
  color: #151311;
  font-size: 17px;
}

.brand-text span {
  margin-top: 3px;
  color: #81776a;
  font-size: 12px;
}

.divider {
  width: 1px;
  height: 34px;
  background: #d7d0c4;
}

.joint {
  border: 1px solid #d9d1c2;
  border-radius: 999px;
  background: #f8f4ed;
  padding: 6px 10px;
  color: #8a6a38;
  font-size: 12px;
  font-weight: 800;
}

.actions,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented {
  border: 1px solid #d9d1c2;
  border-radius: 8px;
  background: #f7f3eb;
  padding: 4px;
}

.btn,
.btn-secondary,
.segmented button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 800;
}

.btn {
  border: 1px solid #b88b3f;
  background: #2b241b;
  color: #fff7e8;
  box-shadow: 0 10px 26px rgba(43, 36, 27, 0.16);
}

.btn-secondary,
.segmented button {
  border: 1px solid #d9d1c2;
  background: rgba(255,255,255,0.82);
  color: #5c5143;
}

.segmented button.active {
  border-color: #b88b3f;
  background: #2b241b;
  color: #fff7e8;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  gap: 28px;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 36px 28px;
  background: #f6f7f7;
}

.eyebrow {
  display: inline-flex;
  border: 1px solid #d7d0c4;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  padding: 6px 12px;
  color: #8a6a38;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 18px 0 0;
  color: #11100f;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero h2 {
  margin: 14px 0 0;
  color: #4b4338;
  font-size: 22px;
}

.hero p {
  max-width: 650px;
  margin: 18px 0 0;
  color: #6d655b;
  font-size: 15px;
  line-height: 1.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tags span,
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9d1c2;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  padding: 6px 11px;
  color: #6d5b42;
  font-size: 12px;
  font-weight: 800;
}

.desk {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #d9d1c2;
  border-radius: 8px;
  background: #edf0f1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.desk::before,
.desk::after {
  content: "";
  position: absolute;
  right: -42px;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 50%;
}

.desk::before {
  top: 24px;
  width: 340px;
  height: 170px;
}

.desk::after {
  top: 56px;
  width: 280px;
  height: 150px;
}

.floating-menu {
  position: absolute;
  top: 42px;
  left: 30px;
  width: 164px;
  transform: rotate(-8deg);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  padding: 12px;
  box-shadow: 0 24px 42px rgba(80,84,88,0.18);
}

.floating-menu span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f1f3f3;
  padding: 9px 10px;
  color: #5c554c;
  font-size: 12px;
  font-weight: 800;
}

.floating-menu span:last-child {
  margin-bottom: 0;
}

.book-device {
  position: absolute;
  right: 34px;
  bottom: 32px;
  width: 250px;
  height: 170px;
  transform: rotate(7deg);
  border-radius: 18px;
  background: #191c1f;
  padding: 10px;
  box-shadow: 0 28px 50px rgba(48,50,52,0.28);
}

.book-page {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #fdfdf9;
}

.book-page::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 46%;
  width: 13px;
  background: #e6e1d7;
  box-shadow: inset 8px 0 14px rgba(120,112,98,0.22);
}

.book-page::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 36px;
  width: 74px;
  height: 78px;
  background: repeating-linear-gradient(to bottom, #d8d2c7, #d8d2c7 1px, transparent 1px, transparent 13px);
}

.notice {
  margin-bottom: 16px;
  border: 1px solid #c9d7cf;
  border-radius: 8px;
  background: #f1fbf4;
  padding: 12px;
  color: #2f6c45;
  font-size: 14px;
}

.notice-inline {
  margin-top: 14px;
  margin-bottom: 0;
}

.notice.warn {
  border-color: #ead7a6;
  background: #fff8e8;
  color: #7a5a19;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.soft-card {
  padding: 18px;
}

.soft-card label {
  color: #776e62;
  font-size: 14px;
}

.metric-value {
  margin-top: 12px;
  color: #9b7132;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 28px;
  font-weight: 900;
}

.hint {
  margin-top: 6px;
  color: #8b8378;
  font-size: 12px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.8fr) 150px minmax(160px, 0.8fr);
  gap: 12px;
}

.input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7d0c4;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  padding: 9px 12px;
  color: #211b14;
  outline: none;
}

textarea.input {
  min-height: 102px;
  resize: vertical;
}

.input:focus {
  border-color: #bc985a;
  box-shadow: 0 0 0 3px rgba(214,180,111,0.25);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 16px;
  margin-top: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e4ded4;
  padding: 16px;
}

.panel-title h3 {
  margin: 0;
  color: #211b14;
  font-size: 20px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #f4efe7;
  color: #776e62;
  font-size: 12px;
}

th,
td {
  padding: 13px 16px;
  text-align: left;
}

tbody tr {
  border-top: 1px solid #ece7de;
  background: rgba(255,255,255,0.42);
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #fff4dc;
}

td strong {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: #211b14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td small {
  display: block;
  max-width: 300px;
  overflow: hidden;
  margin-top: 5px;
  color: #81776a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-open,
.status-approved {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.status-restricted {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.status-draft,
.status-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.status-unpublished,
.status-rejected {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.detail {
  padding: 18px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.detail h3 {
  margin: 10px 0 0;
  color: #211b14;
  font-size: 25px;
}

.detail p {
  color: #675d51;
  line-height: 1.75;
}

.info-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.info-line,
.content-box,
.request-card,
.log-item,
.template-card {
  border: 1px solid #e1dacd;
  border-radius: 8px;
  background: #fffdfa;
}

.info-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.info-line span:first-child {
  flex-shrink: 0;
  color: #81776a;
}

.info-line span:last-child {
  text-align: right;
}

.content-box,
.request-card {
  margin-top: 14px;
  padding: 14px;
}

.content-text {
  max-height: 360px;
  overflow: auto;
  color: #332c24;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  margin-top: 16px;
}

.request-list,
.log-list,
.template-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.request-item,
.log-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  color: #776e62;
  font-size: 13px;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  padding: 14px;
}

.template-card label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #776e62;
  font-size: 12px;
}

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

.login-card {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  border: 1px solid #d9d4ca;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  padding: 22px;
  box-shadow: 0 24px 80px rgba(64,60,54,0.12);
}

.login-card h1 {
  margin: 18px 0 0;
  font-size: 42px;
}

.login-card p {
  color: #675d51;
  line-height: 1.8;
}

.login-form {
  display: grid;
  gap: 12px;
  border: 1px solid #e1dacd;
  border-radius: 8px;
  background: #fffdfa;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.icp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding: 20px 12px 4px;
  color: #81776a;
  font-size: 12px;
}

.icp-footer a:hover {
  color: #5a4020;
}

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

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

@media (max-width: 720px) {
  .page {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .divider {
    display: none;
  }

  .hero {
    padding: 24px 18px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .desk {
    min-height: 390px;
  }

  .floating-menu {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .book-device {
    right: 22px;
    bottom: 24px;
    width: 220px;
  }

  .filters,
  .metrics {
    grid-template-columns: 1fr;
  }

  .detail-head,
  .info-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-line span:last-child {
    text-align: left;
  }
}
