:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-2: #134e4a;
  --danger: #dc2626;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h1 {
  font-size: 22px;
  margin: 12px 0;
}

.topbar nav a {
  margin-left: 12px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

h2 {
  margin-top: 0;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.card h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.card p {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 10px;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f8fafc;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.button,
button {
  border: none;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.button.small,
button.small {
  padding: 6px 10px;
  font-size: 13px;
}

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

.inline-form {
  display: inline;
}

.form-grid {
  display: grid;
  gap: 8px;
  max-width: 640px;
}

input,
textarea,
select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 700px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 10px;
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
