/* Admin app styles — reuses the RAV design tokens from design.css. */

/* Restore the [hidden] attribute — a bunch of shells below set display:flex,
   which would otherwise override the browser default of display:none. */
[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: radial-gradient(ellipse at 50% 20%, var(--rav-navy-2), var(--rav-navy-deep) 80%);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--rav-white);
  border-top: 6px solid var(--rav-red);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--rav-navy);
  text-transform: uppercase;
  line-height: var(--lh-tight);
}
.auth-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}
.auth-tab {
  padding: 10px 14px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tab.active {
  color: var(--rav-navy);
  border-bottom-color: var(--rav-red);
}
.auth-error {
  background: #fdecec;
  color: var(--rav-red-dark);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
}

/* Dashboard */
.admin-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-nav {
  background: var(--rav-navy-deep);
  color: var(--rav-white);
  border-bottom: 3px solid var(--rav-red);
}
.admin-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
.admin-brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.admin-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.admin-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}
@media (max-width: 900px) {
  .admin-container { grid-template-columns: minmax(0, 1fr); }
}
.panel {
  background: var(--rav-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--rav-navy);
  text-transform: uppercase;
  line-height: var(--lh-snug);
}
.panel-help {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.form-grid { display: grid; gap: 14px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 200px; min-width: 0; }
.form-row .field-toggle { flex: 0 0 auto; align-self: flex-end; }
.field-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--rav-navy);
  cursor: pointer;
  padding: 8px 12px;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}
.field-toggle input { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.status-pill {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}
.status-pill.ok { background: #e8f7ee; color: var(--success); }
.status-pill.err { background: #fdecec; color: var(--rav-red-dark); }

.updates-list { display: flex; flex-direction: column; gap: 12px; }
.update-row {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.update-row-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-condensed);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: 700;
}
.update-row-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--rav-navy);
  text-transform: uppercase;
  line-height: var(--lh-snug);
}
.update-row-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 6px;
}
.side-panel { display: flex; flex-direction: column; gap: 24px; }
.small-note { font-size: 12px; color: var(--text-muted); }

.mode-tabs { display: inline-flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); overflow: hidden; align-self: flex-start; }
.mode-tab {
  padding: 8px 14px;
  background: var(--rav-white);
  border: 0;
  cursor: pointer;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--color-border-strong);
}
.mode-tab:last-child { border-right: 0; }
.mode-tab.active { background: var(--rav-navy); color: var(--rav-white); }

.attachments-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.attachment-tile {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  min-height: 120px;
}
.attachment-tile .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--rav-navy);
  color: var(--rav-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: var(--ls-wide);
  overflow: hidden;
}
.attachment-tile .thumb img, .attachment-tile .thumb video {
  width: 100%; height: 100%; object-fit: cover;
}
.attachment-tile .caption {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--color-border);
}
.attachment-tile .remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: white;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.attachment-tile.uploading .thumb::after {
  content: 'Uploading…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29,20,90,0.7);
  color: var(--rav-white);
}
