/* Redesigned main action buttons for admin-events */
.redesigned-btn {
  font-size: 1.05rem;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.redesigned-btn.primary-btn {
  background: linear-gradient(90deg, #bf9745 60%, #f0e990 100%);
  color: #002e6b;
  font-weight: 700;
  border: none;
}
.redesigned-btn.primary-btn:hover {
  background: linear-gradient(90deg, #f0e990 0%, #bf9745 100%);
  color: #002e6b;
  box-shadow: 0 4px 16px rgba(191,151,69,0.10);
}
.redesigned-btn.secondary-btn {
  background: #f5f7fb;
  color: #002e6b;
  border: 1px solid #bf9745;
  font-weight: 600;
}
.redesigned-btn.secondary-btn:hover {
  background: #fffbe6;
  color: #bf9745;
  border-color: #f0e990;
}
/* ============================
   HOLY CIRCLE — ADMIN EVENTS
   ============================ */

  .events-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.2rem;
    gap: 2rem;
  }

  .events-header-actions {
    display: flex;
    gap: 0.7rem;
    align-items: flex-end;
  }

  .events-search-bar {
    width: 100%;
    margin-bottom: 1.1rem;
    display: flex;
    justify-content: flex-start;
  }

  .events-filters-bar {
    width: 100%;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .events-header h2 {
    font-size: 1.6rem;
    margin: 0;
    color: #002e6b;
  }
  
  .events-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.3rem;
  }
  
  .primary-btn {
    background: #bf9745;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  
  .primary-btn i {
    font-size: 0.9rem;
  }
  
  /* Filters */
  
  /* .events-filters is deprecated in new layout */

  .events-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
  }
  
  .search-input {
    flex: 1 1 320px;
    min-width: 220px;
    max-width: 420px;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.98rem;
    margin-right: 0;
  }
  
  .filter-select {
    flex: 0 0 180px;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }

  /* Dropdown polish (applies to old-events + new-events pages) */
  .events-filters-bar .filter-select {
    min-width: 220px;
    max-width: 320px;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
      linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.2rem;
  }

  .events-filters-bar .filter-select:focus {
    outline: none;
    border-color: #bf9745;
    box-shadow: 0 0 0 3px rgba(191, 151, 69, 0.18);
  }

  /* Filter pills (used by admin-event-old) */

  .filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    justify-content: stretch;
  }

  .filter-pill {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    padding: 0.38rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    cursor: pointer;
    line-height: 1.1;
    min-width: 0;
    flex: 1 1 90px;
    text-align: center;
    margin: 0;
  }

  .filter-pill:hover {
    background: #f3f4f6;
  }

  .filter-pill.active {
    background: #bf9745;
    border-color: #bf9745;
    color: #ffffff;
  }

  .filter-clear-btn {
    margin-left: auto;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
  }

  .filter-clear-btn:hover {
    background: #f3f4f6;
  }
  
  /* Table */
  
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
  }
  
  .admin-table.events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
  }
  
  .admin-table.events-table th,
  .admin-table.events-table td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
  }

  .admin-table.events-table th.photo-col,
  .admin-table.events-table td.photo-col {
    width: 92px;
    padding-left: 0.75rem;
    padding-right: 0.55rem;
  }

  .event-thumb {
    width: 74px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #bf9745;
    overflow: hidden;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  
  .admin-table.events-table thead {
    background: #f3f4f6;
  }
  
  .admin-table.events-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }
  
  .empty-state {
    text-align: center;
    padding: 1.2rem 0;
    color: #6b7280;
  }
  
  .event-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  
  .event-main strong {
    color: #111827;
  }
  
  .event-main small {
    color: #6b7280;
  }
  
  /* Pills */
  
  .pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .pill-type {
    background: #e0f2fe;
    color: #0369a1;
  }
  
  .pill-status {
    background: #ecfdf3;
    color: #15803d;
  }
  
  .pill-status.pill-draft {
    background: #fef3c7;
    color: #92400e;
  }
  
  .pill-status.pill-archived {
    background: #f3f4f6;
    color: #4b5563;
  }
  
  /* Actions */
  
  .actions-cell {
    white-space: nowrap;
  }
  
  .icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
  }
  
  .icon-btn i {
    font-size: 0.9rem;
    color: #4b5563;
  }
  
  .icon-btn:hover {
    background: #e5e7eb;
  }
  
  .icon-btn.danger i {
    color: #b91c1c;
  }
  
  /* Modal */
  
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .modal-backdrop.active {
    display: flex;
  }
  
  .modal-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.25rem 1.4rem;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
  }
  
  .modal-close-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6b7280;
  }
  
  .modal-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
  }
  
  .modal-card input,
  .modal-card select,
  .modal-card textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .event-photo-preview {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #f9fafb;
    margin-top: -0.25rem;
    margin-bottom: 0.9rem;
  }

  .event-photo-preview img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #ffffff;
  }

  .photo-remove-btn {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0;
    margin-top: -0.35rem;
    margin-bottom: 0.85rem;
    text-align: left;
  }

  .photo-remove-btn:hover {
    text-decoration: underline;
  }
  
  .modal-row {
    display: flex;
    gap: 1rem;
  }
  
  .modal-col {
    flex: 1 1 0;
  }
  
  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.4rem;
  }
  
  .secondary-btn {
    background: #f3f4f6;
    color: #111827;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
  }
  
  /* Responsive */
  
  @media (max-width: 900px) {
    .events-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.85rem;
    }
    .events-header-actions {
      margin-top: 0.7rem;
    }
    .events-search-bar, .events-filters-bar {
      flex-direction: column;
      gap: 0.7rem;
    }
  }

  @media (max-width: 768px) {
    .filter-pills {
      gap: 0.18rem;
      width: 100%;
      justify-content: space-between;
    }
    .filter-pill {
      font-size: 0.78rem;
      padding: 0.32rem 0.4rem;
      flex: 1 1 70px;
      min-width: 60px;
      max-width: 100px;
      margin: 0;
    }
    .events-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.85rem;
    }
    .events-header-actions {
      margin-top: 0.7rem;
      width: 100%;
      flex-direction: column;
      gap: 0.7rem;
    }
    .events-header-actions button {
      width: 100%;
      font-size: 1.08rem;
      padding: 0.8rem 0;
    }
    .events-search-bar, .events-filters-bar {
      flex-direction: column;
      gap: 0.7rem;
      width: 100%;
    }
    .search-input, .filter-select {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      font-size: 1.05rem;
      padding: 0.7rem 1rem;
    }
    .table-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .admin-table.events-table th,
    .admin-table.events-table td {
      padding: 0.55rem 0.5rem;
      font-size: 0.98rem;
    }
    .admin-table.events-table th.photo-col,
    .admin-table.events-table td.photo-col {
      width: 60px;
      padding-left: 0.3rem;
      padding-right: 0.3rem;
    }
    .event-thumb {
      width: 48px;
      height: 32px;
    }
    .events-footer-actions {
      flex-direction: column;
      align-items: stretch;
      gap: 0.7rem;
    }
    .primary-btn, .secondary-btn {
      width: 100%;
      font-size: 1.05rem;
      padding: 0.8rem 0;
    }
    .modal-row {
      flex-direction: column;
    }
  }

  @media (max-width: 600px) {
    .filter-pills {
      gap: 0.12rem;
    }
    .filter-pill {
      font-size: 0.74rem;
      padding: 0.28rem 0.2rem;
      flex: 1 1 55px;
      min-width: 45px;
      max-width: 80px;
    }
    .admin-main, .admin-container, .panel, .table-wrapper {
      padding-left: 0.5rem !important;
      padding-right: 0.5rem !important;
    }
    .events-header h2 {
      font-size: 1.18rem;
    }
    .events-subtitle {
      font-size: 0.92rem;
    }
    .admin-table.events-table th, .admin-table.events-table td {
      font-size: 0.93rem;
    }
  }

  @media (max-width: 400px) {
    .filter-pills {
      gap: 0.08rem;
    }
    .filter-pill {
      font-size: 0.7rem;
      padding: 0.22rem 0.1rem;
      flex: 1 1 38px;
      min-width: 30px;
      max-width: 60px;
    }
    .events-header h2 {
      font-size: 1rem;
    }
    .events-subtitle {
      font-size: 0.85rem;
    }
    .primary-btn, .secondary-btn {
      font-size: 0.98rem;
      padding: 0.7rem 0;
    }
    .search-input, .filter-select {
      font-size: 0.98rem;
      padding: 0.6rem 0.7rem;
    }
  }
  
  /* ==========================================================
   ADMIN EVENTS — MOBILE-ONLY FIX
   Scoped strictly to admin-events page
   ========================================================== */

