/* ============================================
   style.css — Sistem Tempahan Projector
   ============================================ */

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Poppins:wght@400;600&display=swap');
:root {
  --blue-dark:   #0C447C;
  --blue:        #185FA5;
  --blue-light:  #E6F1FB;
  --blue-mid:    #B5D4F4;
  --red:         #A32D2D;
  --red-light:   #FCEBEB;
  --red-mid:     #F09595;
  --green:       #3B6D11;
  --green-light: #EAF3DE;
  --green-mid:   #97C459;
  --gray-50:     #F8F9FA;
  --gray-100:    #F1F3F5;
  --gray-200:    #E9ECEF;
  --gray-300:    #DEE2E6;
  --gray-500:    #6C757D;
  --gray-700:    #495057;
  --gray-900:    #212529;
  --white:       #FFFFFF;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --font:        'Poppins', sans-serif;
  --transition:  all .2s ease;

  /* ──  Warna untuk setiap device ── */
  --projector-color:   #185FA5;
  --projector-light:   #d7e8f9;
  --projector-border:  #318ef1;

  --tablet-color:      #F57C00;
  --tablet-light:      #fff9e3;
  --tablet-border:     #F57C00;

  --ipad-color:        #0F6E56;
  --ipad-light:        #d1f7ea;
  --ipad-border:       #1D9E75;
}

body {
  font-family: var(--font);
  background: #1e74a9;
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

#myVideo {
  position: fixed;
  top: 50%;
   left: 50%;
   min-width: 100%;
   min-height: 100%;
   width: auto;
   height: auto;
   z-index: -1;
   transform: translate(-50%, -50%);
   object-fit: cover; 
}

.container, .navbar {
  position: relative;
}

/* ── Layout ───────────────────────────────── */
.navbar {
  background: rgba(255, 255, 255, 0.156); 
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
  border-bottom: 2px solid #ff9a35;
  padding: 8px 24px; 
  display: flex;
  flex-direction: row;  
  align-items: center;
  justify-content: center;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
  gap: 0.5rem;
}

.navbar-hidden {
  transform: translateY(-100%);
}

.navbar-content {
  font-family: "Roboto";
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 50px;
}

.navbar-title {
  position: relative;
  height: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.navbar-title span {
  position: absolute;
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  opacity: 0;
  white-space: nowrap;
  animation: titleSwap 6s infinite;
}

.text-2 {
  animation-delay: 3s !important;
  color: #F57C00 !important;
}

@keyframes titleSwap {
  0% { opacity: 0; transform: translateY(20px); }
  5%, 45% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(-20px); }
}

.navbar-sub {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color:#ffffff !important;
  font-weight: 600 !important;
  margin-top: 4px;
  animation: sloganFade 3s ease-in-out infinite;
}

@keyframes sloganFade {
  0%, 100% { opacity: 0.3; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.15); }
}
  
