@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
  --brand-1: #007a69;
  --brand-2: #00a38a;
  --brand-dark: #003b4a;
  --surface: #f1f6f4;
  --card-bg: #ffffff;
  --muted: #5f6f72;
  --border: #d9e6e2;
  --row-hover: #ebf8f3;
  --danger: #c53f3f;
  --warning: #e2a117;
  --success: #1a9b7d;
  --brand-soft: #dff3ea;
  --brand-soft-2: #e8f5fb;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background:
    radial-gradient(circle at 8% 0%, #e4f5ef 0, transparent 33%),
    radial-gradient(circle at 92% 100%, #d7eef7 0, transparent 28%),
    var(--surface);
  color: #17313a;
  font-size: .9rem;
}

body.auth-screen {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 8% 0%, rgba(228,245,239,.28) 0, transparent 33%),
    radial-gradient(circle at 92% 100%, rgba(215,238,247,.24) 0, transparent 28%),
    linear-gradient(135deg, #003744 0%, #005f63 52%, #0a8c73 100%);
}

.app-navbar {
  background: linear-gradient(135deg, #003744 0%, #005f63 52%, #0a8c73 100%);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,59,74,.35);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand i {
  font-size: 1.3rem;
}

.nav-menu {
  display: flex;
  gap: .2rem;
}

.nav-link-item {
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  padding: .3rem .85rem;
  border-radius: 20px;
  transition: all .18s;
  white-space: nowrap;
}

.nav-link-item:hover {
  color: #fff;
  background: rgba(255,255,255,.16);
}

.nav-link-item.active {
  color: #fff;
  background: rgba(255,255,255,.22);
  font-weight: 600;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-db-label {
  color: rgba(255,255,255,.65);
  font-size: .75rem;
}

.nav-btn,
.nav-link-pill {
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  text-decoration: none;
  background: rgba(255,255,255,.12);
  padding: .28rem .75rem;
  border-radius: 20px;
  transition: background .18s;
  white-space: nowrap;
}

.nav-btn:hover,
.nav-link-pill:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.nav-link-pill.active {
  background: rgba(255,255,255,.25);
  color: #fff;
}

@media (max-width: 640px) {
  .nav-menu {
    display: none;
  }
}

/* ---- Sort headers ---- */
.th-sortable { white-space: nowrap; }
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.sort-link:hover { color: var(--brand-1); }
.th-sorted .sort-link { color: var(--brand-1); }
.sort-icon {
  font-size: .75em;
  opacity: .9;
  font-style: normal;
}
.sort-icon-off {
  opacity: .25;
}