@media (max-width: 720px) {

  /* ---------- PAGE CONTAINER ---------- */
  body.with-sidebar .admin-container {
    padding: 1rem 0.75rem 2rem;
  }

  /* ---------- EVENTS HEADER ---------- */
  body.with-sidebar .events-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.with-sidebar .events-header h2 {
    font-size: 1.2rem;
  }

  body.with-sidebar .events-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  body.with-sidebar .events-header-actions {
    display: flex;
    gap: 0.5rem;
  }

  body.with-sidebar .events-header-actions button {
    flex: 1;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 999px;
  }

  /* ---------- SEARCH BAR ---------- */
  body.with-sidebar .events-search-bar {
    margin-top: 0.75rem;
  }

  body.with-sidebar .events-search-bar input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  /* ---------- FILTERS BAR ---------- */
  body.with-sidebar .events-filters-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.75rem;
    border-radius: 14px;
  }

  body.with-sidebar .events-filters-bar select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  /* ---------- TABLE ---------- */
  body.with-sidebar .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.with-sidebar .admin-table {
    font-size: 0.78rem;
  }

  body.with-sidebar .photo-col {
    display: none; /* hide photo column on mobile */
  }

  /* ---------- FOOTER ACTION ---------- */
  body.with-sidebar .events-footer-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
  }

  body.with-sidebar .events-footer-actions .primary-btn {
    width: 100%;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 999px;
  }
}

