:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --line: #e4e7ee;
  --text: #1f2430;
  --muted: #616b7f;
  --accent: #0f6fff;
  --error: #ce3a3a;
  --ok: #1d8f47;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
}

.brand {
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.nav a:hover {
  color: var(--accent);
}

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

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

.grid {
  display: grid;
  gap: 16px;
}

.cards-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.metric {
  font-size: 42px;
  margin: 6px 0 0;
}

.mt-16 {
  margin-top: 16px;
}

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

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

.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 8px 0 18px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.alert-ok {
  background: #ebf8ef;
  color: var(--ok);
  border: 1px solid #b7e3c5;
}

.alert-error {
  background: #fff0f0;
  color: var(--error);
  border: 1px solid #f2c8c8;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.tag-ok {
  color: var(--ok);
  background: #ebf8ef;
}

.tag-error {
  color: var(--error);
  background: #fff0f0;
}

.upload-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.help-text {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-wrap {
  width: 100%;
  max-width: 440px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav {
    width: 100%;
    order: 3;
  }

  .upload-inline {
    flex-direction: column;
    align-items: flex-start;
  }
}
