/* Adapted from the workspace, staff and upload styles in Sleep Number Store Photos. */
:root {
  color-scheme: light;
  --brand: #084069;
  --paper: #f5f7fa;
  --surface: #fff;
  --wash: #f5f5f5;
  --hover: #eaf2fa;
  --ink: #172d40;
  --muted: #5f7080;
  --line: #dce5ed;
  --selected: #d2e6ff;
  --selected-line: #aac7e6;
  --field-line: #b8c9d8;
  --stripe: #f8fafc;
  --table-head: #edf3f8;
  --green: #24583d;
  --yellow: #765313;
  --red: #852a2a;
  --workspace-font: "Segoe UI", Arial, sans-serif;
  --gutter: clamp(1rem, 3vw, 2.75rem);
  font: 100%/1.5 var(--workspace-font);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: .17em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #287db4; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl { margin: 0 0 .65rem; }
h1, h2, h3 { line-height: 1.23; font-weight: 650; letter-spacing: -.026em; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); }
h2 { font-size: clamp(1.12rem, 2vw, 1.35rem); }
h3 { font-size: 1.05rem; }
.app-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 1.25rem;
  min-height: 5.6rem;
  padding: .8rem var(--gutter);
  color: white;
  background: var(--brand);
}
.app-header :focus-visible { outline-color: var(--selected); }
.brand { display: block; width: fit-content; line-height: 0; }
.brand img {
  display: block;
  width: clamp(8.4rem, 18vw, 12.8rem);
  height: auto;
  padding: .33rem .55rem;
  background: white;
  border-radius: 5px;
}
.app-title { margin: 0; font-size: clamp(1.15rem, 2.1vw, 1.65rem); font-weight: 650; letter-spacing: -.025em; text-align: center; }
.workspace { max-width: 93rem; margin-inline: auto; padding: .9rem var(--gutter) max(2rem,env(safe-area-inset-bottom)); }
.workspace-nav, .nav-items, .account, .actions, .page-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.workspace-nav { justify-content: space-between; padding-bottom: .7rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.nav-items { gap: .15rem; }
.account { justify-content: end; margin-inline-start: auto; }
.workspace-nav form { margin: 0; }
.nav-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem;
  padding: .4rem .75rem; border: 1px solid transparent; border-radius: 7px;
  color: var(--brand); font-weight: 650; text-decoration: none;
}
.nav-link:is(:hover,:focus-visible) { background: var(--hover); }
.nav-link[aria-current]:not([aria-current=false]), .nav-link.active { background: var(--selected); border-color: var(--selected-line); }
.button, .workspace-button, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem;
  padding: .5rem .9rem; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.25; text-decoration: none;
  text-align: center; cursor: pointer;
}
:is(.button, .workspace-button, button, input[type=submit]):hover { background: var(--hover); }
.button-primary, .plus-button { background: var(--brand); border-color: var(--brand); color: white; }
:is(.button-primary,.plus-button):hover { background: #063558; }
.plus-button { display: inline-grid; place-items: center; min-width: 2.9rem; height: 2.9rem; border-radius: .75rem; font-size: 1.9rem; font-weight: 500; text-decoration: none; line-height: 1; }
:is(button,input):disabled { cursor: not-allowed; opacity: .55; }
.page-heading { justify-content: space-between; align-items: center; gap: .9rem; margin: 0 0 1.1rem; }
.page-heading > :is(h1,h2,p), .page-heading > div > :last-child { margin-bottom: 0; }
.muted, .hint, .helptext, small { color: var(--muted); font-size: .875rem; }
.card, .panel, .login-card, .receipt-card {
  display: block; min-width: 0; padding: clamp(1rem,2.5vw,1.5rem);
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: 0 3px 12px #16395408;
}
.card > :last-child, .panel > :last-child, .login-card > :last-child { margin-bottom: 0; }
.card + .card, .panel + .panel { margin-top: 1rem; }
.receipt-list { display: grid; gap: .7rem; list-style: none; padding: 0; margin: 0; }
.receipt-card { overflow-wrap: anywhere; }
a.receipt-card { color: inherit; text-decoration: none; }
a.receipt-card:hover { border-color: var(--selected-line); background: var(--hover); }
.status { display: inline-block; vertical-align: middle; padding: .22rem .6rem; border-radius: 5px; background: #eaf0f5; color: #344d60; font-size: .8rem; font-weight: 650; line-height: 1.45; }
.status-pending, .status-review { background: #fff2cf; color: var(--yellow); }
.status-approved, .status-ready, .status-posted { background: #e2f1e9; color: var(--green); }
.status-received { background: #e3f0fc; color: #174772; }
.status-missing { background: #fce8e7; color: var(--red); }
.status-closed { background: #eaf0f5; color: #344d60; }
.login-card { width: min(100%,26rem); margin: clamp(1.25rem, 8vh, 5rem) auto; padding: clamp(1.25rem,4vw,1.85rem); }
.login-card form { display: grid; gap: .9rem; }
.login-card button { justify-self: start; }
.form-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.field, .login-field { min-width: 0; display: grid; align-content: start; gap: .35rem; }
.field-wide { grid-column: 1/-1; }
fieldset { min-width: 0; margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 .3rem; font-weight: 650; }
label, dt { display: block; font-size: .9rem; font-weight: 650; }
dd { margin: .15rem 0 .75rem; overflow-wrap: anywhere; }
input:not([type=hidden],[type=checkbox],[type=radio],[type=submit],[type=file]), select, textarea {
  width: 100%; min-width: 0; min-height: 2.75rem; padding: .58rem .7rem;
  border: 1px solid var(--field-line); border-radius: 7px; background: var(--surface);
  color: var(--ink); line-height: 1.35;
}
select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position: right .92rem center,right .65rem center; background-size: .28rem .28rem;
  background-repeat: no-repeat;
}
textarea { min-height: 5.5rem; resize: vertical; }
input[type=file] { width: 100%; font-size: .9rem; }
input::file-selector-button { padding: .55rem .7rem; margin-right: .6rem; border-radius: 6px; border: 1px solid var(--field-line); background: var(--stripe); color: var(--brand); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 1rem; height: 1rem; }
input[readonly] { background-color: var(--stripe); }
.field-good :is(input,select,textarea), input.field-good { border-color: #7ca78b; background-color: #f1f8f3; }
.field-review :is(input,select,textarea), input.field-review { border-color: #bc9b43; background-color: #fff9e9; }
.field-good small { color: var(--green); }
.field-review small { color: var(--yellow); }
.actions { margin-top: 1rem; }
.actions form { margin: 0; }
.notice, .messages li { list-style: none; border-radius: 7px; padding: .7rem 1rem; background: #e3f0fc; color: #174772; }
.messages { padding: 0; }
.messages li + li { margin-top: .5rem; }
.messages .success { background: #e2f1e9; color: var(--green); }
.messages .error, .notice.error { color: var(--red); background: #fce8e7; }
.errorlist, .form-error { color: var(--red); }
.errorlist { margin: 0 0 .7rem; padding-inline-start: 1.2rem; }
.empty { color: var(--muted); padding: 1.15rem; }
.table-scroll { width: 100%; overflow: auto; border-radius: 8px; border: 1px solid var(--line); }
table { width: 100%; border-spacing: 0; background: var(--surface); font-size: .9rem; text-align: left; }
th, td { height: 2.7rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--table-head); font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:hover { background: var(--hover); }
.amount, .money, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.receipt-photo { display: block; max-height: 32rem; max-width: 100%; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 48rem) {
  .app-header { min-height: 4.6rem; grid-template-columns: auto 1fr; gap: .8rem; }
  .app-title { text-align: right; }
  .workspace { padding-top: .65rem; }
  .account { font-size: .85rem; }
  .workspace-nav { gap: .4rem; margin-bottom: 1rem; }
  .table-scroll table { min-width: 36rem; }
}
@media (max-width: 35rem) {
  .nav-link { padding: .4rem .5rem; }
  .form-grid, .detail-grid { grid-template-columns: minmax(0,1fr); }
  .actions { align-items: stretch; }
  .actions > .button, .actions > button { flex: 1 1 auto; }
  .card, .panel, .receipt-card { padding: 1rem; }
}
