/* ============================================================
   RESET & GLOBAL
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #213448;
  font-family: "Outfit", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  color: #e1e1f1;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}
/* ============================================================
   LOGIN BACKGROUND FIXED (DESKTOP & MOBILE RESPONSIVE)
============================================================ */

body.login-page {
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.65)
    ),
    url("img/kampus.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* DESKTOP */
}

/* ======================
   MOBILE FIX
====================== */
@media (max-width: 768px) {
  body.login-page {
    background-attachment: scroll; /* 🔥 FIX BUG HP */
    background-position: center top;
  }
}




/* ============================================================
   LOGIN PAGE
============================================================ */

body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 1rem;
}

.login-container {
  background-color: #3291b6;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 8px 10px 0 #000000;

  /* --- UPDATE DI SINI --- */
  width: 99%;         /* lebih lebar dari 90% di layar kecil */
  max-width: 34rem;   /* dari 24rem → 34rem, seperti card contoh */

  color: #e1e1f1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.login-container h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.75rem;
}

.login-container label {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.login-container input {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 0.5rem;
  background-color: #1f1f3f;
  color: #e1e1f1;
  font-size: 1rem;
  transition: 0.2s;
  margin-bottom: 1rem; /* <-- tambahkan ini untuk jarak */
}


.login-container input::placeholder {
  color: #8787a3;
}

.login-container input:focus {
  outline: 2px solid cyan;
  outline-offset: 4px;
}

.login-container button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background-image: linear-gradient(to top, purple, cyan);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-container button:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/* ============================================================
   DASHBOARD GLOBAL LAYOUT — Full Mentok Atas
============================================================ */
body:not(.login-page) {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0;      /* Hapus jarak atas */
  padding-bottom: 1.5rem;
  gap: 0.5rem;
}

/* BACKGROUND TEXT BESAR (MENTOK ATAS) */
.bg-text-animation {
  position: absolute;
  top: 0;              /* FULL MENTOK ATAS */
  font-size: clamp(5rem, 11vw, 12rem);
  text-transform: uppercase;
  font-weight: 900;
  -webkit-text-stroke: 2px #2d2d56;
  -webkit-text-fill-color: transparent;
  user-select: none;
  z-index: -1;
  pointer-events: none;
}

/* =============================
   PROFILE FIX — SPACING + LOGO
============================= */
.profile-container {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Rapatkan bagian atas dan bawah */
  margin-top: 10px;
  margin-bottom: 1.2rem;
}

/* LOGO LEBIH BESAR + RAPIH */
.profile-container img.logo {
  width: clamp(110px, 13vw, 170px);
  height: clamp(110px, 13vw, 170px);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

/* TEKS */
.profile-container h1 {
  margin: 0;
  margin-top: 5px;      /* hilangkan jarak jauh */
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

.profile-container p {
  margin: 3px 0 0 0;    /* rapatkan */
  font-size: clamp(0.85rem, 2vw, 1rem);
}


.my-photo {
  width: 10rem;
  aspect-ratio: 1/1;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  display: block;
  margin-inline: auto;
}

/* ============================================================
   SOSMED ICON
============================================================ */
.sosmed i {
  font-size: 1.5rem;
  color: #8787a3;
  transition: 0.2s;
}

.sosmed i:hover {
  color: white;
}

/* ============================================================
   LISTS & LINK CARDS
============================================================ */
ul {
  width: 80%;
  max-width: 40rem;
  list-style: none;
}

.links {
  margin-top: 1rem;
}

.links li {
  margin-bottom: 1rem;
}

.link-card {
  background-color: #4a628a;
  padding: 1.2rem;
  border-radius: 20px;
  box-shadow: 8px 10px 0 #0f0f25;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
  border: 2px solid #2d2d56;
}

.link-card:hover {
  border-color: white;
  transform: scale(1.01);
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 260px;
  background-color: #3a6d8c;
  border-right: 3px solid #000000;
  box-shadow: 6px 0 0 #213448;
  padding: 1.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: transform 0.3s ease;
  z-index: 999;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar h2 {
  text-align: center;
  font-size: 1.45rem;
  margin-bottom: 1rem;
  color: white;
}

.sidebar a {
  padding: 0.85rem 1rem;
  background-color: #456882;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  box-shadow: 4px 4px 0 #000000;
  display: block;
  transition: 0.2s;
}

.sidebar a:hover {
  background-color: #3a3a6d;
  transform: translateX(4px);
}

/* ============================================================
   CONTENT AREA (DIPUSATKAN)
============================================================ */
.content {
  margin-left: 270px;
  padding: 2rem 1.5rem;
  width: calc(100% - 270px);

  display: flex;
  flex-direction: column;
  align-items: center;
}

.content > * {
  text-align: center;
  width: 100%;
}

/* ============================================================
   TOGGLE SIDEBAR (HP)
============================================================ */
.toggle-sidebar {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  display: none;
  padding: 0.65rem 1.1rem;
  background: #141831;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  box-shadow: 4px 4px 0 #0f0f25;
  cursor: pointer;
}

/* ============================================================
   RESPONSIVE (HP)
============================================================ */
@media (max-width: 480px) {

  .toggle-sidebar {
    display: block;
  }

  .sidebar {
    transform: translateX(-260px);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding-top: 4rem;
  }

  .link-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .bg-text-animation {
    font-size: 5rem;
    top: 1rem;
  }
}

/* ============================================================
   CARD / TUGAS / JADWAL
============================================================ */
.task-item {
  padding: 1rem;
  background-color: #4a628a;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

.card-jadwal {
  background-color: #4a628a;
  color: #fff;
  border: 1px solid #f0e7e7;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card {
  background: #2c2c3e;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  color: white;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  margin-bottom: 1.5rem;
}

/* ============================================================
   FORM CARD
============================================================ */
.form-card {
  max-width: 800px;
  margin: 1rem auto;
  padding: 2rem;
  background: #cecece;
  color: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.form-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #ffeb3b;
}

.form-card input,
.form-card button {
  width: 100%;
  padding: 0.7rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
}

.form-card button {
  background: #27ae60;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.form-card button:hover {
  background: #2ecc71;
}

/* ============================================================
   CARD MATKUL
============================================================ */
.card-mk {
  background: #1abc9c;
  color: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgb(255, 255, 255);
  margin-bottom: 1rem;
  transition: 0.3s;
}

.card-mk:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.card-mk h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
}

.card-mk p {
  margin: 0.3rem 0;
}

.card-mk a {
  color: #f1c40f;
  text-decoration: none;
  font-weight: bold;
}

.card-mk a:hover {
  text-decoration: underline;
}

/* ============================================================
   NOTIFICATION
============================================================ */
#floating-notif {
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* ============================================================
   COPYRIGHT
============================================================ */
.copyright {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #8787a3;
}

.copyright img {
  width: 2rem;
  opacity: 0.4;
}

/* =========================
   INFORMASI TEKS
========================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem; /* biar aman di HP */
  animation: fadeIn .3s ease;
}
.popup-box {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;              /* ⬅️ batas tinggi */
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  animation: popIn .35s cubic-bezier(.2,.8,.2,1);
  position: relative;
  display: flex;
  flex-direction: column;        /* ⬅️ penting */
  overflow: hidden;
}

/* garis atas */
.popup-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #007bff, #00b4ff);
}
.popup-box h3 {
  margin: 1.4rem 1.5rem .6rem;
  font-size: 1.25rem;
  color: #007bff;
  text-align: center;
}
.popup-box p {
  margin: 0 1.5rem;
  font-size: .95rem;
  line-height: 1.6;
  color: #444;
  overflow-y: auto;              /* ⬅️ SCROLL AKTIF */
  padding-bottom: 1rem;
}

/* scrollbar halus */
.popup-box p::-webkit-scrollbar {
  width: 6px;
}
.popup-box p::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}
.popup-box button {
  margin: 1rem 1.5rem 1.4rem;
  padding: .55rem 1.6rem;
  border: none;
  border-radius: 10px;
  background: #007bff;
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,123,255,.35);
  transition: all .25s ease;
}

