:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172033;
  --muted: #697386;
  --line: #dce3ec;
  --soft: #f4f7fb;
  --blue-soft: #edf5ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--soft);
}

button,
input,
a {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

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

.password-card {
  width: min(100%, 390px);
  padding: 32px;
  border: 1px solid #e0e4eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
}

.password-card h1 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.gate-copy {
  margin-bottom: 24px;
  color: var(--muted);
}

.password-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

#password-input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfd5df;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

#password-input:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.password-error {
  margin: 9px 0 0;
  color: #b42318;
  font-size: 0.86rem;
}

.unlock-button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.unlock-button:hover {
  background: #26324a;
}

.tracker-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-self: start;
  min-height: 100vh;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.sidebar-brand {
  padding: 0 10px 24px;
  border-bottom: 1px solid #edf0f4;
}

.sidebar-brand h1 {
  margin: 0;
  color: #0b1d41;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.sidebar-nav {
  padding-top: 22px;
}

.nav-heading {
  margin: 0 10px 9px;
  color: #7b8799;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 3px 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #43506a;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: #f5f7fa;
  color: #18243d;
}

.nav-item.is-active {
  background: #eaf3ff;
  color: #0d3f93;
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #ffffff;
  font-size: 1rem;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
}

.category-full-tracker {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #f4f7fb;
}

.section-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.section-mainbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 15px 24px 12px;
}

.section-flag {
  display: grid;
  width: 50px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 32, 64, 0.06);
  font-size: 1.45rem;
}

.section-brand {
  min-width: 0;
}

.section-brand h2 {
  margin: 0;
  color: #091b3c;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-brand p {
  margin: 5px 0 0;
  color: #526078;
  font-size: 0.82rem;
}

.count-pill {
  margin: 0 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1552a3;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.section-statusbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 24px;
  border-top: 1px solid #eef2f6;
  color: #697386;
  font-size: 0.76rem;
}

.section-statusbar > :first-child {
  color: #344054;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a363;
  box-shadow: 0 0 0 4px rgba(18, 163, 99, 0.1);
}

.workspace-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 48px 24px;
  border: 1px dashed #cfd5df;
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.empty-state p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.opportunity-list {
  display: grid;
  gap: 14px;
}

.opportunity-card {
  padding: 18px 20px;
  border: 1px solid #e0e4eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(15, 32, 64, 0.04);
}

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

.card-title {
  margin-bottom: 6px;
  font-size: 1.16rem;
  line-height: 1.3;
}

.card-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #4f596d;
  font-size: 0.76rem;
  font-weight: 700;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: #1d4ed8;
  font-weight: 650;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

details {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
}

summary {
  width: fit-content;
  color: #566075;
  font-weight: 650;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.detail-item {
  padding: 12px;
  border-radius: 12px;
  background: #f7f8fa;
}

.detail-item dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .tracker-shell {
    display: block;
  }

  .app-sidebar {
    position: static;
    min-height: auto;
    padding: 16px 14px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    padding: 0 4px 12px;
  }

  .sidebar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-top: 12px;
  }

  .nav-heading {
    margin: 0 6px 0 2px;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 10px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .category-full-tracker {
    height: calc(100vh - 120px);
    min-height: 650px;
  }
}

@media (max-width: 640px) {
  .password-card {
    padding: 26px 22px;
  }

  .section-mainbar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px 14px 11px;
  }

  .count-pill {
    width: fit-content;
    margin-left: 64px;
  }

  .section-statusbar {
    padding: 8px 14px;
  }

  .workspace-content {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .empty-state {
    min-height: 300px;
  }

  .card-topline {
    flex-direction: column;
    gap: 10px;
  }
}
