/* ==========================================================================
   MISJ STUCO — LOST & FOUND
   Uses the tokens, type and buttons from base.css
   ========================================================================== */

.lf-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.lf-page .atmos {
  background:
    radial-gradient(70vmax 60vmax at 50% 18%, rgba(26, 71, 214, .38), rgba(10, 36, 130, .1) 50%, transparent 72%),
    var(--navy-950);
}
.lf-page .atmos::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
          mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.lf-main { position: relative; z-index: 2; flex: 1; padding-top: clamp(96px, 16vh, 160px); padding-bottom: clamp(48px, 8vh, 96px); }

/* nav extras */
.lf-nav__logo img { height: clamp(40px, 4vw, 56px); }
.lf-nav__right { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px); }
.lf-who { display: flex; align-items: center; gap: 14px; }
.lf-who__email { color: var(--mist); max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-who__out { color: var(--yellow); padding: .4em 0; border-bottom: 1px solid transparent; transition: border-color .3s; }
.lf-who__out:hover { border-color: var(--yellow); }
.lf-back { gap: .7em; }

/* sparkles (same shape as the logo's) */
.lf-sparks { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.lf-sparks .spark { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); fill: #e9e6d6; opacity: .7; transform: translate(-50%, -50%); animation: lfTwinkle 3.6s ease-in-out var(--d) infinite; }
.lf-sparks .spark--y { fill: var(--yellow); filter: drop-shadow(0 0 8px var(--yellow-glow)); }
@keyframes lfTwinkle { 0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(1) rotate(0deg); } 50% { opacity: .18; transform: translate(-50%, -50%) scale(.55) rotate(45deg); } }

/* heading */
.lf-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px; margin-bottom: clamp(36px, 6vh, 64px); }
.lf-title { font-size: clamp(3rem, 8.4vw, 11rem); line-height: .84; }
.lf-title em { font-style: normal; color: var(--yellow); }
.lf-head .lede { max-width: 30ch; padding-bottom: .4em; }
.lf-head > .label { grid-column: 1 / -1; margin-bottom: 0; }
.lf-head > * { animation: lfIn 1.1s var(--ease) both; }
.lf-head > :nth-child(2) { animation-delay: .12s; }
.lf-head > :nth-child(3) { animation-delay: .24s; }
@keyframes lfIn { from { opacity: 0; transform: translate3d(0, 24px, 0); filter: blur(8px); } }

/* ---------- the card (sign in / messages) ---------- */
.lf-card {
  position: relative; max-width: 680px; padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--faint); border-radius: 24px;
  background: linear-gradient(160deg, rgba(26, 71, 214, .22), rgba(5, 15, 51, .55) 60%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9);
  animation: lfIn 1.1s var(--ease) .3s both;
}
.lf-card::after { content: ""; position: absolute; right: 18px; bottom: 18px; width: 16px; height: 16px; border-right: 1.5px solid var(--yellow); border-bottom: 1.5px solid var(--yellow); }
.lf-card .label { margin-bottom: 1.2rem; }
.lf-card__title { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(1.8rem, 3.2vw, 3rem); margin-bottom: 1rem; }
.lf-card__text { color: var(--mist); max-width: 44ch; margin-bottom: 1.8rem; font-size: 1.05rem; }
.lf-card__text b { color: var(--white); font-weight: 600; }
.lf-card code { font-family: var(--f-label); font-size: .85em; color: var(--yellow); }
.lf-loading { color: var(--mist); }
.lf-loading::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .8em; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 14px var(--yellow-glow); animation: lfBlink 1.2s infinite; }
@keyframes lfBlink { 50% { opacity: .25; } }
.lf-lock { flex: none; width: 10px; height: 8px; margin-top: 3px; border-radius: 2px; background: var(--yellow); position: relative; }
.lf-lock::before { content: ""; position: absolute; left: 2px; bottom: 6px; width: 6px; height: 5px; border: 1.5px solid var(--yellow); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }

