@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #f8fafc;
  color: #334155;
}

/* LOGIN PAGE */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-container h2 {
  margin-bottom: 20px;
  color: #1e3c72;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: 0.3s;
}

.form-group input:focus {
  border-color: #2a5298;
  box-shadow: 0 0 8px rgba(42, 82, 152, 0.2);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: #1e3c72;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-login:hover {
  background: #2a5298;
}

.error-msg {
  color: #e74c3c;
  background: #fadbd8;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* DASHBOARD LAYOUT */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  width: 260px;
  background: #0f172a;
  color: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar-header {
  padding: 25px 20px;
  font-size: 22px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: #38bdf8;
}

.sidebar-menu {
  list-style: none;
  margin-top: 20px;
  flex-grow: 1;
}

.sidebar-menu li {
  margin: 5px 15px;
  border-radius: 8px;
  transition: 0.3s;
}

.sidebar-menu li a {
  color: #cbd5e1;
  text-decoration: none;
  display: block;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.sidebar-menu li:hover,
.sidebar-menu li.active {
  background: rgba(56, 189, 248, 0.1);
}
.sidebar-menu li:hover a,
.sidebar-menu li.active a {
  color: #38bdf8;
}

.main-content {
  flex-grow: 1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.topbar {
  background: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 24px;
  color: #334155;
  margin-right: 20px;
}

.user-info {
  font-weight: 600;
  color: #1e293b;
}

.btn-logout {
  padding: 8px 16px;
  background: #ef4444;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-logout:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.content-body {
  padding: 30px;
  flex-grow: 1;
}

/* CARDS & TABLES */
.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  margin-bottom: 25px;
  border: 1px solid #e2e8f0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-primary {
  background: #38bdf8;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.btn-primary:hover {
  background: #0ea5e9;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
}

.btn-danger {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
}
.btn-warning:hover {
  background: #d97706;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

table th,
table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

/* FORMS */
.form-modal {
  margin-bottom: 15px;
}

.form-modal label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.form-modal input,
.form-modal textarea,
.form-modal select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
/* ================= RESPONSIVE ================= */

/* Tablet */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  .sidebar.active {
    transform: translateX(260px);
  }

  .hero-content h1 {
    font-size: 45px;
  }

  .hero-content p {
    font-size: 18px;
  }

  .about-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .timeline-card {
    flex-direction: column;
  }

  .timeline-card img {
    width: 100%;
    height: 250px;
  }

  .navbar {
    padding: 15px 5%;
  }

  .nav-menu {
    gap: 20px;
  }
}

/* Mobile Dashboard Adjustments */
@media (max-width: 780px) {
    .topbar {
        padding: 15px 20px;
    }
    .content-body {
        padding: 20px 15px;
    }
    .card {
        padding: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
  /* navbar */
  .navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px 5%;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .nav-menu a {
    font-size: 14px;
  }

  /* hero */
  .hero {
    padding: 120px 20px 80px;
  }

  .hero-content h1 {
    font-size: 34px;
    line-height: 1.3;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-btn {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  /* section title */
  .kegiatan-header h2,
  .about-content h2,
  .contact-header h2,
  .sejarah-header h2,
  .vm-header h2,
  .struktur-header h2,
  .jadwal h2,
  .kajian h2,
  .event h2 {
    font-size: 28px;
  }

  /* timeline */
  .timeline-card {
    flex-direction: column;
  }

  .timeline-card img {
    width: 100%;
    height: 220px;
  }

  /* ketua */
  .ketua-card {
    width: 100%;
    max-width: 300px;
  }

  /* grid */
  .kegiatan-container,
  .kajian-grid,
  .event-grid,
  .pengurus-container,
  .misi-container,
  .jadwal-grid {
    grid-template-columns: 1fr;
  }

  /* footer */
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* form */
  .contact-form,
  .contact-info {
    padding: 20px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .logo {
    font-size: 18px;
  }

  .btn-primary,
  .btn-secondary,
  .about-btn,
  .btn-kajian,
  .btn-event {
    padding: 10px 18px;
    font-size: 14px;
  }

  .card-content h3,
  .kajian-content h3,
  .event-content h3 {
    font-size: 18px;
  }

  .timeline-text {
    padding: 15px;
  }

  .contact-header h2,
  .kegiatan-header h2,
  .about-content h2 {
    font-size: 24px;
  }
}
