:root {
  color-scheme: light;
  --navy: #071d49; --ink: #14274b; --muted: #4a5979; --lilac: #a78ac0;
  --paper: #f6f2fa; --line: #e0d8ea; --orange: #ef7d00; --rose: #a52849;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--navy); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #8153a8; outline-offset: 3px;
}
.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; min-height: 86px; gap: 24px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; }
.brand img { width: 198px; height: auto; display: block; }
nav { display: flex; gap: 5px; flex-wrap: wrap; }
nav a { text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 650; }
nav a:hover, nav a[aria-current] { background: #f0e8f7; }
.logout { margin: 0; }
.welcome { display: grid; grid-template-columns: 1.65fr 1fr; min-height: 535px; margin-block: 56px 36px; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex;
  border-radius: 28px 0 0 28px; background: var(--navy); color: white;
}
.hero-copy { z-index: 1; padding: clamp(32px, 5vw, 74px); padding-bottom: 160px; }
.project-name {
  margin: 0 0 17px; color: #dbc5ee; font-size: 1rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .19em;
}
h1,h2,p { margin-top: 0; }
.hero h1 { margin: 0 0 23px; font-size: clamp(2.4rem, 5vw, 4.75rem); line-height: .99; letter-spacing: -.063em; }
.hero-description { font-size: 1.125rem; color: #ece5f5; max-width: 26rem; margin-bottom: 0; }
.hero-art { position: absolute; right: -72px; bottom: -80px; width: min(78%, 515px); transform: rotate(180deg); z-index: -1; }
.signin {
  border: 1px solid var(--line); border-left: 0; background: #fff; padding: clamp(26px, 4vw, 55px);
  border-radius: 0 28px 28px 0; display: flex; align-items: center;
}
.signin > div { width: 100%; }
.signin h2 { font-size: 2.15rem; margin-bottom: 5px; letter-spacing: -.04em; line-height: 1.1; }
.signin p { color: var(--muted); margin-bottom: 28px; }
.stack { display: grid; gap: 18px; }
label { color: var(--navy); display: grid; gap: 6px; font-weight: 650; font-size: .94rem; }
input:not([type="checkbox"]),textarea,select {
  width: 100%; min-width: 0; border: 1px solid #c9c1d5; background: #fdfcff; color: var(--ink);
  padding: 11px 12px; border-radius: 8px; font: inherit; font-weight: 400;
}
textarea { resize: vertical; }
small { font-weight: 400; color: var(--muted); }
button,.button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 42px;
  border: 1px solid transparent; border-radius: 9px; padding: 8px 15px; color: var(--navy);
  font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
.primary { background: var(--navy); color: #fff; }
.primary:hover { background: #193b73; }
.signin .primary { background: var(--orange); color: #171b2a; min-height: 48px; }
.signin .primary:hover { background: #ff9f29; }
.quiet { background: #fff; border-color: var(--line); }
.quiet:hover { background: #f0e8f7; }
.danger { background: #a32142; color: white; }
.danger:hover { background: #801736; }
.danger-link { color: var(--rose); }
.foot {
  margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 15px;
  border-top: 1px solid var(--line); color: var(--muted); padding-block: 20px 26px; font-size: .875rem;
}
.foot strong { color: var(--navy); }
.workspace { padding-block: 36px 52px; }
.page-heading { display: flex; gap: 15px; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.page-heading h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.045em; line-height: 1.08; }
.page-heading p { color: var(--muted); margin: 8px 0 0; }
.quick,.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.quick { margin-bottom: 32px; }
.quick .tile { background: var(--navy); color: #fff; border: 1px solid var(--navy); padding-block: 23px; }
.quick .tile:hover { background: #193b73; }
.quick .tile span { color: #f0e5fa; }
.tile,.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; }
.tile { display: grid; align-content: start; gap: 6px; text-decoration: none; }
.tile:hover { border-color: var(--lilac); background: #fdfaff; }
.tile strong { font-size: 1.16rem; line-height: 1.25; }
.tile span { color: var(--muted); }
.tile .pill,.pill { border-radius: 20px; width: max-content; padding: 3px 9px; background: #eee6f6; color: #443256; font-size: .8rem; font-weight: 700; }
.tile .pill { margin-bottom: 4px; }
.tile .complete,.pill.complete { background: #deefe3; color: #184c2c; }
.pill.failed { background: #ffe7ed; color: #801736; }
.panel > :last-child { margin-bottom: 0; }
.table-panel { padding: 22px 0 0; }
.table-scroll { overflow-x: auto; }
.search { padding-inline: 22px; display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.search label { width: min(100%, 350px); }
.count,.empty { margin: 14px 22px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th,td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead { background: #f0e9f6; color: var(--navy); }
tbody tr:nth-child(even) { background: #fbf8fd; }
tbody th { font-weight: 650; }
.row-actions { display: table-cell; white-space: nowrap; }
.row-actions a + a { margin-left: 9px; }
.code { white-space: nowrap; font: 700 .88rem ui-monospace, monospace; }
.notice { border: 1px solid transparent; padding: 10px 13px; border-radius: 8px; margin-bottom: 16px; }
.notice.success { color: #184c2c; background: #e5f4e9; border-color: #b8d8c1; }
.notice.error,.signin .notice.error { color: #801736; background: #fcecf0; border-color: #ecc1ce; }
.editor { max-width: 870px; }
fieldset { padding: 15px; margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 9px; }
legend { color: var(--navy); font-weight: 750; padding-inline: 6px; }
.form-grid,.user-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; }
.check,.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check input { width: 17px; height: 17px; accent-color: var(--navy); }
.user-grid { grid-template-columns: minmax(230px,.8fr) minmax(0,1.2fr); align-items: start; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .welcome { margin-top: 28px; }
  .hero-copy { padding-bottom: 135px; }
  .hero-art { right: -23px; bottom: -40px; }
  .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { padding-block: 12px; flex-wrap: wrap; gap: 7px; }
  .brand img { width: 155px; }
  nav { order: 3; width: 100%; }
  nav a { padding: 6px 8px; font-size: .9rem; }
  .welcome,.quick,.tiles,.form-grid,.user-grid { grid-template-columns: 1fr; }
  .welcome { margin-block: 20px 25px; }
  .hero { min-height: 330px; border-radius: 18px 18px 0 0; }
  .hero-copy { padding: 27px 22px 110px; }
  .hero-art { max-width: 300px; }
  .signin { border-radius: 0 0 18px 18px; border-left: 1px solid var(--line); }
  .page-heading { align-items: start; flex-direction: column; }
}

.lab-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.lab-field-head { display: flex; gap: 8px; align-items: center; min-height: 26px; }
.lab-field-head .lab-info {
  flex: 0 0 26px; min-height: 26px; padding: 0; border-radius: 50%;
  background: #f0e8f7; color: var(--navy); border-color: #d3c3e1; line-height: 1;
}
.lab-field-head .lab-info:hover { background: #e1d1ed; }
.lab-checkbox { width: 17px; height: 17px; margin: 4px 0; accent-color: var(--navy); }
.lab-tooltip {
  width: min(21rem, calc(100vw - 24px)); padding: 12px 14px; border: 0;
  border-radius: 8px; background: var(--navy); color: white; font-size: .92rem;
  box-shadow: 0 4px 16px #071d4933;
}
@supports (position-area: block-end) {
  .lab-tooltip {
    position-area: block-end span-inline-end; position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
    margin: 6px 0 0;
  }
}



.budget-form { margin-bottom: 20px; }

.budget-list-actions { margin-top: 16px; }

.budget-total { color: var(--navy); font-size: 1.9rem; font-weight: 750; }
.budget-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.budget-category { border-top: 1px solid var(--line); }
.budget-category summary { cursor: pointer; padding: .8rem .35rem; }
.budget-category summary strong { float: right; margin-left: .75rem; }
.budget-category summary:hover { background: var(--paper); }
.budget-category td:last-child { white-space: nowrap; }

