:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #647086;
  --line: #dfe5ef;
  --accent: #0f766e;
  --danger: #b42318;
  --soft: #e8f3f1;
  --shadow: 0 18px 50px rgba(18, 28, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc, #eef3f8 54%, #f7efe5);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.header h1,
.panel h2 {
  margin: 0;
}

.header h1 {
  font-size: 34px;
}

.header a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 22px;
}

.field {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 900;
}

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

.secondary-btn {
  background: var(--soft);
  color: #0f4f4a;
}

.ghost-btn {
  background: #fff;
  color: var(--muted);
  border-color: var(--line);
}

.danger-btn {
  background: #fff1f0;
  color: var(--danger);
}

.message {
  min-height: 22px;
  color: var(--muted);
}

.toolbar,
.create-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.create-grid {
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.7fr) minmax(110px, 0.4fr) auto;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

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

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

code {
  font-weight: 900;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.status.ok {
  background: #dcfce7;
  color: #166534;
}

.status.bad {
  background: #fee2e2;
  color: #991b1b;
}

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

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

.password-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .header,
  .toolbar,
  .create-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .header {
    display: grid;
  }
}
