:root {
  --md-primary: #b86b3f;
  --md-primary-strong: #8f4f2d;
  --md-secondary: #2f6b72;
  --md-tertiary: #d7c7ad;
  --md-surface: #f8f4ef;
  --md-surface-2: #ffffff;
  --md-surface-3: #efe6db;
  --md-text: #2a2420;
  --md-muted: #6f655d;
  --md-border: rgba(68, 54, 46, 0.12);
  --md-shadow-1: 0 1px 2px rgba(50, 30, 20, 0.08), 0 2px 6px rgba(50, 30, 20, 0.06);
  --md-shadow-2: 0 8px 24px rgba(50, 30, 20, 0.10), 0 2px 8px rgba(50, 30, 20, 0.08);
  --md-shadow-3: 0 18px 46px rgba(50, 30, 20, 0.14), 0 6px 18px rgba(50, 30, 20, 0.10);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--md-text);
  background:
    radial-gradient(circle at top left, rgba(184, 107, 63, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(47, 107, 114, 0.12), transparent 26%),
    linear-gradient(180deg, #fbf8f4 0%, #f4ede4 100%);
}

a {
  color: var(--md-primary-strong);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--md-border);
  border-radius: var(--radius-l);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--md-shadow-1);
  backdrop-filter: blur(16px);
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--md-text);
  font-weight: 600;
}

.nav a:hover {
  background: rgba(184, 107, 63, 0.08);
  text-decoration: none;
}

.card {
  background: var(--md-surface-2);
  border: 1px solid var(--md-border);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: var(--md-shadow-2);
}

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

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

h1, h2, h3, h4 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 10px; }

.muted { color: var(--md-muted); }

.notice {
  padding: 14px 16px;
  border-radius: var(--radius-m);
  margin-bottom: 16px;
  border: 1px solid transparent;
  box-shadow: var(--md-shadow-1);
}

.ok {
  background: rgba(47, 107, 114, 0.10);
  border-color: rgba(47, 107, 114, 0.20);
}

.err {
  background: rgba(184, 107, 63, 0.12);
  border-color: rgba(184, 107, 63, 0.24);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--md-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--md-shadow-1);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  background: var(--md-primary-strong);
  box-shadow: var(--md-shadow-2);
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--md-surface-3);
  color: var(--md-text);
}

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

.btn.danger {
  background: #a4472f;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--md-border);
  background: #fff;
  color: var(--md-text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { min-height: 140px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(184, 107, 63, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 107, 63, 0.12);
}

label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
}

.field { margin-bottom: 16px; }

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-m);
}

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

th {
  font-size: 0.92rem;
  color: var(--md-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(215, 199, 173, 0.20);
}

tr:hover td { background: rgba(184, 107, 63, 0.03); }

hr {
  border: 0;
  border-top: 1px solid var(--md-border);
  margin: 18px 0;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--md-primary);
}

.nav .btn,
.nav .secondary {
  min-height: 38px;
}

@media (max-width: 900px) {
  .two, .three { grid-template-columns: 1fr; }
  .wrap { padding: 16px; }
  .nav { padding: 10px; }
}

