/*global, admin*/
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  color: #1e293b;
  margin: 0;
  padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.main-wrapper {
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: fadeIn 0.4s ease-in-out;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TOP HEADER BAR */
.top-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  gap: 15px;
  box-sizing: border-box;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box-header img {
  height: 36px;
  object-fit: contain;
}

.header-text h2 {
  color: #1a73e8;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.3px;
}

.header-text p {
  color: #5f6368;
  font-size: 12px;
  font-weight: 600;
  margin: 2px 0 0 0;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-form label {
  font-weight: 600;
  color: #334155;
  font-size: 13px;
}

.filter-form input[type="date"] {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
  cursor: pointer;
}

.tanggal-info {
  font-size: 13px;
  font-weight: 600;
  color: #1a73e8;
  border-left: 1px solid #cbd5e1;
  padding-left: 10px;
  white-space: nowrap;
}

.btn-admin-login {
  background: #1a73e8;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-admin-login:hover {
  background: #1557b0;
}

/* GRID CONTAINER UNTUK CARD LAB */
.grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* room dan lab card */
.lab-card-status {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 110px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  min-width: 0;
}

.lab-card-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.lab-card-header {
  background-color: #1a73e8;
  color: white;
  padding: 6px 10px;
  text-align: center;
  font-weight: bold;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.2;
  overflow: hidden;
}

.lab-card-status.terpakai .lab-card-header {
  background-color: #d93025;
}

.lab-card-body {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 0;
}

.lab-card-status.tersedia .lab-card-body {
  align-items: center;
  text-align: center;
}

.empty-text {
  color: #9aa0a6;
  font-style: italic;
  font-size: 12px;
}

.agenda-item-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}

.lab-agenda-jam {
  font-size: 11px;
  font-weight: 600;
  color: #1a73e8;
  white-space: nowrap;
  flex-shrink: 0;
}

.lab-agenda-text {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

/* info lab */
.info-card {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.info-card-header {
  background: #1a73e8;
  color: #ffffff;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card-body {
  padding: 10px 14px;
}

.info-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
}

.info-list li {
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}

/* baner footer */
.footer-banner {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 15px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.footer-section {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}

.footer-section strong {
  color: #1e293b;
  display: block;
  margin-bottom: 2px;
}

.qr-section {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid #cbd5e1;
  padding-left: 15px;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.3;
}

/* MODAL POPUP JADWAL LAB */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: modalScale 0.3s ease-in-out;
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  background: #2c3e50;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 16px;
  max-height: 380px;
  overflow-y: auto;
}

.modal-empty {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 13px;
}

/* halaman login */
.login-body {
  font-family: Arial, sans-serif;
  background-color: #ecf0f1;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-card {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
}

.login-header {
  background-color: #2c3e50;
  color: white;
  padding: 15px;
  text-align: center;
  border-radius: 6px 6px 0 0;
  margin: -30px -30px 20px -30px;
}

.login-header h3 {
  margin: 0;
  font-size: 18px;
}

.login-card .form-group {
  margin-bottom: 15px;
}

.login-card .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: bold;
  color: #333;
}

.login-card .form-control {
  width: 100%;
  height: 38px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.btn-login {
  width: 100%;
  background-color: #34495e;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-login:hover {
  background-color: #007bff;
}

.alert-error {
  background-color: #9d2531;
  color: white;
  padding: 8px;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  text-align: center;
}

/* header dan logout */
.header-utama {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2c3e50;
  color: white;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
  width: 100%;
}

.header-utama h2 {
  margin: 0;
  font-size: 20px;
}

.header-right {
  display: flex;
  align-items: center;
}

.user-info {
  font-size: 13px;
  margin-right: 15px;
  color: #bdc3c7;
}

.btn-logout {
  background-color: #9d2531;
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.btn-logout:hover {
  background-color: #c0392b;
  color: white;
  text-decoration: none;
}

.container-utama {
  display: flex;
  width: 100%;
  flex: 1;
  background-color: #ecf0f1;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-height: calc(100vh - 43px); /
}

.sidebar {
  width: 200px;
  min-width: 200px;
  background-color: #34495e;
  color: white;
  padding: 20px;
  box-sizing: border-box;
  align-self: stretch;
}

.sidebar h3 {
  margin-top: 0;
  font-size: 16px;
  color: #bdc3c7;
  border-bottom: 1px solid #4e6d8c;
  padding-bottom: 8px;
}

.sidebar a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid #4e6d8c;
  font-size: 13px;
}

.sidebar a:hover {
  color: #1abc9c;
}

.konten {
  flex: 1;
  padding: 15px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background-color: #ecf0f1;
}

.tabel-data {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tabel-data th {
  background-color: #34495e;
  color: white;
  padding: 8px 10px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-align: left;
}

.tabel-data td {
  padding: 6px 9px;
  border-bottom: 1px solid #eee;
  color: #333;
  font-size: 12px;
}

.tabel-data tr:nth-child(even) {
  background-color: #f8f9fa;
}

.tabel-data tr:hover {
  background-color: #e8f4fd;
  transition: background-color 0.2s ease;
}

.tabel-data td:last-child,
.tabel-data th:last-child {
  text-align: center;
}

.label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
}

.label-aktif {
  background-color: #28a745;
  color: #ffff;
}

.label-tidak-aktif {
  background-color: #9d2531;
  color: #ffff;
}

.btn-tambah {
  display: inline-block;
  padding: 4px 8px;
  background-color: #34495e;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 5px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-tambah:hover {
  background-color: #007bff;
}

.kotak-cari {
  padding: 8px;
  width: 180px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
}

.tabel-data a,
.tabel-data button {
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  border: none;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  margin-right: 4px;
}

/* RESPONSIF */
@media (max-width: 1200px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .lab-card-header {
    font-size: 10.5px;
    padding: 4px 6px;
    height: 32px;
  }
  .top-header-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }
  .header-right-actions {
    flex-direction: column;
    width: 100%;
  }
  .card-filter {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }
  .filter-form {
    width: 100%;
    justify-content: center;
  }
  .tanggal-info {
    border-left: none;
    border-top: 1px solid #cbd5e1;
    padding-left: 0;
    padding-top: 6px;
    text-align: center;
  }
  .btn-admin-login {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .footer-banner {
    grid-template-columns: 1fr;
  }
  .info-list {
    grid-template-columns: 1fr;
  }

  /* Responsif hp */
  .container-utama {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .sidebar a {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    border: 1px solid #1abc9c;
    border-radius: 20px;
    font-size: 13px;
    border-bottom: none;
  }
  .sidebar h3 {
    display: none;
  }
}

@media (max-width: 400px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}