.navbar-icon {
  width: 38px; height: 38px;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.navbar-icon svg { width: 20px; height: 20px; color: var(--blue); }
.navbar-title { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.navbar-sub   { font-size: 12px; color: var(--gray-500); }

.container {
  max-width: 1650px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* ── Page switching ───────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── Stats bar ────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat-chip {
  flex: 1;
  min-width: 140px;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.stat-chip:nth-child(1) { background: #d8f6db; }
.stat-chip:nth-child(2) { background: #f3e2d1; }
.stat-chip:nth-child(3) { background: #d7d8f7; }
.stat-chip:nth-child(1) svg { background: #c8e6c9; color: #2e7d32; }
.stat-chip:nth-child(2) svg { background: #f2dd9e; color: #f57f17; }
.stat-chip:nth-child(3) svg { background: #bbc8f8; color: #3a28c6; }

.stat-chip strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2d2d2d;
  line-height: 1;
  letter-spacing: 0;
}
.stat-chip svg { 
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  flex-shrink: 0; 
}

/* ── Toolbar ──────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.tabs {
  display: flex;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
}
.tab-btn {
  padding: 8px 18px;
  border: 1.5px solid #e0e0e0;
  background: white;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #888;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tabs[data-active="harian"] .tab-btn.active {
  background: #e8f5e9;
  border-color: #59d15d;
  color: #2e7d32;
}
.tabs[data-active="mingguan"] .tab-btn.active {
  background: #fff8e1;
  border-color: #ff7300;
  color: #e65100;
}
.tabs[data-active="bulanan"] .tab-btn.active {
  background: #fce4ec;
  border-color: #3d1ee9;
  color: #0e4f88;
}

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { 
  background: #ffffff !important;
  color: rgb(0, 0, 0) !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
}
.btn-primary:hover {  
  background: #d54d4d !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important; 
}
.btn-primary svg { stroke: rgb(0, 0, 0) !important; }

.btn-danger {
  background: transparent;
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  padding: 6px 12px;
  font-size: 12px;
}
.btn-danger:hover { background: var(--red-light); color: var(--red); border-color: var(--red-mid); }

.btn-secondary { background:rgba(0, 0, 0, 0.958); color: rgb(255, 252, 252); border: 1px solid rgb(255, 255, 255); }
.btn-secondary:hover { background: rgba(71, 148, 235, 0.464); }

.btn-submit {
  width: 100%;
  padding: 11px;
  justify-content: center;
  font-size: 14px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius-md);
}
.btn-submit:hover { background: var(--blue-dark); }
.btn-submit:disabled { background: var(--gray-300); cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Cards ────────────────────────────────── */
.group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin: 1.5rem 0 .6rem;
}
.group-label:first-child { margin-top: 0; }

.booking-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  animation: fadeIn .25s ease;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* ── Border kiri mengikut jenis device ── */
/*  nth-child warna berbeza — diganti dengan class device */
.booking-card.device-projector {
  border-left: 10px solid var(--projector-border);
}
.booking-card.device-tablet {
  border-left: 10px solid var(--tablet-border);
}
.booking-card.device-ipad {
  border-left: 10px solid var(--ipad-border);
}
/* Fallback: kad tanpa class device ikut  */
.booking-card:not(.device-projector):not(.device-tablet):not(.device-ipad):nth-child(3n+1) {
  border-left: 10px solid #3171f1;
}
.booking-card:not(.device-projector):not(.device-tablet):not(.device-ipad):nth-child(3n+2) {
  border-left: 10px solid #9b9e9b;
}
.booking-card:not(.device-projector):not(.device-tablet):not(.device-ipad):nth-child(3n+3) {
  border-left: 10px solid #F57C00;
}

.booking-card:hover { 
  transform: perspective(800px) rotateX(2deg) translateY(-6px) scale(1.01);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(49, 113, 241, 0.12);
  border-color: rgba(49, 113, 241, 0.3) !important;
  z-index: 10;
  position: relative;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ──  Icon wrap warna mengikut device ── */
.card-icon-wrap {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.card-icon-wrap svg { width: 20px; height: 20px; color: var(--blue); }

/* Override warna icon wrap mengikut device */
.device-projector .card-icon-wrap { background: var(--projector-light); }
.device-projector .card-icon-wrap svg { color: var(--projector-color); }

.device-tablet .card-icon-wrap { background: var(--tablet-light); }
.device-tablet .card-icon-wrap svg { color: var(--tablet-color); }

.device-ipad .card-icon-wrap { background: var(--ipad-light); }
.device-ipad .card-icon-wrap svg { color: var(--ipad-color); }

/* ──  Badge pill dalam kad ── */
.card-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 10px 8px;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 4px;
}

/* Badge warna mengikut device */
.device-projector .card-badge { background: var(--projector-light); color: var(--projector-color); }
.device-tablet .card-badge    { background: var(--tablet-light);    color: var(--tablet-color); }
.device-ipad .card-badge      { background: var(--ipad-light);      color: var(--ipad-color); }

/* ──  Badge "Tiada had" untuk tablet & ipad ── */
.badge-no-limit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 4px;
  vertical-align: middle;
}
.device-tablet .badge-no-limit { background: var(--tablet-light); color: var(--tablet-color); }
.device-ipad   .badge-no-limit { background: var(--ipad-light);   color: var(--ipad-color); }

.card-body { flex: 1; min-width: 0; }
.card-name { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--gray-500);
}
.meta-item svg { width: 12px; height: 12px; }
.card-tujuan {
  font-size: 12px; color: var(--gray-500);
  margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card-actions {
  align-self: center;
}

@media (max-width: 600px) {
  .booking-card { flex-direction: column; }
  .card-actions { width: 100%; margin-top: 10px; }
}

/* ── Empty state ──────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--gray-500);
}
.empty-state .empty-icon {
  width: 60px; height: 60px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.empty-state .empty-icon svg { width: 28px; height: 28px; color:rgb(118, 114, 114); }
.empty-state p { font-size: 14px; color:white; }
.empty-state span { color:white; font-size: 13px; }

/* ── Loading ──────────────────────────────── */
.loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 2.5rem;
  color: var(--gray-500); font-size: 14px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Form Page ────────────────────────────── */
.form-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding: 0 1.25rem; 
}
.form-header h2 { 
  font-size: 20px;
  font-weight: 600;
 color: white;
text-shadow: 0 0 6px #f5a623, 0 0 12px #f5a623;
  flex: 1;           
  text-align: center; 
  margin-right: 100px;

}

#page-form .form-header {
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0;
}

#page-form {
  max-width: 650px;
  margin: 0 auto;
}

.form-card {
  background: rgb(110, 133, 175);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-radius: 20px;
  padding: 2rem;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(251, 251, 251, 0);
}



.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgb(51, 50, 50);
  margin-bottom: 5px;
}
.form-label span { color: #E24B4A; margin-left: 2px; }

.form-control {
  width: 100%;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,95,165,.1); }
.form-control.is-invalid { border-color: #E24B4A; }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invalid-feedback { font-size: 12px; color: #A32D2D; margin-top: 4px; display: none; }
.form-control.is-invalid + .invalid-feedback { display: block; }

/* ════════════════════════════════════════════
   Device Selector 
════════════════════════════════════════════ */
.device-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.device-option {
  cursor: pointer;
  position: relative;
}

/* Sembunyikan radio input  */
.device-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.device-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: all 0.2s ease;
  text-align: center;
}

.device-option-inner:hover {
  border-color: var(--gray-500);
  background: var(--gray-50);
}

.device-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Warna icon mengikut device — keadaan normal */
.device-icon-projector { background: var(--projector-light); color: var(--projector-color); }
.device-icon-tablet    { background: var(--tablet-light);    color: var(--tablet-color); }
.device-icon-ipad      { background: var(--ipad-light);      color: var(--ipad-color); }

.device-option-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.device-option-sub {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 500;
}

/* Keadaan active/dipilih */
.device-option.active[data-device="projector"] .device-option-inner {
  border-color: var(--projector-color);
  background: var(--projector-light);
}
.device-option.active[data-device="projector"] .device-option-label { color: var(--projector-color); }
.device-option.active[data-device="projector"] .device-option-sub   { color: var(--projector-color); opacity: 0.7; }

.device-option.active[data-device="tablet"] .device-option-inner {
  border-color: var(--tablet-color);
  background: var(--tablet-light);
}
.device-option.active[data-device="tablet"] .device-option-label { color: var(--tablet-color); }
.device-option.active[data-device="tablet"] .device-option-sub   { color: var(--tablet-color); opacity: 0.7; }

.device-option.active[data-device="ipad"] .device-option-inner {
  border-color: var(--ipad-color);
  background: var(--ipad-light);
}
.device-option.active[data-device="ipad"] .device-option-label { color: var(--ipad-color); }
.device-option.active[data-device="ipad"] .device-option-sub   { color: var(--ipad-color); opacity: 0.7; }

/* ══ /Device Selector ══ */

/* ── Toast ────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn .25s ease;
  border: 1px solid transparent;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-icon svg { width: 16px; height: 16px; }
.toast.toast-success { background: var(--green-light); color: var(--green); border-color: var(--green-mid); }
.toast.toast-error   { background: var(--red-light);   color: var(--red);   border-color: var(--red-mid); }
.toast.toast-info    { background: var(--blue-light);  color: var(--blue);  border-color: var(--blue-mid); }

/* ── Modal Confirm ────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.488);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 380px; width: 90%;
  box-shadow: var(--shadow-md);
  transform: scale(.95);
  transition: var(--transition);
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.modal-text  { font-size: 13px; color: var(--gray-500); margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 600px) {
  .toolbar { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .booking-card { flex-wrap: wrap; }
  .stats-bar { gap: .5rem; }
  .stat-chip { font-size: 12px; padding: .5rem .75rem; }
  .device-selector { grid-template-columns: 1fr; }
}

/* ── View Toggle ── */
.view-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 4px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn:hover {
  background: rgba(255, 11, 11, 0.15);
  color: white;
}

.view-btn.active {
  background: white;
  color: #1a6db5;
}

/* ── Grid 3 kolum ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

/* ── Grid 2 kolum ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

/* Card dalam grid mode */
.grid-2 .booking-card,
.grid-3 .booking-card {
  border-radius: 0 12px 12px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}

/* Grid mode: warna border kiri ikut device juga */
.grid-2 .booking-card.device-projector,
.grid-3 .booking-card.device-projector { border-left: 10px solid var(--projector-border)!important; }

.grid-2 .booking-card.device-tablet,
.grid-3 .booking-card.device-tablet { border-left: 10px solid var(--tablet-border)!important; }

.grid-2 .booking-card.device-ipad,
.grid-3 .booking-card.device-ipad { border-left: 10px solid var(--ipad-border)!important; }

/* Fallback grid tanpa class device */
.grid-2 .booking-card:not(.device-projector):not(.device-tablet):not(.device-ipad),
.grid-3 .booking-card:not(.device-projector):not(.device-tablet):not(.device-ipad) {
  border-left: 20px solid #378ADD;
}

.grid-3 .booking-card .card-meta {
  flex-direction: column;
  gap: 4px;
}

.grid-3 .card-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
  border-top: 0.5px solid rgba(0,0,0,0.08);
  margin-top: auto;
}

.durasi-badge {
  background: #F1EFE8;
  color: #444;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  white-space: nowrap;
}

/* ── Clock & Calendar Panel ── */
.clock-cal-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 14px;
  margin-bottom: -0.5rem;
  margin-top: 1.25rem;
}

.cc-clock {
  flex: 1;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.cc-time {
  font-size: 34px;
  font-weight: 700;
  color: white;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cc-date {
  font-size: 14px;
  color: rgb(255, 255, 255);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

.cc-secs-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.cc-secs-bar {
  height: 100%;
  background: #f50685;
  border-radius: 2px;
  width: 0%;
  transition: width 1s linear;
}

.cc-cal {
  flex: 1.4;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 16px;
}

.cc-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cc-cal-month {
  font-size: 14px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.5px;
}

.cc-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  background: rgba(255, 255, 255, 0.1); /* Warna putih telus */
    backdrop-filter: blur(10px); /* Tahap kekaburan latar belakang */
    -webkit-backdrop-filter: blur(10px); /* Untuk sokongan browser Safari */
    border-radius: 15px; /* Sudut melengkung supaya nampak moden */
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Garisan tepi halus */

}

.cc-day-label {
  text-align: center;
  font-size: 14px;
  color: rgb(255, 255, 255);
  padding: 3px 0;
  font-weight: 600;
}

.cc-cal-num {
  text-align: center;
  font-size: 14px;
  color: rgb(255, 255, 255);
  padding: 5px 2px;
  border-radius: 6px;
  cursor: default;
}

.cc-cal-num.today {
  background: rgb(255, 255, 255);
  color: #4845ff;
  font-weight: 700;
}

.cc-cal-num.has-booking {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  position: relative;
}

.cc-cal-num.has-booking::after {
  content: '';
  width: 4px;
  height: 4px;
  background: #64b5f6;
  border-radius: 50%;
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 600px) {
  .clock-cal-panel { flex-direction: column; }
  .cc-time { font-size: 28px; }
}

/* ── Dashboard Layout ── */
.dashboard-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.dashboard-main { flex: 1; min-width: 0; }
.dashboard-side {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: 90px;
}
.dashboard-side .cc-clock {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dashboard-side .cc-cal {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 16px;
}
.clock-cal-panel { display: none; }

@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; }
  .dashboard-side { 
    width: 100%; 
    position: static;
    flex-direction: row;
  }
  .dashboard-side .cc-clock,
  .dashboard-side .cc-cal { flex: 1; }
}

/* ── Top Pengguna Aktif ── */
.cc-topuser {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 16px;
}

.top-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-user-item:last-child { border-bottom: none; }

.top-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-1 { background: #FFD700; color: #5a3e00; }
.rank-2 { background: #C0C0C0; color: #3a3a3a; }
.rank-3 { background: #CD7F32; color: #fff; }
.rank-other { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }

/* .top-user-name {
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} */

/* .top-user-count {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.top-user-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.top-user-bar {
  height: 100%;
  border-radius: 2px;
  background: #64b5f6;
} */

.side-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.side-row .cc-clock { flex: 1; }
.side-row .cc-topuser { flex: 1.2; }

/* ========================bahagian sidebar sahaja========================== */

/* ── Wrapper luar: sidebar + kandungan ── */
.sb-outer-wrap {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

/* ── Sidebar panel ── */
.sb-panel {
  width: 450px;
  min-width: 400px;
  flex-shrink: 0;
  background: rgba(10, 15, 25, 0.733);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 115, 255, 0);
  border-radius: 16px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 90px;
  margin-right: 20px;
   /* box-shadow: 
    6px 0 40px rgba(99, 31, 245, 0.273),
    12px 0 60px rgba(238, 240, 239, 0.3),
    -2px 0 20px rgba(0, 0, 0, 0.2); */
}

/* ── Label seksyen ── */
.sb-section-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  padding: 0 4px;
  margin-bottom: 4px;
  margin-top: 4px;
}

/* ── Senarai pill ── */
.sb-pill-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

/* ── Pill button ── */
.sb-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}

.sb-pill:hover {
  background: rgba(141, 146, 241, 0.27);
}

.sb-pill.active {
  background: rgba(163, 85, 247, 0.12);
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.15),
              inset 0 0 12px rgba(168, 85, 247, 0.08);
}

/* Projector (biru) */
.sb-pill.active[data-device="projector"] {
  background: rgba(24, 95, 165, 0.18);
  border-color: var(--projector-border);
  box-shadow: 0 0 0 1px rgba(49, 142, 241, 0.2),
              inset 0 0 12px rgba(49, 142, 241, 0.08);
}

/* Tablet (oren) */
.sb-pill.active[data-device="tablet"] {
  background: rgba(245, 124, 0, 0.12);
  border-color: var(--tablet-border);
  box-shadow: 0 0 0 1px rgba(245, 124, 0, 0.2),
              inset 0 0 12px rgba(245, 124, 0, 0.08);
}

/* iPad (hijau) */
.sb-pill.active[data-device="ipad"] {
  background: rgba(15, 110, 86, 0.15);
  border-color: var(--ipad-border);
  box-shadow: 0 0 0 1px rgba(29, 158, 117, 0.2),
              inset 0 0 12px rgba(29, 158, 117, 0.08);
}

/* ── Dot warna device ── */
.sb-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Nama pill ── */
.sb-pill-name {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
  font-weight: 500;
}

.sb-pill.active .sb-pill-name {
  color: rgba(255, 255, 255, 0.92);
}

/* ── Count badge ── */
.sb-pill-count {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.671);
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 26px;
  text-align: center;
}

.sb-pill.active .sb-pill-count {
  background: rgba(74, 157, 224, 0.2);
  color: #7eb8f0;
}

/* ── Divider ── */
.sb-divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0;
}

/* ── Statistik bar ── */
.sb-stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 4px 0;
}


