/* ===================================================
   PORTAL BAP & MONITORING CBT - CUSTOM STYLES
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-dark: #1e293b;
  --accent: #0d9488;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Navigation Tabs (Modern Sleek Pill Style) */
.nav-tab-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 0.75rem;
  padding: 0.5rem 0.9rem;
  color: #bfdbfe;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border: 1px solid transparent;
  background-color: transparent;
}
.nav-tab-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}
.nav-tab-btn.active {
  color: #1e3a8a !important;
  background-color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.nav-tab-btn.active i {
  color: #1d4ed8 !important;
}

/* Header Action & Top Tab Buttons */
.header-nav-btn {
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  cursor: pointer;
  white-space: nowrap;
}
.header-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
}
.header-nav-btn i {
  color: #fde047 !important; /* amber-300 */
}
.header-nav-btn span {
  color: #ffffff !important;
  display: inline !important;
}
.header-nav-btn.active {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
}
.header-nav-btn.active i {
  color: #1e3a8a !important;
}
.header-nav-btn.active span {
  color: #1e3a8a !important;
  font-weight: 800 !important;
}

/* Signature Canvas */
.signature-pad-container {
  position: relative;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  transition: border-color 0.2s;
  touch-action: none;
}
.signature-pad-container:hover, .signature-pad-container:focus-within {
  border-color: #3b82f6;
}
#signature-canvas {
  width: 100%;
  height: 160px;
  cursor: crosshair;
  border-radius: 10px;
}

/* Student Attendance Cards */
.student-card {
  transition: all 0.18s ease;
  border: 1px solid #e2e8f0;
}
.student-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.student-card.is-absent {
  background-color: #fef2f2 !important;
  border-color: #f87171 !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-done {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-pending {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-empty {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Room Matrix Card */
.room-matrix-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.room-matrix-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

/* Master Subtab Segmented Pills */
.master-subtab-btn {
  color: #64748b;
  background-color: transparent;
  white-space: nowrap;
}
.master-subtab-btn:hover {
  color: #1e293b;
  background-color: rgba(255, 255, 255, 0.7);
}
.master-subtab-btn.active {
  color: #1e3a8a !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Modal Animations & Executive Rounded 3XL */
.modal-backdrop {
  transition: opacity 0.2s ease-out;
}
.modal-content-box {
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-msg {
  animation: slideInRight 0.3s ease-out forwards;
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Quick Tag Pill */
.quick-tag {
  transition: all 0.15s;
  cursor: pointer;
  user-select: none;
}
.quick-tag:hover {
  background-color: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

/* Print CSS */
@media print {
  body * {
    visibility: hidden;
  }
  #bap-preview-modal, #bap-preview-modal * {
    visibility: visible;
  }
  #bap-preview-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  .no-print {
    display: none !important;
  }
}
