/* Global Variables */
:root {
  --primary: #993a03;       /* brand dark orange (was green #2e7d32) */
  --primary-light: #cc4d04; /* brand orange (was green #43a047) */
  --bg: #fff;
  --white: #ffffff;
  --text: #01051b;
  --muted: #777;
  --radius: 12px;
  --transition: 0.3s ease;
  --hdr-h: 60px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: #fff;
}

/* NAVIGATION */
.header {
  height: var(--hdr-h);
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.nav__brand img {
  height: 38px;
  width: auto;
  display: block;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 0px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  user-select: none;
  color: #01051b;
  border-radius: 8px;
  transition: background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;  /* flex, not block — keeps SVG icon centered */
  }
}



.nav__links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav__links li a {
  color: #01051b;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.nav__links li a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 90;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

.panel {
  position: fixed;
  top: var(--hdr-h);
  right: 0;
  transform: translateX(100%);
  width: fit-content;
  max-width: 80vw;
  background: #01051b;
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  max-height: calc(100vh - var(--hdr-h));
  overflow-y: auto;
  transition: transform var(--transition);
  z-index: 91;
}

.panel.open {
  transform: translateX(0);
}

.panel__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

.panel__links {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel__links a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.panel__links a:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

/* DASHBOARD */
.dashboard {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

.sidebar {
  width: 240px;
  padding: 20px;
  flex-shrink: 0;
  background: transparent;
  border-right: 1px solid #e0e0e0;
}

.sidebar h2 {
  font-size: 1.4rem;
  margin-bottom: 30px;
  color: var(--text);
}

.sidebar a {
  display: flex;
  align-items: center;
  color: var(--text);
  padding: 12px 14px;
  margin-bottom: 12px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
  font-weight: 500;
}

.sidebar a:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

.sidebar a i {
  margin-right: 10px;
}

.main {
  flex-grow: 1;
  padding: 40px 30px;
}

.welcome-box {
  background: var(--white);
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 36px;
}

.welcome-box img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

.welcome-box .info h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.welcome-box .info p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.quick-action {
  background: var(--white);
  padding: 22px 18px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease;
}

.quick-action:hover {
  transform: translateY(-6px);
}

.quick-action img {
  width: 48px;
  margin-bottom: 14px;
}

.quick-action h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text);
}

.quick-action a {
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  display: inline-block;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
}

.quick-action a:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Footer */
.footer {
  background-color: #01051b; /* matches page dark blue bg */
  color: #b0b8c1; /* soft light gray for text */
  text-align: center;
  padding: 20px 15px;
  font-size: 0.9rem;
  font-weight: 400;
  border-top: 1px solid #1e2a48; /* subtle top border for separation */
  margin-top: 60px;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.footer a {
  color: #43a047; /* match your primary green accent */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer a:hover,
.footer a:focus {
  color: #2e7d32; /* darker green on hover */
  text-decoration: underline;
  outline: none;
}

/* Responsive */
@media (max-width: 480px) {
  .footer {
    font-size: 0.85rem;
    padding: 15px 10px;
  }
}


.buy-ticket-container {
  max-width: 520px;
  margin: 40px auto;
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.buy-ticket-container h2 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 25px;
  font-size: 24px;
}

.back-button-container {
  text-align: center;
  margin-top: 30px;
}


@media (max-width: 600px) {
  .buy-ticket-container {
    margin: 20px;
    padding: 25px;
  }
}


.form-group {
  margin-bottom: 18px;
}

.form-group label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-light);
  outline: none;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-light);
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-submit:hover {
  background-color: var(--primary);
}

.alert-error {
  background-color: #ffebee;
  color: #b71c1c;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
}


.ticket-form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ticket-form-container h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-left: 5px solid #e53935;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.submit-btn {
  width: 100%;
  background: var(--primary-light);
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 14px;
  border: none;
  border-radius: 6px;
  transition: background var(--transition);
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--primary);
}

@media (max-width: 480px) {
  .ticket-form-container {
    padding: 1.5rem;
    margin: 1rem;
  }
}


/* Scoped styles for scanner page */
.scanner-page {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.scanner-page h2 {
  color: #2e7d32;
  margin-bottom: 16px;
  text-align: center;
  font-size: 1.5rem;
}

.scanner-box {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

#reader {
  width: 100% !important;
  max-height: 320px;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  display: none;
}

#status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  display: none;
  transition: all 0.3s ease;
}

.success {
  background-color: #d9f7be;
  color: #237804;
  border: 1px solid #b7eb8f;
}

.error {
  background-color: #fff1f0;
  color: #a8071a;
  border: 1px solid #ffa39e;
}

.loading {
  color: #1e0a3c;
  font-style: italic;
  animation: blink 1s infinite;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toggle-button {
  margin-bottom: 16px;
}

button {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background-color: #2e7d32;
  color: white;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  transition: background 0.3s;
}

button:hover {
  background-color: #fff3ec;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@keyframes blink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@media (max-width: 500px) {
  .scanner-page h2 {
    font-size: 1.3rem;
  }

  .scanner-box {
    padding: 16px;
  }

  .controls {
    flex-direction: column;
  }
}


/* Event Details Page */
.event-details-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px 20px;
  font-family: 'Inter', sans-serif;
  color: #333;
  position: relative;
}

.event-details-title {
  color: #1e0a3c;
  font-size: 3.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  max-width: 700px;
  margin-left: 0px;
  margin-right: auto;
  
}


