:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --menu-width: 220px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 1.1vw + 12px, 16px);
}

body {
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-height: 700px) {
  html {
    font-size: 13px;
  }
}

@media (max-height: 600px) {
  html {
    font-size: 12px;
  }
}

h1, h2, h3 {
  letter-spacing: 0.01em;
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
}

input::placeholder {
  color: var(--muted);
}

.menu a {
  white-space: nowrap;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

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

.menu {
  width: var(--menu-width);
  min-width: var(--menu-width);
  max-width: 240px;
}

.menu a {
  padding: 12px 20px;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-card {
  max-width: 92vw;
  max-height: 92vh;
  overflow: auto;
}