.popup-box button:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

@keyframes popIn {
  from {
    transform: scale(.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 992px) {
  .popup-overlay {
    justify-content: center;
  }

  .popup-box {
    position: relative;
    left: calc(260px / 2); /* ⬅️ setengah lebar sidebar */
  }
}



/* ================================
   PROFILE DROPDOWN SIDEBAR
================================ */

.profile-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.profile-box:hover {
  background: rgba(255,255,255,0.08);
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-icon {
  width: 36px;
  height: 36px;
  background: #2c2c54;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.profile-text {
  line-height: 1.2;
}

.profile-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.profile-email {
  font-size: 11px;
  color: #bbb;
}

.profile-arrow {
  font-size: 14px;
  color: #bbb;
}

/* DROPDOWN MENU */
.profile-menu {
  display: none;
  background: #1f1f3b;
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 15px;
}

.logout-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #ff6b6b;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.logout-item:hover {
  background: rgba(255,0,0,0.1);
}
/* =========================
   PILIH TARGET EMAIL
========================= */

.target-box {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.target-option {
  flex: 1;
  cursor: pointer;
}

.target-option input {
  display: none;
}

.target-option span {
  display: block;
  padding: 6px 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  background: #2c2c54;        /* DARK MODE */
  color: #e1e1f1;
  border: 2px solid #2d2d56;
  transition: all 0.2s ease;
}

/* Hover */
.target-option span:hover {
  background: #3a3a75;
}

/* Aktif */
.target-option input:checked + span {
  background: linear-gradient(135deg, #00b4ff, #007bff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(0,123,255,.35);
}

/* =========================
   LIGHT MODE
========================= */
body.light-mode .target-option span {
  background: #dde5ee;
  color: #1f2937;
  border-color: #cfd8e3;
}

body.light-mode .target-option span:hover {
  background: #e9eef4;
}

body.light-mode .target-option input:checked + span {
  background: linear-gradient(135deg, #00b4ff, #007bff);
  color: #fff;
  border-color: transparent;
}

/* ============================
   SIDEBAR KHUSUS ADMIN (RAPAT)
============================ */

/* Jarak antar menu admin dipersempit */
.admin-sidebar a {
  padding: 7px 12px;
  margin-bottom: 3px;
  line-height: 1.2;
}

/* Jarak dari judul Admin ke menu */
.admin-sidebar h2 {
  margin-bottom: 10px;
}

/* Jarak menu ke profile dibuat lebih dekat */
.admin-sidebar .profile-box {
  margin-top: 8px;
  padding-top: 8px;
}

.xm-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 700px;
  margin: 15px auto;
  padding: 18px 22px;
  border-radius: 18px;
  background: #2c2c54;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: 0.3s ease;
}

.xm-button:hover {
  transform: translateY(-3px);
  background: #3a3a75;
}

.xm-button i {
  font-size: 1.3rem;
}

.xm-button span {
  flex: 1;
  text-align: center;
}

.xm-button .right-icon {
  opacity: 0.8;
}


.google-input-container {
  position: relative;
  width: 100%;
  display: block;            /* pastikan jadi block sehingga NPM pasti di bawah */
  margin-bottom: .5rem;
}

.google-input-container input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid #1f1f3b;
  border-radius: 6px;
  background-color: #1f1f3b;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.google-input-container input:hover {
  border-color: #4285F4;
}

.google-input-container img {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-80%); /* ⬅ naik sedikit */
  width: 26px;
  height: 26px;
  cursor: pointer;
  transition: transform 0.2s;
}


.google-input-container img:hover {
  transform: translateY(-50%) scale(1.1);
}


.profile-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Foto profil */
.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Inisial fallback jika tidak ada foto */
.profile-initials {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;

    background: linear-gradient(135deg, #1e88e5, #26c6da);
    color: #fff;
    text-transform: uppercase;

    user-select: none;
}

/* Jika foto error → gunakan inisial */
.profile-icon.no-img .profile-initials {
    display: flex;
}

.profile-text {
  display: flex;
  flex-direction: column;
  max-width: 200px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.profile-text .profile-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  line-height: 1.1;
}

.profile-text .profile-email {
  font-size: 12px;
  color: #cfcfcf;
  opacity: 0.8;
  word-break: break-all; /* email panjang auto turun */
}

/* kelompok */
body {
  padding-top: 50px;
}
.box-kelompok {
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 0.7rem;
    background: #4a628a;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: #fff;
}
.box-kelompok h2, .box-kelompok h3 {
    text-align: center;
    margin-bottom: 1rem;
}
.box-kelompok h4 {
    margin:0.5rem 0 0.3rem 0;
}
.box-kelompok ul {
    padding-left: 1.2rem;
}


/* Tidak boleh copy link grup */
.no-copy {
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
}


/* Notif untuk 10 menit logout */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
    animation: slideIn .4s ease;
}

.toast-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 5px solid #f1c40f;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* ============================================================
   DARK / LIGHT MODE FIX (IMPROVED VISIBILITY)
   TIDAK PUTIH POLOS & EMAIL KELIHATAN
============================================================ */

/* BODY */
body.light-mode {
  background-color: #EEEEEE !important; /* lebih soft */
  color: #1f2937 !important;
}

/* SIDEBAR */
body.light-mode .sidebar {
  background-color: #e9eef4 !important;
  box-shadow: 6px 0 0 #dbe2ea;
}

body.light-mode .sidebar a {
  background-color: #dde5ee !important;
  color: #1f2937 !important;
}

/* CONTENT – SATU ATURAN */
body.light-mode .content,
body.light-mode .profile-container,
body.light-mode .link-card,
body.light-mode .card,
body.light-mode .card-jadwal,
body.light-mode .task-item,
body.light-mode .box-kelompok {
  background-color: #eeeeee !important;
  color: #1f2937 !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 16px;
}


/* NAMA & EMAIL (DIPASTIKAN KELIHATAN) */
body.light-mode .profile-name,
body.light-mode .profile-nama,
body.light-mode .profile-username {
  color: #111827 !important;
  font-weight: 600;
}

body.light-mode .profile-email {
  color: #374151 !important; /* lebih gelap dari sebelumnya */
  opacity: 1 !important;
}

/* TEXT UMUM */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
  color: #111827 !important;
}

body.light-mode p,
body.light-mode span {
  color: #1f2937 !important;
}

body.light-mode .copyright {
  color: #4b5563 !important;
}

/* INPUT */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background-color: #f9fbfd !important;
  color: #1f2937 !important;
  border: 1px solid #cfd8e3 !important;
}