.sb-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.sb-stat-name {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Poppins', sans-serif;
}

.sb-stat-num {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Poppins', sans-serif;
}

.sb-stat-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sb-stat-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── Kandungan utama ── */
.sb-main-content {
  flex: 1;
  min-width: 0;
  padding-left: 5px;
  width: 100%;
}

/* ── Sembunyikan kad mengikut filter ── */
.booking-card.sb-hidden {
  display: none !important;
}

/* ── Responsive: sidebar jadi bar atas pada skrin kecil ── */
@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; }
  .dashboard-side {
    width: 100%;
    position: static;
    flex-direction: row;
  }
  .dashboard-side .cc-clock,
  .dashboard-side .cc-cal { flex: 1; }
}

/* ============================================================
   RESPONSIVE MOBILE VIEW  
   ============================================================ */

/* ── TABLET (≤ 1024px) ───────────────────────────────────── */
@media (max-width: 1024px) {

  .sb-panel {
    width: 200px;
    min-width: 180px;   
    padding: 14px 10px;
  }

  .dashboard-side {
    width: 300px;       
  }

  .navbar img {
    height: 80px !important;
    margin-right: 0 !important;
  }
}


/* ── MOBILE BESAR (≤ 768px) ─────────────────────────────── */
@media (max-width: 768px) {

  /* ── NAVBAR ── */
  .navbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .navbar img {
    height: 50px !important;
    margin-right: 0 !important;
    position: static !important;
  }

  .navbar > div[style*="position:absolute"],
  .navbar > div[style*="position: absolute"] {
    position: static !important;
    transform: none !important;
    order: 3;
    width: 100%;
    text-align: center;
  }

  .navbar-title span { font-size: 13px !important; }
  .navbar-sub { font-size: 11px !important; }

  .navbar > button {
    margin-left: 0 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  /* ── CONTAINER ── */
  .container {
    padding: 1rem 0.75rem 5rem;
  }

  /* ── SIDEBAR ── */
  .sb-outer-wrap {
    flex-direction: column;
    gap: 0px;
  }

  .sb-panel {
    width: 100%;
    min-width: unset;   
    position: static;
    margin-right: 0;
    padding: 12px;
    border-radius: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sb-section-title { width: 100%; margin: 0; font-size: 11px; }

  .sb-pill-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
    width: 100%;
  }

  .sb-pill {
    width: auto;
    padding: 5px 10px;
    border-radius: 20px;
  }

  .sb-pill-name  { font-size: 12px; }
  .sb-pill-count { font-size: 11px; padding: 1px 6px; }

  .sb-divider { width: 100%; }

  .sb-stat-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .sb-stat-row   { flex: 1; min-width: 80px; }
  .sb-stat-name,
  .sb-stat-num   { font-size: 12px; }

  /* ── KANDUNGAN UTAMA── */
  .sb-main-content {
    padding-left: 0;
    width: 100%;
    min-width: 0;
    overflow: hidden;   
  }

  /* ── DASHBOARD LAYOUT ── */
  .dashboard-layout {
    flex-direction: column;
    gap: 14px;
    width: 100%;        
    min-width: 0;       
  }

  .dashboard-main {
    width: 100%;        
    min-width: 0;       
  }

  .dashboard-side {
    width: 100%;
    position: static;
    flex-direction: column;
    gap: 10px;
    order: -1;
  }

  .side-row {
    flex-direction: column;
    gap: 10px;
  }

  .side-row .cc-clock,
  .side-row .cc-topuser { flex: unset; width: 100%; }

  .dashboard-side .cc-clock {
    padding: 20px !important;
  }

  /* ── STATS BAR ── */
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: 8px;
  }

  .stat-chip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    font-size: 11px;
    min-width: unset;
    border-radius: 12px;
  }

  .stat-chip svg    { width: 28px; height: 28px; }
  .stat-chip strong { font-size: 20px; }

  /* ── TOOLBAR ── */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tabs { justify-content: stretch; }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 11px;
  }

  .view-toggle { justify-content: flex-start; }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  /* ── BOOKING CARDS ── */
  .booking-card {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }

  .card-name    { font-size: 13px; }
  .card-meta    { gap: 6px; }
  .meta-item    { font-size: 11px; }
  .card-tujuan  { font-size: 11px; }

  .card-actions {
    width: 100%;
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
  }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  /* ── JAM & KALENDAR ── */
  .cc-time      { font-size: 26px; letter-spacing: 2px; }
  .cc-date      { font-size: 12px; }
  .cc-cal-grid  { padding: 12px; gap: 2px; }
  .cc-cal-num   { font-size: 12px; padding: 4px 1px; }
  .cc-day-label { font-size: 11px; }

  /* ── FORM ── */
  .form-card    { padding: 1.25rem; border-radius: 14px; }
  .form-row     { grid-template-columns: 1fr; }

  .device-selector    { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .device-option-inner { padding: 10px 6px; gap: 4px; }
  .device-option-icon  { width: 36px; height: 36px; }
  .device-option-label { font-size: 11px; }

  .form-header h2 { font-size: 16px; margin-right: 0; }

  /* ── MODAL ── */
  .modal-box { max-width: 95%; padding: 1.25rem; }
}