.event-details-meta {
  font-size: 14px;
  color: #1e0a3c;
  margin-bottom: 20px;
  line-height: 1.6;
}

.event-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 25px;
}

.event-description {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 30px;
}

.tickets-section {
  margin-top: 50px;
}

.tickets-section h3 {
  color: var(--primary);
  margin-bottom: 20px;
}

.ticket-card {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  background: #fafafa;
}

.ticket-card p {
  margin: 0 0 8px;
  font-size: 14px;
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.floating-buy-btn {
  display: none;
}

@media (max-width: 600px) {
  .event-details-title {
    font-size: 22px;
  }

  .event-description {
    font-size: 15px;
  }

  .buy-ticket-btn {
    width: 100%;
    text-align: center;
  }

  .floating-buy-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--primary-light);
    color: white;
    padding: 14px 20px;
    border-radius: 100px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-size: 15px;
  }

  .floating-buy-btn:hover {
    background: var(--primary);
  }
}


.date-time-label {
  font-size: 1.55rem;
  font-weight: bold;
  margin-bottom: 5px;
}


.location-label {
  font-size: 1.55rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: #1e0a3c;
}

.buy-ticket-btn {
  display: inline-block;
  background-color: #43a047; /* green */
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.buy-ticket-btn:hover {
  background-color: #388e3c;
}



/* Responsive */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .nav__links {
    display: none;
  }

   .main {
    padding: 20px 16px;
  }

  .welcome-box {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .quick-action img {
    width: 40px;
  }

  .quick-action h4 {
    font-size: 1rem;
  }

  .quick-action a {
    font-size: 0.85rem;
  }
}

/* ===== Floating Button (Mobile) ===== */
.floating-buy-btn {
  display: none;
}

@media (max-width: 600px) {
  .floating-buy-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #43a047;
    color: white;
    padding: 14px 20px;
    border-radius: 100px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-size: 15px;
  }

  .floating-buy-btn:hover {
    background: #2e7d32;
  }
}

/* ===== Modal Styles ===== */
.ticket-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.6);
  padding-top: 60px;
}

.ticket-modal-content {
  background-color: #fff;
  margin: auto;
  padding: 20px 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 26px;
  color: #888;
  cursor: pointer;
}

.ticket-option {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.modal-buy-btn {
  display: inline-block;
  margin-top: 8px;
  background: #43a047;
  color: white;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.modal-buy-btn:hover {
  background: #2e7d32;
}




/* === Event Page Specific Styles === */
body.events-page {
  background: linear-gradient(to right, #e0f2f1, #f9fbe7);
  font-family: 'Inter', sans-serif;
}

.myevent-container {
  max-width: 1100px; /* ✅ Enough space for 3 x 280px cards + 2 gaps of 24px */
  margin: 30px auto;
  padding: 30px 20px;
}

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 30px 20px;
}

.container h1 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

.message-box {
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-weight: 500;
}

.message-box.success {
  background: #fff4f0;
  color: var(--primary);
  border-left: 5px solid var(--primary);
}

.no-events {
  text-align: center;
  font-size: 16px;
  color: #444;
  margin-bottom: 20px;
}

.create-button {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(to right, var(--primary-light), var(--primary));
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.create-button:hover {
  background: var(--primary);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.event-card {
  background: white;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px 12px 2px 2px;
  margin-bottom: 10px;
}

.event-card h2 {
  color: var(--primary);
  margin: 0 0 10px;
  font-size: 18px;
}

.event-card p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #444;
}

.event-card a {
  color: #01051b;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.125rem;
}

.event-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.event-actions form {
  flex: 1;
}

.event-actions button {
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.edit-btn {
  background: #fbc02d;
  color: white;
}

.edit-btn:hover {
  background: #f9a825;
}

.delete-btn {
  background: #e53935;
  color: white;
}

.delete-btn:hover {
  background: #c62828;
}

.back-link {
  text-align: center;
  margin-top: 40px;
}

.back-link a {
  display: inline-block;
  padding: 6px 14px; /* reduced padding */
  font-size: 14px;    /* slightly smaller font */
  background: #fff4f0;
  color: var(--primary);
  font-weight: 600;
  border-radius: 6px; /* less rounded */
  text-decoration: none;
  transition: background 0.3s ease;
}


.back-link a:hover {
  background: #ffe3d3;
  color: var(--primary);
}

.pagination {
  margin-top: 40px;
  text-align: center;
}


/* 🔍 Search Bar Styles */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.search-bar input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  font-size: 15px;
  min-width: 220px;
}

.search-bar button {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(to right, #e0f2f1, #c8e6c9);
  color: #2e7d32;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-bar button:hover {
  background: #b2dfdb;
  color: #fff3ec;
}

/* 🔙 Back Button Styles */
.back-button-container {
  text-align: center;
  margin-top: 50px;
}

.back-button-container a {
  display: inline-block;
  padding: 6px 14px; /* reduced padding */
  font-size: 14px;    /* smaller font size */
  background: linear-gradient(to right, #e0f2f1, #c8e6c9);
  color: #2e7d32;
  font-weight: 600;
  border-radius: 6px; /* slightly reduced corner radius */
  text-decoration: none;
  transition: background 0.3s ease;
}


.back-button-container a:hover {
  background: #b2dfdb;
  color: #fff3ec;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.share-btn img {
  width: 16px;
  height: 16px;
}


/* 📱 Responsive for Search Bar */
@media (max-width: 600px) {
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-bar input,
  .search-bar button {
    width: 100%;
  }
}


