

/*  INFO BANNER */
.as-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: var(--white);
  border: 1px solid var(--portal-border);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
  color: var(--neutral-dark);
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
}

.as-info-icon {
  font-size: 1.05rem;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.as-info-banner p { margin: 0; }

.as-signup-date {
  background: var(--primary-color);
  color: var(--white);
  padding: 0.08rem 0.55rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}


/*  MAIN CARD*/
.as-main-card {
  background: var(--white);
  border: 1px solid #e0ddd9;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}


/* CARD HEADER */
.as-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--secondary-color);
  border-bottom: 3px solid var(--primary-color);
  padding: 0.95rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.as-card-header-icon {
  color: var(--primary-extra-light);
  font-size: 1rem;
  flex-shrink: 0;
}


/*  TAB CONTENT WRAPPER */
.as-tab-content {
  padding: 1.5rem 1.25rem;
}

.as-tab-content.hidden {
  display: none;
}


/*  ASSESSMENTS TABLE */
.as-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #e0ddd9;
}

.as-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  background: var(--white);
}

.as-table thead tr {
  background: var(--secondary-color);
}

.as-table thead th {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border: none;
  white-space: nowrap;
}

.as-table thead th:first-child {
  border-left: 3px solid var(--primary-color);
}

.as-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background var(--transition-fast);
}

.as-table tbody tr:last-child  { border-bottom: none; }
.as-table tbody tr:nth-child(even) { background: #f9f8f7; }
.as-table tbody tr:hover       { background: #f3f0ec; }

.as-table tbody td {
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: var(--text-sm);
  vertical-align: middle;
}


/*  START BUTTON*/
.as-btn-start {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.42rem 1.15rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  min-width: 72px;
  box-shadow: 0 2px 8px rgba(186, 12, 47, 0.22);
}

.as-btn-start:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}


/*PAGINATION — Redesigned*/
.as-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1rem 0.25rem 0;
  border-top: 2px solid var(--portal-border);
  flex-wrap: wrap;
}

/* Left: results count label */
.as-pagination-info {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--neutral-mid);
  white-space: nowrap;
}

.as-pagination-info strong {
  color: var(--neutral-dark);
  font-weight: 600;
}

/* Center: prev/next + page numbers */
.as-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Prev / Next arrow buttons */
.as-page-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--white);
  border: 1.5px solid #d0ccc8;
  color: var(--neutral-dark);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.46rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.as-page-arrow:hover:not(:disabled) {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white);
}

.as-page-arrow:disabled {
  color: #ccc;
  border-color: #ebebeb;
  background: #fafafa;
  cursor: not-allowed;
}

/* Thin divider between arrows and page numbers */
.as-page-sep {
  width: 1px;
  height: 22px;
  background: #ddd;
  margin: 0 0.2rem;
  flex-shrink: 0;
}

/* Individual page number buttons */
.as-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--white);
  border: 1.5px solid #d0ccc8;
  color: var(--neutral-dark);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.as-page-num:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-extra-light);
  transform: translateY(-1px);
}

.as-page-num.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(186, 12, 47, 0.35);
  transform: translateY(-1px);
}

/* Ellipsis placeholder */
.as-page-ellipsis {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 28px;
  height: 36px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #bbb;
  padding-bottom: 4px;
  letter-spacing: 0.1em;
  cursor: default;
  user-select: none;
}

/* Right: rows-per-page selector */
.as-per-page {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--neutral-mid);
}

.as-per-page select {
  background: var(--white);
  border: 1.5px solid #d0ccc8;
  border-radius: var(--radius-sm);
  color: var(--neutral-dark);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  outline: none;
}

.as-per-page select:hover,
.as-per-page select:focus {
  border-color: var(--primary-color);
}


/* SUBJECT PANEL*/
.as-subject-panel {
  position: absolute;
  inset: 0;
  background: var(--neutral-light);
  z-index: 10;
  overflow-y: auto;
  animation: panelSlideIn 0.28s ease;
}

