/* =============================================
   TodayFM Autopod – Brand Stylesheet
   Primary colours: Blue (#003087) & Yellow (#FFD700)
   ============================================= */

:root {
  --blue: #003087;
  --blue-light: #0050c8;
  --blue-dark: #001e5c;
  --yellow: #FFD700;
  --yellow-hover: #e6c200;
  --white: #ffffff;
  --gray-100: #f4f6f9;
  --gray-200: #e8ecf1;
  --gray-400: #9aa3b0;
  --gray-600: #5a6272;
  --gray-800: #2c3345;
  --text: #1a2133;
  --shadow: 0 2px 12px rgba(0, 48, 135, 0.10);
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--text);
  min-height: 100vh;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  background: var(--blue);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-brand img {
  height: 36px;
  filter: brightness(0) invert(1);
}

.navbar-title {
  color: var(--yellow);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.navbar-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar-nav a:hover {
  color: var(--yellow);
}

.navbar-nav .btn-logout {
  background: var(--yellow);
  color: var(--blue-dark);
  padding: 6px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s;
}

.navbar-nav .btn-logout:hover {
  background: var(--yellow-hover);
  color: var(--blue-dark);
}

/* ── PAGE WRAPPER ────────────────────────────── */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── PAGE HEADER ─────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.page-header p {
  color: var(--gray-600);
  margin-top: 4px;
  font-size: 0.95rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--blue-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ── FLASH MESSAGES ──────────────────────────── */
.flash-messages {
  margin-bottom: 1.5rem;
}

.alert {
  padding: 12px 18px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.alert-success {
  background: #e6f4ea;
  color: #1e7e34;
  border: 1px solid #b8ddc5;
}

.alert-danger {
  background: #fde8e8;
  color: #c0392b;
  border: 1px solid #f5c0c0;
}

.alert-info {
  background: #e8f0fe;
  color: #1a56a0;
  border: 1px solid #c5d8f8;
}

/* ── LOGIN PAGE ──────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.login-logo {
  width: 160px;
  margin-bottom: 1.5rem;
  filter: none;
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--gray-100);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(0, 80, 200, 0.12);
  background: var(--white);
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-light);
  box-shadow: 0 4px 12px rgba(0, 80, 200, 0.25);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--blue-dark);
}

.btn-yellow:hover {
  background: var(--yellow-hover);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35);
}

.btn-success {
  background: #27ae60;
  color: var(--white);
}

.btn-success:hover {
  background: #1e8e4b;
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-secondary:hover {
  background: #d5dce6;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── SHOW CARDS (DASHBOARD) ──────────────────── */
.shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}

.show-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.show-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 48, 135, 0.16);
}

.show-card-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--blue-dark);
  padding: 1rem;
}

.show-card-image.placeholder {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  height: 200px;
}

.show-card-body {
  padding: 1.1rem 1.2rem;
  border-top: 3px solid var(--yellow);
}

.show-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.show-card-meta {
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ── CLIP LIST (SHOW PAGE) ────────────────────── */
.clip-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clip-list-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: box-shadow 0.2s;
}

.clip-list-item:hover {
  box-shadow: 0 4px 20px rgba(0,48,135,0.14);
}

.clip-list-content {
  flex: 1;
  min-width: 0;
}

.clip-list-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-list-meta {
  font-size: 0.82rem;
  color: var(--gray-400);
}

.clip-list-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ── STATUS BADGES ────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-draft {
  background: #fff3cd;
  color: #856404;
}

.badge-edited {
  background: #cce5ff;
  color: #004085;
}

.badge-approved {
  background: #d4edda;
  color: #155724;
}

/* ── CLIP DETAIL PAGE ─────────────────────────── */
.clip-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .clip-detail {
    grid-template-columns: 1fr;
  }
  .shows-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--gray-200);
}

.card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.clip-title-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Audio player wrapper */
.audio-player {
  width: 100%;
  margin: 1rem 0;
  accent-color: var(--blue);
}

.audio-player audio {
  width: 100%;
  border-radius: 8px;
}

/* Info rows */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.info-label {
  font-weight: 700;
  color: var(--gray-600);
  min-width: 90px;
  flex-shrink: 0;
}

.info-value {
  color: var(--text);
  line-height: 1.5;
}

/* Transcript box */
.transcript-box {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
  max-height: 200px;
  overflow-y: auto;
  font-style: italic;
}

/* Edit form */
.edit-form .form-group {
  margin-bottom: 1.2rem;
}

.edit-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Action bar */
.action-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Processing spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

/* Stats bar on dashboard */
.stats-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 140px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-card.yellow .stat-value {
  color: #b8860b;
}

.stat-card.green .stat-value {
  color: #27ae60;
}

/* Divider */
.divider {
  border: none;
  border-top: 2px solid var(--gray-200);
  margin: 1.5rem 0;
}

/* Keyword chips */
.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.keyword-chip {
  background: var(--blue);
  color: var(--white);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
