* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  color: #333;
  animation: halamanMasuk 0.5s ease;
}

header {
  background: #142d4e;
  color: white;
  text-align: center;
  padding: 35px;
}

header h1 {
  font-size: 32px;
  letter-spacing: 2px;
}

header p {
  margin-top: 8px;
}

nav {
  background: #0d1f35;
  padding: 15px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 15px;
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  transition: 0.3s ease;
}

nav a:hover {
  color: #7fc8ff;
  transform: translateY(-3px);
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 50%;
  background: #7fc8ff;
  transition: 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 80%;
}

main {
  max-width: 1200px;
  margin: auto;
  min-height: 400px;
  padding: 30px;
}

main h2 {
  text-align: center;
  margin-bottom: 25px;
}

main > p {
  margin-bottom: 30px;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0001;
  transition: 0.3s;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  color: #142d4e;
  margin-bottom: 12px;
}

.card p {
  margin-bottom: 15px;
}

.card a {
  display: inline-block;
  background: #142d4e;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
}

.card a:hover {
  background: #24558b;
}

.container .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.container .card img {
  display: block;
  width: 100% !important;
  height: 160px !important;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.card img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

.detail-container img {
  display: block;
  width: 80%;
  max-height: 450px;
  object-fit: contain;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logo img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.agenda {
  max-width: 1200px;
  margin: 0 auto;
  padding: 45px 20px 60px;
  background: #eaf0f7;
  border-radius: 18px;
  text-align: center;
}

.agenda h2 {
  color: #142d4e;
  font-size: 28px;
  margin-bottom: 12px;
}

.agenda-subtitle {
  text-align: center;
  margin-bottom: 35px;
  color: #555;
}

.agenda-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.agenda-card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  text-align: left;
  border-left: 5px solid #24558b;
  box-shadow: 0 4px 12px #00000010;
  transition: 0.3s;
}

.agenda-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px #00000018;
}

.agenda-card span {
  display: block;
  color: #24558b;
  font-weight: bold;
  margin-bottom: 18px;
}

.agenda-card h3 {
  color: #142d4e;
  font-size: 18px;
  margin: 15px 0 18px;
}

.agenda-card p {
  margin: 12px 0;
  line-height: 1.5;
  font-size: 14px;
}

#beranda {
  padding: 50px 0;
}

#beranda > .beranda {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 65px;
  padding: 50px 25px;
}

#beranda .beranda h2 {
  font-size: 32px;
  margin-bottom: 25px;
  color: #142d4e;
}

#beranda .beranda p {
  line-height: 1.8;
  margin: 12px auto;
  font-size: 16px;
}

#beranda .beranda button {
  margin-top: 20px;
  padding: 13px 25px;
  font-size: 16px;
  border-radius: 8px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: formMasuk 0.6s ease;
}

form input,
form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px;
}

form textarea {
  min-height: 100px;
}

form button {
  padding: 12px;
}

button {
  background: #142d4e;
  color: white;
  padding: 9px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #24558b;
}

input,
select,
textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-top: 20px;
}

table th {
  background: #142d4e;
  color: white;
  padding: 14px;
}

table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

table tr:hover {
  background: #f1f5f9;
}

footer {
  text-align: center;
  background: #142d4e;
  color: white;
  padding: 20px;
  margin-top: 40px;
}

footer h3 {
  margin-bottom: 10px;
}

footer p {
  margin-top: 8px;
}

.edit-wrapper {
  max-width: 650px;
  margin: 50px auto;
  padding: 20px;
}

.edit-card {
  background: white;
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 5px 20px #00000012;
  animation: masuk 0.5s ease;
}

.edit-card h2 {
  color: #142d4e;
  text-align: center;
  margin-bottom: 10px;
}

.edit-card .subtitle {
  text-align: center;
  color: #777;
  margin-bottom: 30px;
}

.edit-card label {
  display: block;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.edit-card input,
.edit-card textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 20px;
  outline: none;
  transition: 0.3s;
}

.edit-card input:focus,
.edit-card textarea:focus {
  border-color: #24558b;
  box-shadow: 0 0 0 3px #24558b18;
}

.edit-card textarea {
  min-height: 130px;
  resize: vertical;
}

.edit-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.edit-actions button,
.edit-actions a {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}

.edit-actions .btn-simpan {
  background: #142d4e;
  color: white;
}

.edit-actions .btn-simpan:hover {
  background: #24558b;
}

.edit-actions .btn-kembali {
  background: #e5e9ef;
  color: #333;
}

.edit-actions .btn-kembali:hover {
  background: #d5dce5;
}

.dashboard-search {
  margin: 25px 0;
}

.dashboard-search input {
  width: 100%;
  padding: 13px;
  margin-bottom: 10px;
}

.ukm-section {
  margin: 35px 0;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 3px 12px #00000010;
}

.ukm-section h2 {
  color: #142d4e;
  text-align: left;
  border-left: 5px solid #24558b;
  padding-left: 12px;
  margin-bottom: 20px;
}

.ukm-table-wrapper {
  overflow-x: auto;
}

.ukm-table {
  min-width: 950px;
}

.ukm-table select {
  width: 100%;
  margin-bottom: 8px;
}

.ukm-table button {
  width: 100%;
}

.ukm-table a {
  white-space: nowrap;
}

.kosong {
  text-align: center;
  padding: 20px;
  color: #777;
}

/* SHOW / HIDE PASSWORD */
.password-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  width: 100%;
  gap: 5px;
  margin-bottom: 10px;
}

.password-wrapper input {
  flex: 1;
  width: 0 !important;
  min-width: 0;
  height: 42px;
  margin: 0 !important;
}

.password-wrapper button {
  width: 45px;
  min-width: 45px;
  height: 42px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

@keyframes masuk {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes halamanMasuk {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes formMasuk {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.halaman {
  animation: masuk 0.4s ease;
}

@media (max-width: 900px) {
  main {
    padding: 20px;
  }

  .agenda-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .ukm-section {
    padding: 15px;
  }
}

@media (max-width: 600px) {
  header {
    padding: 25px 12px;
  }

  header h1 {
    font-size: 23px;
    letter-spacing: 1px;
  }

  header p {
    font-size: 13px;
  }

  nav {
    padding: 10px 5px;
  }

  nav a {
    margin: 3px;
    padding: 8px;
    font-size: 13px;
  }

  main {
    padding: 15px 10px;
    overflow-x: hidden;
  }

  main h2 {
    font-size: 21px;
  }

  .container {
    grid-template-columns: 1fr;
  }

  .agenda-container {
    grid-template-columns: 1fr;
  }

  #beranda {
    padding: 25px 0;
  }

  #beranda > .beranda {
    padding: 25px 10px;
    margin-bottom: 30px;
  }

  #beranda .beranda h2 {
    font-size: 23px;
  }

  #beranda .beranda p {
    font-size: 14px;
  }

  .card {
    padding: 15px;
  }

  .card img,
  .detail-container img {
    width: 100%;
    height: 230px;
  }

  .logo {
    flex-direction: column;
    gap: 5px;
  }

  .edit-wrapper {
    padding: 10px;
    margin: 20px auto;
  }

  .edit-card {
    padding: 20px 15px;
  }

  .edit-actions {
    flex-direction: column;
  }

  .ukm-section {
    padding: 12px;
    margin: 20px 0;
  }

  .ukm-table {
    min-width: 850px;
  }

  .ukm-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-search input {
    width: 100%;
  }

  footer {
    font-size: 13px;
  }
}
