/* ========================================
   Global Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 1.2rem 1.5rem;
  display: block;
  transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: #34495e;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-logout {
  background-color: #e74c3c;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn-logout:hover {
  background-color: #c0392b;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  min-height: calc(100vh - 140px);
  padding: 2rem 0;
}

.main-full {
  min-height: calc(100vh - 60px);
  padding: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-box {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.login-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
}

.login-info code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

/* ========================================
   Dashboard
   ======================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card-content h3 {
  color: #7f8c8d;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.card-link {
  display: inline-block;
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.card-link:hover {
  color: #2980b9;
}

.welcome-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  color: #2c3e50;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* ========================================
   Forms
   ======================================== */
.form-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #7f8c8d;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ========================================
   Tables
   ======================================== */
.table-container {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background-color: #34495e;
  color: white;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.data-table .actions {
  white-space: nowrap;
}

.data-table .actions form {
  display: inline;
}

/* ========================================
   Badges
   ======================================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-success {
  background-color: #2ecc71;
  color: white;
}

.badge-danger {
  background-color: #e74c3c;
  color: white;
}

/* ========================================
   Agenda Cards
   ======================================== */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.agenda-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.agenda-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.agenda-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #ecf0f1;
}

.agenda-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agenda-image-slider {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-color: #ecf0f1;
}

.agenda-image-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.agenda-image-slider img.active {
  opacity: 1;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s;
}

.slider-dots .dot.active {
  background-color: white;
}

.agenda-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #95a5a6;
}

/* Current Images Grid */
.current-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-item {
  position: relative;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f8f9fa;
}

.image-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.delete-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font-size: 0.875rem;
}

.delete-checkbox input[type="checkbox"] {
  width: auto;
}

.delete-checkbox:hover {
  background-color: #fee;
}

/* Upload Grid for separate inputs */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.upload-item {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  background-color: #f8f9fa;
  transition: border-color 0.3s;
}

.upload-item:hover {
  border-color: #3498db;
}

.upload-item label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #7f8c8d;
  font-size: 0.875rem;
}

.upload-item input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  border: none;
  background: none;
}

.agenda-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #95a5a6;
}

.agenda-content {
  padding: 1.5rem;
}

.agenda-content h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.agenda-content p {
  color: #7f8c8d;
  margin-bottom: 1rem;
}

.agenda-meta {
  font-size: 0.875rem;
  color: #95a5a6;
}

.agenda-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid #ecf0f1;
  display: flex;
  gap: 0.5rem;
}

.current-image {
  margin-top: 0.5rem;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #fee;
  color: #c0392b;
  border: 1px solid #e74c3c;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #28a745;
}

/* ========================================
   Modal
   ======================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #ecf0f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #2c3e50;
}

.modal-body {
  padding: 2rem;
}

.close {
  color: #95a5a6;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover,
.close:focus {
  color: #2c3e50;
}

/* ========================================
   Import/Export Section
   ======================================== */
.import-export-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ========================================
   Button Variants
   ======================================== */
.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
}

/* ========================================
   Pagination
   ======================================== */
.pagination-info {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #7f8c8d;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  min-width: 40px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #2c3e50;
  text-decoration: none;
  background-color: white;
  transition: all 0.3s;
}

.pagination-btn:hover {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

.pagination-btn.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
  font-weight: bold;
}

/* ========================================
   Utilities
   ======================================== */
.no-data {
  text-align: center;
  padding: 3rem;
  color: #95a5a6;
  font-size: 1.1rem;
}

.text-muted {
  color: #7f8c8d;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    padding: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
  }

  .nav-menu a {
    text-align: center;
  }

  .nav-user {
    margin-top: 1rem;
    flex-direction: column;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}
