/* =========================================================
   Report In Pub — Staff Portal styles (layers on styles.css)
   ========================================================= */

.portal-body { background: var(--paper-2); }

.portal-tag {
  font-family: var(--font-body);
  font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  font-size: .8rem; color: var(--red);
}

/* ---------- Login ---------- */
.login-wrap { min-height: calc(100vh - 76px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card {
  background: var(--white); width: 100%; max-width: 420px;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  border: 1px solid var(--rule); padding: 36px 32px;
}
.login-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.login-sub { color: var(--muted); margin-bottom: 22px; }
.login-card label { display: block; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.login-card input {
  width: 100%; padding: 13px 14px; font-size: 1rem;
  border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper);
}
.login-card input:focus { outline: none; border-color: var(--red); background: var(--white); }
.login-btn { width: 100%; margin-top: 22px; }
.login-error { color: var(--red-dark); background: #fdecee; border: 1px solid #f6c6cd; border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: .9rem; }
.login-help { color: var(--muted); font-size: .82rem; margin-top: 20px; line-height: 1.5; text-align: center; }

/* ---------- User bar / tabs ---------- */
.portal-userbar { display: flex; align-items: center; gap: 16px; }
.portal-hi { font-weight: 700; }
.portal-logout { padding: 8px 16px; font-size: .78rem; }

.portal-tabs { display: flex; gap: 6px; padding-top: 14px; padding-bottom: 0; flex-wrap: wrap; }
.ptab {
  background: transparent; border: 0; padding: 12px 20px; border-radius: 10px 10px 0 0;
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .85rem;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.ptab:hover { color: var(--ink); }
.ptab.active { color: var(--red); border-bottom-color: var(--red); background: var(--paper-2); }

.portal-main { padding-top: 26px; padding-bottom: 60px; min-height: 60vh; }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none; } }
.ptab-panel h2 { margin-bottom: 14px; }
.muted { color: var(--muted); }

/* ---------- Cards ---------- */
.portal-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 18px;
}
.portal-card h3 { margin-bottom: 12px; font-size: 1.1rem; }
#today-note-card { border-left: 5px solid var(--red); }

.crew-list, .announce-list { list-style: none; margin: 0; padding: 0; }
.crew-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.crew-list li:first-child { border-top: 0; }
.crew-name { font-weight: 600; }
.crew-role { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.crew-time { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }
.announce-list li { padding: 8px 0 8px 18px; position: relative; }
.announce-list li::before { content: "•"; color: var(--red); position: absolute; left: 2px; }

/* ---------- Schedule ---------- */
.sched-day { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.sched-day.is-today { border-color: var(--red); }
.sched-day-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--ink); color: var(--white); }
.sched-day.is-today .sched-day-head { background: var(--red); }
.sched-day-head .d-label { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.sched-day-head .d-count { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.sched-shifts { list-style: none; margin: 0; padding: 6px 0; }
.sched-shifts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 18px; border-top: 1px solid var(--rule); }
.sched-shifts li:first-child { border-top: 0; }
.sched-empty { padding: 12px 18px; color: var(--muted); }

/* ---------- Requests ---------- */
.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 4px 0 8px; }
.req-card {
  background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center;
  box-shadow: var(--shadow-sm); transition: transform .1s, border-color .15s;
}
.req-card:hover { transform: translateY(-2px); border-color: var(--red); }
.req-card span:not(.req-emoji) { font-weight: 700; font-size: 1.02rem; }
.req-card small { color: var(--muted); }
.req-emoji { font-size: 1.9rem; }

.req-form, #tv-form { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-top: 18px; max-width: 640px; }
.req-row { margin-bottom: 14px; }
.req-row label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.req-row input, .req-row textarea, .req-row select {
  width: 100%; padding: 11px 13px; font: inherit; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper);
}
.req-row input:focus, .req-row textarea:focus, .req-row select:focus { outline: none; border-color: var(--red); background: var(--white); }
.req-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.req-result { margin-top: 14px; padding: 11px 13px; border-radius: 8px; font-weight: 600; }
.req-result.ok { background: #e9f7ec; border: 1px solid #b6e0c0; color: #1c6b34; }
.req-result.err { background: #fdecee; border: 1px solid #f6c6cd; color: var(--red-dark); }

/* ---------- TV ---------- */
.tv-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 6px; }
.tv-preset {
  background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 18px; font-weight: 700; box-shadow: var(--shadow-sm); text-align: left; transition: transform .1s, border-color .15s;
}
.tv-preset:hover { transform: translateY(-2px); border-color: var(--red); }

.portal-foot-note { color: var(--muted); font-size: .85rem; margin-top: 16px; }

/* ---------- Mini footer ---------- */
.portal-mini-footer { border-top: 1px solid var(--rule); background: var(--white); padding: 18px 0; }
.portal-mini-footer .container { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; }

@media (max-width: 560px) {
  .portal-userbar { gap: 10px; }
  .portal-hi { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crew-list li, .sched-shifts li { flex-wrap: wrap; }
}
