/* Logo default (sidebar normal) */
.logo-mini {
  display: none;
  width: 40px;
  height: auto;
}

.logo-main {
  width: 130px;
  transition: all 0.3s ease;
}

/* Saat sidebar di-collapse */
body.sidebar-mini .logo-main {
  display: none;
}

body.sidebar-mini .logo-mini {
  display: inline-block;
}

/* Samain tinggi semua card di dashboard */
.card-statistic-4 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Biar teks di tiap card tetap sejajar rapi */
.card-statistic-4 .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
}

/* Samain tinggi area judul biar baris judul panjang gak ganggu */
.card-content h5 {
  min-height: 40px;
  margin-bottom: 5px;
}

/* Gambar biar tetap proporsional */
.banner-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Modal Event Detail */
.event-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.event-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 0;
  border: 1px solid #888;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.event-modal-header {
  padding: 15px 20px;
  background: #6777ef;
  color: white;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-modal-header h5 {
  margin: 0;
  font-size: 18px;
}

.event-modal-close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.event-modal-close:hover {
  opacity: 0.7;
}

.event-modal-body {
  padding: 20px;
}

.event-detail-row {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.event-detail-label {
  font-weight: 600;
  width: 140px;
  color: #34395e;
}

.event-detail-value {
  flex: 1;
  color: #6c757d;
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  line-height: 14px;
}

.dropdown-item-desc .message-user {
  font-weight: 600;
  color: #34395e;
}

.dropdown-item-desc .message-text {
  color: #6c757d;
  margin-top: 4px;
}

.dropdown-item-desc .time {
  font-size: 11px;
  color: #98a6ad;
}

/* === FIX FullCalendar Header Layout === */
.fc-header-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  visibility: visible !important;
  opacity: 1 !important;
  margin-bottom: 1.5rem;
}

.fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Pastikan tombol view tidak hilang atau tumpuk */
.fc-toolbar .fc-button-group,
.fc-toolbar .fc-today-button,
.fc-toolbar .fc-button {
  margin: 0;
}

.fc-button,
.fc-button-group .fc-button,
.year-view-toolbar .btn-toolbar {
  padding: 0.375rem 0.75rem !important;
  background-color: #6777ef !important;
  border: 1px solid transparent !important;
  color: #fff !important;
  text-transform: capitalize !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  border-radius: 0.25rem !important;
  font-weight: 400 !important;
  transition: background-color 0.15s ease-in-out !important;
  min-width: auto !important;
  cursor: pointer;
}

.btn-toolbar.active {
  background: #394eea;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fc-button:hover,
.year-view-toolbar .btn-toolbar:hover {
  background-color: #394eea !important;
}

/* CRITICAL: Tombol aktif berdasarkan view */
body[data-current-view="month"] .fc-button[data-view="dayGridMonth"],
body[data-current-view="month"] .year-view-toolbar .btn-toolbar#btn-month {
  background-color: #394eea !important;
}

body[data-current-view="week"] .fc-button[data-view="timeGridWeek"],
body[data-current-view="week"] .year-view-toolbar .btn-toolbar#btn-week {
  background-color: #394eea !important;
}

body[data-current-view="year"] .fc-button[data-fc-button="yearViewBtn"],
body[data-current-view="year"] .year-view-toolbar .btn-toolbar#btn-year {
  background-color: #394eea !important;
}

/* Button group styling */
.fc-button-group,
.year-view-toolbar .btn-group {
  display: inline-flex !important;
  gap: 0 !important;
}

