:root {
  --primary-color: #007bff;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --danger-color: #dc3545;
  --border-radius: 8px;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  line-height: 1.6;
}

.main-container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  padding-inline: 15px;
  min-height: 100vh;
}

.media-container,
.data-container {
  width: 100%;
  padding: 10px;
}

.counter-box {
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  padding: 12px;
  margin: 8px 0;
  box-shadow: var(--box-shadow);
  background-color: white;
}

.label {
  font-size: 1em;
  color: #333;
  font-weight: bold;
  margin-bottom: 5px;
}

.count {
  font-size: 2em;
  color: var(--primary-color);
  font-weight: bold;
  text-align: center;
  margin: 5px 0;
  transition: var(--transition);
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 15px;
  font-size: 1.5em;
}

h2 {
  color: #333;
  margin: 10px 0;
  font-size: 1.2em;
}

.last-update {
  text-align: center;
  font-size: 0.8em;
  color: #666;
  margin-top: 15px;
  padding: 5px;
}

.counters-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.counter-box {
  text-align: center;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.summary-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 12px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
}

.summary-card:hover {
  transform: translateY(-3px);
}

.summary-card .card-icon {
  font-size: 1.5em;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.summary-card .card-title {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 5px;
  font-weight: 600;
}

.summary-card .card-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
}

.summary-card.students {
  border-top: 4px solid var(--success-color);
}

.summary-card.teachers {
  border-top: 4px solid var(--warning-color);
}

.summary-card.staff {
  border-top: 4px solid var(--info-color);
}

/* Video and Carousel Styles */
.video-container {
  width: 100%;
  background-color: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 460px;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  object-fit: contain;
}

/* Carousel */
.carousel {
  width: 100%;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  aspect-ratio: 16/9;
  margin-bottom: 15px;
}

.carousel-inner {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
}

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

.carousel-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.carousel-control {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 10;
  font-size: 1rem;
  transition: var(--transition);
}

.carousel-control:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Attendance List Styles */
.attendance-list {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.attendance-item {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid #eee;
  align-items: center;
  cursor: pointer;
}

.attendance-item:last-child {
  border-bottom: none;
}

.attendance-item:hover {
  background-color: #f9f9f9;
}

.attendance-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ddd;
  margin-right: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
  font-size: 0.8em;
  flex-shrink: 0;
}

.attendance-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attendance-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.attendance-name {
  font-weight: bold;
  margin-bottom: 2px;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-meta {
  display: flex;
  font-size: 0.75em;
  color: #666;
  flex-wrap: wrap;
  gap: 5px;
}

.attendance-id {
  font-weight: 500;
}

.attendance-time {
  font-style: italic;
}

.attendance-status {
  padding: 3px 6px;
  border-radius: 12px;
  font-size: 0.65em;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
  flex-shrink: 0;
}

.status-hadir {
  background-color: #e6f7e6;
  color: var(--success-color);
}

.status-izin {
  background-color: #fff8e6;
  color: var(--warning-color);
}

.status-sakit {
  background-color: #fff1e6;
  color: #fd7e14;
}

.status-alpha {
  background-color: #fee;
  color: var(--danger-color);
}

.status-telat {
  background-color: #f0e6ff;
  color: #6f42c1;
}

/* Search and Filter */
.table-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.search-box {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  font-size: 0.9em;
}

.status-filter {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9em;
  width: 100%;
}

/* Loading indicator */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Refresh button */
.refresh-btn {
  padding: 8px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9em;
  width: 100%;
}

.refresh-btn:hover {
  background-color: #0069d9;
}

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

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  border-radius: var(--border-radius);
  width: 95%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 15px;
}

.detail-row {
  display: flex;
  margin-bottom: 12px;
  justify-content: space-between;
  width: 100%;
}

.detail-label {
  font-weight: bold;
  /* width: 100px; */
  color: #555;
  font-size: 0.9em;
  margin-bottom: 3px;
}

.detail-value {
  /* flex: 1; */
  color: #333;
  /* min-width: 0; */
  word-break: break-word;
  font-size: 0.9em;
}

.modal-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 auto 15px;
}

.status-badge {
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  display: inline-block;
}

.header-container-wrapper {
  background-color: #fff;
  height: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

.promo-bar {
  background-color: #004c3f;
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Segoe UI", sans-serif;
  position: relative;
  z-index: 10;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.promo-bar a {
  color: #ffd700;
  text-decoration: underline;
  margin-left: 8px;
}

.ruangguru-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: 15px 0; */
  position: relative;
  /* margin-left: 30px; */
}

.logo-header img {
  width: 20px;
}

.navigation__content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.navig-link {
  padding: 15px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  margin: 0px 30px 0px 0px;
  transition: all 0.3s ease;
  color: #333;
}

.navig-link:hover {
  color: #2eb5c0;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1000;
  position: relative;
  margin: 0px 15px 0px 0px;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
/* Tablet and Desktop Styles */
@media (min-width: 768px) {
  .main-container {
    flex-direction: row;
  }
  .hamburger-menu {
    display: flex;
  }

  .navigation__content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
  }

  .navigation__content.active {
    max-height: 300px;
    padding: 15px 0;
  }

  .navig-link {
    padding: 10px 20px;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .navig-link:hover {
    background: #f5f5f5;
  }
  .media-container,
  .data-container {
    width: 50%;
    padding: 15px;
  }

  .table-controls {
    flex-direction: row;
    align-items: center;
  }

  .search-box {
    flex: 2;
    min-width: 200px;
  }

  .status-filter {
    flex: 1;
    min-width: 150px;
  }

  .refresh-btn {
    width: auto;
    min-width: 120px;
  }

  .last-update {
    text-align: right;
  }

  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hamburger-menu {
    display: flex;
  }

  .navigation__content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .navigation__content.active {
    max-height: 300px;
    padding: 15px 0;
  }

  .navig-link {
    padding: 10px 20px;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .navig-link:hover {
    background: #f5f5f5;
  }
}

@media (min-width: 992px) {
  .main-container {
    max-width: 2400px;
    margin: 0 auto;
  }

  .summary-cards {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }

  .summary-card .card-icon {
    font-size: 2em;
  }

  .summary-card .card-title {
    font-size: 1em;
  }

  .summary-card .card-value {
    font-size: 1.8em;
  }

  .attendance-item {
    padding: 12px;
  }

  .attendance-avatar {
    width: 40px;
    height: 40px;
  }

  .attendance-name {
    font-size: 0.95em;
  }

  .attendance-meta {
    font-size: 0.8em;
    flex-direction: row;
  }

  .attendance-time {
    margin-left: auto;
  }

  .attendance-status {
    font-size: 0.7em;
    min-width: 60px;
  }
}
