/* IBD Dashboard — Monitor Portal */
/* ═══════════════════════════════════════════
   MONITOR PORTAL — full visual system
   ═══════════════════════════════════════════ */
#monitorPortal { background: var(--bg-page); min-height: 100vh; display: flex; flex-direction: column; }

/* Header — matches sidebar cyan-blue gradient */
.mp-portal-header {
  background: linear-gradient(180deg, #0891b2 0%, #0369a1 100%);
  padding: 18px 20px 20px;
  display: flex; justify-content: space-between; align-items: flex-start;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(3,105,161,.35);
}
.mp-classname {
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.01em;
  display: flex; align-items: center;
}
.mp-dateline {
  font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; line-height: 1.4;
}
.mp-signout {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 500;
  cursor: pointer; padding: 7px 13px; border-radius: 8px;
  background: rgba(255,255,255,.15); transition: background .15s; white-space: nowrap;
}
.mp-signout:hover { background: rgba(255,255,255,.28); color: #fff; }

/* Tab bar */
.mp-tabbar {
  background: #fff; border-bottom: 1px solid #e5e7eb;
  display: flex; padding: 0 8px;
  position: sticky; top: 78px; z-index: 99;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.mp-tab {
  padding: 11px 20px; border: none; background: none; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px; transition: color .15s;
}
.mp-tab i { font-size: 14px; }
.mp-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.mp-tab:hover:not(.active) { color: var(--text-primary); }

/* Pane content */
.mp-pane { padding: 14px 14px 0; max-width: 640px; margin: 0 auto; width: 100%; box-sizing: border-box; }

/* Mode / info card */
.mp-mode-card {
  background: #fff; border-radius: 12px; border: 0.5px solid #e5e7eb;
  padding: 14px 16px; font-size: 13.5px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05); margin-bottom: 12px;
}

/* Attendance table card */
.mp-table-card {
  background: #fff; border-radius: 12px; border: 0.5px solid #e5e7eb;
  overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.mp-table-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-table-card thead tr { background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.mp-table-card th {
  padding: 9px 12px; font-size: 10.5px; font-weight: 600;
  color: var(--text-muted); text-align: left; text-transform: uppercase; letter-spacing: .05em;
}
.mp-table-card td { padding: 9px 12px; border-bottom: 0.5px solid #f0f2f5; color: var(--text-primary); vertical-align: middle; }
.mp-table-card tbody tr:last-child td { border-bottom: none; }
.mp-table-card tbody tr { transition: background .1s; }

/* Status chip grid — replaces <select> */
.mp-status-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mp-chip {
  padding: 5px 4px; font-size: 10.5px; font-weight: 600;
  border-radius: 6px; border: 1.5px solid #e5e7eb;
  background: #f9fafb; color: #9ca3af;
  cursor: pointer; transition: all .1s; text-align: center; line-height: 1.2;
}
.mp-chip:hover { border-color: #d1d5db; color: var(--text-primary); }
.mp-chip.mp-chip-active[data-val="Present"]      { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.mp-chip.mp-chip-active[data-val="Late"]         { background: #fef9c3; border-color: #ca8a04; color: #92400e; }
.mp-chip.mp-chip-active[data-val="Authorized"]   { background: #dbeafe; border-color: #2563eb; color: #1d4ed8; }
.mp-chip.mp-chip-active[data-val="Unauthorized"] { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }

/* Submitted status badge (read-only rows) */
.mp-status-badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.mp-status-badge.present      { background: #dcfce7; color: #15803d; }
.mp-status-badge.late         { background: #fef9c3; color: #92400e; }
.mp-status-badge.authorized   { background: #dbeafe; color: #1d4ed8; }
.mp-status-badge.unauthorized { background: #fee2e2; color: #b91c1c; }

/* Submit row */
.mp-submit-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-bottom: 36px; flex-wrap: wrap; }
.mp-submit-btn {
  padding: 13px 28px; border-radius: 10px; border: none;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.mp-submit-btn:hover  { background: var(--accent-hover); }
.mp-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.mp-submitted-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px;
  background: #dcfce7; color: #15803d;
  font-size: 14px; font-weight: 600;
}

/* Past submissions list */
.mp-past-item {
  background: #fff; border: 0.5px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: box-shadow .15s;
}
.mp-past-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.mp-past-item strong { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.mp-past-item span   { font-size: 11.5px; color: var(--text-muted); }

/* Past detail overlay header — matches portal header */
.mp-past-header {
  background: linear-gradient(135deg, #0891b2 0%, #0369a1 100%);
  color: #fff; padding: 14px 16px; border-radius: 10px;
  margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;
}

/* Confirm popup buttons */
.mp-type-btn:hover        { border-color: #185fa5 !important; background: #e6f1fb !important; }
.mp-type-btn-cancel:hover { border-color: #e24b4a !important; background: #fef2f2 !important; }
.mp-course-chip:hover     { border-color: #185fa5; background: #e6f1fb; }

/* Responsive — wider screens get a centred card feel */
@media (min-width: 640px) {
  .mp-portal-header { padding: 20px 32px 22px; }
  .mp-pane { padding: 20px 24px 0; }
  .mp-tabbar { padding: 0 20px; }
}
@media (min-width: 1024px) {
  #monitorPortal { align-items: center; }
  .mp-portal-header { width: 100%; }
  .mp-tabbar { width: 100%; }
  .mp-pane { max-width: 680px; padding: 24px 0 0; }
}


