:root {
  --navy: #061737;
  --deep: #03102a;
  --blue: #0742b2;
  --bright: #1264ee;
  --cream: #fffaf0;
  --gold: #d9ae53;
  --ice: #a7c7ff;
  --ink: #071b49;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--deep);
  color: var(--cream);
  font-family: "Courier New", monospace;
  font-size: 13px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.app {
  min-height: 100vh;
  border: 4px double #3479ee;
  background: var(--navy);
}
header {
  height: 78px;
  border-bottom: 3px solid #2464d4;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 15px 22px;
  background: #051331;
}
.brand {
  font-size: 30px;
  font-weight: 1000;
  white-space: nowrap;
  letter-spacing: -2px;
  text-shadow: 3px 3px #002e89;
}
.brand span {
  color: var(--gold);
}
.motto {
  color: var(--ice);
  font-size: 11px;
  letter-spacing: 2px;
}
.head-right {
  margin-left: auto;
  color: var(--ice);
  font-size: 12px;
  white-space: nowrap;
}
.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 78px);
}
aside {
  border-right: 3px solid #2464d4;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav {
  background: none;
  border: 0;
  color: var(--ice);
  text-align: left;
  padding: 14px 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.nav .ico {
  font-size: 21px;
  width: 25px;
  text-align: center;
}
.nav.active {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 4px 4px 0 #164ab0;
}
.nav:hover:not(.active) {
  background: #0d2b62;
}
.studio {
  margin-top: auto;
  border: 2px solid #2773df;
  padding: 16px;
  color: var(--ice);
  line-height: 1.9;
}
.studio b {
  color: var(--gold);
}
main {
  padding: 16px;
  min-width: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}
.stat {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid #2672df;
  box-shadow: 4px 4px #010b1c;
  padding: 17px 13px;
  min-height: 112px;
}
.stat .label {
  font-weight: 900;
  font-size: 12px;
}
.stat .num {
  font-size: 30px;
  font-weight: 900;
  margin: 5px 0;
}
.stat .sub {
  font-size: 11px;
  color: var(--blue);
}
.stat .symbol {
  float: left;
  font-size: 27px;
  margin-right: 10px;
  color: var(--blue);
}
.grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 15px;
}
.window {
  border: 3px solid #2672df;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 4px 4px #010b1c;
  min-width: 0;
}
.bar {
  background: linear-gradient(90deg, #0640b4, #09275f);
  color: white;
  padding: 10px 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.bar button {
  color: white;
  background: none;
  border: 0;
  text-decoration: underline;
}
.inner {
  padding: 13px;
}
.rowitem {
  padding: 12px 4px;
  border-bottom: 1px solid #c9d5e8;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rowitem:last-child {
  border-bottom: 0;
}
.small {
  font-size: 11px;
  color: #48618c;
  margin-top: 4px;
}
.tiny {
  font-size: 10px;
}
.muted {
  color: #6680a7;
}
.gold {
  color: #a6781d;
}
.artgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.arttile {
  min-width: 0;
}
.artpic {
  height: 112px;
  background: linear-gradient(
    140deg,
    #03245e 5%,
    #0c61d8 35%,
    #f1bb92 55%,
    #0c2b83 70%,
    #d8ab4c
  );
  border: 3px solid #fff;
  outline: 1px solid #c8aa65;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  overflow: hidden;
}
.artpic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.arttile b {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.pill {
  display: inline-block;
  padding: 5px 9px;
  background: #d5e4ff;
  color: #082d80;
  font-weight: bold;
  font-size: 10px;
}
.pill.sold {
  background: #e8ca85;
  color: #513b11;
}
.pill.progress {
  background: #f2d8a1;
  color: #513b11;
}
.check {
  width: 19px;
  height: 19px;
  accent-color: #0848c5;
  flex-shrink: 0;
}
.btn {
  background: #063caa;
  border: 2px solid #063caa;
  color: white;
  font-weight: bold;
  padding: 10px 14px;
  box-shadow: 3px 3px #b7c8e7;
}
.btn.secondary {
  background: var(--cream);
  color: var(--ink);
}
.btn.goldbtn {
  background: var(--gold);
  color: var(--ink);
  border-color: #a57b2c;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar h2 {
  margin: 0;
  color: var(--cream);
  font-size: 22px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: bold;
}
.field.wide {
  grid-column: 1/-1;
}
input,
select,
textarea {
  padding: 10px;
  border: 2px solid #9db5dd;
  background: white;
  color: #061737;
  width: 100%;
  border-radius: 0;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
.records {
  width: 100%;
  border-collapse: collapse;
}
.records th,
.records td {
  text-align: left;
  padding: 12px 9px;
  border-bottom: 1px solid #cbd6e8;
  vertical-align: top;
}
.records th {
  font-size: 11px;
  color: #395b92;
}
.records td {
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.action {
  background: #d7e5fc;
  color: #092c7b;
  border: 1px solid #96b6e8;
  padding: 6px 8px;
  font-weight: bold;
}
.action.delete {
  color: #9d2b3b;
  background: #ffe3e3;
}
.empty {
  padding: 32px;
  text-align: center;
  color: #5e739b;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}
.day {
  padding: 9px 2px;
  border: 1px solid #d6dfef;
  font-size: 11px;
}
.day.today {
  background: #0b54d1;
  color: white;
}
.day.has {
  border-bottom: 3px solid var(--gold);
}
.foot {
  margin-top: 22px;
  color: var(--ice);
  font-size: 11px;
}
.modalshade {
  position: fixed;
  inset: 0;
  background: #000b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  z-index: 10;
}
.modal {
  background: var(--cream);
  color: var(--ink);
  width: min(640px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 4px solid #2672df;
  box-shadow: 8px 8px #00163c;
}
.modal .inner {
  padding: 20px;
}
.modalbuttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.search {
  max-width: 310px;
}
.notice {
  padding: 11px;
  border: 1px dashed #c4d2e8;
  background: #e9f0fb;
  margin: 12px 0;
  font-size: 11px;
}
.link {
  color: #0b4eb8;
}
.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sectionhead h3 {
  margin: 0;
}
.subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}
@media (max-width: 1050px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid > .window:last-child {
    grid-column: 1/-1;
  }
  .artgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  header {
    height: auto;
    flex-wrap: wrap;
    padding: 13px;
  }
  .brand {
    font-size: 25px;
  }
  .motto {
    display: none;
  }
  .head-right {
    font-size: 10px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    flex-direction: row;
    overflow: auto;
    border-right: 0;
    border-bottom: 2px solid #2672df;
    padding: 7px;
    gap: 3px;
  }
  .nav {
    width: auto;
    white-space: nowrap;
    padding: 10px;
  }
  .nav .ico {
    font-size: 16px;
    width: auto;
  }
  .studio {
    display: none;
  }
  main {
    padding: 12px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 11px;
    min-height: 95px;
  }
  .stat .num {
    font-size: 24px;
  }
  .grid,
  .subgrid {
    grid-template-columns: 1fr;
  }
  .grid > .window:last-child {
    grid-column: auto;
  }
  .artgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .records {
    font-size: 11px;
  }
  .records th,
  .records td {
    padding: 7px 3px;
  }
}

.auth-screen[hidden] {
  display: none !important;
}
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #03102a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: min(440px, 100%);
  padding: 32px 25px;
  border: 3px solid #2672df;
  background: #061737;
  box-shadow: 8px 8px #010819;
}
.auth-card label {
  display: block;
  margin: 18px 0;
  font-weight: bold;
  color: #a7c7ff;
}
.auth-card input,
.auth-card select {
  margin-top: 7px;
}
.auth-card .btn {
  width: 100%;
  min-height: 48px;
}
.auth-card .brand {
  font-size: 36px;
}
@media (max-width: 700px) {
  body {
    padding-bottom: 76px;
  }
  .app {
    border: 0;
  }
  header {
    height: 65px;
    padding: 10px 12px;
    gap: 6px;
  }
  .brand {
    font-size: 24px;
  }
  .motto {
    display: none;
  }
  .head-right {
    font-size: 9px;
    text-align: right;
  }
  .layout {
    display: block;
  }
  aside {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
    height: 74px;
    background: #041331;
    border: 0;
    border-top: 3px solid #2672df;
    padding: 5px;
    overflow-x: auto;
    display: block;
    scrollbar-width: none;
  }
  #navitems {
    display: flex;
    width: max-content;
    gap: 2px;
  }
  .nav {
    width: 78px;
    min-width: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    font-size: 9px;
    height: 59px;
  }
  .nav .ico {
    font-size: 20px;
  }
  .studio {
    display: none;
  }
  main {
    padding: 12px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid,
  .subgrid {
    grid-template-columns: 1fr;
  }
  .grid > .window:last-child {
    grid-column: auto;
  }
  .artgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .modalshade {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 92dvh;
    border-width: 3px 0 0;
  }
  .modal .inner {
    padding: 16px;
  }
  .toolbar .btn {
    min-height: 46px;
  }
  .records {
    min-width: 570px;
  }
  .stat {
    padding: 12px 9px;
  }
  .stat .symbol {
    font-size: 21px;
  }
}

/* ART.CRM 2.0 opportunity pipeline */
.pipeline-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.pipeline-stat {
  background: var(--cream);
  border: 3px solid var(--blue);
  padding: 13px;
  color: var(--ink);
  box-shadow: 3px 3px #010819;
}
.pipeline-stat strong {
  display: block;
  font-size: 23px;
}
.pipeline-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 18px;
}
.pipeline-tools input,
.pipeline-tools select {
  background: var(--cream);
  border: 2px solid var(--blue);
  color: var(--ink);
  padding: 10px;
  max-width: 100%;
}
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 3px 3px 18px;
}
.pipeline-column {
  background: #0a2355;
  border: 2px solid #2672df;
  min-height: 240px;
}
.pipeline-head {
  background: #1043a1;
  padding: 12px;
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.pipeline-cards {
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.pipeline-card {
  background: var(--cream);
  color: var(--ink);
  padding: 12px;
  border-left: 5px solid var(--gold);
  overflow-wrap: anywhere;
}
.pipeline-card b {
  font-size: 13px;
}
.pipeline-card .meta {
  color: #375c9b;
  font-size: 11px;
  margin: 7px 0;
}
.pipeline-card .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pipeline-card a {
  color: #0644b1;
  text-decoration: underline;
  font-weight: bold;
}
.pipeline-card button {
  border: 1px solid #1356bd;
  background: #fff;
  padding: 6px;
  color: #071b49;
}
.pipeline-empty {
  color: #a7c7ff;
  font-size: 11px;
  padding: 12px;
  text-align: center;
}
.pipeline-list {
  display: grid;
  gap: 10px;
}
.pipeline-list .pipeline-card {
  border: 2px solid #2672df;
  border-left: 5px solid var(--gold);
}
.pipeline-hint {
  color: #a7c7ff;
  font-size: 11px;
  margin: 8px 0 15px;
}
.pipeline-form .formgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pipeline-form .field.wide {
  grid-column: 1/-1;
}
.pipeline-form .field input,
.pipeline-form .field textarea,
.pipeline-form .field select {
  width: 100%;
}
@media (max-width: 850px) {
  .pipeline-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pipeline-board {
    grid-template-columns: repeat(6, 230px);
  }
  .pipeline-form .formgrid {
    grid-template-columns: 1fr;
  }
}

/* ART.CRM 3.0: interactive dashboard, drag-and-drop pipeline, feedback states */
button.stat {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
button.stat:hover,
.arttile:hover,
.rowlink:hover {
  background: #fff3d6;
}
button.stat:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px #010b1c;
}
.rowlink {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid #c9d5e8;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.rowlink.plain {
  flex: 1;
  border: 0;
  padding: 0;
}
.arttile {
  background: none;
  border: 0;
  padding: 4px;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.calendar button.day {
  background: none;
  font: inherit;
  font-size: 11px;
  color: inherit;
  cursor: pointer;
}
.calendar button.day.today {
  background: #0b54d1;
  color: white;
}
.calendar button.day:hover {
  background: #f2d8a1;
}
.minihead {
  margin: 16px 0 4px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #395b92;
}
.overdue {
  color: #9d2b3b;
  font-weight: bold;
}
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  color: #0b4eb8;
  text-decoration: underline;
  font: inherit;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
}
.auth-card .linkbtn {
  display: block;
  margin: 14px auto 0;
  color: #a7c7ff;
  font-weight: normal;
}
.pipeline-tools input {
  flex: 1 1 220px;
  width: auto;
}
.pipeline-tools select {
  flex: 0 1 200px;
  width: auto;
}
.pipeline-card {
  cursor: grab;
  transition: opacity 0.15s;
}
.pipeline-card.dragging {
  opacity: 0.45;
}
.pipeline-card.saving {
  outline: 2px dashed var(--gold);
}
.savingnote {
  color: #a6781d;
  font-weight: bold;
}
.pipeline-card .cardtitle {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-weight: bold;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.pipeline-column.droptarget {
  border-color: var(--gold);
  background: #12306b;
  box-shadow: inset 0 0 0 3px var(--gold);
}
.movestage {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: bold;
  color: #375c9b;
  margin: 8px 0;
}
.movestage select {
  flex: 1;
  min-width: 0;
  padding: 5px;
  font-size: 11px;
}
.detailtitle {
  margin: 0 0 12px;
  font-size: 18px;
}
.details {
  margin: 0;
  display: grid;
  gap: 0;
}
.detailrow {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #cbd6e8;
}
.detailrow dt {
  font-size: 11px;
  font-weight: bold;
  color: #395b92;
}
.detailrow dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.prewrap {
  white-space: pre-wrap;
}
.formerror {
  color: #9d2b3b;
  font-weight: bold;
  min-height: 1em;
  margin: 12px 0 0;
}
.formerror:empty {
  margin: 0;
}
.statebox {
  margin: 40px auto;
  max-width: 460px;
  padding: 28px;
  text-align: center;
  background: var(--cream);
  color: var(--ink);
  border: 3px solid #2672df;
  box-shadow: 4px 4px #010b1c;
  font-weight: bold;
}
.statebox.error {
  border-color: #9d2b3b;
}
.spinner {
  font-size: 22px;
  color: var(--blue);
  margin-bottom: 10px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.35;
  }
}
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid #2672df;
  border-left: 8px solid var(--gold);
  box-shadow: 4px 4px #010b1c;
  padding: 11px 13px;
  font-weight: bold;
  font-size: 12px;
}
.toast.error {
  border-left-color: #9d2b3b;
  background: #ffe9e9;
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  button.stat:hover {
    transform: none;
  }
}
@media (max-width: 700px) {
  .toasts {
    bottom: 86px;
    right: 16px;
  }
  .detailrow {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .pipeline-tools input,
  .pipeline-tools select {
    flex: 1 1 100%;
  }
}

/* ART.CRM 3.1: mobile and touch.
   Layout changes apply below 700px; touch sizing applies to any coarse pointer
   (phones and tablets). */
html {
  -webkit-text-size-adjust: 100%;
}
.auth-screen {
  align-items: flex-start;
  overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) 16px
    max(20px, env(safe-area-inset-bottom));
}
.auth-card {
  margin: auto;
}
.rowlink {
  min-width: 0;
  overflow-wrap: anywhere;
}
.rowlink > div {
  min-width: 0;
}
.rowlink .pill {
  flex-shrink: 0;
}
.tablewrap {
  overflow-x: auto;
}
@media (max-width: 700px), (pointer: coarse) {
  /* 16px stops iOS Safari zooming into a focused field. */
  input,
  select,
  textarea,
  .movestage select {
    font-size: 16px;
  }
  input:not([type="checkbox"]),
  select {
    min-height: 44px;
  }
  .btn,
  .action,
  .pipeline-card .actions > *,
  .bar button,
  .auth-card .linkbtn,
  .records .linkbtn,
  .details .linkbtn,
  .details a,
  .cardtitle,
  .rowlink,
  .movestage select {
    min-height: 44px;
  }
  .action,
  .records .linkbtn,
  .pipeline-card .actions > * {
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .bar button {
    padding: 0 6px;
  }
  .auth-card .linkbtn {
    padding: 0 4px;
  }
  .records .linkbtn,
  .details .linkbtn,
  .details a,
  .cardtitle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    text-align: left;
  }
  .day {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .check {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 700px) {
  header {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    height: auto;
    min-height: 65px;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  aside {
    height: calc(74px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    scroll-snap-type: x proximity;
  }
  .nav {
    scroll-snap-align: start;
  }
  .toasts {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .toolbar h2 {
    font-size: 19px;
  }
  .search {
    max-width: none;
  }
  /* List tables become one card per record. */
  .records {
    min-width: 0;
    font-size: 13px;
  }
  .records thead {
    display: none;
  }
  .records tr {
    display: block;
    padding: 10px 0;
    border-bottom: 2px solid #cbd6e8;
  }
  .records td {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border: 0;
  }
  .records td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: bold;
    color: #395b92;
    text-transform: uppercase;
    padding-top: 2px;
  }
  .records td.rowactions {
    display: block;
    padding-top: 8px;
  }
  .records td.rowactions::before {
    content: none;
  }
  .records .actions .action {
    flex: 1;
  }
  /* Modals: bottom sheet with the title bar and buttons always reachable. */
  .modal {
    max-height: calc(100dvh - env(safe-area-inset-top) - 12px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal > .bar {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .modalbuttons {
    position: sticky;
    bottom: 0;
    background: var(--cream);
    margin: 16px -16px -16px;
    padding: 12px 16px;
    border-top: 1px solid #cbd6e8;
    flex-wrap: wrap;
  }
  .modalbuttons .btn {
    flex: 1 1 auto;
  }
  /* Pipeline: swipe between stage columns. */
  .pipeline-board {
    grid-template-columns: repeat(6, min(280px, 82vw));
    scroll-snap-type: x mandatory;
    scroll-padding: 3px;
    -webkit-overflow-scrolling: touch;
  }
  .pipeline-column {
    scroll-snap-align: start;
  }
  .pipeline-summary {
    gap: 8px;
  }
  .pipeline-stat {
    padding: 9px 10px;
    font-size: 11px;
  }
  .pipeline-stat strong {
    font-size: 19px;
  }
  .pipeline-tools select {
    flex: 1 1 40%;
  }
  .auth-card {
    padding: 24px 18px;
  }
  .auth-card .brand {
    font-size: 30px;
  }
}
