:root {
  --bg: #efe7da;
  --ink: #213127;
  --muted: #66756b;
  --accent: #215640;
  --accent-soft: #d9e8dd;
  --panel: rgba(255, 251, 244, 0.9);
  --line: rgba(33, 49, 39, 0.1);
  --alert: #9d4d31;
  --shadow: 0 25px 60px rgba(33, 49, 39, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(84, 124, 89, 0.2), transparent 22%),
    linear-gradient(135deg, #f2eee5, #e8dfcd);
  min-height: 100vh;
}

.auth-body,
.dashboard-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card,
.panel,
.summary-grid article,
.tender-card,
.fleet-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.auth-card {
  width: min(560px, 100%);
  padding: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

.lead,
.meta,
.description,
.facts,
.empty-state p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

button,
.ghost-link,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.ghost-link {
  border: 1px solid var(--line);
  color: var(--ink);
}

.error {
  color: #a22f2f;
  font-weight: 700;
}

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

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 251, 244, 0.72);
}

.tab-link.is-active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.user-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(33, 86, 64, 0.09);
  color: var(--accent);
  font-weight: 700;
}

.summary-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.summary-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
}

.panel {
  margin-top: 24px;
  padding: 24px;
}

.tender-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.search-group-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tender-card,
.fleet-card,
.search-group-card {
  padding: 22px;
}

.search-group-card {
  background: rgba(255, 251, 244, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.badge-row,
.facts,
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.keyword-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-primary,
.keyword-chip {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-alert {
  background: rgba(157, 77, 49, 0.14);
  color: var(--alert);
}

.badge-muted {
  background: rgba(33, 49, 39, 0.08);
  color: var(--muted);
}

.meta {
  margin: 12px 0 0;
}

.description {
  margin: 16px 0 0;
  line-height: 1.6;
}

.facts {
  margin-top: 16px;
}

.keyword-row {
  margin-top: 14px;
}

.card-link-wrap {
  margin: 16px 0 0;
}

.card-link {
  background: var(--accent);
  color: white;
}

.empty-state {
  padding: 18px 0 4px;
}

.success-note {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.reject-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.secondary-btn {
  width: fit-content;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.fleet-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.fleet-list li + li {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .search-group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-body,
  .dashboard-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .topbar {
    flex-direction: column;
  }

  .summary-grid,
  .fleet-grid,
  .search-group-grid {
    grid-template-columns: 1fr;
  }
}
