:root {
  --green: #176b4d;
  --ink: #18211d;
  --muted: #5f6b65;
  --edge: #dfe6e2;
  --bg: #fff;
  --white: #fff;
  --light: #e9f8f4;
  --red: #b42318;
  --petroleum: #0d2021;
  --petroleum-border: #08191a;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: #fff;
  font-family: Inter, "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

header {
  background: var(--petroleum);
  border-bottom: 1px solid var(--petroleum-border);
}

.shell {
  width: min(calc(100% - 3rem), 1160px);
  max-width: 1160px;
  margin-inline: auto;
  padding: 22px 0;
}

.bar {
  min-height: 82px;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 150px;
  height: 66px;
  object-fit: contain;
}

.note {
  color: rgb(255 255 255 / 82%);
  font-size: 0.85rem;
}

.hero {
  padding: 48px 0 30px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.09em;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.toolbar {
  margin: 16px 0 26px;
}

.field,
.formgrid label,
.stack label,
.actions > label,
.auth-panel .actions label,
.create-dialog label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.45;
}

input,
textarea,
select {
  max-width: 100%;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(23 107 77 / 14%);
}

input[type="checkbox"] {
  accent-color: var(--green);
}

.btn {
  min-height: 42px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:not(.secondary):not(.danger):hover {
  background: #10563d;
  border-color: #10563d;
}

.btn.secondary {
  border-color: var(--edge);
  background: #fff;
  color: var(--ink);
}

.btn.secondary:hover {
  background: #f7f9f8;
}

.btn.danger {
  border-color: #f0cfcc;
  background: #fff5f4;
  color: var(--red);
}

.btn.danger:hover {
  background: #fcebea;
}

.btn:focus-visible,
.seg button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(23 107 77 / 35%);
  outline-offset: 3px;
}

.seg {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: #f7f9f8;
}

.seg button {
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 550;
}

.seg button.active {
  color: var(--green);
  box-shadow: 0 1px 3px rgb(24 33 29 / 8%);
}

.cards {
  gap: 16px;
}

.card,
.panel {
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(24 33 29 / 7%);
}

.card {
  padding: 24px;
}

.card.featured {
  border: 1px solid var(--green);
  box-shadow: 0 2px 8px rgb(23 107 77 / 10%);
}

.plan-name,
.price {
  color: var(--ink);
  font-weight: 650;
}

.plan-name {
  font-size: 1.3rem;
}

.price {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.period,
.subprice,
.desc,
.meta,
.small,
.status,
.footer {
  color: var(--muted);
}

.pill {
  border-radius: 4px;
  background: var(--light);
  color: var(--green);
  font-weight: 600;
}

.chip {
  border-radius: 4px;
  background: #f3f6f4;
}

.tablewrap {
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(24 33 29 / 5%);
}

th,
td {
  border-bottom-color: #edf1ee;
}

thead th {
  background: #f7f9f8;
  color: var(--ink);
  font-weight: 600;
}

.category td {
  background: #f2f7f4 !important;
  color: var(--green);
  font-weight: 600;
}

.panel {
  padding: 24px;
  margin: 16px 0;
}

.rowedit {
  border-bottom-color: var(--edge);
}

#editor > .actions:first-child {
  background: rgb(255 255 255 / 96%);
  border-color: var(--edge);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(24 33 29 / 6%);
  backdrop-filter: blur(8px);
}

#authState {
  border-radius: 4px;
  background: #f3f6f4;
}

.create-dialog {
  border-color: var(--edge);
  border-radius: 10px;
}

.create-dialog::backdrop {
  background: rgb(13 32 33 / 55%);
}

.footer {
  border-top: 1px solid var(--edge);
  padding: 20px 0 40px;
}

@media (max-width: 800px) {
  .shell {
    width: min(calc(100% - 2rem), 1160px);
    padding: 18px 0;
  }

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

  .bar {
    min-height: 72px;
    align-items: center;
  }

  .hero {
    padding: 38px 0 24px;
  }
}

@media (max-width: 600px) {
  .brand-logo {
    width: 128px;
    height: 56px;
  }

  .note {
    font-size: 0.75rem;
    text-align: right;
  }

  .cards,
  .formgrid {
    grid-template-columns: 1fr;
  }

  .panel,
  .card {
    padding: 18px;
  }
}

@media print {
  header {
    background: #fff;
    border-color: var(--edge);
  }

  .logo,
  .note {
    color: var(--ink);
  }

  .brand-logo {
    filter: brightness(0.2);
  }
}
