/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

:root {
  --draw-card-front-bg: #ffffff;
  --draw-card-front-border: #f0f0f0;
  --draw-card-front-mark: #d0d0d0;
}

body {
  background: #FAFAFA;
  color: #333;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
}

/* ========== Header ========== */
.header {
  text-align: center;
  padding: 20px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.02em;
}

.header h1 span {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.remaining-count {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #999;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  flex: 1;
  max-width: 200px;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn.active {
  color: #333;
}

.tab-btn:disabled {
  cursor: default;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: #333;
  border-radius: 3px 3px 0 0;
}

/* ========== Card Grid ========== */
.grid-container {
  padding: 20px 32px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.card-grid {
  display: grid;
  gap: 6px;
  justify-content: center;
  transform-origin: top center;
}

/* ========== Card ========== */
.card-wrapper {
  perspective: 800px;
  width: 100%;
  height: 100%;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card.drawn {
  cursor: default;
}

.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.card-front {
  background: var(--draw-card-front-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--draw-card-front-border);
  color: #ccc;
  font-size: 1.1rem;
}

.card-front .question-mark {
  font-size: 1.2rem;
  color: var(--draw-card-front-mark);
}

.card-back {
  transform: rotateY(180deg);
  color: #fff;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  flex-direction: column;
  gap: 2px;
}

/* Drawn card back (no rank shown to customers) */
.card-back.drawn-back {
  background: #E8E8E8;
  color: #bbb;
}

.drawn-check {
  font-size: 1.3rem;
  color: #bbb;
}

/* Prize rank colors (admin only) */
.card-back.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}
.card-back.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
  color: #555;
  text-shadow: none;
}
.card-back.rank-3 {
  background: linear-gradient(135deg, #B76E79, #E8C4C8);
}
.card-back.rank-4 {
  background: #6C9BCF;
}
.card-back.rank-5 {
  background: #7BC67E;
}
.card-back.rank-6 {
  background: #D5D5D5;
  color: #666;
  text-shadow: none;
}

/* ========== Sparkle effect for 1st prize ========== */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.card-back.rank-1::before,
.card-back.rank-1::after {
  content: '✦';
  position: absolute;
  font-size: 0.5rem;
  animation: sparkle 1.5s ease-in-out infinite;
}

.card-back.rank-1::before {
  top: 4px;
  right: 6px;
  animation-delay: 0s;
}

.card-back.rank-1::after {
  bottom: 4px;
  left: 6px;
  animation-delay: 0.75s;
}

/* ========== Bottom Progress ========== */
.progress-section {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #eee;
}

.progress-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-align: center;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.progress-item {
  text-align: center;
}

.progress-rank {
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 4px;
}

.progress-bar-bg {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.progress-bar-fill.rank-1 { background: linear-gradient(90deg, #FFD700, #FFA500); }
.progress-bar-fill.rank-2 { background: #C0C0C0; }
.progress-bar-fill.rank-3 { background: #B76E79; }
.progress-bar-fill.rank-4 { background: #6C9BCF; }
.progress-bar-fill.rank-5 { background: #7BC67E; }
.progress-bar-fill.rank-6 { background: #D5D5D5; }

.progress-count {
  font-size: 0.65rem;
  color: #aaa;
}

/* ========== Result Modal ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 24px;
  padding: 40px 48px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-rank {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-rank.rank-1 { color: #FFA500; }
.modal-rank.rank-2 { color: #A0A0A0; }
.modal-rank.rank-3 { color: #B76E79; }
.modal-rank.rank-4 { color: #6C9BCF; }
.modal-rank.rank-5 { color: #7BC67E; }
.modal-rank.rank-6 { color: #999; }

.modal-label {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 24px;
}

.modal-close {
  padding: 12px 40px;
  border: none;
  border-radius: 12px;
  background: #333;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:active {
  background: #555;
}

/* ========== Confetti ========== */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ========== Not Initialized Message ========== */
.not-initialized {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.not-initialized p {
  font-size: 1rem;
  margin-bottom: 8px;
}

.not-initialized small {
  font-size: 0.8rem;
  color: #bbb;
}

/* ========== Admin Styles ========== */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px;
}

.admin-header {
  text-align: center;
  padding: 20px 0;
}

.admin-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
}

.admin-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-section h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.status-card {
  background: #FAFAFA;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.status-rank {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  margin-bottom: 6px;
}

.status-numbers {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
}

.status-drawn {
  color: #e74c3c;
  font-weight: 700;
}

.status-remaining {
  color: #27ae60;
  font-weight: 700;
}

.status-total {
  color: #888;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.history-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #eee;
  color: #888;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  color: #555;
}

.history-table tr:last-child td {
  border-bottom: none;
}

#historyContainer {
  max-height: 420px;
  overflow-y: auto;
}

.history-pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.page-btn {
  padding: 8px 14px;
  min-width: 72px;
}

.page-info {
  font-size: 0.85rem;
  color: #666;
  min-width: 60px;
  text-align: center;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rank-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
}

.rank-badge.rank-1 { background: #FFF3D0; color: #D4920C; }
.rank-badge.rank-2 { background: #F0F0F0; color: #777; }
.rank-badge.rank-3 { background: #F8E8EB; color: #B76E79; }
.rank-badge.rank-4 { background: #E8F0F8; color: #5A86B5; }
.rank-badge.rank-5 { background: #E8F5E9; color: #5DA660; }
.rank-badge.rank-6 { background: #F0F0F0; color: #999; }

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.board-config {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.board-config label {
  font-size: 0.82rem;
  color: #666;
  font-weight: 600;
}

.board-config input {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.board-config small {
  color: #999;
  font-size: 0.76rem;
}

.color-config {
  display: flex;
  align-items: center;
  gap: 8px;
}

#boardColorInput {
  width: 44px;
  height: 34px;
  padding: 2px;
  border-radius: 8px;
}

#boardColorHex {
  width: 100px;
  text-transform: uppercase;
}

.color-save-btn {
  padding: 8px 12px;
}

.distribution-mode {
  display: flex;
  gap: 12px;
}

.distribution-mode label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #555;
}

.manual-distribution {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.manual-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f7f7f7;
  border-radius: 8px;
  padding: 6px 8px;
}

.manual-row span {
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
}

.manual-row input {
  width: 78px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.85rem;
}

/* ========== Board Preview ========== */
.board-config input[readonly] {
  background: #f0f0f0;
  color: #555;
  cursor: default;
  font-weight: 700;
}

.board-preview {
  margin-top: 8px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  min-height: 40px;
}

.preview-summary {
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.preview-summary strong {
  color: #e74c3c;
  font-size: 1rem;
}

.preview-page {
  margin-bottom: 10px;
}

.preview-page:last-child {
  margin-bottom: 0;
}

.preview-page-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 4px;
}

.preview-grid {
  line-height: 0;
  font-size: 0;
}

.preview-cell {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0.5px;
  border-radius: 1px;
  background: #e8e8e8;
}

.preview-cell.active {
  background: #333;
}

.preview-empty {
  font-size: 0.8rem;
  color: #bbb;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:active {
  opacity: 0.7;
}

.btn-primary {
  background: #333;
  color: #fff;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-secondary {
  background: #eee;
  color: #555;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #bbb;
  font-size: 0.9rem;
}

/* ========== Summary Bar (Admin) ========== */
.summary-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px;
  background: #F7F7F7;
  border-radius: 12px;
  margin-bottom: 16px;
}

.summary-item {
  text-align: center;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #333;
}

.summary-label {
  font-size: 0.7rem;
  color: #999;
  text-transform: uppercase;
}

/* ========== Password Gate ========== */
.password-gate {
  display: none;
  position: fixed;
  inset: 0;
  background: #FAFAFA;
  z-index: 900;
  align-items: center;
  justify-content: center;
}

.password-gate-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.password-gate-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.password-gate-card p {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 20px;
}

.password-gate-card input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 12px;
}

.password-gate-card .form-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ========== Manual Distribution Sum ========== */
.manual-sum {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px;
  background: #f7f7f7;
  border-radius: 8px;
}

/* ========== Event Status Badge ========== */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-draft {
  background: #FFF3D0;
  color: #D4920C;
}

.badge-active {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-closed {
  background: #F0F0F0;
  color: #777;
}

/* ========== Responsive (Tablet) ========== */
@media (min-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .status-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ========== Shared Button Sizes ========== */
.btn-sm {
  padding: 7px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
}

.btn-ghost {
  background: transparent;
  color: #555;
  border: 1.5px solid #ddd;
}

.btn-ghost:hover {
  background: #f5f5f5;
}

/* ========== Landing Page ========== */
.landing-body {
  user-select: auto;
  -webkit-user-select: auto;
  background: #FAFAFA;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Hero */
.hero-section {
  background: linear-gradient(160deg, #fff 0%, #FFF9EC 100%);
  padding: 80px 24px 72px;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #222;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-sub {
  font-size: 1rem;
  color: #666;
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features-section {
  padding: 64px 24px;
  background: #fff;
}

.features-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.features-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  text-align: center;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #FAFAFA;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid #f0f0f0;
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
}

/* CTA */
.cta-section {
  padding: 64px 24px;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  text-align: center;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 28px;
}

/* Footer */
.landing-footer {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: #bbb;
  background: #fff;
  border-top: 1px solid #eee;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
  }
}

/* ========== Auth Pages ========== */
.auth-body {
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  user-select: auto;
  -webkit-user-select: auto;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-link {
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  text-align: center;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
}

.form-group input {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
  color: #333;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #aaa;
}

.form-error {
  color: #e74c3c;
  font-size: 0.82rem;
  padding: 8px 12px;
  background: #fff5f5;
  border-radius: 8px;
  border: 1px solid #fdd;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #888;
}

.auth-switch a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ========== Dashboard ========== */
.dash-body {
  background: #F5F5F5;
  min-height: 100vh;
  user-select: auto;
  -webkit-user-select: auto;
}

.dash-layout {
  min-height: 100vh;
}

.dash-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-logo {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-user-name {
  font-size: 0.85rem;
  color: #666;
}

.dash-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px;
}

.dash-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-loading {
  text-align: center;
  padding: 40px;
  color: #bbb;
  font-size: 0.9rem;
}

.dash-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dash-empty p {
  font-size: 1rem;
  color: #888;
  margin-bottom: 8px;
}

.dash-empty small {
  font-size: 0.82rem;
  color: #bbb;
}

.event-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.event-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
}

.event-status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-draft {
  background: #F0F0F0;
  color: #888;
}

.status-active {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-closed {
  background: #FFF3E0;
  color: #E65100;
}

.event-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.event-meta-item {
  font-size: 0.8rem;
  color: #999;
}

.event-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Dashboard new event modal */
.modal-form {
  max-width: 380px;
  padding: 32px;
}

.modal-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.modal-form .form-group {
  margin-bottom: 16px;
}

.modal-form .form-group input {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
  width: 100%;
  outline: none;
}

.modal-form .form-group input:focus {
  border-color: #aaa;
}

.modal-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ========== Event Page ========== */
.event-header-logo {
  margin-bottom: 8px;
}

.event-logo-img {
  max-height: 48px;
  max-width: 160px;
  object-fit: contain;
}

.event-status-msg {
  text-align: center;
  padding: 60px 24px;
  font-size: 1rem;
  color: #888;
}

/* ========== Event Admin Page ========== */
.admin-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-header-top h1 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  flex: 1;
  text-align: center;
}

.inline-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-action-row input,
.inline-action-row select {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-filename {
  font-size: 0.8rem;
  color: #999;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
  max-width: 240px;
}

.image-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  background: #f5f5f5;
}
