:root {
  --bg: #030712;
  --bg-alt: #0f172a;
  --sidebar: rgba(15, 23, 42, 0.85);
  --card: rgba(30, 41, 59, 0.75);
  --panel: rgba(15, 23, 42, 0.72);
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: rgba(249, 115, 22, 0.18);
  --text: #e2e8f0;
  --text-muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.40);
  --transition: 0.22s ease;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1f2937 0%, #020617 55%, #000 100%);
  color: var(--text);
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Auto-adjusting image containers for responsive sizing */
.auto-fit-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auto-fit-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smart image sizing - maintains aspect ratio while filling container */
.smart-image-fit {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Responsive image containers for different aspect ratios */
.image-container-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

.image-container-wide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
}

.image-container-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
}

/* Auto-detect image orientation and adjust */
.adaptive-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
}

.adaptive-image.portrait {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.02);
}

.adaptive-image.landscape {
  object-fit: cover;
}

.adaptive-image.square {
  object-fit: cover;
}

.hidden {
  display: none !important;
}

.admin-app {
  min-height: 100vh;
  display: grid;
}

.auth-view {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 6rem);
}

.auth-card {
  max-width: 420px;
  width: 100%;
  padding: clamp(2rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.82));
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  display: inline-flex;
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.auth-header h1 {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 700;
}

.auth-header p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.8rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.portal {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  background: var(--sidebar);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform var(--transition);
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.brand-icon {
  font-size: 2.1rem;
}

.brand-copy {
  display: grid;
  gap: 0.2rem;
}

.brand-copy strong {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sidebar-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
}

.nav {
  display: grid;
  gap: 0.5rem;
  margin-bottom: auto;
}

.nav-link {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.12);
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-footer {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-meta {
  display: grid;
  gap: 0.2rem;
}

.admin-meta span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem clamp(1.5rem, 3vw, 2.75rem) 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 999px;
}

.titles h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
}

.titles p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.85rem;
}

.connection .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.connection .dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.connection .dot.reconnecting {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.screens {
  flex: 1;
  padding: clamp(1.5rem, 3.5vw, 3rem);
}

.screen {
  min-height: calc(100vh - 160px);
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.14);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.26), transparent 60%);
  opacity: 0.85;
}

.card-label {
  display: block;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  position: relative;
  z-index: 1;
}

