:root {
  --st-navy: #16223e; /* Primary - Dark */
  --st-teal: #00b1b0; /* Secondary - Action/Success */
  --st-purple: #7e8cff; /* Accent 1 */
  --st-blue: #3b7cf1; /* Accent 2 */
  --st-pink: #ef719f; /* Alert/Live Status */
  --st-bg-canvas: #e2e8f0; /* App Background */
  --st-bg-main: #f8faff; /* Content Background */
  --st-white: #ffffff;
  --st-border: #edf2f7;
  --st-text-muted: #a0aec0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--st-bg-canvas);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.site-back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  background: var(--st-navy);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-back-btn:hover {
  background: #0f1831;
}

.franklyn-container {

  width: 95%;
  max-width: 1200px;
  height: 85vh;
  background: var(--st-white);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none !important;
}

.sidebar {
  width: 260px;
  background-color: var(--st-navy);
  color: white;
  padding: 35px 20px;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  position: relative;
  white-space: nowrap;
}
.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 45px;
  overflow: hidden;
}
.logo-circle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar.collapsed .sidebar-footer {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar.collapsed .sidebar-footer p {
  justify-content: center;
  padding: 12px 0;
  width: 100%;
}

.sidebar.collapsed .sidebar-footer p i {
  font-size: 1.2rem;
  margin: 0;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .link-text,
.sidebar.collapsed .sidebar-footer span {
  display: none;
}

.sidebar.collapsed .toggle-btn {
  transform: rotate(180deg);
}

.toggle-btn {
  position: absolute;
  top: 44px;
  right: -14px;
  background: var(--st-teal);
  border: none;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.sidebar.collapsed .nav-links li {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .nav-links li i {
  font-size: 1.2rem;
  margin: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 45px;
}

.logo-circle {
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  list-style: none;
  flex-grow: 1;
}
.nav-links li {
  padding: 12px 15px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.65;
  transition: 0.2s;
  font-size: 0.95rem;
}

.nav-links li.active,
.nav-links li:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.nav-links li.active {
  color: var(--st-teal);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}
.sidebar-footer p {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: 0.2s;
}
.main-content {
  flex-grow: 1;
  padding: 40px;
  background-color: var(--st-bg-main);
  overflow-y: auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.search-wrapper {
  background: white;
  padding: 10px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  width: 360px;
  border: 1px solid var(--st-border);
}

.search-wrapper input {
  border: none;
  outline: none;
  margin-left: 10px;
  width: 100%;
  font-size: 0.9rem;
}

.status-indicator {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--st-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  width: 10px;
  height: 10px;
  background: var(--st-pink);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 113, 159, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 113, 159, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 113, 159, 0);
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 45px;
}
.card {
  padding: 22px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.card i {
  font-size: 1.8rem;
  margin-bottom: 15px;
  display: block;
}
.card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 600;
}
.card-stat {
  font-size: 0.8rem;
  opacity: 0.85;
}

.card-purple {
  background: var(--st-purple);
}
.card-teal {
  background: var(--st-teal);
}
.card-pink {
  background: var(--st-pink);
}
.card-blue {
  background: var(--st-blue);
}

.test-row {
  background: white;
  padding: 16px 22px;
  border-radius: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--st-border);
  cursor: pointer;
  transition: 0.2s;
}

.test-row:hover {
  border-color: var(--st-teal);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.col-main {
  flex: 2.5;
  display: flex;
  align-items: center;
  gap: 15px;
}
.col-status {
  flex: 1;
  display: flex;
  justify-content: center;
}
.col-time {
  flex: 1.5;
  color: var(--st-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.col-actions {
  flex: 0.5;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.test-name {
  display: block;
  font-weight: 700;
  color: var(--st-navy);
  font-size: 1rem;
}
.test-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--st-text-muted);
}
.purple-bg {
  background: var(--st-purple);
}
.teal-bg {
  background: var(--st-teal);
}

.badge {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.status-completed {
  background: #e6fffa;
  color: var(--st-teal);
}
.status-live {
  background: #fff5f7;
  color: var(--st-pink);
  border: 1px solid var(--st-pink);
}

.action-btn {
  background: none;
  border: none;
  color: var(--st-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}
.detail-hero h1 {
  font-size: 2.2rem;
  color: var(--st-navy);
  margin-bottom: 5px;
}
.detail-hero p {
  color: var(--st-text-muted);
  font-weight: 500;
}

.monitoring-placeholder {
  width: 100%;
  height: 350px;
  background: #edf2f7;
  border: 2px dashed #cbd5e0;
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
}
.empty-state i {
  font-size: 3rem;
  color: var(--st-text-muted);
  margin-bottom: 15px;
  display: block;
}

.back-btn {
  border: none;
  background: var(--st-navy);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--st-teal);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary {
  background: white;
  border: 1px solid var(--st-border);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
}
/* Session Info Grid Layout */
.session-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.info-card {
  background: white;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--st-border);
}
.info-label {
  font-size: 0.7rem;
  color: var(--st-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.info-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--st-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.info-sub {
  font-size: 0.75rem;
  color: var(--st-purple);
  margin-top: 4px;
}
.teacher-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.teacher-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.teacher-entry input {
  border: none;
  border-bottom: 1px dashed var(--st-border);
  font-size: 0.75rem;
  outline: none;
  width: 100%;
}

.teacher-entry input:focus {
  border-bottom-color: var(--st-teal);
}

.main-lead {
  font-weight: 600;
  padding-bottom: 5px;
}

.monitoring-container {
  display: flex;
  gap: 20px;
  height: 380px;
}
.monitoring-container.grid-expanded .main-stream-focus {
  display: none;
}

.monitoring-container.grid-expanded .student-grid-tray {
  flex: 1;
}

.monitoring-container.grid-expanded .grid-scroll {
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.monitoring-container.grid-expanded .mini-stream span {
  font-size: 0.85rem;
}
.main-stream-focus {
  flex: 2.5;
  height: 80%;
  background: #000;
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-mockup {
  text-align: center;
  color: #222;
}
.video-mockup i {
  font-size: 4rem;
  display: block;
}
.stream-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
}
.student-name-tag {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.student-grid-tray {
  flex: 1;
  background: white;
  border: 1px solid var(--st-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.layout-btn {
  background: var(--st-bg-canvas);
  border: none;
  color: var(--st-navy);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.layout-btn:hover {
  background: var(--st-teal);
  color: white;
}
.grid-scroll {
  padding: 12px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mini-video-mockup {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  border-radius: 6px;
  margin-bottom: 4px;
}
.mini-stream {
  text-align: center;
  font-size: 0.65rem;
  color: var(--st-navy);
  cursor: pointer;
}
.active-border .mini-video-mockup {
  border: 2px solid var(--st-teal);
}
.flagged-border .mini-video-mockup {
  border: 2px solid var(--st-pink);
}

.back-btn {
  border: none;
  background: var(--st-navy);
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

b {
  animation: blink 1s infinite ease-in-out;
  margin-left: -60%;
  margin-right: -60%;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.focus-active .session-info-grid {
  display: none;
}

.focus-active .monitoring-container {
  height: calc(85vh - 120px);
  transition: height 0.3s ease;
}

#toggle-focus-mode.active {
  background: var(--st-navy);
  color: white;
}