/* ── MOBILE KECIL (≤ 480px) ─────────────────────────────── */
@media (max-width: 480px) {

  .stats-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* ← minmax(0) elak overflow */
    gap: 6px;
  }

  .stat-chip        { padding: 8px 8px; }
  .stat-chip strong { font-size: 18px; }
  .stat-chip svg    { width: 24px; height: 24px; }

  .navbar-title span { font-size: 11px !important; }
  .navbar-sub        { font-size: 10px !important; }

  .device-selector { grid-template-columns: 1fr; }

  .cc-time { font-size: 22px; }

  #toast-container { right: 0.5rem; left: 0.5rem; max-width: unset; }
}

/* =================== butang toggle pada desktop ==================================*/
.sb-toggle-btn { display: none; }

@media (max-width: 768px) {
  .sb-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: rgba(10,15,25,0.85);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0;
  }

  .sb-toggle-btn.active {
    border-radius: 12px 12px 0 0;
  }

  .sb-toggle-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
  }

  .sb-toggle-arrow {
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.5);
  }

  .sb-toggle-arrow.open {
    transform: rotate(180deg);
  }

  /* Sidebar tersembunyi by default */
  .sb-panel {
    display: none !important;
    width: 100% !important;
    min-width: unset !important;
    position: static !important;
    margin-right: 0 !important;
    flex-direction: column !important;
    border-radius: 0 0 12px 12px !important;
  }

  /* Tunjuk bila toggle dibuka */
  .sb-panel.sb-open {
    display: flex !important;
  }

  .sb-panel.sb-open .sb-pill-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sb-panel.sb-open .sb-stat-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sb-stat-row { flex: 1; min-width: 80px; }
}

