:root {
  --ink: #17212b;
  --muted: #5b6773;
  --paper: #ffffff;
  --wash: #f3f5f6;
  --line: #d6dce1;
  --navy: #173b57;
  --teal: #14706f;
  --amber: #8b5a10;
  --danger: #9b2c2c;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--wash); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--navy); }
.login-panel { width: min(520px, 100%); color: white; }
.login-panel h1 { margin: 8px 0 14px; font-size: 42px; letter-spacing: 0; }
.login-copy { margin: 0 0 30px; color: #d8e4eb; font-size: 18px; }
.eyebrow { margin: 0; color: var(--teal); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.login-panel .eyebrow { color: #9bd4cf; }
.primary-button, .secondary-button { min-height: 42px; border-radius: 6px; padding: 0 16px; font-weight: 650; }
.primary-button { border: 0; background: white; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.secondary-button { border: 1px solid #9ca8b2; background: transparent; color: inherit; }
.google-mark { color: #2767c8; font-weight: 800; }
.status-text { min-height: 24px; margin-top: 18px; color: #ffd6d6; }

.portal-view { min-height: 100vh; }
.topbar { min-height: 82px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--navy); color: white; }
.topbar h1 { margin: 3px 0 0; font-size: 24px; letter-spacing: 0; }
.topbar .eyebrow { color: #9bd4cf; }
.account-actions { display: flex; align-items: center; gap: 16px; }
.user-email { color: #d8e4eb; font-size: 14px; }

.tabs { display: flex; gap: 4px; padding: 0 28px; background: white; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 650; }
.tab.active { color: var(--navy); border-bottom-color: var(--teal); }
main { max-width: 1560px; margin: 0 auto; padding: 24px 28px 48px; }
.content-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: 0; }
.updated-date { color: var(--muted); font-size: 13px; }
.lead-summary { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.55; }
.position-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.position-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.position-section h3 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.position-section ul { margin: 0; padding-left: 20px; }
.position-section li { margin: 7px 0; line-height: 1.45; }
.caution { margin: 20px 0 0; padding-left: 14px; border-left: 4px solid var(--amber); color: #65440f; line-height: 1.45; }

.filters { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) minmax(220px, 1fr); gap: 12px; margin-bottom: 16px; }
.filters label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filters input, .filters select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #aeb8c0; border-radius: 4px; background: white; }
.table-wrap { overflow: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; padding: 10px; background: var(--navy); color: white; text-align: left; white-space: nowrap; }
td { min-width: 110px; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
td:nth-child(3), td:nth-child(4), td:nth-child(5), td:nth-child(6) { min-width: 250px; }
tbody tr:hover { background: #f2f8f7; }
.open-button { border: 1px solid var(--teal); border-radius: 4px; background: white; color: var(--teal); padding: 7px 10px; white-space: nowrap; font-weight: 700; }
.open-button:disabled { cursor: wait; opacity: .55; }
.action-list { margin: 0; padding: 0; list-style: none; counter-reset: actions; }
.action-list li { counter-increment: actions; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.action-list li::before { content: counter(actions); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: white; font-weight: 700; }
.system-message { padding: 22px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.system-message.error { border-left: 5px solid var(--danger); }
.system-message h2 { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; padding: 16px; }
  .account-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
  .tabs { padding: 0 10px; overflow-x: auto; }
  main { padding: 16px 10px 36px; }
  .content-panel { padding: 16px; }
  .position-grid, .filters { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .login-panel h1 { font-size: 34px; }
}