.fc-button-group .fc-button,
.year-view-toolbar .btn-group .btn-toolbar {
  border-radius: 0 !important;
  margin-left: -1px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.fc-button-group .fc-button:first-child,
.year-view-toolbar .btn-group .btn-toolbar:first-child {
  border-top-left-radius: 0.25rem !important;
  border-bottom-left-radius: 0.25rem !important;
  margin-left: 0 !important;
}

.fc-button-group .fc-button:last-child,
.year-view-toolbar .btn-group .btn-toolbar:last-child {
  border-top-right-radius: 0.25rem !important;
  border-bottom-right-radius: 0.25rem !important;
  border-right: 1px solid transparent !important;
}

/* Biar tulisan bulan/tahun selalu tampil */
.fc-toolbar-title {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  margin: 0 8px !important;
  white-space: nowrap !important;
  color: #212529 !important;
}

/* === FIX Overlap dan posisi tabel kalender === */
.fc-scrollgrid {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.fc-daygrid-day-frame {
  padding: 6px !important;
}

/* Hilangkan scroll di week view */
.fc-timegrid-body {
  overflow-y: visible !important;
}

.fc-scroller-liquid-absolute {
  overflow: visible !important;
  position: relative !important;
}

.fc .fc-scroller {
  overflow: visible !important;
}

/* === Week View Responsive untuk Mobile === */
@media (max-width: 768px) {

  /* Kompres kolom waktu jadi lebih kecil */
  .fc-timegrid-axis {
    width: 40px !important;
    font-size: 0.7rem !important;
  }

  .fc-timegrid-slot-label {
    font-size: 0.7rem !important;
    padding: 2px !important;
  }

  /* Header hari di week view */
  .fc-col-header-cell {
    font-size: 0.7rem !important;
    padding: 4px 2px !important;
  }

  .fc-col-header-cell-cushion {
    padding: 2px !important;
    text-align: center !important;
  }

  /* Event title di week view */
  .fc-timegrid-event .fc-event-title {
    font-size: 0.7rem !important;
    padding: 2px !important;
  }

  /* Slot tinggi dikurangi biar lebih fit */
  .fc-timegrid-slot {
    height: 2.5em !important;
  }

  /* Title tanggal minggu lebih kecil */
  .fc-toolbar-title {
    font-size: 0.9rem !important;
  }

  /* Tombol jadi lebih kecil di mobile */
  .fc-button,
  .year-view-toolbar .btn-toolbar {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
}

/* === Biar teks hari & tanggal ga nempel di kiri === */
.fc-col-header-cell-cushion {
  padding-left: 0 !important;
  text-align: center !important;
}

.fc-daygrid-day-number {
  padding-left: 10px !important;
}

/* === Responsif biar rapi di mode kecil === */
@media (max-width: 768px) {
  .fc-header-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .fc-toolbar-chunk {
    justify-content: center;
  }
}

/* Notifikasi belum dibaca — background lebih terang */
.notif-unread {
  background-color: #f0f6ff !important;
  border-left: 3px solid #4e73df;
}

/* Notifikasi sudah dibaca — normal */
.notif-read {
  background-color: transparent !important;
  border-left: none;
  opacity: 0.7;
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  line-height: 14px;
}

.dropdown-item-desc .message-user {
  font-weight: 600;
  color: #34395e;
}

.dropdown-item-desc .message-text {
  color: #6c757d;
  margin-top: 4px;
}

.dropdown-item-desc .time {
  font-size: 11px;
  color: #98a6ad;
}

.navbar .user-img-radious-style {
  border-radius: 50%;
}

/* === YEAR VIEW CUSTOM TOOLBAR === */
.year-view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 0;
}

.year-view-toolbar .toolbar-left,
.year-view-toolbar .toolbar-right {
  display: flex;
  gap: 5px;
  align-items: center;
}

.year-view-toolbar .toolbar-center {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  margin: 0 8px;
}

/* YEAR VIEW FIX 3 KOLOM 4 BARIS */
.year-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 20px;
}

.mini-calendar {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.mini-calendar:hover {
  transform: scale(1.02);
}

.mini-calendar h6 {
  background: #6777ef;
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  text-transform: capitalize;
}

/* Mini calendar ukuran kecil & tidak berantakan */
.mini-calendar .fc {
  font-size: 0.7rem;
}

.mini-calendar .fc-toolbar {
  display: none !important;
}

.mini-calendar .fc-daygrid-day-frame {
  padding: 4px 2px !important;
  min-height: 30px;
}

.mini-calendar .fc-scrollgrid {
  border: none !important;
}

.mini-calendar .fc-daygrid-day-number {
  padding: 2px 4px !important;
  text-align: center;
  font-size: 0.75rem;
}

.mini-calendar .fc-scroller {
  overflow: visible !important;
  height: auto !important;
}

.mini-calendar .fc-daygrid-body {
  width: 100% !important;
  height: auto !important;
}

/* Responsive: ubah jadi 2 kolom di layar kecil */
@media (max-width: 992px) {
  .year-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .year-view {
    grid-template-columns: 1fr;
  }

  .year-view-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .year-view-toolbar .toolbar-left,
  .year-view-toolbar .toolbar-right {
    justify-content: center;
  }
}

.calendar-container {
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

@media (max-width: 600px) {
  .calendar-container {
    padding: 15px;
  }
}

/* === GLOBAL STYLING FOR ALL PAGES === */

/* Modal Styling */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
}

#organisasi-group .select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  height: 46px !important;
  border: 1px solid #e4e6fc !important;
  border-radius: 4px !important;
  padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px !important;
  padding-left: 0 !important;
  color: #6c757d !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  display: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #6c757d;
  font-size: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  width: 40px !important;
  right: 5px !important;
  top: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.form-control.is-valid,
.was-validated .form-control:valid {
  background-image: none !important;
  padding-right: .75rem !important;
}

.custom-select.is-valid,
.was-validated .custom-select:valid {
  background-image: none !important;
  padding-right: 1.5rem !important;
}

/* Rounded Form Controls */
.form-control-rounded {
  border-radius: 10px !important;
}

.btn-rounded {
  border-radius: 10px !important;
}

.input-group .form-control-rounded {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group-append .btn-rounded {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Rounded Pagination */
.page-link-rounded {
  border-radius: 8px !important;
  margin: 0 2px;
}

.pagination .page-item:first-child .page-link-rounded,
.pagination .page-item:last-child .page-link-rounded {
  border-radius: 8px !important;
}

/* fasilitas di halaman informasi ruangan */
.fasilitas-cell {
  vertical-align: top;
}

.fasilitas-wrapper {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 5px;
  vertical-align: top;
}

.fasilitas-wrapper .badge {
  margin: 0;
  padding: 6px 10px;
}

/* Rounded Table Styling */
.table-responsive {
  border-radius: 10px;
  overflow: hidden;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  padding: 12px 15px;
}

.table thead th:first-child {
  border-top-left-radius: 10px;
}

.table thead th:last-child {
  border-top-right-radius: 10px;
}

.table tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}

.table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

.table tbody td {
  padding: 12px 15px;
  vertical-align: middle;
}

/* Button Styling */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Ensure buttons stay in same row */
td:last-child {
  white-space: nowrap;
}

/* Badge Styling */
.badge {
  padding: 0.35em 0.65em;
  font-size: 0.85em;
  border-radius: 6px;
}

/* Custom File Input */
.custom-file-label {
  border-radius: 10px;
}

/* Rounded form control for password input group */
.form-control-rounded-left {
  border-radius: 10px 0 0 10px !important;
  padding: 0.75rem 1rem;
}

.btn-rounded-right {
  border-radius: 0 10px 10px 0 !important;
  padding: 0.75rem 1rem;
}

/* Profile Photo Styling */
.position-relative {
  position: relative;
}

/* Card Styling */
.card {
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: none;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
}

.card-body {
  padding: 2rem;
}

/* Input Focus Effect */
.form-control:focus {
  border-color: #6777ef;
  box-shadow: 0 0 0 0.2rem rgba(103, 119, 239, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }

  .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }

  .btn-sm i {
    font-size: 0.7rem;
  }

  .card-body {
    padding: 1rem;
  }
}

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.login-page * {
  box-sizing: border-box;
}

.login-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 1200px;
  width: 100%;
  display: flex;
  min-height: 500px;
  margin: auto;
}

/* Left Side - Carousel */
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #ffffff 0%, #005BAC 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-section {
  position: absolute;
  top: 30px;
  left: 30px;
}