/* ── BOTTOM NAVIGATION BAR───────────────── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
  }

  .mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 10px;
    transition: background 0.2s;
    flex: 1;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
  }

  .mbn-item:hover { background: rgba(255, 254, 254, 0.136); }

  .mbn-icon { font-size: 18px; }
  .mbn-label { font-size: 10px; color: rgba(255, 255, 255, 0.581); }

  .mbn-item.active .mbn-label { color: #64b5f6; }
  .mbn-item.active .mbn-icon  { filter: drop-shadow(0 0 4px #64b5f6); }

  /* Butang tambah tengah */
  .mbn-item.mbn-add .mbn-icon {
    background: #E24B4A;
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-top: -14px;
    box-shadow: 0 4px 14px rgba(226,75,74,0.5);
  }
  .mbn-item.mbn-add .mbn-label { color: #E24B4A; }
}

/* ── ANIMATED BORDER LIGHT ── */
@keyframes spinBorder {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.form-card-wrap {
  position: relative;
  padding: 3px;
  border-radius: 23px;
  max-width: 650px;
  margin: 0 auto;
  background: rgba(251, 251, 251, 0.549);
}

.form-card-spin {
  position: absolute;
  inset: 0;
  border-radius: 23px;
  overflow: hidden;
  pointer-events: none;
}

.form-card-spin::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(
    transparent 0deg,
    transparent 120deg,
    #fcc379 140deg,
    #5c61ff 180deg,
    #ff3333 220deg,
    transparent 240deg,
    transparent 360deg
  );
  animation: spinBorder 3s linear infinite;
}

.form-card-wrap .form-card {
  position: relative;
  z-index: 1;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ==========bahagian footer==================== */
.footer-wrapper {
     text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

.footer-text {
  font-size: 13px;
  color: #a9a8a8;
  margin: 0;
}

.footer-brand {
  font-weight: 600;
  color: #cbc9c9;
}