:root {
  --ink: #2b170d;
  --deep: #3a2012;
  --wood: #5a3820;
  --clay: #a95a24;
  --gold: #c38a46;
  --sand: #f5ecdf;
  --cream: #fff8ee;
  --line: rgba(90, 56, 32, 0.14);
  --muted: #80634d;
  --shadow: 0 20px 54px rgba(43, 23, 13, 0.16);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(90, 56, 32, 0.08), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(195, 138, 70, 0.18), transparent 34%),
    var(--sand);
}

a { color: inherit; }

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

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

	.login-card,
	.welcome-panel,
	.tool-card,
	.health-grid article,
	.base-price-ledger,
	.recent-orders {
  background: rgba(255, 248, 238, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 34px;
  border-radius: 22px;
}

.brand-mark {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(195, 138, 70, 0.32);
  box-shadow: 0 16px 32px rgba(90, 56, 32, 0.12);
  margin-bottom: 20px;
}

.brand-mark img,
.admin-brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.eyebrow {
  color: var(--clay);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

h1, h2, h3 {
  font-family: Oswald, Impact, sans-serif;
  letter-spacing: 0;
}

.login-card h1,
.welcome-panel h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
}

.intro,
.welcome-panel p,
.tool-card p,
.empty-note {
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--wood);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

button,
.tool-card a,
.admin-nav a,
.ghost-link {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.login-form button,
.tool-card a,
.logout-button {
  background: linear-gradient(135deg, var(--wood), var(--clay));
  color: #fff8ee;
  padding: 13px 18px;
  text-decoration: none;
}

.message {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 18px 0;
  font-weight: 800;
}

.message.error { background: #ffe9e1; color: #9d3418; }
.message.success { background: #ecf8ed; color: #276749; }
.security-note { color: var(--muted); font-size: 13px; }

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  background: rgba(43, 23, 13, 0.94);
  color: #fff8ee;
  border-bottom: 1px solid rgba(255, 248, 238, 0.12);
  backdrop-filter: blur(16px);
}

.admin-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  min-width: 220px;
}

.admin-brand img {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
}

.admin-brand span {
  display: grid;
  line-height: 1.1;
  font-weight: 900;
}

.admin-brand small {
  color: #d9c3ab;
  font-weight: 600;
  font-size: 12px;
}

.admin-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav a {
  padding: 10px 13px;
  color: #f7e9d8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(195, 138, 70, 0.28);
}

.admin-account {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: end;
  font-size: 13px;
}

.logout-button {
  padding: 9px 13px;
  background: rgba(255, 248, 238, 0.12);
  border: 1px solid rgba(255, 248, 238, 0.18);
}

.dashboard {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 60px;
}

.welcome-panel {
  min-height: 250px;
  border-radius: 26px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.welcome-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.health-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.health-grid article {
  border-radius: 18px;
  padding: 18px;
}

.health-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.health-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  color: var(--wood);
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.tool-card {
  border-radius: 20px;
  padding: 22px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f0dcc3;
  color: var(--clay);
  font-weight: 900;
}

.tool-card h2 { margin: 18px 0 8px; }
.tool-card a { display: inline-block; margin-top: 10px; }

.base-price-ledger {
  margin-top: 20px;
  border-radius: 22px;
  padding: 22px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-heading a {
  text-decoration: none;
  font-weight: 900;
  color: var(--clay);
}

.base-price-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.base-price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.base-price-table th,
.base-price-table td {
  text-align: left;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.base-price-table th {
  color: var(--wood);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.base-price-table td:nth-child(3) {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.is-active {
  color: #276749;
  background: #ecf8ed;
}

.status-pill.is-hidden {
  color: #9d3418;
  background: #ffe9e1;
}

.recent-orders {
  margin-top: 20px;
  border-radius: 22px;
  padding: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.order-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 820px) {
  .admin-header,
  .welcome-panel {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    justify-content: start;
  }

  .admin-account {
    justify-content: start;
  }

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