/* Design tokens and base rules mirror webapp/static/style.css so
   review.daugavpils.fans reads as the same site, not a different app.
   Kept as an independent file (not shared/symlinked) since webapp and
   review_app are separate deploys - see ADR-0003. If the main site's
   palette/fonts change, update both files. */
:root {
  color-scheme: dark;
  --bg: #111214;
  --bg-raised: #1a1b1e;
  --text: #e8e6e3;
  --text-dim: #9a9691;
  --accent: #e2b13c;
  --border: #2c2d30;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

header.site-header .site-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* The dashboard shows full proposal diffs (often paragraph-length bio
   text) per pending item - the site's normal 46rem prose column reads
   as cramped for that, so it alone opts into a wider column. Everything
   else (header, tokens, fonts, spacing) stays identical. */
main.main-wide {
  max-width: 60rem;
}

h1 { font-size: 1.8rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; color: var(--text-dim); }

.meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.item-list a { font-size: 1.2rem; font-weight: 600; }

.item-list.compact li { padding: 0.4rem 0; }
.item-list.compact a { font-size: 1rem; font-weight: 400; }

pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

form { margin: 1.5rem 0; }

.field { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  font-family: inherit;
  font-size: 0.95rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; }

.honeypot {
  position: absolute;
  left: -9999px;
}

button, .btn {
  display: inline-block;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

button:hover, .btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.actions form { margin: 0; display: inline; }

.proposal {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.proposal h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  border-top: none;
  padding-top: 0;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.5rem;
}

.status-pending {
  background: rgba(226, 177, 60, 0.15);
  color: var(--accent);
}

.status-approved {
  background: rgba(90, 180, 120, 0.15);
  color: #5ab478;
}

.status-applying {
  background: rgba(80, 150, 230, 0.15);
  color: #5096e6;
}

.status-rejected {
  background: rgba(220, 60, 60, 0.15);
  color: #dc3c3c;
}

.note {
  color: var(--text-dim);
  font-size: 0.85rem;
}

button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:disabled:hover, .btn:disabled:hover {
  color: var(--text);
  border-color: var(--border);
}

.media-file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem;
}

.media-item-preview {
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-raised);
}

.media-item-preview-video {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.media-item-details {
  flex: 1;
  min-width: 0;
}

.media-item-details label {
  margin-top: 0.5rem;
}

.media-item-name {
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.media-item-remove {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.media-item-remove:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Admin Dashboard (GitHub issue #34) */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Admin Tabs (GitHub issue #35) */
.admin-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.admin-tab {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--text-dim);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}

.admin-tab:hover {
  color: var(--text);
  text-decoration: none;
  border-bottom-color: var(--border);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.admin-header h1 {
  margin: 0;
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.period-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.period-btn {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
}

.period-btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.period-btn.active {
  background: var(--accent);
  color: #111214;
  border-color: var(--accent);
  font-weight: 600;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.admin-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.admin-section h2 {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  font-size: 1.15rem;
}

.admin-section h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-item {
  margin-bottom: 0.75rem;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  gap: 0.5rem;
}

.stat-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-item-count {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.stat-bar-bg {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  margin-top: 0.3rem;
  overflow: hidden;
}

.stat-bar {
  background: var(--accent);
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.admin-table th,
.admin-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th.num,
.admin-table td.num {
  text-align: right;
}

.meta-stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.meta-stat-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.85rem;
}

.recent-activity-section {
  margin-top: 2rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  display: inline-block;
  letter-spacing: 0.03em;
}

.badge-pageview {
  background: #1b2d42;
  color: #7bb8f0;
}

.badge-track_play {
  background: #183b22;
  color: #72e08e;
}

.badge-video_play {
  background: #3d2c14;
  color: #f5b958;
}

/* Role badges and user management (GitHub issue #35) */
.badge-role-admin {
  background: #3b1822;
  color: #ff758f;
  border: 1px solid rgba(255, 117, 143, 0.2);
}

.badge-role-approver {
  background: #183b22;
  color: #72e08e;
  border: 1px solid rgba(114, 224, 142, 0.2);
}

.badge-role-stats {
  background: #1b2d42;
  color: #7bb8f0;
  border: 1px solid rgba(123, 184, 240, 0.2);
}

.badge-status-active {
  background: #14331e;
  color: #52c41a;
}

.badge-status-inactive {
  background: #2a2b30;
  color: #8c8c8c;
}

.badge-meta {
  background: #232429;
  color: var(--accent);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  margin-top: 0.25rem;
}

.user-role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-name {
  font-size: 0.95rem;
}

.user-email {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.user-inactive {
  opacity: 0.6;
}

.users-table td {
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
}

.role-checkboxes-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
}

.user-roles-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  flex-wrap: wrap;
}

.button-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.button-danger {
  color: #ff758f;
  border-color: rgba(255, 117, 143, 0.4);
}

.button-danger:hover {
  border-color: #ff758f;
  color: #fff;
  background: #4a1c26;
}

.add-user-form {
  margin: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .field {
  flex: 1;
  min-width: 220px;
}

.table-responsive {
  overflow-x: auto;
}

.stat-card-warning {
  border-color: rgba(255, 146, 43, 0.5);
  background: rgba(255, 146, 43, 0.08);
}

.stat-card-warning .stat-value {
  color: #ff922b;
}

