:root {
  --bg: #eef3ea;
  --panel: #ffffff;
  --panel-soft: #f8fbf5;
  --line: #d9e4d2;
  --text: #1f2a1f;
  --muted: #617066;
  --primary: #205f3b;
  --primary-dark: #19492e;
  --danger: #a0382b;
  --danger-dark: #7a291f;
  --success-bg: #e5f6ea;
  --success-text: #1b6a37;
  --error-bg: #fde9e7;
  --error-text: #9c2f23;
  --shadow: 0 18px 48px rgba(35, 52, 35, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(58, 122, 78, 0.16), transparent 32%),
    linear-gradient(180deg, #f7fbf4 0%, var(--bg) 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.panel,
.auth-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 210, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(460px, 100%);
  margin: 72px auto 0;
  padding: 32px;
}

.panel {
  padding: 28px;
}

.form-panel {
  width: min(720px, 100%);
  margin: 0 auto;
}

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

.panel-header.compact {
  align-items: flex-start;
}

.toolbar,
.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
}

.field small,
.muted {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

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

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

.button-small {
  padding: 9px 12px;
  font-size: 14px;
}

.alert {
  margin-bottom: 20px;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: rgba(27, 106, 55, 0.12);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: rgba(156, 47, 35, 0.12);
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 40px);
}

.helper-box,
.current-preview,
.empty-state {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.helper-box {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

thead th {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-preview {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.icon-preview.large {
  width: 88px;
  height: 88px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-active {
  background: rgba(27, 106, 55, 0.12);
  color: var(--success-text);
}

.status-inactive {
  background: rgba(156, 47, 35, 0.12);
  color: var(--error-text);
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .panel,
  .auth-card {
    padding: 20px;
  }

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

  th,
  td {
    min-width: 140px;
  }
}
