:root {
  color-scheme: light;
  --ink: #0a1422;
  --ink-2: #14253a;
  --paper: #f3f6f8;
  --white: #fff;
  --muted: #687589;
  --muted-2: #8a96a7;
  --line: #dce3e9;
  --line-dark: rgba(255,255,255,.11);
  --orange: #ff6b3d;
  --orange-soft: #fff0e9;
  --mint: #6ee7c5;
  --mint-soft: #e5faf4;
  --blue: #4779ff;
  --blue-soft: #edf2ff;
  --yellow: #f5b940;
  --red: #dc493f;
  --shadow: 0 20px 55px rgba(12, 30, 50, .12);
  --radius: 18px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.1; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: 1.15rem; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 780;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { background: var(--orange); color: var(--white); }
.button-primary:hover { background: #f85e2e; }
.button-secondary { border-color: var(--line); background: var(--white); }
.button-secondary:hover { border-color: #bcc7d1; background: #f8fafb; }
.button-dark { background: var(--ink); color: var(--white); }
.button-compact { min-height: 40px; padding-inline: 16px; font-size: .83rem; }
.button-small { min-height: 36px; padding-inline: 13px; font-size: .78rem; }
.button-wide { width: 100%; }
:focus-visible { outline: 3px solid rgba(71,121,255,.35); outline-offset: 2px; }

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: var(--orange);
  color: white;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: -.03em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mint);
}
.eyebrow {
  margin-bottom: 13px;
  color: var(--orange);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Sign in */
.login-page { background: #07111e; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.2fr) minmax(430px, .8fr); }
.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 5vw, 72px);
  background:
    radial-gradient(circle at 85% 20%, rgba(71,121,255,.24), transparent 28%),
    linear-gradient(145deg, #07111e, #10243a);
  color: white;
}
.login-story::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border: 75px solid rgba(110,231,197,.09);
  border-radius: 50%;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; font-size: 1.05rem; font-weight: 780; }
.login-promise { position: relative; z-index: 1; max-width: 730px; padding-block: 80px; }
.login-promise h1 { max-width: 700px; margin-bottom: 25px; font-size: clamp(3.1rem, 6vw, 6.4rem); }
.login-promise > p:last-child { max-width: 630px; margin: 0; color: #bcc8d7; font-size: 1.16rem; }
.login-proof { position: relative; z-index: 1; display: flex; gap: 8px; }
.login-proof div { min-width: 135px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.04); }
.login-proof strong, .login-proof span { display: block; }
.login-proof strong { font-size: .9rem; }
.login-proof span { color: #8fa0b4; font-size: .72rem; }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--paper); }
.login-box { width: min(100%, 420px); }
.login-box h2 { margin-bottom: 12px; }
.login-help { margin-bottom: 32px; color: var(--muted); }
.login-form { display: grid; gap: 18px; }
label > span { display: block; margin-bottom: 7px; color: #35445a; font-size: .78rem; font-weight: 780; }
input, select, textarea {
  width: 100%;
  border: 1px solid #ccd6df;
  border-radius: 11px;
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input, select { height: 48px; padding: 0 13px; }
textarea { min-height: 110px; padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(71,121,255,.11); }
.form-error { margin: 0; padding: 10px 12px; border-radius: 9px; background: #ffebe9; color: #a62e27; font-size: .82rem; }
.back-link { display: inline-block; margin-top: 28px; color: var(--muted); font-size: .82rem; font-weight: 700; }

/* Application frame */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 26px 18px 20px;
  background: #091523;
  color: white;
}
.app-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; font-size: .92rem; color: #b7c2cf; }
.app-brand strong { color: white; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 0 13px; border-radius: 11px; color: #92a1b3; font-size: .86rem; font-weight: 680; transition: .15s; }
.side-nav a span { display: grid; width: 22px; place-items: center; font-size: 1.07rem; }
.side-nav a:hover { background: rgba(255,255,255,.05); color: white; }
.side-nav a.active { background: rgba(255,107,61,.14); color: #ff8b66; }
.side-note { margin-top: auto; padding: 16px; border: 1px solid var(--line-dark); border-radius: 14px; background: rgba(255,255,255,.035); }
.side-note p { margin: 0; color: #8090a3; font-size: .71rem; line-height: 1.5; }
.side-note strong { display: block; margin-bottom: 3px; color: #dbe3eb; font-size: .76rem; }
.live-dot { display: block; width: 7px; height: 7px; margin-bottom: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(110,231,197,.1); }
.side-user { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; margin-top: 16px; padding: 12px 2px 0; border-top: 1px solid var(--line-dark); }
.side-user-profile { display: grid; min-width: 0; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 4px; border-radius: 11px; transition: background .15s; }
.side-user-profile:hover, .side-user-profile.active { background: rgba(255,255,255,.06); }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #23344a; color: #dce5ed; font-size: .7rem; font-weight: 850; }
.side-user strong, .side-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user strong { font-size: .76rem; }
.side-user span { max-width: 125px; color: #718196; font-size: .64rem; }
.icon-button { display: grid; width: 31px; height: 31px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #718196; cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.07); color: white; }
.main-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { display: flex; min-height: 136px; align-items: center; justify-content: space-between; gap: 30px; padding: 27px clamp(26px, 4vw, 60px); border-bottom: 1px solid var(--line); background: rgba(243,246,248,.92); backdrop-filter: blur(16px); }
.topbar h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.7rem); }
.topbar-kicker { margin: 0 0 5px; color: var(--orange); font-size: .67rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.today { color: var(--muted); font-size: .78rem; font-weight: 670; }
.menu-button { display: none; }
.view { padding: 38px clamp(26px, 4vw, 60px) 80px; }
.flash { position: fixed; z-index: 60; top: 24px; right: 28px; max-width: 420px; padding: 13px 18px; border-radius: 11px; background: var(--ink); box-shadow: var(--shadow); color: white; font-size: .82rem; }

/* Shared views */
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.view-heading h2 { margin-bottom: 8px; }
.view-heading p { max-width: 660px; margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 35px; }
.stat-card { position: relative; min-height: 142px; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat-card::after { content: ""; position: absolute; right: -24px; bottom: -30px; width: 76px; height: 76px; border: 16px solid var(--stat-color, var(--blue-soft)); border-radius: 50%; opacity: .65; }
.stat-card strong { display: block; margin: 10px 0 7px; font-size: 2rem; line-height: 1; }
.stat-card span { color: var(--muted); font-size: .77rem; }
.stat-label { display: flex; align-items: center; gap: 8px; color: #344257; font-size: .72rem; font-weight: 780; text-transform: uppercase; letter-spacing: .06em; }
.stat-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--blue)); }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 22px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.panel-head a { color: var(--blue); font-size: .76rem; font-weight: 750; }
.panel-body { padding: 20px 22px; }
.loading-state, .empty-state { display: grid; min-height: 320px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.loader { width: 28px; height: 28px; border: 3px solid #d9e1e8; border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 1.02rem; }

/* Opportunity cards and lists */
.match-list { display: grid; }
.match-row { display: grid; grid-template-columns: 47px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 18px 0; border-bottom: 1px solid #e7ebef; cursor: pointer; }
.match-row:first-child { padding-top: 0; }
.match-row:last-child { padding-bottom: 0; border: 0; }
.match-row:hover h4 { color: var(--blue); }
.score-ring { display: grid; width: 44px; height: 44px; place-items: center; border: 4px solid var(--score-color, var(--mint)); border-radius: 50%; font-size: .7rem; font-weight: 850; }
.match-row h4 { margin: 0 0 4px; font-size: .92rem; line-height: 1.3; transition: color .15s; }
.match-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: .7rem; }
.match-side { min-width: 130px; text-align: right; }
.match-side span { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; }
.pill { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; background: #edf1f4; color: #526175; font-size: .65rem; font-weight: 800; text-transform: capitalize; }
.pill.strong, .pill.open, .pill.completed, .pill.ready, .pill.shortlisted, .pill.active { background: var(--mint-soft); color: #166b58; }
.pill.possible, .pill.monitoring, .pill.forthcoming { background: #fff5dc; color: #8b6511; }
.pill.exploratory, .pill.dismissed, .pill.failed { background: #ffedeb; color: #a23b34; }
.pill.reviewing, .pill.sent { background: var(--blue-soft); color: #345bc1; }
.source-stack { display: grid; gap: 10px; }
.source-row { display: grid; grid-template-columns: 35px 1fr auto; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e9edf1; }
.source-row:last-child { border: 0; }
.source-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: .67rem; font-weight: 900; text-transform: uppercase; }
.source-row strong, .source-row span { display: block; }
.source-row strong { font-size: .8rem; }
.source-row span { color: var(--muted); font-size: .67rem; }

.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(125px, .28fr)); gap: 10px; margin-bottom: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.search-field { position: relative; }
.search-field::before { content: "⌕"; position: absolute; z-index: 1; left: 14px; top: 9px; color: var(--muted); font-size: 1.2rem; }
.search-field input { padding-left: 40px; }
.filter-bar input, .filter-bar select { height: 42px; border: 0; background: #f3f6f8; }
.filter-bar input:focus, .filter-bar select:focus { box-shadow: 0 0 0 2px var(--blue); }
.tender-table { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.tender-table-head, .tender-item { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(130px, .55fr) 110px 105px; gap: 16px; align-items: center; }
.tender-table-head { padding: 12px 20px; border-bottom: 1px solid var(--line); background: #f9fafb; color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.tender-item { min-height: 124px; padding: 18px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.tender-item:last-child { border: 0; }
.tender-item:hover { background: #fbfcfd; }
.tender-title { margin: 0 0 5px; font-size: .93rem; line-height: 1.35; }
.tender-item:hover .tender-title { color: var(--blue); }
.tender-summary { display: -webkit-box; overflow: hidden; margin: 0 0 7px; color: var(--muted); font-size: .74rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tender-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted-2); font-size: .65rem; }
.fit-cell strong, .deadline-cell strong { display: block; font-size: .8rem; }
.fit-cell span, .deadline-cell span { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.demo-label { color: #95691c; font-weight: 750; }

/* Clients and briefs */
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.client-card { position: relative; min-height: 270px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; transition: transform .16s, box-shadow .16s; }
.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.client-monogram { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 24px; border-radius: 12px; background: var(--ink); color: white; font-size: .72rem; font-weight: 850; }
.client-card h3 { margin-bottom: 8px; }
.client-card > p { display: -webkit-box; overflow: hidden; min-height: 46px; color: var(--muted); font-size: .78rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.client-stats { display: flex; gap: 22px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.client-stats strong, .client-stats span { display: block; }
.client-stats strong { font-size: 1.15rem; }
.client-stats span { color: var(--muted); font-size: .64rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 8px; border-radius: 7px; background: #f0f3f5; color: #59687a; font-size: .64rem; font-weight: 650; }
.brief-grid { display: grid; gap: 15px; }
.brief-card { display: grid; grid-template-columns: 95px minmax(0,1fr) auto; gap: 22px; align-items: center; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; }
.brief-card:hover { border-color: #b9c6d1; }
.brief-date { display: grid; min-height: 76px; place-items: center; align-content: center; border-radius: 13px; background: var(--ink); color: white; text-align: center; }
.brief-date strong { font-size: 1.5rem; line-height: 1; }
.brief-date span { color: #9eacba; font-size: .62rem; text-transform: uppercase; }
.brief-card h3 { margin-bottom: 6px; }
.brief-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.brief-count { text-align: right; }
.brief-count strong, .brief-count span { display: block; }
.brief-count strong { font-size: 1.35rem; }
.brief-count span { color: var(--muted); font-size: .65rem; }

/* Team and account */
.team-panel { overflow: hidden; }
.team-panel .panel-head > div p { margin: 5px 0 0; color: var(--muted); font-size: .73rem; }
.team-table-head, .team-member { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(130px, .7fr) minmax(110px, .55fr) minmax(125px, .65fr); gap: 20px; align-items: center; }
.team-table-head { padding: 11px 22px; border-bottom: 1px solid var(--line); background: #f8fafb; color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.team-list { display: grid; }
.team-member { min-height: 88px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.team-member:last-child { border-bottom: 0; }
.team-member > div > small, .coverage-cell span { display: block; margin-top: 5px; color: var(--muted); font-size: .65rem; }
.team-identity { display: grid; min-width: 0; grid-template-columns: 43px minmax(0, 1fr); gap: 13px; align-items: center; }
.team-identity strong, .team-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-identity strong { font-size: .85rem; }
.team-identity span { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.member-avatar { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; background: var(--ink); color: white; font-size: .72rem; font-weight: 850; }
.role-label { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border-radius: 8px; background: #eef2f5; color: #4d5d70; font-size: .68rem; font-weight: 800; text-transform: capitalize; }
.role-label.admin { background: var(--blue-soft); color: #345bc1; }
.coverage-cell strong { font-size: 1.12rem; }
.assignment-fieldset { min-width: 0; margin: 25px 0 0; padding: 0; border: 0; }
.assignment-fieldset legend { margin-bottom: 3px; color: #35445a; font-size: .8rem; font-weight: 800; }
.assignment-fieldset > p { margin: 0 0 13px; color: var(--muted); font-size: .72rem; }
.assignment-grid { display: grid; max-height: 250px; grid-template-columns: 1fr 1fr; gap: 9px; overflow-y: auto; padding: 2px; }
.assignment-option { position: relative; display: grid; min-width: 0; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; cursor: pointer; }
.assignment-option:hover { border-color: #b9c6d1; }
.assignment-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.assignment-mark { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #b7c3cf; border-radius: 6px; background: white; }
.assignment-option input:checked + .assignment-mark { border-color: var(--blue); background: var(--blue); }
.assignment-option input:checked + .assignment-mark::after { content: "✓"; color: white; font-size: .7rem; font-weight: 900; }
.assignment-option input:focus-visible + .assignment-mark { outline: 3px solid rgba(71,121,255,.25); outline-offset: 2px; }
.assignment-option strong, .assignment-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-option strong { font-size: .75rem; }
.assignment-option small { margin-top: 2px; color: var(--muted); font-size: .63rem; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; }
.account-grid { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(360px, 1.22fr); gap: 22px; }
.account-identity-card { overflow: hidden; padding: 30px; border-radius: var(--radius); background: var(--ink); color: white; }
.account-avatar { display: grid; width: 68px; height: 68px; place-items: center; margin-bottom: 42px; border-radius: 19px; background: var(--orange); font-size: 1rem; font-weight: 900; }
.account-identity-card .eyebrow { margin-bottom: 8px; color: var(--mint); }
.account-identity-card h2 { margin-bottom: 8px; }
.account-identity-card > div > p:last-child { color: #96a5b7; }
.account-details { display: grid; gap: 0; margin: 30px -30px -30px; }
.account-details > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 15px; padding: 13px 30px; border-top: 1px solid var(--line-dark); }
.account-details dt { color: #75869a; font-size: .67rem; }
.account-details dd { margin: 0; overflow: hidden; color: #dce5ed; font-size: .72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-settings-stack { display: grid; gap: 13px; }
.settings-card { display: grid; min-height: 150px; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; align-content: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.settings-card h3 { margin-bottom: 7px; }
.settings-card p { max-width: 620px; margin: 0; color: var(--muted); font-size: .78rem; }
.settings-card a, .text-button { display: inline-block; margin-top: 13px; border: 0; padding: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: .75rem; font-weight: 760; }
.settings-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; font-size: 1rem; font-weight: 900; }
.settings-icon.mint { background: var(--mint-soft); color: #166b58; }
.settings-icon.blue { background: var(--blue-soft); color: #345bc1; }
.settings-icon.orange { background: var(--orange-soft); color: #b44625; }
.password-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.password-form label span { display: block; margin-bottom: 6px; color: #405064; font-size: .65rem; font-weight: 750; }
.password-form input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; background: #fbfcfd; }
.password-form .form-error { grid-column: 1 / -1; color: var(--danger); }
.password-form .button { grid-column: 1 / -1; justify-self: start; }

/* Dialogs */
dialog { max-height: calc(100vh - 36px); border: 0; padding: 0; box-shadow: 0 35px 100px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(5,14,25,.65); backdrop-filter: blur(5px); }
.detail-dialog { width: min(880px, calc(100% - 30px)); border-radius: 22px; }
.client-dialog { width: min(780px, calc(100% - 30px)); border-radius: 22px; }
.dialog-close { position: sticky; z-index: 3; top: 14px; float: right; width: 38px; height: 38px; margin: 14px 14px -52px 0; border: 0; border-radius: 50%; background: #eef2f5; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.detail-hero { padding: 38px 42px 30px; background: var(--ink); color: white; }
.detail-hero .eyebrow { color: var(--mint); }
.detail-hero h2 { max-width: 710px; margin-bottom: 14px; }
.detail-hero p { max-width: 720px; margin: 0; color: #b5c0cd; }
.detail-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.detail-hero-meta span { padding: 6px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #c8d1db; font-size: .67rem; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr); gap: 30px; padding: 34px 42px 45px; }
.detail-section { margin-bottom: 28px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h3 { margin-bottom: 11px; }
.detail-section p { color: #4f5d70; }
.match-explanation { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; }
.match-explanation + .match-explanation { margin-top: 12px; }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 13px; }
.dimension-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 15px 0; }
.dimension { padding: 10px; border-radius: 9px; background: white; }
.dimension span, .dimension strong { display: block; }
.dimension span { color: var(--muted); font-size: .63rem; text-transform: capitalize; }
.dimension strong { margin-top: 2px; font-size: .76rem; }
.risk-list { margin: 10px 0 0; padding-left: 18px; color: #7d4039; font-size: .74rem; }
.review-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.review-actions button { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; font-size: .7rem; font-weight: 750; }
.review-actions button:hover { border-color: var(--blue); color: var(--blue); }
.facts-list { display: grid; gap: 9px; }
.fact { padding: 12px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.fact strong, .fact span { display: block; }
.fact strong { font-size: .73rem; }
.fact span { color: var(--muted); font-size: .68rem; }
.source-link { display: block; margin-bottom: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; font-size: .73rem; font-weight: 750; }
.source-link:hover { border-color: var(--blue); color: var(--blue); }
.source-link small { display: block; margin-top: 4px; color: var(--muted); font-size: .66rem; font-weight: 600; }
.client-form { padding: 35px 38px; }
.dialog-heading { padding-right: 45px; }
.dialog-heading h2 { margin-bottom: 8px; }
.dialog-heading > p:last-child { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 28px; }
.span-2 { grid-column: span 2; }
.value-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.mobile-scrim { display: none; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .section-grid { grid-template-columns: 1fr; }
  .source-stack { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --sidebar: 270px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 28px 24px 45px; }
  .login-promise { padding: 65px 0 50px; }
  .login-promise h1 { font-size: clamp(2.75rem, 13vw, 4.4rem); }
  .login-proof { flex-wrap: wrap; }
  .login-panel { min-height: 620px; padding: 50px 24px; }
  .sidebar { transform: translateX(-105%); box-shadow: var(--shadow); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .mobile-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(5,14,25,.48); }
  .mobile-scrim.open { display: block; }
  .topbar { min-height: 110px; padding: 20px; }
  .menu-button { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .topbar h1 { font-size: 1.65rem; }
  .today { display: none; }
  .topbar-actions .button { display: none; }
  .view { padding: 26px 18px 60px; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 126px; padding: 17px; }
  .match-row { grid-template-columns: 42px 1fr; }
  .match-side { grid-column: 2; text-align: left; }
  .source-stack { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .tender-table-head { display: none; }
  .tender-item { grid-template-columns: 1fr auto; gap: 14px; }
  .tender-main { grid-column: span 2; }
  .fit-cell { grid-column: 1; }
  .deadline-cell { grid-column: 2; text-align: right; }
  .tender-item > .pill { display: none; }
  .client-grid { grid-template-columns: 1fr; }
  .brief-card { grid-template-columns: 70px 1fr; gap: 15px; }
  .brief-count { display: none; }
  .team-table-head { display: none; }
  .team-member { grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .team-identity { grid-column: span 2; }
  .assignment-grid { grid-template-columns: 1fr; }
  .account-identity-card { padding: 24px; }
  .account-details { margin: 25px -24px -24px; }
  .account-details > div { padding-inline: 24px; }
  .password-form { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; padding: 28px 24px 36px; }
  .detail-hero { padding: 34px 24px 28px; }
  .client-form { padding: 30px 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .value-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 108px; }
  .login-proof div { min-width: 0; flex: 1; }
  .dimension-grid { grid-template-columns: 1fr; }
  .value-fields { grid-template-columns: 1fr; }
}