.logo-img {
  width: 250px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  transition: 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.carousel-container {
  width: 100%;
  max-width: 600px;
  position: relative;
}

.carousel-inner {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.carousel-control-prev {
  left: 10px;
}

.carousel-control-next {
  right: 10px;
}

.carousel-indicators {
  bottom: -30px;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators .active {
  background-color: white;
}

/* Right Side - Login Form */
.login-right {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.login-header p {
  color: #666;
  font-size: 1rem;
}

.login-right .form-group {
  margin-bottom: 25px;
}

.login-right .form-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.login-right .form-control {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.login-right .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.login-right .form-check {
  margin-bottom: 20px;
}

.login-right .form-check-label {
  color: #666;
  font-size: 0.9rem;
}

.password-hint {
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #005BAC 0%, #00AEEF 100%);
  border: none;
  border-radius: 10px;
  padding: 12px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.divider:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  background: white;
  padding: 0 15px;
  color: #999;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.btn-google {
  width: 100%;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn-google:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: #333;
  text-decoration: none;
}

.btn-google img {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    max-width: 450px;
  }

  .login-left {
    padding: 30px 20px;
    min-height: 300px;
  }

  .logo-section {
    position: static;
    margin-bottom: 20px;
  }

  .carousel-container {
    max-width: 100%;
  }

  .carousel-item img {
    height: 250px;
  }

  .login-right {
    padding: 40px 30px;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }
}

.year-view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid #e3e6f0;
  margin-bottom: 20px;
}

.year-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}