/* proktor-layout.css - Complete Layout for Proktor Application */

/* ------------------------------------------------------------- */
/* 1. LAUNCHER (SYSTEM CHECK) LAYOUT                              */
/* ------------------------------------------------------------- */
.proktor-launcher-canvas {
  min-height: 100vh;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.proktor-launcher-card {
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.launcher-titlebar {
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.launcher-body {
  padding: 24px;
}

.launcher-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.proktor-check-item {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.proktor-check-item .label {
  width: 160px;
  color: #475569;
}

.proktor-check-item .colon {
  width: 16px;
}

.proktor-check-item .val {
  font-weight: 600;
  color: #0f172a;
  flex: 1;
}

.proktor-check-item .icon {
  margin-left: 10px;
}

.launcher-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

/* ------------------------------------------------------------- */
/* 2. PROKTOR LOGIN LAYOUT                                       */
/* ------------------------------------------------------------- */
.proktor-login-canvas {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  padding: 20px;
}

.proktor-login-box {
  width: 100%;
  max-width: 840px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-left-banner {
  flex: 1;
  background: linear-gradient(180deg, #0369a1 0%, #0c4a6e 100%);
  color: #ffffff;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand-text h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.login-brand-text p {
  font-size: 12px;
  opacity: 0.85;
}

.login-left-content h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.login-left-content p {
  font-size: 13.5px;
  opacity: 0.9;
  line-height: 1.6;
}

.login-left-footer {
  font-size: 11.5px;
  opacity: 0.7;
}

.login-right-form {
  width: 400px;
  padding: 40px 34px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.login-form-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
}

/* ------------------------------------------------------------- */
/* 3. PROKTOR APP SHELL (SIDEBAR & HEADER)                       */
/* ------------------------------------------------------------- */
.proktor-app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.proktor-sidebar {
  width: 250px;
  background-color: var(--proktor-sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #1e293b;
  background-color: #0b1120;
}

.sidebar-brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}

.sidebar-menu {
  list-style: none;
  padding: 14px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-menu-category {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 20px 4px;
  letter-spacing: 0.8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar-item:hover {
  background-color: var(--proktor-sidebar-hover);
  color: #ffffff;
}

.sidebar-item.active {
  background-color: var(--proktor-sidebar-hover);
  color: #38bdf8;
  border-left-color: #38bdf8;
  font-weight: 700;
}

.sidebar-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-badge {
  margin-left: auto;
  background-color: var(--proktor-danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid #1e293b;
  background-color: #0b1120;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header */
.proktor-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.proktor-top-header {
  height: 60px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--proktor-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-school-tag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-name-text {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.school-npsn-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
}

.header-user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-identity {
  text-align: right;
}

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.user-role-label {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Page Content */
.proktor-page-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

/* ------------------------------------------------------------- */
/* 4. DASHBOARD STAT CARDS & TOKEN BANNER                        */
/* ------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--proktor-border-color);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-info .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.stat-info .stat-number {
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
}

.stat-card.blue .stat-number { color: #0284c7; }
.stat-card.yellow .stat-number { color: #d97706; }
.stat-card.red .stat-number { color: #dc2626; }
.stat-card.green .stat-number { color: #16a34a; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card.blue .stat-icon { background: #e0f2fe; color: #0284c7; }
.stat-card.yellow .stat-icon { background: #fef3c7; color: #d97706; }
.stat-card.red .stat-icon { background: #fee2e2; color: #dc2626; }
.stat-card.green .stat-icon { background: #dcfce7; color: #16a34a; }

/* Token Banner */
.token-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.token-display-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.token-code {
  background: #ffffff;
  color: #0369a1;
  font-family: monospace;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 6px 18px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.token-timer-box {
  text-align: right;
  font-size: 13px;
}

.token-countdown {
  font-size: 16px;
  font-weight: 700;
  color: #fef08a;
}

/* ------------------------------------------------------------- */
/* 5. QUESTION BANK AUTHORING SUITE                              */
/* ------------------------------------------------------------- */
.qbank-editor-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.qbank-sidebar {
  background: #ffffff;
  border: 1px solid var(--proktor-border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.qbank-list {
  list-style: none;
  margin-top: 12px;
  flex: 1;
  overflow-y: auto;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qbank-item {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.qbank-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.qbank-item.active {
  background: #eff6ff;
  border-color: #0284c7;
}

.qbank-item-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.qbank-item-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
}

.qtype-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.qtype-btn {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid var(--proktor-border-color);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: all 0.15s;
}

.qtype-btn:hover {
  background: #f8fafc;
}

.qtype-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Category Table in Authoring Tool */
.cat-editor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.cat-editor-table th {
  background: #f8fafc;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.cat-editor-table td {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}

@media (max-width: 960px) {
  .proktor-app-shell {
    flex-direction: column;
  }
  .proktor-sidebar {
    width: 100%;
  }
  .qbank-editor-grid {
    grid-template-columns: 1fr;
  }
}
