:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --success: #16a34a;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #eef4ff 0%, rgba(37, 99, 235, 0.08) 35%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

header.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

header.page-header > div {
  flex: 1;
  min-width: 280px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.75rem;
}

p {
  margin: 0;
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
  transform: translateY(-1px);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.action-btn,
button.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.action-btn:hover,
button.submit-btn:hover {
  transform: translateY(-1px);
  background: var(--primary-strong);
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

form .form-grid {
  display: grid;
  gap: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  background: var(--primary-strong);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

button.secondary,
.button.secondary {
  background: #f8fafc;
  color: var(--text);
  border: 1px solid #cbd5e1;
}

button.secondary:hover,
.button.secondary:hover {
  background: #e2e8f0;
}

button.full-width {
  width: 100%;
}

.table-card {
  overflow-x: auto;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f8fafc;
  color: #334155;
  text-align: left;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: #f8fafc;
}

.table-actions button {
  margin-right: 10px;
  margin-bottom: 8px;
}

.table-actions button:last-child {
  margin-right: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
}

.modal-content {
  width: min(540px, 100%);
  margin: 80px auto;
  padding: 28px;
  background: var(--surface);
  border-radius: 24px;
  position: relative;
}

.close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}

.close:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .container {
    padding: 24px;
  }

  header.page-header {
    flex-direction: column;
    align-items: stretch;
  }

  nav {
    justify-content: center;
  }

  .modal-content {
    margin: 60px auto;
  }
}