/* BUTTON / LINK */
body.light-mode .xm-button {
  background-color: #dde5ee !important;
  color: #1f2937 !important;
}


/* Dark mode */
body:not(.light-mode) .theme-toggle {
  background: rgba(42, 59, 85, 0.95);
  color: #e1e1f1;
}

/* Light mode */
body.light-mode .theme-toggle {
  background: #e2e8f0;
  color: #1f2937;
}

/* Hover (laptop) */
.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

/* Klik */
.theme-toggle:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* =========================
   THEME TOGGLE — POJOK KANAN ATAS LAYAR
   BUKAN HEADER, BUKAN SIDEBAR
========================= */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;

  z-index: 99999;

  /* paksa lepas dari parent */
  transform: none !important;
  pointer-events: auto;
}

/* HP tetap rapi & kecil */
@media (max-width: 768px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* IP Publik */
.signal-box {
    position: fixed;
    top: 14px;
    right: calc(14px + 110px); /* samping dark mode */
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #fff;
    z-index: 99998;
}

/* BAR SINYAL */
.signal-bars {
    display: flex;
    gap: 2px;
}
.signal-bars span {
    width: 4px;
    height: 10px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
}

/* BAR AKTIF */
.bars-1 span:nth-child(1),
.bars-2 span:nth-child(-n+2),
.bars-3 span {
    background: #fff;
}

/* WARNA STATUS */
.signal-box.good   { background: #2ecc71; }
.signal-box.medium { background: #f1c40f; color:#000; }
.signal-box.bad    { background: #e74c3c; }

/* HP */
@media (max-width: 768px) {
    .signal-box {
        top: 52px;
        right: 10px;
    }
}

/* ============================================================
   CEK DATA MAHASISWA
============================================================ */

.ip-card {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 18px;
  background: #4a628a;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.ip-card h3,
.ip-card h4 {
  text-align: center;
  margin-bottom: 1rem;
}

/* form */
.ip-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ip-form label {
  font-size: 0.9rem;
  text-align: left;
}

.ip-form select {
  width: 100%;
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  border-radius: 8px;

  background-color: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;

  font-size: 14px;
  font-weight: 500;

  /* DEFAULT: KIRI */
  text-align: left;
  text-align-last: left;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* panah */
  background-image:
    linear-gradient(45deg, transparent 50%, #374151 50%),
    linear-gradient(135deg, #374151 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.ip-form select option {
  text-align: left;
}


/* button */
.ip-form button {
  align-self: center;
  padding: 0.6rem 1.6rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00b4ff, #007bff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,123,255,.35);
  transition: .25s;
}

.ip-form button:hover {
  transform: translateY(-2px);
  opacity: .9;
}

/* tabel hasil */
.ip-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.ip-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.ip-table td:first-child {
  font-weight: 600;
  width: 40%;
}

/* warna IP */
.ip-ok {
  color: #4fc3f7;
  font-weight: 600;
}

.ip-local {
  color: #ffb74d;
}

.ip-empty {
  color: #ccc;
}

/* ============================================================
   LIGHT MODE SUPPORT
============================================================ */
body.light-mode .ip-card {
  background: #eeeeee;
  color: #1f2937;
  border: 1px solid #dbe2ea;
}

body.light-mode .ip-form select {
  background: #f9fbfd;
  color: #1f2937;
  border: 1px solid #cfd8e3;
}

body.light-mode .ip-table td {
  border-bottom: 1px solid #dbe2ea;
}

body.light-mode .ip-ok {
  color: #007bff;
}
/* =========================
   PILIH TARGET EMAIL
========================= */

.target-box {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.target-option {
  flex: 1;
  cursor: pointer;
}

.target-option input {
  display: none;
}

.target-option span {
  display: block;
  padding: 6px 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  background: #2c2c54;        /* DARK MODE */
  color: #e1e1f1;
  border: 2px solid #2d2d56;
  transition: all 0.2s ease;
}

/* Hover */
.target-option span:hover {
  background: #3a3a75;
}

/* Aktif */
.target-option input:checked + span {
  background: linear-gradient(135deg, #00b4ff, #007bff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(0,123,255,.35);
}

/* =========================
   LIGHT MODE
========================= */
body.light-mode .target-option span {
  background: #dde5ee;
  color: #1f2937;
  border-color: #cfd8e3;
}

body.light-mode .target-option span:hover {
  background: #e9eef4;
}

body.light-mode .target-option input:checked + span {
  background: linear-gradient(135deg, #00b4ff, #007bff);
  color: #fff;
  border-color: transparent;
}

/* ==================================================
   DAFTAR INFORMASI 
================================================== */

/* Hilangkan header tabel */
.info-table thead {
  display: none;
}

/* Spasi antar card */
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 16px;
  background: transparent;
}

/* CARD */
.info-table tbody tr {
  display: block;
  padding: 16px;
  border-radius: 14px;
  background: #1f2937; /* dark */
  color: #e5e7eb;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* CELL */
.info-table td {
  display: block;
  border: none !important;
  padding: 6px 0 !important;
  font-size: 0.9rem;
}

/* ===============================
   LABEL (KETERANGAN)
   pakai nth-child (tanpa data-label)
================================ */
.info-table td:nth-child(1)::before {
  content: "Isi";
}
.info-table td:nth-child(2)::before {
  content: "Status";
}
.info-table td:nth-child(3)::before {
  content: "Hapus";
}
.info-table td:nth-child(4)::before {
  content: "Aksi";
}

.info-table td::before {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #868686;
  margin-bottom: 2px;
}

/* ISI TEKS */
.info-table td:nth-child(1) {
  line-height: 1.6;
  margin-bottom: 8px;
}

/* STATUS */
.info-table strong {
  color: #22c55e;
}

/* LINK */
.info-table a {
  font-size: 0.85rem;
}

/* ===============================
   BOX KIRIM EMAIL
================================ */
.target-box {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.target-option {
  flex: 1;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  padding: 5px;
  font-size: 0.75rem;
  text-align: center;
  cursor: pointer;
  color: #ffffff;
}

.target-option input {
  display: none;
}

.target-option input:checked + span {
  background: #3b82f6;
  color: #fff;
  border-radius: 4px;
}

/* ==================================================
   LIGHT MODE
================================================== */
body.light-mode .info-table tbody tr {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

body.light-mode .info-table td::before {
  color: #6b7280;
}

body.light-mode .info-table strong {
  color: #16a34a;
}

body.light-mode .target-option {
  color: #1f2937;
  border-color: #2563eb;
}

body.light-mode .target-option input:checked + span {
  background: #2563eb;
  color: #fff;
}

/* ==================================================
   DESKTOP (BIAR GA TERLALU GEDE)
================================================== */
@media (min-width: 768px) {
  .info-table tbody tr {
    max-width: 760px;
    margin: auto;
  }
}

/* ================================
   DASHBOARD STATISTIK MAHASISWA
   (CSS TERPISAH & AMAN)
   ================================ */

   .mhs-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.mhs-card {
    min-width: 220px;
    padding: 1.5rem;
    border-radius: 16px;
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    transition: transform .3s ease, box-shadow .3s ease;
}

.mhs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.35);
}

.mhs-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff8b0;
}

.mhs-card .mhs-count {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: .5rem;
}

/* VARIAN WARNA */
.mhs-internal {
    background: linear-gradient(145deg, #0f93eb, #007bff);
}

.mhs-external {
    background: linear-gradient(145deg, #ff9800, #ff5722);
}

.mhs-total {
    background: linear-gradient(145deg, #4caf50, #2e7d32);
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .mhs-card {
        min-width: 100%;
    }
}
