* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 71, 43, 0.18), transparent 28%),
    linear-gradient(180deg, #f4efe8 0%, #efe7dd 100%);
  color: #1f1a17;
}

a {
  color: inherit;
}

.master-body {
  min-height: 100vh;
  padding: 32px;
}

.master-login-body {
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(100%, 460px);
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.login-card,
.panel,
.notice,
.feed-box,
.subpanel,
.summary-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 26, 23, 0.08);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(90, 58, 33, 0.12);
}

.login-card,
.panel,
.subpanel,
.summary-card {
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

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

.page-grid {
  display: grid;
  gap: 16px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

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

.admin-side-stack {
  display: grid;
  gap: 18px;
}

.section-nav {
  display: grid;
  gap: 10px;
}

.page-nav {
  display: grid;
  gap: 10px;
}

.section-link,
.text-link {
  color: #7a2f24;
  text-decoration: none;
  font-weight: 600;
}

.page-link {
  border: 1px solid rgba(31, 26, 23, 0.1);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #1f1a17;
  text-decoration: none;
  font-weight: 700;
}

.page-link.active {
  background: linear-gradient(135deg, rgba(202, 67, 38, 0.12), rgba(122, 47, 36, 0.08));
  border-color: rgba(122, 47, 36, 0.3);
}

.section-link {
  border: 1px solid rgba(31, 26, 23, 0.1);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.section-link:hover,
.page-link:hover,
.text-link:hover {
  text-decoration: underline;
}

.side-note-box,
.hint-box {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(31, 26, 23, 0.1);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.side-note-box p,
.hint-box p {
  margin: 0;
  color: #5f5348;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  display: grid;
  gap: 8px;
}

.summary-card strong {
  font-size: 1.05rem;
}

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

.form-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(31, 26, 23, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fffdfa;
  color: #1f1a17;
}

.form-field textarea {
  resize: vertical;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  border: none;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, #ca4326 0%, #7a2f24 100%);
  color: #fffaf6;
}

.ghost-button {
  border: 1px solid rgba(31, 26, 23, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.notice {
  padding: 14px 18px;
}

.notice-success {
  border-color: rgba(29, 110, 67, 0.2);
}

.notice-error {
  border-color: rgba(143, 37, 37, 0.2);
}

.panel-header,
.subpanel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.sticky-actions {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #7e6757;
}

h1,
h2,
h3 {
  margin: 0;
}

.intro-copy {
  max-width: 780px;
  color: #5f5348;
}

.ssl-chip {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(29, 110, 67, 0.12);
  color: #255f44;
}

.feed-box {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  min-width: 260px;
  font-size: 13px;
}

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

@media (max-width: 900px) {
  .master-body {
    padding: 18px;
  }

  .admin-layout,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar-actions,
  .login-header,
  .login-actions,
  .panel-header,
  .subpanel-header {
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }

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