* {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
}

body {
      font-family: 'Poppins', sans-serif;
      background: #f4f7fb;
      color: #1f3042;
      min-height: 100vh;
}

a {
      color: white;
      text-decoration: none;
}

/* ===== NAVBAR ===== */
/* sudah diganti dengan navbr.css sebagai css global */

/* ===== PAGE HEADER ===== */
.page-header {
      background: white;
      border-bottom: 1px solid #dde3ee;
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
}

.page-header-content h2 {
      font-size: 18px;
      color: #1f3042;
      font-weight: 600;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 8px;
}

.page-header-content h2 i {
      color: #3f6ea0;
}

.page-header-content p {
      font-size: 13px;
      color: #6b7a90;
      display: flex;
      align-items: center;
      gap: 8px;
}

.sks-badge-header {
      background: #eef3fb;
      color: #1f3042;
      font-size: 12px;
      font-weight: 600;
      padding: 2px 10px;
      border-radius: 20px;
      border: 1px solid #c5d0e0;
}

.page-header-actions {
      display: flex;
      gap: 10px;
      flex-shrink: 0;
}

.btn-outline {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      background: white;
      color: #1f3042;
      border: 1.5px solid #c5d0e0;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.2s ease;
}

.btn-outline:hover {
      background: #1f3042;
      color: white;
      border-color: #1f3042;
}

.btn-primary {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      background: #1f3042;
      color: white;
      border: 1.5px solid #1f3042;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.2s ease;
}

.btn-primary:hover {
      background: #2d4a6b;
      border-color: #2d4a6b;
}

/* ===== LEGEND BAR ===== */
.legend-bar {
      background: white;
      border-bottom: 1px solid #e8edf5;
      padding: 10px 24px;
      display: flex;
      align-items: center;
      gap: 20px;
      font-size: 12px;
      color: #6b7a90;
}

.legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
}

.legend-dot {
      width: 12px;
      height: 12px;
      border-radius: 3px;
      display: inline-block;
      flex-shrink: 0;
}

.legend-kuliah {
      background: #1f3042;
}

.legend-agenda {
      background: #2d7d32;
}

.legend-bentrok {
      background: #c53030;
}

.legend-label {
      margin-left: auto;
      font-style: italic;
}

/* ===== MAIN ===== */
main {
      padding: 20px;
      max-width: 1400px;
      margin: 0 auto;
}

/* ===== GRID JADWAL ===== */
.jadwal_tersimpan {
      padding: 0;
      margin: 0;
}

.jadwal-grid {
      display: grid;
      grid-template-columns: 80px repeat(7, 1fr);
      background: white;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(31, 48, 66, 0.08);
      border: 1px solid #e0e7f0;
}

.time-column,
.day-column {
      display: flex;
      flex-direction: column;
}

.time-slot,
.day-slot,
.day-header,
.time-header {
      border-bottom: 1px solid #edf2f7;
      padding: 0 8px;
      text-align: center;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
}

.time-header {
      font-weight: 700;
      background-color: #1f3042;
      color: white;
      font-size: 12px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
}

.time-slot {
      color: #718096;
      border-right: 1px solid #edf2f7;
      font-size: 11px;
      font-weight: 500;
      background: #f8fafc;
}

.day-header {
      font-weight: 600;
      background-color: #1f3042;
      color: white;
      font-size: 13px;
      height: 48px;
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      line-height: 1.3;
}

/* Class baru khusus untuk teks tanggal di bawah hari */
.dh-date {
      font-size: 10px;
      font-weight: 400;
      color: #9aabb8;
      margin-top: 2px;
}

.day-slot {
      border-left: 1px solid #edf2f7;
      position: relative;
}

.day-slot:hover {
      background: #f0f5fb;
}

.today-column {
      background: rgba(88, 92, 208, 0.094);
      /* border: 2px solid rgba(255, 217, 0, 0.132); */
}

.today-column .day-header {
      background: #1f3042;
      color: #ffffff;
      font-weight: 600;
}

/* ===== WIDGET ===== */
.widget {
      position: absolute;
      width: calc(100% - 6px);
      left: 3px;
      background-color: #1f3042;
      color: white;
      /* align-items: flex-start; */
      justify-content: flex-start;
      flex-direction: column;
      border-radius: 8px;
      z-index: 10;
      padding: 6px 8px;
      box-sizing: border-box;
      font-size: 11px;
      line-height: 1.4;
      cursor: pointer;
      transition: all 0.2s ease;
      overflow: hidden;
      display: flex;
      gap: 2px;
      box-shadow: 0 2px 8px rgba(31, 48, 66, 0.25);
}

.widget:hover {
      transform: scale(1.02);
      z-index: 20;
      box-shadow: 0 4px 16px rgba(31, 48, 66, 0.35);
}

.widget-title {
      font-weight: 600;
      font-size: 11.5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
}

.widget-time {
      font-size: 10px;
      opacity: 0.75;
}

