:root {
  --bg: #f2efe8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #1b1c1e;
  --muted: #5e625d;
  --accent: #1c7c54;
  --accent-dark: #115238;
  --line: rgba(27, 28, 30, 0.12);
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(17, 31, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(28, 124, 84, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(221, 153, 71, 0.18), transparent 26%),
    linear-gradient(135deg, #f7f4ec 0%, #ece5d8 100%);
}

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

.auth-shell,
.dashboard-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.auth-card,
.panel {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(460px, 100%);
  padding: 32px;
  border-radius: 28px;
}

.topbar {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 32px;
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

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

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface-strong);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: rgba(17, 31, 20, 0.05);
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
}

.muted,
.status-text {
  color: var(--muted);
}

.error-text {
  min-height: 20px;
  color: var(--danger);
}

.inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.inline-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

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

td.actions button {
  padding: 9px 12px;
  font-size: 13px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal-shell.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 31, 20, 0.4);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.danger-button {
  background: var(--danger);
}

@media (max-width: 900px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    gap: 16px;
    flex-direction: column;
  }
}
