:root {
  color-scheme: dark;
  --bg: #0f0f11;
  --panel: #1d1d20;
  --panel-strong: #27272a;
  --line: #3b3b40;
  --text: #f5f5f7;
  --muted: #a7a7ad;
  --red: #ef3128;
  --red-soft: rgba(239, 49, 40, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 12%, rgba(239, 49, 40, 0.22), transparent 32rem),
    linear-gradient(135deg, #111113, #190b0d 58%, #0d0d0f);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

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

.login-panel {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(29, 29, 32, 0.92);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.login-logo {
  display: block;
  width: min(420px, 100%);
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #232326;
  padding: 28px;
}

.eyebrow {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.login-version,
.muted {
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #121214;
  color: var(--text);
  padding: 10px 14px;
  font-weight: 700;
}

button {
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: white;
  min-height: 48px;
  padding: 10px 18px;
  font-weight: 900;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.message {
  border: 1px solid #ffc0c0;
  border-radius: 9px;
  background: rgba(239, 49, 40, 0.16);
  color: #ff8b85;
  padding: 14px;
  font-weight: 800;
}

.portal-shell {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 40px);
  padding-bottom: 72px;
}

.topbar,
.summary-grid article,
.tab-panel,
.tabs {
  border: 1px solid var(--line);
  background: rgba(29, 29, 32, 0.92);
  border-radius: 10px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.secondary-button {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  color: var(--text);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.summary-grid article {
  padding: 18px;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--red-soft);
  color: var(--red);
}

.tab-panel {
  padding: 18px;
}

.section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-intro h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.location-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(39, 39, 42, 0.72);
  padding: 18px;
  margin-bottom: 16px;
}

.location-card > header,
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.location-card > header {
  margin-bottom: 14px;
}

.location-card > header h2 {
  margin: 0 0 4px;
}

.location-card > header strong {
  white-space: nowrap;
  color: var(--red);
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-strong);
  padding: 16px;
}

.card h2,
.card h3 {
  margin: 0 0 8px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.meta {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.meta span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.meta strong {
  display: block;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.danger {
  border-color: rgba(239, 49, 40, 0.55);
  background: var(--red-soft);
  color: #ff8b85;
}

.task-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.task-list span,
.task-list strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.task-list span {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-weight: 800;
  padding: 20px;
}

@media (max-width: 760px) {
  .topbar,
  .tabs {
    flex-direction: column;
  }

  .summary-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .location-card > header,
  .card-heading {
    flex-direction: column;
  }

  .tab {
    width: 100%;
  }
}