.widget-room {
      font-size: 10px;
      opacity: 0.65;
}

.widget.agenda-widget {
      background: #2d6a4f;
}

.widget.bentrok-widget {
      background: #9b2226;
}

/* ==== FILTER JADWAL CONTROLS ==== */
.filter-jadwal-controls {
      display: flex;
      width: fit-content;
      align-items: center;
      justify-content: center;
      margin: 12px auto 1px;
      border: 1.5px solid #c5d0e0;
      border-radius: 10px;
      padding: 2px;
      gap: 4px;
}

.filter-jadwal-controls button {
      font-family: 'Poppins', sans-serif;
      border: none;
      background: transparent;
      color: #1f3042;
      font-size: 12px;
      font-weight: 500;
      padding: 6px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
}

#prevWeek,
#nextWeek {
      display: flex;
      align-items: center;
      justify-content: center;
}

#prevWeek:hover,
#nextWeek:hover {
      background: #c5d0e05a;
}

.filter-mode-btn.active {
      background: #1f3042;
      color: white;
      border-radius: 8px;
}

.filter-mode-btn:not(.active):hover {
      background: #c5d0e091;
      /* color: #1f3042; */
}

/* ===== MODAL ===== */
.modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 9999;
      align-items: center;
      justify-content: center;
}

.modal-overlay.active {
      display: flex;
}

.modal-content {
      background: white;
      border-radius: 16px;
      width: 380px;
      max-width: 90vw;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      overflow: hidden;
}

.modal-header {
      background: #1f3042;
      color: white;
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
}

.modal-header h3 {
      font-size: 15px;
      font-weight: 600;
}

.modal-close {
      background: none;
      border: none;
      color: rgba(255, 255, 255, 0.7);
      cursor: pointer;
      font-size: 16px;
      padding: 2px 6px;
      border-radius: 4px;
      transition: all 0.2s;
}

.modal-close:hover {
      background: rgba(255, 255, 255, 0.15);
      color: white;
}

.modal-body {
      padding: 20px;
}

.modal-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 13px;
}

.modal-row:last-child {
      border-bottom: none;
}

.modal-row i {
      color: #3f6ea0;
      width: 16px;
      margin-top: 1px;
      flex-shrink: 0;
}

.modal-row strong {
      display: block;
      font-size: 11px;
      color: #9aabb8;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 2px;
}

@media (max-width: 768px) {
      .jadwal-grid {
            grid-template-columns: 60px repeat(7, 1fr);
      }

      .time-slot,
      .day-slot,
      .day-header,
      .time-header {
            height: 42px;
            font-size: 10px;
      }

      main {
            padding: 12px;
      }

      .page-header {
            flex-direction: column;
            align-items: flex-start;
      }

      .page-header-actions {
            flex-wrap: wrap;
      }

      .legend-bar {
            flex-wrap: wrap;
            gap: 10px;
      }
}

/* ── Navbar right ── */
.navbar-right {
      display: flex;
      align-items: center;
      gap: 10px;
}

.logout-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: rgba(255, 255, 255, 0.7);
      border-radius: 8px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      font-family: 'Poppins', sans-serif;
      transition: background 0.2s, color 0.2s;
}

.logout-btn:hover {
      background: rgba(197, 48, 48, 0.35);
      color: #fff;
      border-color: rgba(197, 48, 48, 0.4);
}

/* ── Download modal options ── */
.dl-group {
      margin-bottom: 16px;
}

.dl-group>label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: #9aabb8;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
}

.dl-options {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
}

.dl-opt {
      padding: 6px 12px;
      border: 1.5px solid #d1d9e6;
      background: white;
      color: #1f3042;
      font-size: 12px;
      font-weight: 500;
      border-radius: 8px;
      cursor: pointer;
      font-family: 'Poppins', sans-serif;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dl-opt.active {
      background: #1f3042;
      color: white;
      border-color: #1f3042;
}

.dl-opt:hover:not(.active) {
      background: #f0f5fb;
      border-color: #3f6ea0;
}

/* auth-btn used in modal */
.auth-btn {
      width: 100%;
      padding: 11px;
      background: linear-gradient(135deg, #3f6ea0, #2d5080);
      border: none;
      border-radius: 10px;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      font-family: 'Poppins', sans-serif;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: opacity 0.2s;
      box-shadow: 0 4px 20px rgba(63, 110, 160, 0.3);
}

.auth-btn:hover {
      opacity: 0.9;
}

/* ── Responsive jadwal_tersimpan ── */
@media (max-width: 480px) {
      .page-header-actions {
            flex-wrap: wrap;
            gap: 4px;
      }

      main {
            padding: 10px;
      }

      .jadwal-grid {
            grid-template-columns: 50px repeat(7, 1fr);
      }

      .time-slot,
      .day-slot,
      .day-header,
      .time-header {
            height: 36px;
            font-size: 9px;
            padding: 0 3px;
      }
}