.lf-or { display: flex; align-items: center; gap: 1em; color: var(--mist); margin: 1.4rem 0; }
.lf-or::before, .lf-or::after { content: ""; flex: 1; height: 1px; background: var(--faint); }
.lf-form { display: grid; gap: .7rem; }
.lf-form label { color: var(--mist); }
.lf-form__row { display: flex; flex-wrap: wrap; gap: 10px; }
.lf-input, .lf-form input {
  flex: 1 1 240px; min-width: 0; font: 500 1rem/1.2 var(--f-label); color: var(--white);
  padding: 1.05em 1.4em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(3, 10, 34, .5); transition: border-color .3s, box-shadow .3s;
}
.lf-form input::placeholder { color: rgba(255, 255, 255, .35); }
.lf-form input:focus, .lf-input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 31, .15); }
.btn:disabled { opacity: .55; cursor: progress; }
.lf-msg, .lf-up__msg { margin-top: 1.1rem; min-height: 1.5em; color: var(--yellow); }
.lf-msg.is-bad, .lf-up__msg.is-bad { color: #ff8a7a; }

/* ---------- student gallery ---------- */
.lf-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 18px 0; margin-bottom: clamp(20px, 3vh, 32px); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.lf-count { color: var(--yellow); }
.lf-bar__note { color: var(--mist); }
.lf-bar__note b { color: var(--white); font-weight: 600; }
.lf-admin-link { color: var(--yellow); }
.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 44vw), 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.lf-item { animation: lfIn .9s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.lf-item__btn {
  position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 16px;
  background: var(--navy-800); box-shadow: 0 24px 40px -30px rgba(0, 0, 0, .9);
  transition: transform .6s var(--ease), box-shadow .5s;
}
.lf-item__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lf-item__btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(255, 255, 255, .12); transition: border-color .4s, box-shadow .4s; }
.lf-item__btn:hover, .lf-item__btn:focus-visible { transform: translateY(-4px); }
.lf-item__btn:hover img, .lf-item__btn:focus-visible img { transform: scale(1.06); }
.lf-item__btn:hover::after, .lf-item__btn:focus-visible::after { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow); }
.lf-item__btn:focus-visible { outline: none; }
.lf-empty { grid-column: 1 / -1; padding: clamp(48px, 10vh, 110px) 0; text-align: center; color: var(--mist); }
.lf-empty__big { display: block; margin-bottom: .6rem; font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: clamp(1.6rem, 3vw, 2.6rem); color: var(--white); }

/* lightbox */
.lf-box { width: 100vw; height: 100vh; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(3, 10, 34, .94); color: var(--white); }
.lf-box::backdrop { background: transparent; }
.lf-box[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lfFade .35s var(--ease); }
@keyframes lfFade { from { opacity: 0; } }
.lf-box__top, .lf-box__bottom { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); }
.lf-box__num { color: var(--yellow); }
.lf-box__stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lf-box__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 40px 80px -40px #000; }
.lf-box__bottom { justify-content: center; gap: 12px; }
.lf-box .btn:hover, .lf-box .btn:focus-visible { border-color: var(--yellow); }

/* ---------- librarian desk ---------- */
.lf-desk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.lf-up { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--faint); border-radius: 24px; background: linear-gradient(160deg, rgba(26, 71, 214, .22), rgba(5, 15, 51, .55) 60%); position: sticky; top: 100px; }
.lf-up h2, .lf-desk__list h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(1.5rem, 2.2vw, 2.2rem); margin-bottom: 1.2rem; }
.lf-step { display: block; color: var(--mist); margin: 1.4rem 0 .6rem; }
.lf-step b { color: var(--yellow); font-weight: 500; margin-right: .6em; }
.lf-drop {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
  border: 1.5px dashed rgba(255, 210, 31, .55); border-radius: 18px; background: rgba(3, 10, 34, .45);
  text-align: center; transition: border-color .3s, background .3s;
}
.lf-drop:hover, .lf-drop.is-over, .lf-drop:focus-within { border-color: var(--yellow); background: rgba(255, 210, 31, .06); }
.lf-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lf-drop__hint { display: grid; gap: .5rem; justify-items: center; pointer-events: none; }
.lf-drop__plus { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--navy-950); font-size: 1.8rem; font-weight: 700; box-shadow: 0 0 30px var(--yellow-glow); }
.lf-drop__hint strong { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.lf-drop__hint span { color: var(--mist); }
.lf-drop__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none; }
.lf-drop.has-photo .lf-drop__preview { display: block; }
.lf-drop.has-photo .lf-drop__hint { opacity: 0; }
.lf-up textarea, .lf-row__desc {
  width: 100%; resize: vertical; font: 400 1rem/1.45 var(--f-label); color: var(--white);
  padding: .9em 1.1em; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(3, 10, 34, .5);
}
.lf-up textarea:focus, .lf-row__desc:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 31, .15); }
.lf-up__note { color: var(--mist); font-size: .9rem; margin-top: .5rem; }
.lf-up__submit { margin-top: 1.4rem; width: 100%; justify-content: center; }

