/* Meal collection: keep the handle and fill on the same animated coordinate. */
.collect-swipe { --swipe-x: 0px; --swipe-progress: 0; position: relative; height: 60px; padding: 4px; overflow: hidden; border: 1px solid #dededc; border-radius: 32px; background: #efefed; isolation: isolate; }

/* Student account controls live in the header, outside the meal dashboard. */
#student-app > .grid { grid-template-columns: minmax(0, 1fr); }
.top { gap: 16px; }
#signed-in { flex-shrink: 0; }
.student-profile-menu { position: relative; }
.student-profile-menu > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 24px; padding: 9px 14px; background: white; color: var(--ink); font-weight: 650; }
.student-profile-menu > summary::-webkit-details-marker { display: none; }
.student-profile-menu > summary:focus-visible { outline: 2px solid var(--g); outline-offset: 3px; }
.student-profile-dropdown { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(300px, calc(100vw - 36px)); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 10px 30px #17241e20; overflow-wrap: anywhere; }
.student-profile-dropdown .sub { margin: 5px 0 16px; }
.student-profile-dropdown button { width: 100%; text-align: left; }
@media(max-width: 480px) { .top .brand { min-width: 0; } .top .brand-copy { font-size: 12px; } .top .brand small { font-size: 9px; } .student-profile-menu > summary { padding: 8px 10px; } }
.collect-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--swipe-x) + 56px); border-radius: inherit; background: #cdebd9; transition: width .5s cubic-bezier(.34,1.56,.64,1); }
.collect-label { position: absolute; inset: 0 12px 0 64px; display: flex; align-items: center; justify-content: center; color: #47584e; font-size: 14px; font-weight: 650; pointer-events: none; opacity: calc(1 - var(--swipe-progress) * .65); }
.collect-handle { position: relative; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #246846; font-size: 27px; box-shadow: 0 2px 8px #18382624; transform: translateX(var(--swipe-x)); transition: transform .5s cubic-bezier(.34,1.56,.64,1), background .2s, color .2s; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.collect-handle:focus-visible { outline: 3px solid #246846; outline-offset: -4px; }
.collect-swipe.dragging .collect-handle, .collect-swipe.dragging .collect-fill { transition: none; }
.collect-swipe.dragging .collect-handle { cursor: grabbing; }
.collect-swipe.pending .collect-handle, .collect-swipe.confirmed .collect-handle { cursor: default; }
.collect-swipe.pending .collect-label, .collect-swipe.confirmed .collect-label { inset: 0 64px 0 12px; opacity: 1; }
.collect-swipe.confirmed { border-color: #247348; background: #247348; }
.collect-swipe.confirmed .collect-fill { background: #247348; }
.collect-swipe.confirmed .collect-label { color: white; }
.collect-swipe.confirmed .collect-handle { color: #247348; }
@media (prefers-reduced-motion: reduce) { .collect-swipe .collect-handle, .collect-swipe .collect-fill { transition: none; } }

/* UniFeast Solutions visual system for the mess portal. */
:root {
  --brand: #ed3d3b;
  --brand-dark: #cf302e;
  --brand-orange: #ec8333;
  --ink: #2f2524;
  --muted: #847775;
  --line: #f0e3dc;
  --surface: #fff;
  --canvas: #fcf7f3;
  --soft: #fff2ea;
  --g: #d83d39;
  --g2: #b9322f;
  --mint: #fff0e9;
  --paper: #fcf7f3;
  --red: #b92e2e;
}

body {
  color: var(--ink);
  background: radial-gradient(circle at 8% 5%, #fff1e8 0, transparent 30%), var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f5a49a;
  outline-offset: 2px;
}
.top {
  min-height: 76px;
  padding: 11px clamp(18px, 3vw, 38px);
  background: rgba(255, 255, 255, .94);
  border-color: #f0e4de;
  box-shadow: 0 3px 18px rgba(94, 55, 37, .035);
  gap: 16px;
}
.brand { gap: 11px; min-width: 0; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.brand-copy { color: #302525; font-size: 15px; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.brand-copy small { margin-top: 3px; color: #9a8981; font-size: 10px; font-weight: 600; letter-spacing: .025em; }
#signed-in { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.wrap { max-width: 1140px; margin: 44px auto; }
.intro { max-width: 470px; margin: 0 auto 22px; }
.eyebrow { color: #c74e34; letter-spacing: .13em; }
.intro h1 { color: #302522; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.intro p, .sub { color: #897d77; }
.card {
  border: 1px solid #f0e6e0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(92, 54, 34, .055);
}
.card h2 { color: #332a29; font-weight: 750; }
#login-card { padding: clamp(24px, 4vw, 36px); }
#login-card h2 { font-size: 22px; }
#login-card .row { flex-wrap: wrap; }
.field { color: #675b57; font-weight: 700; }
input:not([type=range]), select, textarea {
  border: 1px solid #eaded8;
  border-radius: 10px;
  color: #3c3330;
  background: #fff;
  padding: 10px 12px;
  min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
input:not([type=range]):focus, select:focus, textarea:focus { border-color: #e98e7e; box-shadow: 0 0 0 3px #fae2d9; outline: none; }
input::placeholder, textarea::placeholder { color: #afa39d; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { padding: 8px 12px; margin-right: 12px; border: 0; border-radius: 8px; background: #fce9df; color: #9d4932; font-weight: 700; cursor: pointer; }
input[type=range] { accent-color: var(--brand); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 10px 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(220, 61, 54, .14);
  transition: background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.secondary { color: #ad4a37; background: #fff3ed; border-color: #f3dcd1; box-shadow: none; }
.btn.secondary:hover { background: #fbe6da; }
.btn.small { font-size: 12px; padding: 7px 11px; }
.btn:disabled { transform: none; box-shadow: none; }
.notice { color: #7b6a62; background: #fcf7f3; border: 1px solid #f5e8df; border-radius: 11px; }
.notice.ok { color: #2f7054; background: #edf7ef; border-color: #d7ecdf; }
.notice.error { color: #ad3735; background: #fff1ef; border-color: #f6dbd5; }
.pill { background: #fff0e8; color: #b54e38; font-weight: 700; }
.avatar { background: #ffebe0; color: #b95037; }
.meal { border-color: #f0e4dd; }
.meal.available { border-color: #f0b79f; background: #fff8f3; }
.available .badge { background: #fbe8dc; color: #a34b31; }
.token { background: #fff9f5; border-color: #ebc7b8; }
.token-code { color: #c94137; }

/* Gentle outcome tints keep completed and missed meals easy to distinguish. */
.meal.done { background: #edf7f0; border-color: #cfe5d6; color: #356448; }
.meal.missed { background: #fdf0ee; border-color: #f0d5d0; color: #98483f; }
.meal.done h3, .meal.done time { color: #356448; }
.meal.missed h3, .meal.missed time { color: #98483f; }
.meal.done .badge, .meal.done .btn:disabled { background: #dceee2; border-color: #cfe5d6; color: #356448; opacity: 1; box-shadow: none; }
.meal.missed .badge, .meal.missed .btn:disabled { background: #f8dfdb; border-color: #f0d5d0; color: #98483f; opacity: 1; box-shadow: none; }
.password-field {
  position: relative;
}
.password-field input {
  padding-inline-end: 44px;
}
.password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  appearance: none;
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--ink);
}
.password-toggle:focus-visible {
  outline: none;
}
.password-field:has(.password-toggle:focus-visible) input {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.password-toggle-slash {
  visibility: hidden;
}
.password-visible .password-toggle-slash {
  visibility: visible;
}

.sign-in-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.registration-link {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.registration-link:hover {
  color: var(--brand);
  text-decoration: underline;
}