.as-subject-panel.hidden { display: none; }

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.as-subject-header {
  background: var(--secondary-color);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  line-height: 1.4;
  border-left: 4px solid var(--primary-color);
  margin-top: 0.75rem;
}

.as-subject-list {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.as-subject-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e0ddd9;
}

.as-subject-item:last-child { border-bottom: none; }

.as-subject-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-red);
}

.as-subject-info { flex: 1; min-width: 0; }

.as-subject-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.as-subject-link {
  color: #4ba8d5;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color var(--transition-fast);
}

.as-subject-link:hover { color: #2d7ea3; }

.as-subject-meta {
  text-align: right;
  flex-shrink: 0;
}

.as-subject-date {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.as-subject-date strong { font-weight: 700; }

.as-subject-once {
  font-size: 0.78rem;
  color: var(--neutral-dark);
  margin-top: 0.15rem;
}


/*  BUTTONS — Back */
.as-btn-back {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.42rem 1.1rem 0.42rem 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.as-btn-back i { font-size: 1rem; }

.as-btn-back:hover {
  background: var(--secondary-extra-light);
  transform: translateX(-2px);
}

/* Subject panel back-button row */
.as-subjectpanel-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 0 0;
}


/* QUIZ MODAL*/
.as-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.as-modal-overlay.hidden { display: none; }

.as-modal {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(.22, .68, 0, 1.2);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.as-modal-header {
  background: var(--secondary-color);
  border-bottom: 3px solid var(--primary-color);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.as-modal-header h5 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.as-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast);
}

.as-modal-close:hover { color: var(--white); }

.as-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.as-timer {
  text-align: right;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.as-q-header {
  background: var(--secondary-color);
  color: var(--white);
  font-size: var(--text-sm);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.as-progress-bar {
  height: 4px;
  background: #ddd;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.as-progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.4s ease;
}

.as-question         { display: none; }
.as-question.active  { display: block; }

.as-q-text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

.as-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.as-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.as-option:hover {
  border-color: var(--primary-color);
  background: var(--primary-extra-light);
}

.as-option input[type="radio"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.as-modal-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}

.as-btn-nav {
  background: #f0f0ee;
  border: 1px solid #ddd;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.as-btn-nav:hover:not(:disabled) { background: #e3e0da; }
.as-btn-nav:disabled { opacity: 0.45; cursor: not-allowed; }

.as-btn-nav.primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-red);
}

.as-btn-nav.primary:hover { background: var(--primary-light); }


/* SIDEBAR SUBMENU */
.sidebar-nav-item.has-submenu { cursor: pointer; }

.submenu-arrow {
  font-size: 0.68rem !important;
  width: auto !important;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--neutral-mid);
}

.submenu-arrow.open {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.sidebar-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 0;
  background: rgba(0, 0, 0, 0.02);
  border-left: 2px solid var(--primary-extra-light);
}

.sidebar-submenu.open {
  max-height: 300px;
  opacity: 1;
}

.sidebar-sub-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.35rem 0.6rem 2rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--neutral-dark);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.sidebar-sub-item i {
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--neutral-mid);
}

.sidebar-sub-item:hover {
  color: var(--primary-color);
  background: var(--sidebar-hover-bg);
  border-left-color: var(--primary-extra-light);
}

.sidebar-sub-item:hover i { color: var(--primary-color); }

.sidebar-sub-item.active {
  color: var(--primary-color);
  background: var(--sidebar-active-bg);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.sidebar-sub-item.active i { color: var(--primary-color); }

.sidebar-nav-item.has-submenu.submenu-open {
  color: var(--primary-color);
  background: var(--sidebar-hover-bg);
  border-left-color: var(--primary-color);
}


/* RESPONSIVE */
@media (max-width: 767.98px) {
  .as-subject-item      { flex-wrap: wrap; }
  .as-subject-meta      { text-align: left; width: 100%; }

  .as-pagination        { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .as-pagination-controls { flex-wrap: wrap; }
}

@media (max-width: 575.98px) {
  .as-tab-content  { padding: 1rem 0.85rem; }
  .as-per-page     { display: none; }
}