@font-face {
  font-family: "BJP Sans";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #071a39;
  --blue: #0c285d;
  --red: #d30b2b;
  --ink: #162036;
  --muted: #667085;
  --line: #dbe1ea;
  --soft: #f3f6fa;
  --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: "BJP Sans", Arial, sans-serif; line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.manager-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 5%, rgba(38, 82, 157, .58), transparent 32%),
    linear-gradient(135deg, #06142d, #0c285d);
}

.auth-card {
  width: min(100%, 500px);
  padding: clamp(32px, 6vw, 58px);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 35px 100px rgba(0,0,0,.3);
}

.auth-card img { width: 260px; max-width: 80%; margin-bottom: 30px; }
.auth-card > span, .manager-intro span { color: var(--red); font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.auth-card h1 { margin: 10px 0 14px; font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -.05em; }
.auth-card p { color: var(--muted); }
.auth-card form { display: grid; gap: 16px; margin: 26px 0; }
.auth-card label, .listing-form label { display: grid; gap: 7px; color: #344054; font-size: .82rem; font-weight: 750; }
.auth-card input, .listing-form input, .listing-form select, .listing-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  outline: 0;
}
.auth-card input, .listing-form input, .listing-form select { min-height: 48px; padding: 0 13px; }
.listing-form textarea { resize: vertical; padding: 12px 13px; }
.auth-card input:focus, .listing-form input:focus, .listing-form select:focus, .listing-form textarea:focus { border-color: #2b62ad; box-shadow: 0 0 0 4px rgba(43,98,173,.11); }
.auth-card button, .save-bar button {
  min-height: 52px;
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: var(--white);
  font-weight: 850;
}
.auth-card > a { color: var(--blue); font-size: .8rem; font-weight: 750; }

.manager-header {
  min-height: 84px;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 15px max(24px, calc((100vw - 1500px) / 2));
  background: var(--navy);
  color: var(--white);
}
.manager-header img { width: 230px; }
.manager-header > div { display: grid; }
.manager-header > div span { color: #b9c5d8; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.manager-header nav { display: flex; gap: 20px; }
.manager-header nav a { color: var(--white); font-size: .78rem; font-weight: 750; text-decoration: none; }

.manager-shell { width: min(calc(100% - 40px), 1500px); margin: 0 auto; padding: 48px 0 90px; }
.manager-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.manager-intro h1 { margin: 8px 0 8px; font-size: clamp(2.3rem, 5vw, 4.7rem); letter-spacing: -.06em; line-height: 1; }
.manager-intro p { max-width: 820px; margin: 0; color: var(--muted); }
.manager-intro > a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--blue); font-size: .8rem; font-weight: 800; text-decoration: none; }
.manager-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .52fr); align-items: start; gap: 28px; }
.listing-form { display: grid; gap: 18px; }
.form-section { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 12px 35px rgba(7,26,57,.06); }
.form-section h2 { margin: 0 0 20px; font-size: 1.25rem; }
.form-section > label + label { margin-top: 18px; }
.form-section small { color: var(--muted); font-weight: 550; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.span-2 { grid-column: span 2; }
.photo-upload { padding: 24px; border: 2px dashed #bdc7d7; border-radius: 12px; background: var(--soft); }
.photo-upload input { min-height: 42px; padding: 8px; background: transparent; }
.existing-photo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.existing-photo-grid img { width: 100%; aspect-ratio: 1.2/1; border-radius: 8px; object-fit: cover; }
.form-help { margin: 10px 0 18px; color: var(--muted); font-size: .75rem; }
.save-bar { position: sticky; z-index: 5; bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 18px; border: 1px solid #cbd4e0; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 16px 45px rgba(7,26,57,.16); backdrop-filter: blur(12px); }
.save-bar p { margin: 0; color: var(--muted); font-size: .76rem; }
.save-bar button { min-width: 220px; padding: 0 20px; }

.manager-list { position: sticky; top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 12px 35px rgba(7,26,57,.06); }
.manager-list-heading { display: flex; justify-content: space-between; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.manager-list-heading span { font-weight: 820; }
.manager-list-heading strong { color: var(--red); }
.manager-list-scroll { max-height: 72vh; overflow-y: auto; }
.manager-list article { display: grid; grid-template-columns: 96px 1fr auto; gap: 13px; padding: 14px; border-bottom: 1px solid var(--line); }
.manager-list article > img, .manager-placeholder { width: 96px; aspect-ratio: 1.25/1; border-radius: 8px; object-fit: cover; background: var(--soft); }
.manager-placeholder { display: grid; place-items: center; color: var(--muted); font-size: .65rem; }
.manager-list article > div { min-width: 0; display: flex; flex-direction: column; }
.manager-list article > div > span { color: var(--red); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.manager-list article > div > strong { margin: 3px 0; font-size: .82rem; line-height: 1.25; }
.manager-list article small { color: var(--muted); }
.manager-list article > div > div { display: flex; gap: 13px; margin-top: auto; }
.manager-list article a { color: var(--blue); font-size: .7rem; font-weight: 800; }
.manager-list article > form { align-self: center; }
.manager-list article > form button, .archived-list button { border: 0; background: transparent; color: #8d2235; font-size: .67rem; font-weight: 750; }
.archived-list { padding: 16px 20px; background: #fafbfc; }
.archived-list summary { cursor: pointer; color: var(--muted); font-size: .75rem; font-weight: 800; }
.archived-list form { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .72rem; }
.archived-list button { color: var(--blue); }

.manager-alert { margin-bottom: 20px; padding: 13px 16px; border-radius: 9px; font-size: .82rem; font-weight: 700; }
.manager-alert--success { border: 1px solid #a7ddca; background: #edfff8; color: #086247; }
.manager-alert--error { border: 1px solid #efb5bf; background: #fff1f4; color: #91213a; }

@media (max-width: 1050px) {
  .manager-header { grid-template-columns: 210px 1fr; }
  .manager-header nav { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.15); }
  .manager-layout { grid-template-columns: 1fr; }
  .manager-list { position: static; }
  .manager-list-scroll { max-height: none; }
}

@media (max-width: 680px) {
  .manager-header { grid-template-columns: 1fr; gap: 12px; padding: 16px 20px; }
  .manager-header > div { display: none; }
  .manager-header nav { grid-column: auto; justify-content: space-between; }
  .manager-shell { width: min(calc(100% - 24px), 1500px); padding-top: 30px; }
  .manager-intro { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .existing-photo-grid { grid-template-columns: repeat(3, 1fr); }
  .save-bar { align-items: stretch; flex-direction: column; }
  .save-bar button { width: 100%; min-width: 0; }
  .manager-list article { grid-template-columns: 78px 1fr; }
  .manager-list article > img, .manager-placeholder { width: 78px; }
  .manager-list article > form { grid-column: 2; justify-self: start; }
}
