:root {
  --bg: #f4f6fb;
  --text: #1d2939;
  --primary: #1f4db3;
  --danger: #be123c;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.auth-wrap {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(900px, 100%);
}

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.topnav {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: #0f172a;
  justify-content: space-between;
  align-items: center;
}

.topnav-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topnav a {
  color: #dbeafe;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}

.topnav a:hover {
  background: #1d4ed8;
}

.topnav-right {
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 3px 15px rgba(15, 23, 42, 0.07);
  margin-bottom: 14px;
}

.auth-card {
  width: 380px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

input,
select,
button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  margin-top: 6px;
  margin-bottom: 10px;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

button.picked-btn {
  background: #16a34a;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  padding: 10px;
}

.alert {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.inline-form {
  display: inline;
}

.btn-link {
  text-decoration: none;
  background: #e2e8f0;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 8px;
}

.btn-link.active {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 768px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .auth-card {
    width: 100%;
  }

  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .topnav {
    align-items: flex-start;
  }
}
