:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #eef2ff 100%);
}

.container {
  width: min(900px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-title {
  line-height: 1;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
}

main.container {
  padding: 2rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button,
button {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

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

.button-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 600;
}

.label-fixed {
  width: 10rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-weight: 700;
}

.badge-ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}