.lf-desk__list .lf-bar { margin-bottom: 18px; }
.lf-list { display: grid; gap: 12px; }
.lf-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px; border: 1px solid var(--hair); border-radius: 18px; background: rgba(5, 15, 51, .5); }
.lf-row__img { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--navy-800); }
.lf-row__img img { width: 100%; height: 100%; object-fit: cover; }
.lf-row__body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.lf-row__date { color: var(--mist); }
.lf-row__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.lf-row__actions .btn { padding: .85em 1.2em; font-size: .7rem; }
.lf-row__save { background: var(--yellow); color: var(--navy-950); border-color: var(--yellow); }
.lf-row__remove:hover { border-color: #ff8a7a; color: #ff8a7a; }
.lf-list .lf-empty { padding: 40px 0; }

/* footer */
.lf-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px var(--gutter); border-top: 1px solid var(--hair); color: var(--mist); }
.lf-foot a:hover { color: var(--yellow); }

@media (max-width: 900px) {
  .lf-head { grid-template-columns: 1fr; }
  .lf-desk { grid-template-columns: 1fr; }
  .lf-up { position: static; }
  .lf-who__email { display: none; }
}
@media (max-width: 520px) {
  .lf-row { grid-template-columns: 80px 1fr; }
  .lf-form__row .btn { width: 100%; justify-content: center; }
  .lf-back span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-sparks .spark, .lf-head > *, .lf-card, .lf-item { animation: none; }
}

/* date fields (admin) */
.lf-date, .lf-row__when {
  color-scheme: dark; font: 500 1rem/1.2 var(--f-label); color: var(--white);
  padding: .8em 1.1em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(3, 10, 34, .5);
}
.lf-date { width: 100%; }
.lf-row__when { margin-left: .8em; padding: .45em .9em; font-size: .9rem; letter-spacing: 0; text-transform: none; }
.lf-date:focus, .lf-row__when:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 31, .15); }
.lf-row__date { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; }

/* announcement admin */
.an-form { position: static; scroll-margin-top: 100px; }
.an-form .lf-input { display: block; width: 100%; }
.an-form .lf-input::placeholder, .an-form textarea::placeholder { color: rgba(255, 255, 255, .35); }
.an-cancel { margin-top: .7rem; width: 100%; justify-content: center; }
/* crop: the frame is the homepage slide's 4:3 shape */
.an-crop {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: var(--navy-800);
  border: 1.5px solid rgba(255, 210, 31, .55); cursor: grab; touch-action: none; user-select: none;
}
.an-crop:active { cursor: grabbing; }
.an-crop:focus-visible, .an-photo.is-over .an-crop { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 31, .15); }
.an-crop__img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
/* rule-of-thirds guides */
.an-crop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), #fff calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.67% - .5px), #fff calc(66.67% - .5px) calc(66.67% + .5px), transparent calc(66.67% + .5px)),
              linear-gradient(transparent calc(33.33% - .5px), #fff calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.67% - .5px), #fff calc(66.67% - .5px) calc(66.67% + .5px), transparent calc(66.67% + .5px));
}
.an-crop__bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.an-crop__bar label { color: var(--mist); }
.an-crop__bar input { flex: 1; min-width: 0; accent-color: var(--yellow); }
.an-photo:not(.has-photo) .an-crop, .an-photo:not(.has-photo) .an-crop__bar, .an-photo.has-photo .lf-drop { display: none; }
.an-photo.is-over .lf-drop { border-color: var(--yellow); background: rgba(255, 210, 31, .06); }
.an-history { margin-top: clamp(36px, 6vh, 64px); }
.an-row__title { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.an-row__desc { color: var(--mist); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.an-row__when { color: var(--yellow); }
.an-history .lf-row__img img { filter: saturate(.55); }
.an-see { color: var(--yellow); white-space: nowrap; }
.an-see:hover { text-decoration: underline; }
/* live slides get a bigger photo, so admins can see what visitors see */
@media (min-width: 521px) {
  .an-live .lf-row { grid-template-columns: 190px 1fr; }
  .an-live .lf-row__img { aspect-ratio: 4 / 3; }
}
