/* Live STT Lecture System - High-Contrast Clean Light Theme */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #059669;
  --success-light: #ecfdf5;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Navbar */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0.4rem 0;
  gap: 0.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  flex-shrink: 0;
  user-select: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease;
}

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

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-info-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  color: #dc2626;
  border-color: #fecaca;
  background-color: #fff5f5;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-login {
  padding: 0.45rem 1.15rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  font-size: 0.85rem;
}

.flash-container {
  margin-top: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-super_admin {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-dosen {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-mahasiswa {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-aktif {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-selesai {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Page Layout & Responsive Grid */
.page-main {
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  flex: 1;
}

.dashboard-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-subtitle {
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.room-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.dashboard-content-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-accent-primary {
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.label-with-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.label-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}

.form-help-text {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 0.35rem;
  display: block;
}

.btn-block {
  width: 100%;
}

.empty-state-card {
  text-align: center;
  padding: 2.25rem 1rem;
  color: #64748b;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.session-card-item {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: all 0.15s ease;
}

.session-card-item:hover {
  border-color: #94a3b8;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.session-info-main {
  flex: 1 1 260px;
  min-width: 0;
}

.session-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.session-matkul-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.session-meta-text {
  font-size: 0.825rem;
  color: #64748b;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.session-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group-responsive {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-danger-outline {
  color: #dc2626;
  border-color: #fecaca;
  background-color: #fff5f5;
}

.btn-danger-outline:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #047857;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Alert / Flash */
.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success {
  background-color: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background-color: var(--primary-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

/* Code Badge */
.code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background-color: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #0f172a;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* STT Live Indicators & Waves */
.pulse-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444;
  margin-right: 6px;
  animation: pulse-dot 1.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.live-typing-box {
  background-color: #f8fafc;
  border: 2px dashed #3b82f6;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 90px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #1e293b;
  position: relative;
  transition: all 0.2s ease;
}

.live-typing-box.active-speaking {
  background-color: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.transcript-section-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.transcript-section-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.transcript-text {
  font-size: 1.025rem;
  line-height: 1.65;
  color: #0f172a;
}

/* Audio Level Bar */
.audio-meter {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.audio-level {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  transition: width 0.08s ease;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.825rem;
  text-align: center;
}

/* Pinned Subtitle (Live Closed Captions Styling) */
.pip-preview-container {
  width: 100%;
  min-height: 90px;
  background: #0f172a;
  background-image: radial-gradient(#334155 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.pip-caption-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  line-height: 1.35;
  transition: all 0.15s ease;
  word-break: break-word;
}

.pip-status-active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

/* Whiteboard Fullscreen Mode Buttons & Status */
.btn-whiteboard-mode {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  cursor: pointer;
}

.btn-whiteboard-mode:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-whiteboard-mode:active {
  transform: translateY(0);
}

.whiteboard-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  animation: pulseWhiteboard 2.5s infinite ease-in-out;
}

@keyframes pulseWhiteboard {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(0.98); }
}

/* ==========================================
   CHAT ROOM / DISKUSI INTERAKTIF STYLING
   ========================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.chat-header {
  padding: 0.85rem 1.15rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-message-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: fadeIn 0.2s ease-out;
}

.chat-message-row.me {
  align-self: flex-end;
}

.chat-message-row.other {
  align-self: flex-start;
}

.chat-sender-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
  padding: 0 0.25rem;
}

.chat-bubble {
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Self message */
.chat-message-row.me .chat-bubble {
  background: #2563eb;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

/* Other message */
.chat-message-row.other .chat-bubble {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 2px;
}

/* Highlighted Question / Pertanyaan Diskusi Mahasiswa */
.chat-bubble.is-question {
  border-left: 4px solid #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

.chat-message-row.me .chat-bubble.is-question {
  background: #dbeafe !important;
  color: #1e3a8a !important;
  border-left: 4px solid #3b82f6 !important;
}

.chat-badge-role {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.chat-badge-dosen {
  background: #dbeafe;
  color: #1d4ed8;
}

.chat-badge-mhs {
  background: #dcfce7;
  color: #15803d;
}

.chat-badge-admin {
  background: #f3e8ff;
  color: #7e22ce;
}

.chat-badge-question {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.chat-footer {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-input-row textarea {
  flex: 1;
  resize: none;
  height: 42px;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input-row textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
}

.quick-question-pill {
  cursor: pointer;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #334155;
  transition: all 0.15s;
  user-select: none;
}

.quick-question-pill:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* ========================================================
   MODERN CAMPUS LOGIN PAGE STYLES (UTB BANDUNG & TCLASS)
   ======================================================== */

.login-wrapper {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  overflow: hidden;
}

/* Background image & deep atmospheric gradient */
.login-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.login-backdrop-image {
  position: absolute;
  top: -4%;
  left: -4%;
  width: 108%;
  height: 108%;
  background-size: cover;
  background-position: center 36%;
  filter: brightness(0.78) contrast(1.05) saturate(1.1);
  transform: scale(1.02);
  animation: slowCampusPan 28s infinite alternate ease-in-out;
}

@keyframes slowCampusPan {
  0% {
    transform: scale(1.02) translate(0, 0);
  }
  100% {
    transform: scale(1.07) translate(-1.5%, -1%);
  }
}

.login-backdrop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 58, 138, 0.55) 50%, rgba(15, 23, 42, 0.82) 100%),
    radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.25) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.login-backdrop-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

/* Login Card Container */
.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  animation: fadeInLoginCard 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInLoginCard {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modern Frosted Crystal Glass Card */
.login-glass-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 2.25rem 2rem;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 10px 24px -6px rgba(37, 99, 235, 0.15);
}

/* Brand & Logo Header */
.login-brand-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  margin-bottom: 0.85rem;
  transition: all 0.25s ease;
}

.login-logo-container:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

.login-logo-img {
  height: 56px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.campus-subtitle {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #2563eb;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.login-title {
  font-size: 1.95rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}

.login-desc {
  font-size: 0.84rem;
  color: #64748b;
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* Demo account quick fill pills */
.demo-account-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 1.5rem;
}

.demo-account-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.demo-account-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.demo-chip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-chip-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.chip-admin:hover {
  border-color: #ef4444;
  color: #b91c1c;
  background: #fef2f2;
}

.chip-dosen:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #eff6ff;
}

.chip-mhs:hover {
  border-color: #10b981;
  color: #047857;
  background: #ecfdf5;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.login-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.field-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.toggle-pass-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.toggle-pass-btn:hover {
  color: #1d4ed8;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.95rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.65rem;
  font-size: 0.92rem;
  line-height: 1.4;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-input:focus + .input-icon,
.input-icon-wrapper:focus-within .input-icon {
  color: #2563eb;
}

.input-filled-flash {
  animation: flashInput 0.6s ease;
}

@keyframes flashInput {
  0%, 100% { background: #ffffff; }
  50% { background: #e0f2fe; border-color: #0284c7; }
}

/* Submit Button */
.login-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0.35rem;
}

.login-submit-btn:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.login-submit-btn:active {
  transform: translateY(0);
}

/* Trust Badges Footer */
.login-footer-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.footer-badge {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Copyright under card */
.login-page-copyright {
  text-align: center;
  margin-top: 1.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  line-height: 1.4;
}

/* ========================================================
   RESPONSIVE MEDIA QUERIES (DESKTOP, TABLET, MOBILE - PORTRAIT & LANDSCAPE)
   ======================================================== */

/* Tablet & Smaller Desktop Devices (<= 992px) */
@media (max-width: 992px) {
  .dashboard-grid,
  .room-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .page-main {
    margin-top: 1.25rem;
    margin-bottom: 2.25rem;
  }
}

/* Mobile Devices in Portrait & Small Tablets (<= 640px) */
@media (max-width: 640px) {
  .navbar-inner {
    min-height: 56px;
    padding: 0.35rem 0;
  }

  .brand-logo-img {
    height: 34px;
    max-width: 38px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .user-name {
    max-width: 110px;
    font-size: 0.825rem;
  }

  .badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }

  .btn-logout {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
  }

  .page-main {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }

  .dashboard-header-banner {
    margin-bottom: 1.15rem;
    gap: 0.75rem;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .page-subtitle {
    font-size: 0.825rem;
  }

  .card {
    padding: 1.15rem;
    margin-bottom: 1.15rem;
    border-radius: var(--radius-sm);
  }

  .card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .card-title {
    font-size: 1.05rem;
  }

  .session-card-item {
    padding: 0.95rem;
  }

  .session-actions-row {
    width: 100%;
    justify-content: flex-start;
  }

  .session-actions-row .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .btn-sm-mobile {
    padding: 0.5rem 0.75rem;
    font-size: 0.825rem;
  }

  /* Chat Box Mobile */
  .chat-body {
    height: 320px;
    padding: 0.75rem;
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-input-row textarea {
    height: 38px;
    font-size: 0.85rem;
  }

  /* Login Card Mobile */
  .login-glass-card {
    padding: 1.75rem 1.25rem;
    border-radius: 18px;
  }

  .login-title {
    font-size: 1.75rem;
  }

  .demo-account-buttons {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .login-footer-info {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Very Small Mobile Screens (<= 420px) */
@media (max-width: 420px) {
  .brand-title {
    font-size: 1.15rem;
  }

  .user-name {
    display: none; /* Keep role badge and logout button tidy without overflowing */
  }

  .container {
    padding: 0 0.85rem;
  }

  .btn-logout .logout-text {
    display: inline;
  }

  .table th, .table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.825rem;
  }
}

/* Mobile & Tablet in Horizontal / Landscape Orientation (max-height <= 550px) */
@media (max-height: 550px) and (orientation: landscape) {
  .navbar-inner {
    min-height: 48px;
    height: 48px;
    padding: 0.2rem 0;
  }

  .brand-logo-img {
    height: 28px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .page-main {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .dashboard-header-banner {
    margin-bottom: 0.75rem;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .chat-body {
    height: 200px;
    padding: 0.6rem;
  }

  .live-typing-box {
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
  }

  .login-wrapper {
    min-height: 100vh;
    padding: 1rem 0.75rem;
    align-items: flex-start;
  }

  .login-glass-card {
    padding: 1.25rem 1.5rem;
    margin: 1rem auto;
    border-radius: 16px;
  }

  .login-brand-header {
    margin-bottom: 0.75rem;
  }

  .login-logo-container {
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.4rem;
  }

  .login-logo-img {
    height: 38px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .demo-account-box {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
  }

  .demo-account-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}
