/* === Reset & Global === */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: #333;
  background-color: #A6D9C9;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #222;
  margin-bottom: 10px;
}

p,
li,
td,
th,
a {
  font-family: 'Poppins', sans-serif;
}

/* === Dark Mode Global === */
body.dark-mode {
  background-color: #121212;
  color: #eee;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #eee;
}

body.dark-mode a {
  color: #8fc8ff;
}

body.dark-mode a:hover {
  color: #fff;
}

/* === Header === */
.residensi-header {
  display: flex;
  align-items: center;
  height: 200px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0 20px;
  box-sizing: border-box;
}

body.dark-mode .residensi-header {
  background-color: #1f1f1f;
  border-color: #333;
}

/* Header Childs */
.header-kiri {
  width: 28%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-tengah {
  width: 37%;
}

.header-kanan {
  width: 35%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo-kiri {
  height: 111px;
  width: auto;
}

.judul-link {
  font-size: 2.2rem;
  font-weight: 500;
  color: #3772B3;
  text-decoration: none;
}

.judul-link:hover {
  color: #d94444;
}

body.dark-mode .judul-link {
  color: #a3d2ff;
}

@media (min-width: 992px) {
  .judul-link {
    font-size: 1.7rem;
    font-weight: 500;
    color: #3772B3;
    text-decoration: none;
  }
}

/* === Buletan === */
.bulatan-grup {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-right: 20px;
}

.bulat {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.merah {
  background-color: #FF5F57;
}

.kuning {
  background-color: #FFBD2E;
}

.hijau {
  background-color: #28C840;
}

.bulat:hover {
  transform: scale(1.2);
  cursor: pointer;
}

/* === Navigation === */
.residensi-nav {
  background: linear-gradient(to bottom, #ffffff, #dbe5ea);
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 12px 20px;
}

.residensi-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.residensi-nav li a {
  padding: 12px 18px;
  text-decoration: none;
  color: #555;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.residensi-nav li a.active {
  background-color: #40e0d0;
  color: white;
  font-weight: 600;
}

/* Dark nav */
body.dark-mode nav.residensi-nav {
  background: linear-gradient(to bottom, #2a2a2a, #111111);
  border-bottom: 1px solid #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.dark-mode nav.residensi-nav li a {
  color: #bbb;
}

body.dark-mode nav.residensi-nav li a.active {
  background-color: #2c2c2c !important;
  color: white !important;
  opacity: 1;
}

/* Nav per-tab (custom bg untuk dark mode aktif) */
body.dark-mode nav.residensi-nav li:nth-child(1) a.active {
  background-color: #138e86 !important;
}

body.dark-mode nav.residensi-nav li:nth-child(2) a.active {
  background-color: #d68a2e !important;
}

body.dark-mode nav.residensi-nav li:nth-child(3) a.active {
  background-color: #4a3cb7 !important;
}

body.dark-mode nav.residensi-nav li:nth-child(4) a.active {
  background-color: #239b56 !important;
}

body.dark-mode nav.residensi-nav li:nth-child(5) a.active {
  background-color: #c0392b !important;
}

body.dark-mode nav.residensi-nav li:nth-child(6) a.active {
  background-color: #2471a3 !important;
}

/* === Dropdown Mobile === */
.dropdown-wrapper {
  display: none;
  padding: 15px 20px;
  text-align: center;
}

select.mobile-dropdown {
  width: 80%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

body.dark-mode select.mobile-dropdown {
  background-color: #1a1a1a;
  color: #eee;
  border-color: #444;
}

/* === Tab Content === */
.tab-content {
  display: none;
  opacity: 0;
  visibility: hidden;
  max-width: 900px;
  margin: 40px auto;
  padding: 50px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateX(50px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  visibility: visible;
  position: relative;
  transform: translateX(0);
}

.tab-content p {
  text-align: justify;
  text-justify: inter-word;
}

body.dark-mode .tab-content {
  background-color: #1e1e1e;
  color: #eee;
}

/* === Form & Input === */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

body.dark-mode input,
body.dark-mode textarea {
  background-color: #2a2a2a;
  color: #eee;
  border-color: #444;
}

/* === Submit Button === */
button[type="submit"] {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #e94e3b;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: #c53c2d;
}

body.dark-mode button[type="submit"] {
  background-color: #a83224;
}

/* === Notifikasi Box === */
#notif-box {
  display: none;
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #d4edda;
  color: #155724;
  padding: 12px 24px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: top 0.6s ease;
}

body.dark-mode #notif-box {
  background-color: #2e533b;
  color: #d4edda;
}

/* === Responsive === */
@media screen and (max-width: 600px) {
  nav.residensi-nav {
    display: none;
  }

  .dropdown-wrapper {
    display: block;
  }
}

@media (min-width: 768px) {
  .tab-content {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (min-width: 1200px) {
  .tab-content {
    padding-left: 80px;
    padding-right: 80px;
  }
}

/* Halaman */
.beranda-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 20px auto;
}

/* Table */
.residensi-table {
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 2px solid #444;
  /* ✅ border luar lebih tebal */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
}


.residensi-table thead th {
  background-color: #f6f8fa;
  font-weight: 700;
  padding: 14px 20px;
  color: #333;
  border-top: 1px solid #ddd;
  border-bottom: 2px solid #444;
  /* ✅ Ganti dari 1px jadi 2px */
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}


.residensi-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.residensi-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}


.residensi-table tbody td {
  padding: 14px 20px;
  border-top: 1px solid #eee;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}


.residensi-table td:nth-child(1) {
  text-align: center;
  width: 50px;
}


.residensi-table td:nth-child(3),
.residensi-table th:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}


.residensi-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.residensi-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}


body.dark-mode .residensi-table {
  background-color: #1f1f1f;
  color: #eee;
  border-color: #666;
  /* border luar */
}

body.dark-mode .residensi-table th {
  background-color: #2a2a2a;
  color: #fff;
  border-bottom: 2px solid #666;
  /* ✅ sama tebal dengan light mode */
  border-left: 1px solid #666;
  border-right: 1px solid #666;
}

body.dark-mode .residensi-table td {
  border-color: #444;
  /* garis antar baris */
}

body.dark-mode .residensi-table thead tr:first-child th:first-child {
  border-left: 2px solid #666;
}

body.dark-mode .residensi-table thead tr:first-child th:last-child {
  border-right: 2px solid #666;
}

body.dark-mode .residensi-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

body.dark-mode .residensi-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Pengumuman */
.announcement-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 2em;
}

.announcement-box {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 6px solid #2b6cb0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.announcement-header {
  cursor: pointer;
}

.announcement-header h3 {
  margin: 0 0 6px 0;
  color: #0057b7;
  font-size: 1.1rem;
}


.announcement-meta {
  font-size: 0.85rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-toggle {
  margin-top: 10px;
  background: #2b6cb0;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.announcement-content {
  display: none;
  margin-top: 15px;
}

.btn-download {
  background: royalblue;
  color: white;
  padding: 4px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 0;
}

.btn-download:hover {
  background: #003f8a;
}

.announcement-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ccc;
  display: none;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* === Dark Mode: Pengumuman === */
body.dark-mode .announcement-box {
  background: #1f1f1f;
  border-color: #444;
  border-left: 6px solid #5c9ded;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.05);
}

body.dark-mode .announcement-header h3 {
  color: #8fc8ff;
}

body.dark-mode .announcement-meta {
  color: #bbb;
}

body.dark-mode .announcement-toggle {
  background: #3b78c7;
  color: white;
}

body.dark-mode .btn-download {
  background: #3a72cc;
  color: white;
}

body.dark-mode .btn-download:hover {
  background: #1d4f9d;
}

body.dark-mode .announcement-content {
  border-top: 1px dashed #555;
  color: #ddd;
}

/* === Darktogel === */
.dark-toggle-fixed {
  position: fixed;
  top: 15px;
  right: 20px;
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark-toggle-fixed:hover {
  background-color: #eee;
}

body.dark-mode .dark-toggle-fixed {
  background-color: #1e1e1e;
  color: #eee;
  border: 1px solid #555;
}

body.dark-mode .dark-toggle-fixed:hover {
  background-color: #333;
}




/* dokumen */
.dokumen-button {
  padding: 12px 20px;
  background: linear-gradient(to bottom, #2473b6 0%, #1f5e94 100%);
  box-shadow: 0px 10px 14px -7px rgba(21, 75, 126, 0.6);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  font-weight: bold;
  margin: 10px 0;
  transition: all 0.3s ease;
}

.dokumen-button:hover {
  background: linear-gradient(to bottom, #1f5e94 0%, #2473b6 100%);
}

.dokumen-list {
  padding-left: 20px;
}

/* === Dark Mode: Dokumen Button === */
body.dark-mode .dokumen-button {
  background: linear-gradient(to bottom, #1e4a72 0%, #163d5d 100%);
  box-shadow: 0px 10px 14px -7px rgba(0, 0, 0, 0.5);
  color: #e6f0ff;
}

body.dark-mode .dokumen-button:hover {
  background: linear-gradient(to bottom, #163d5d 0%, #1e4a72 100%);
}


.login-section-container {
  display: grid;
  /*grid-template-columns: 1fr minmax(320px, 420px); /* gambar fleksibel, form terkontrol */
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  align-items: start;
  justify-items: center;
  /* isi tiap sel center secara horizontal */
  gap: 40px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Gambar */
.login-image {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-image img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
}

/* Box form */
.login-box {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

body.dark-mode .login-box {
  background: #1e1e1e;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Header login */
.login-header {
  background: #40e0d0;
  color: white;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.login-header .highlight {
  text-decoration: underline;
}

/* Input */
.login-box input[type="email"],
.login-box input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #000;
}

body.dark-mode .login-box input[type="email"],
body.dark-mode .login-box input[type="password"] {
  background-color: #2a2a2a;
  color: #eee;
  border-color: #444;
}

/* Opsi & tombol */
.login-options {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 20px;
  color: #333;
}

body.dark-mode .login-options {
  color: #bbb;
}

.login-buttons {
  display: flex;
  gap: 10px;
}

.btn-masuk,
.btn-daftar {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-masuk {
  background: #004080;
}

.btn-daftar {
  background: #0073e6;
}

body.dark-mode .btn-masuk {
  background: #005399;
}

body.dark-mode .btn-daftar {
  background: #2a8fe6;
}

/* =========================
   RESPONSIVE
   ========================= */
@media screen and (max-width: 768px) {
  .login-section-container {
    grid-template-columns: 1fr;
    /* stack */
    padding: 40px 20px;
    gap: 20px;
    /* rapatkan jarak */
    justify-items: center;
  }

  .login-image img {
    max-width: 300px;
    margin-bottom: 10px;
    /* jarak kecil ke form */
  }

  .login-box {
    max-width: 400px;
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  .residensi-header {
    flex-direction: column;
    height: auto;
    padding: 10px;
    align-items: flex-start;
    text-align: left;
    gap: 8px;
  }

  .header-kiri,
  .header-tengah,
  .header-kanan {
    width: 100%;
    justify-content: flex-start;
  }

  .header-kiri {
    order: 1;
    justify-content: flex-start;
  }

  .header-tengah {
    order: 2;
    text-align: left;
  }

  .header-kanan {
    order: 3;
    justify-content: flex-start;
  }

  .judul-link {
    font-size: 1.5rem;
    display: inline-block;
    padding-left: 5px;
  }

  .bulatan-grup {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 5px;
  }

  .logo-kiri {
    height: 60px;
    margin-left: 30px;
  }
}