:root {
  --bbc-purple: #4B2E83;
  --bbc-deep-purple: #2A1A4A;
  --bbc-white: #FFFFFF;
  --bbc-gray: #6E7479;
  --bbc-light-gray: #F4F4F5;
  --bbc-accent: #7B4FBF;
  --bbc-success: #2E7D32;
  --bbc-error: #C0392B;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bbc-light-gray);
  color: #222;
  line-height: 1.5;
}

.bbc-header {
  background: var(--bbc-deep-purple);
  border-bottom: 4px solid var(--bbc-purple);
  color: #fff;
  padding: 1.25rem 1.25rem;
  text-align: center;
}
.bbc-header-logo {
  display: block;
  margin: 0 auto 0.75rem;
  width: clamp(160px, 40vw, 280px);
  height: auto;
  filter: brightness(1.12) drop-shadow(0 0 18px rgba(255,255,255,0.9)) drop-shadow(0 0 38px rgba(255,255,255,0.55));
}
.bbc-header h1 {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bbc-header p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.bbc-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem;
}

.bbc-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--bbc-accent);
  border-color: var(--bbc-accent);
}

.bbc-required { color: var(--bbc-error); }

.bbc-dropzone {
  border: 2px dashed var(--bbc-purple);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  color: var(--bbc-gray);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bbc-dropzone.bbc-dragover {
  background: rgba(123, 79, 191, 0.08);
  border-color: var(--bbc-accent);
}
.bbc-dropzone strong { color: var(--bbc-purple); }
.bbc-dropzone input[type="file"] { display: none; }

.bbc-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.bbc-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}
.bbc-preview-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.bbc-preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.bbc-btn {
  display: inline-block;
  width: 100%;
  background: var(--bbc-purple);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.bbc-btn:hover { background: var(--bbc-deep-purple); }
.bbc-btn:disabled { background: #aaa; cursor: not-allowed; }

.bbc-btn-secondary {
  background: transparent;
  color: var(--bbc-purple);
  border: 2px solid var(--bbc-purple);
}
.bbc-btn-secondary:hover { background: rgba(75,46,131,0.06); }

.bbc-btn-small {
  width: auto;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.bbc-progress {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.75rem 0;
  display: none;
}
.bbc-progress.active { display: block; }
.bbc-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--bbc-accent);
  transition: width 0.2s;
}

.bbc-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.bbc-alert-success { background: #e8f5e9; color: var(--bbc-success); }
.bbc-alert-error { background: #fdecea; color: var(--bbc-error); }
.bbc-alert-info { background: #ede7f6; color: var(--bbc-deep-purple); }

.bbc-hidden { display: none !important; }

.bbc-footer {
  text-align: center;
  color: var(--bbc-gray);
  font-size: 0.8rem;
  padding: 1.5rem;
}
.bbc-footer a { color: var(--bbc-purple); }

/* ===== Dashboard layouts (moderation/admin) ===== */
.bbc-nav {
  background: var(--bbc-deep-purple);
  border-bottom: 4px solid var(--bbc-purple);
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bbc-nav .bbc-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.bbc-nav img {
  height: 36px;
  width: auto;
  filter: brightness(1.12) drop-shadow(0 0 8px rgba(255,255,255,0.9)) drop-shadow(0 0 16px rgba(255,255,255,0.55));
}
.bbc-nav strong {
  font-family: 'Merriweather', Georgia, serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bbc-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}
.bbc-nav a:hover, .bbc-nav a.active { opacity: 1; text-decoration: underline; }

.bbc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}
.bbc-toolbar select,
.bbc-toolbar input {
  margin-bottom: 0;
  width: auto;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.bbc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.bbc-photo-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
}
.bbc-photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.bbc-photo-card.bbc-selected {
  outline: 3px solid var(--bbc-accent);
}
.bbc-photo-card .bbc-photo-body {
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
}
.bbc-photo-card .bbc-photo-title {
  font-weight: 700;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bbc-photo-card .bbc-photo-meta {
  color: var(--bbc-gray);
  font-size: 0.75rem;
}
.bbc-photo-checkbox {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  width: 22px;
  height: 22px;
  z-index: 2;
}
.bbc-cover-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: var(--bbc-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  z-index: 2;
}
.bbc-photo-actions {
  display: flex;
  gap: 0.3rem;
  padding: 0 0.6rem 0.6rem;
}
.bbc-photo-actions button {
  flex: 1;
  font-size: 0.75rem;
  padding: 0.3rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.bbc-photo-actions .bbc-approve { color: var(--bbc-success); border-color: var(--bbc-success); }
.bbc-photo-actions .bbc-reject { color: var(--bbc-error); border-color: var(--bbc-error); }

.bbc-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}
.bbc-table th, .bbc-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #eee;
}
.bbc-table th { background: var(--bbc-light-gray); font-weight: 700; }
.bbc-table tr:last-child td { border-bottom: none; }

.bbc-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.bbc-badge-active { background: #e8f5e9; color: var(--bbc-success); }
.bbc-badge-inactive { background: #f4f4f5; color: var(--bbc-gray); }

.bbc-loading { text-align: center; color: var(--bbc-gray); padding: 2rem; }

@media (max-width: 480px) {
  .bbc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .bbc-preview-grid { grid-template-columns: repeat(2, 1fr); }
}