.card-value {
  font-size: clamp(2.2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

.panels-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-header p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.panel-actions {
  display: inline-flex;
  gap: 1rem;
}

.panel-body {
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.panel-body.live-feed {
  max-height: 540px;
  overflow-y: auto;
}

.activity-item,
.live-item {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.activity-meta,
.live-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.category-pill strong {
  font-size: 1rem;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  margin: 2rem 0;
}

.entry-review {
  display: grid;
  gap: 1.25rem;
}

.entry-group {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.entry-group > summary {
  list-style: none;
  cursor: pointer;
  outline: none;
}

.entry-group > summary::-webkit-details-marker {
  display: none;
}

.entry-group[open] > summary::marker {
  color: transparent;
}

.entry-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  font-weight: 600;
  background: rgba(17, 24, 39, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.entry-group > summary::after {
  content: '▾';
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.entry-group[open] > summary::after {
  transform: rotate(-180deg);
}

.entry-group-header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.entry-group-header span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.entry-grid {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.entry-item {
  display: grid;
  gap: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(9, 12, 21, 0.55);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
  overflow: hidden;
}

.entry-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3), rgba(15, 23, 42, 0.6));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.entry-thumb:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.95) contrast(1.05);
  /* Auto-adjust to fit container perfectly */
  min-width: 100%;
  min-height: 100%;
}

.entry-thumb:hover img {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.1);
}

.entry-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    rgba(249, 115, 22, 0.1) 0%,
    transparent 50%,
    rgba(168, 85, 247, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.entry-thumb:hover::after {
  opacity: 1;
}

.entry-info {
  padding: 0 1.2rem 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.entry-info h5 {
  margin: 0;
  font-size: 1.05rem;
}

.entry-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.entry-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.entry-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.2rem 1.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(148, 163, 184, 0.15);
}

.status-pill.status-approved {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}

.status-pill.status-pending {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
}

.status-pill.status-rejected {
  color: #f87171;
  background: rgba(248, 113, 113, 0.18);
}

/* Simple status styles for entry pills */
.status-pill.status-open {
  color: #10b981;
  background: rgba(16, 185, 129, 0.18);
}

.status-pill.status-close {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
}

.entry-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(6px);
  z-index: 3000;
}

.entry-modal.hidden {
  display: none;
}

.entry-modal-backdrop {
  position: absolute;
  inset: 0;
}

.entry-modal-dialog {
  position: relative;
  width: min(720px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(13, 22, 37, 0.95), rgba(11, 18, 32, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: grid;
  gap: 1.25rem;
}

.entry-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.entry-modal-media img {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.entry-modal-details {
  display: grid;
  gap: 0.75rem;
}

.entry-modal-details h3 {
  margin: 0;
  font-size: 1.4rem;
}

.entry-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.entry-modal-submitted {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.entry-modal-description {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 1.2rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field.small {
  min-width: 150px;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.24);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #06121f;
  box-shadow: 0 18px 28px rgba(234, 88, 12, 0.4);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(234, 88, 12, 0.5);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.25);
}

.btn.ghost:hover {
  background: rgba(148, 163, 184, 0.1);
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn.loading .btn-label {
  visibility: hidden;
}

.btn.loading .btn-spinner {
  display: inline-flex;
}

/* Delete button and error states */
.btn-error {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border-color: #dc2626;
}

.btn-error:hover:not(:disabled) {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
}

.btn-error:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-error.loading {
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
}

/* Success button (approve) */
.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border-color: #16a34a;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #15803d, #166534);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(22, 163, 74, 0.3);
}

.btn-success.loading {
  background: linear-gradient(135deg, #166534, #14532d);
}

/* Entry deletion animation */
.entry-deleting {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.entry-deleted {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-preview {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.4));
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-preview:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 
    0 10px 15px -3px rgba(249, 115, 22, 0.1),
    0 4px 6px -2px rgba(249, 115, 22, 0.05);
}

.image-preview img {
  max-height: 320px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  object-fit: contain;
  object-position: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  filter: brightness(0.95) contrast(1.05);
  /* Auto-fit within container */
  max-width: 100%;
  background: rgba(248, 250, 252, 0.8);
}

.image-preview img:hover {
  transform: scale(1.02);
  filter: brightness(1) contrast(1.1);
  box-shadow: 
    0 8px 12px -2px rgba(0, 0, 0, 0.15),
    0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.toast-stack {
  position: fixed;
  inset: auto 1.5rem 1.5rem auto;
  display: grid;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.45);
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.45);
}

.toast-dismiss {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

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

.contest-status-panel {
  margin-bottom: 2rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.15);
  font-size: 0.85rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge.status-draft .status-dot {
  background: #6b7280;
}

.status-badge.status-accepting_entries .status-dot {
  background: #3b82f6;
}

.status-badge.status-voting_open .status-dot {
  background: #10b981;
}

.status-badge.status-voting_closed .status-dot {
  background: #f59e0b;
}

.status-badge.status-completed .status-dot {
  background: #8b5cf6;
}

/* Simplified status styles */
.status-badge.status-open .status-dot {
  background: #10b981; /* Green for open */
}

.status-badge.status-close .status-dot {
  background: #ef4444; /* Red for closed */
}

.status-controls {
  display: flex;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.status-controls .field {
  flex: 1;
  min-width: 200px;
}

.status-info {
  padding: 1rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.status-info p {
  margin: 0 0 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-info ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.status-info li {
  margin-bottom: 0.25rem;
}

@media (max-width: 1100px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2000;
    transform: translateX(-100%);
    box-shadow: 18px 0 40px rgba(2, 6, 23, 0.6);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .screens {
    padding: 1rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .titles {
    width: 100%;
  }

  .connection {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .panels-grid {
    grid-template-columns: 1fr;
  }

  .entry-group-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-modal-dialog {
    width: 94vw;
    padding: 1.25rem;
  }
}

@media (max-width: 540px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }

  .field span {
    font-size: 0.75rem;
  }

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

  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .stat-card .stat-label {
    font-size: 0.7rem;
  }

  .stat-card .stat-value {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  .stat-card .stat-meta {
    font-size: 0.75rem;
  }

  .dashboard-heading h3 {
    font-size: 1.5rem;
  }

  .category-chip {
    min-width: 140px;
    padding: 0.625rem 0.75rem;
  }

  .category-chip h5 {
    font-size: 0.875rem;
  }

  .category-chip .category-votes {
    font-size: 0.75rem;
  }

  .leaderboard-table table {
    font-size: 0.8rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.625rem 0.375rem;
  }

  .rank-badge {
    min-width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .rank-1 .rank-badge,
  .rank-2 .rank-badge,
  .rank-3 .rank-badge {
    font-size: 1.25rem;
  }

  .screens {
    padding: 0.75rem;
  }

  .topbar {
    padding: 0.75rem;
  }

  .panel {
    margin-bottom: 1rem;
  }

  .panel-header {
    padding: 1rem;
  }

  .panel-body {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
    text-align: center;
  }

  .dashboard-shell {
    gap: 1rem;
  }

  .screens {
    padding: 0.5rem;
  }

  .topbar {
    padding: 0.75rem 0.5rem;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .connection {
    text-align: center;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  .category-scroll {
    padding: 0 0.5rem;
  }

  .entry-thumb {
    border-radius: 8px;
    aspect-ratio: 1;
  }

  .entry-thumb:hover {
    transform: translateY(-1px) scale(1.01);
  }

  .image-preview {
    padding: 0.75rem;
    border-radius: 12px;
  }

  .image-preview img {
    max-height: 240px;
    border-radius: 8px;
  }
}

/* Enhanced Category Summary Cards */
.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.category-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-rank {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-name {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: block;
}

.category-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stat-value {
  color: var(--text);
  font-weight: 600;
}

.category-votes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.vote-count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.vote-count strong {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.vote-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.vote-percentage {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.category-bar {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 0.5rem;
  height: 0.5rem;
  overflow: hidden;
}

.category-progress {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  height: 100%;
  border-radius: 0.5rem;
  transition: width 0.8s ease;
  min-width: 2px;
  
}

/* Responsive category cards */
@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .category-stats {
    gap: 1rem;
  }
  
  .category-votes {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Leaderboard Styles */
.leaderboard-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.leaderboard-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.leaderboard-controls h3 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leaderboard-filter {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  min-width: 180px;
}

.leaderboard-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.refresh-leaderboard-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.refresh-leaderboard-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.leaderboard-header {
  margin-bottom: 1rem;
}

.leaderboard-header h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leaderboard-header small {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: var(--transition);
}

.leaderboard-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
}

.leaderboard-item.rank-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(30, 41, 59, 0.4));
  border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-item.rank-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(30, 41, 59, 0.4));
  border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-item.rank-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(30, 41, 59, 0.4));
  border-color: rgba(205, 127, 50, 0.3);
}

/* ------------------------------ */
/* New dashboard layout           */
/* ------------------------------ */

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.dashboard-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.dashboard-heading h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.dashboard-heading p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.dashboard-actions .updated-at::before {
  content: '●';
  color: var(--primary);
  margin-right: 0.5rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 55%);
  pointer-events: none;
}

.stat-card .stat-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-card .stat-value {
  display: block;
  margin: 0.75rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-card.accent-orange {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(155deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.85));
}

.stat-card.accent-purple {
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(155deg, rgba(168, 85, 247, 0.16), rgba(15, 23, 42, 0.85));
}

.stat-card.accent-teal {
  border-color: rgba(45, 212, 191, 0.3);
  background: linear-gradient(155deg, rgba(45, 212, 191, 0.16), rgba(15, 23, 42, 0.85));
}

.stat-card.accent-lime {
  border-color: rgba(132, 204, 22, 0.3);
  background: linear-gradient(155deg, rgba(132, 204, 22, 0.16), rgba(15, 23, 42, 0.85));
}

.category-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.section-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.section-header p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.category-controls {
  display: flex;
  gap: 0.5rem;
}

.category-scroll {
  position: relative;
  overflow: hidden;
}

.category-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem;
  scroll-behavior: smooth;
}

.category-rail::-webkit-scrollbar {
  height: 6px;
}

.category-rail::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 3px;
}

.category-chip {
  flex: 0 0 auto;
  min-width: 240px;
  background: rgba(30, 41, 59, 0.65);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1rem 1.25rem;
  transition: var(--transition);
}

.category-chip:hover {
  border-color: rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
}

.category-chip header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.category-chip h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.category-chip .category-rank {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.category-chip .category-metrics {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.category-chip .category-bar {
  margin-top: 0.75rem;
  height: 6px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.category-chip .category-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.leaderboard-panel .panel-body {
  padding: 0;
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

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

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.leaderboard-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.leaderboard-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.45);
}

.leaderboard-table .rank-cell {
  font-weight: 700;
  width: 52px;
}

.leaderboard-table .rank-medal {
  font-size: 1.25rem;
}

.leaderboard-table .entry-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.leaderboard-table .entry-title {
  font-weight: 600;
  color: var(--text);
}

.leaderboard-table .entry-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.leaderboard-table .empty td {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.insights-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-panel .panel-body,
.activity-panel .panel-body {
  max-height: 320px;
  overflow-y: auto;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.timeline-row:last-child {
  margin-bottom: 0;
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 64px;
  text-transform: uppercase;
}

.timeline-bar {
  flex: 1;
  height: 10px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.timeline-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  
}

.timeline-count {
  font-weight: 600;
  color: var(--text);
  min-width: 32px;
  text-align: right;
}

.activity-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-item strong {
  display: block;
  color: var(--text);
}

.activity-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.status-panel .status-info {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-panel ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.status-panel li + li {
  margin-top: 0.25rem;
}

@media (max-width: 1024px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .leaderboard-table table {
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .dashboard-shell {
    gap: 1.5rem;
  }

  .dashboard-top {
    flex-direction: column;
    gap: 1rem;
  }

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

  .stat-card {
    padding: 1rem;
  }

  .stat-card .stat-value {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin: 0.5rem 0 0.25rem;
  }

  .category-chip {
    min-width: 160px;
    padding: 0.75rem 0.875rem;
  }

  .category-scroll {
    padding: 0 1rem;
  }

  .leaderboard-controls {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
  }

  .leaderboard-controls .field {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .leaderboard-table table {
    font-size: 0.875rem;
    min-width: 500px;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
  }

  .dashboard-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .panel-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .insights-grid {
    gap: 1rem;
  }

  .status-controls .field {
    margin-bottom: 1rem;
  }
}

.rank-badge {
  min-width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.rank-1 .rank-badge {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  font-size: 1.5rem;
}

.rank-2 .rank-badge {
  background: rgba(192, 192, 192, 0.15);
  color: #c0c0c0;
  font-size: 1.5rem;
}

.rank-3 .rank-badge {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
  font-size: 1.5rem;
}

.pumpkin-info {
  flex: 1;
  min-width: 0;
}

.pumpkin-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pumpkin-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.separator {
  color: var(--border);
}

.vote-stats {
  text-align: right;
  flex-shrink: 0;
}

.vote-stats .vote-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.vote-stats .vote-percentage {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}

/* Responsive leaderboard */
@media (max-width: 768px) {
  .leaderboard-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .leaderboard-filter {
    min-width: auto;
  }
  
  .leaderboard-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .rank-badge {
    min-width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .rank-1 .rank-badge,
  .rank-2 .rank-badge,
  .rank-3 .rank-badge {
    font-size: 1.25rem;
  }
  
  .pumpkin-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .separator {
    display: none;
  }
  
  .vote-stats .vote-count {
    font-size: 1.125rem;
  }
}

/* ============================================================================
   VOTING CONTROLS ENHANCEMENT - Robust Admin Controls
   ============================================================================ */

.voting-controls {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-sm);
}

.voting-controls h4 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.quick-extend-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  min-height: auto;
}

.btn.secondary {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn.secondary:hover {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-1px);
}

.voting-window-info {
  padding: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.voting-window-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.window-times {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.window-times span {
  font-size: 0.8125rem;
  color: var(--text);
}

.window-times strong {
  color: var(--primary);
  font-weight: 600;
}

/* Status indicators for different contest phases */
.status-badge.status-accepting .status-dot {
  background: #10b981; /* Green for accepting entries */
}

.status-badge.status-open .status-dot {
  background: var(--primary); /* Orange for voting open */
}

.status-badge.status-results .status-dot {
  background: #8b5cf6; /* Purple for results */
}

.status-badge.status-close .status-dot {
  background: #6b7280; /* Gray for closed */
}

/* Loading states for extend buttons */
.btn.loading .btn-label {
  opacity: 0;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

/* Responsive voting controls */
@media (max-width: 640px) {
  .quick-extend-buttons {
    flex-direction: column;
  }
  
  .btn.small {
    width: 100%;
  }
}
/* Generic visibility helpers (to avoid inline style mutations) */
.hidden { display: none !important; }
.show-block { display: block !important; }
.show-flex { display: flex !important; }

/* Width utility classes (5% increments) */
.w-0{width:0%}
.w-5{width:5%}
.w-10{width:10%}
.w-15{width:15%}
.w-20{width:20%}
.w-25{width:25%}
.w-30{width:30%}
.w-35{width:35%}
.w-40{width:40%}
.w-45{width:45%}
.w-50{width:50%}
.w-55{width:55%}
.w-60{width:60%}
.w-65{width:65%}
.w-70{width:70%}
.w-75{width:75%}
.w-80{width:80%}
.w-85{width:85%}
.w-90{width:90%}
.w-95{width:95%}
.w-100{width:100%}

/* Text helpers */
.text-danger{color:#ef4444 !important}
.text-muted{color:#666 !important;font-size:.9em}
.badge-success{background:rgba(16,185,129,.1);border-radius:4px;color:#059669;font-weight:700;padding:4px 8px}
.btn-plain{background:none;border:1px solid #ccc;padding:2px 6px;border-radius:3px;cursor:pointer}

/* Voting window display styles */
.voting-ended { font-weight: bold; }
.voting-active { font-weight: bold; color: var(--primary); }
.voting-time-info { font-size: 0.9em; margin-top: 4px; }
.voting-countdown { margin-top: 6px; padding: 4px 8px; background: rgba(16, 185, 129, 0.1); border-radius: 4px; color: #059669; font-weight: bold; }
.voting-error-info { font-size: 0.8em; color: #666; margin-top: 4px; }
/* Animation helper to replace inline opacity/transform */
.fade-out-scale {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0 !important;
  transform: scale(0.95) !important;
}
/* Portrait fit for admin images */
img.portrait-fit { object-fit: contain !important; background: rgba(248, 250, 252, 0.9) !important; }
