:root {
  --bg: #f3f0ea;
  --bg-deep: #e8e2d6;
  --surface: #fffdf8;
  --ink: #1c1914;
  --muted: #6b645a;
  --line: #d6cfc3;
  --accent: #0f6b4c;
  --accent-hover: #0a523a;
  --danger: #a33b2c;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(28, 25, 20, 0.08);
  --font: "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff8e8 0%, transparent 45%),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.wrap {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lang-switch {
  margin: 0;
}

.lang-switch select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.4rem 1.8rem 0.4rem 0.75rem;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lang-switch select:focus {
  outline: 2px solid rgba(15, 107, 76, 0.25);
  border-color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-user {
  color: var(--muted);
  font-size: 0.92rem;
}

.main {
  padding: 2.5rem 0 4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.25rem 0 2rem;
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 2.5rem 0 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover,
button.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

.auth-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.auth-wrap {
  max-width: 420px;
  margin: 1rem auto 0;
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.auth-card .sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.form-group {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}

input:focus {
  outline: 2px solid rgba(15, 107, 76, 0.25);
  border-color: var(--accent);
}

.alert {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-error {
  background: #fbeceb;
  color: var(--danger);
  border: 1px solid #efc4bd;
}

.alert-success {
  background: #e8f5ef;
  color: var(--accent);
  border: 1px solid #b7dfcb;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #e8f5ef;
  color: var(--accent);
}

.badge-off {
  background: #f1efe9;
  color: var(--muted);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-head h1 {
  margin: 0;
  font-size: 1.5rem;
}

.nav-link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-link-btn:hover {
  color: var(--accent-hover);
}

body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 32, 0.55);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 1.5rem 1.6rem 1.35rem;
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  color: #8a93a0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.modal-close:hover {
  color: #333;
}

.modal-dialog h2 {
  margin: 0 0 1.1rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #3a414c;
}

.modal-help {
  margin: 0 0 1rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.modal-form .form-group label {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.88rem;
}

.modal-form input {
  background: #f3f6fa;
  border: 1px solid #d7dee8;
  border-radius: 4px;
}

.btn-login {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 6px;
  background: #f17a22;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.btn-login:hover {
  background: #e06b14;
  color: #fff;
}

.modal-link-wrap {
  margin: 1rem 0 0;
  text-align: center;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #2f6fed;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  color: #1d4fc7;
}

.modal-panel.is-hidden {
  display: none;
}
