/* Dreamflight brand palette (Brand_Guidelines_24-08-2026.pdf, p.15-17) */
:root {
  --df-dark-blue: #00205B;
  --df-cyan: #00A3E0;
  --df-yellow: #FFCE00;
  --df-red: #EC0033;
  --df-white: #FFFFFF;
  --df-bg: #f5f5f5;
}

* { box-sizing: border-box; }
body { font-family: "Inclusive Sans", system-ui, sans-serif; margin: 0; background: var(--df-bg); color: #222; }
h1, h2 { font-family: "Asap", system-ui, sans-serif; font-weight: 700; }
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--df-dark-blue); color: var(--df-white); }
#brand { display: flex; align-items: center; gap: 0.75rem; }
#brand-logo { height: 2rem; width: auto; }
header h1 { font-size: 1.1rem; margin: 0; }
#user-info { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
#sign-out-btn { padding: 0.35rem 0.75rem; background: transparent; color: var(--df-white); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
#sign-out-btn:hover { background: rgba(255, 255, 255, 0.1); }
nav#type-nav { display: flex; flex-wrap: wrap; background: var(--df-dark-blue); border-top: 1px solid rgba(255, 255, 255, 0.15); }
nav#type-nav button { flex: 1 1 auto; min-width: 8rem; padding: 0.75rem 1rem; border: none; background: transparent; color: var(--df-white); opacity: 0.75; cursor: pointer; font-size: 0.95rem; }
nav#type-nav button.active { background: var(--df-bg); color: var(--df-dark-blue); opacity: 1; font-weight: 600; }
main { padding: 1rem; max-width: 1200px; margin: 0 auto; }
section.tab { display: none; }
section.tab.active { display: block; }
#error-banner { background: var(--df-red); color: var(--df-white); padding: 0.75rem 1rem; display: none; }
#error-banner.hidden { display: none; }
#error-banner.visible { display: block; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.toolbar select, .toolbar input { padding: 0.5rem; font-size: 1rem; border: 1px solid #ccc; border-radius: 4px; background: white; }
.toolbar select { min-width: 14rem; }
#status { font-size: 0.9rem; color: #555; }
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.photo-card { padding: 0.4rem; background: white; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; text-align: center; font: inherit; color: inherit; }
.photo-card:hover, .photo-card:focus-visible { border-color: var(--df-cyan); outline: none; box-shadow: 0 0 0 2px var(--df-cyan); }
.photo-card[hidden] { display: none; }
.photo-frame { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; background: #eee; border-radius: 4px; overflow: hidden; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-frame.pending { color: #777; font-size: 0.8rem; }
.photo-id { margin-top: 0.3rem; font-size: 0.8rem; word-break: break-all; }
#lightbox { position: fixed; inset: 0; background: rgba(0, 32, 91, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; z-index: 10; }
#lightbox[hidden] { display: none; }
#lightbox-img { max-width: 92vw; max-height: 82vh; background: #fff; border-radius: 4px; }
#lightbox-caption { color: var(--df-white); font-size: 1rem; }
#lightbox-close { position: absolute; top: 0.75rem; right: 1rem; background: transparent; border: none; color: var(--df-white); font-size: 2.5rem; line-height: 1; cursor: pointer; }
.photo-id .tp { font-weight: 600; white-space: nowrap; }
.photo-id .person { color: #333; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.15); border: none; color: var(--df-white); font-size: 3rem; line-height: 1; width: 3.5rem; height: 5rem; border-radius: 6px; cursor: pointer; }
.lightbox-nav:hover, .lightbox-nav:focus-visible { background: rgba(255, 255, 255, 0.3); outline: none; }
.lightbox-nav[hidden] { display: none; }
#lightbox-prev { left: 1rem; }
#lightbox-next { right: 1rem; }
#lightbox-tools { display: flex; align-items: center; gap: 0.75rem; }
.tool { padding: 0.5rem 1rem; background: var(--df-yellow); color: var(--df-dark-blue); border: none; border-radius: 4px; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.tool:disabled { background: #999; color: var(--df-white); cursor: wait; }
#rotate-status { color: var(--df-white); font-size: 0.9rem; min-width: 8rem; }
