.ata-shell {
  max-width: none !important;
  padding: 0 !important;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(8, 183, 164, .16), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(49, 94, 214, .13), transparent 34%),
    linear-gradient(135deg, #eef9fb 0%, #eef4ff 48%, #fbfdff 100%) !important;
}

.ats-admin-shell {
  direction: rtl;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  color: #17263d;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  box-sizing: border-box;
}

.ats-sidebar,
.ats-card,
.ats-topbar,
.ats-metric {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dbe7f4;
  box-shadow: 0 22px 60px rgba(23, 38, 61, .08);
}

.ats-sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  border-radius: 28px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
}

.ats-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 6px 18px;
  border-bottom: 1px solid #edf2f7;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #315ed6, #08b7a4);
  box-shadow: 0 16px 35px rgba(8, 183, 164, .2);
}

.ats-brand strong,
.ats-brand span {
  display: block;
}

.ats-brand strong {
  font-size: 18px;
  color: #17263d;
}

.ats-brand span {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.ats-nav {
  display: grid;
  gap: 9px;
}

.ats-nav button,
.ats-actions button,
.ats-filter-row button,
.ats-session-card button,
.question-row {
  font: inherit;
  cursor: pointer;
}

.ats-nav button {
  border: 0;
  background: transparent;
  color: #52647d;
  border-radius: 18px;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  font-weight: 900;
}

.ats-nav button i {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: #315ed6;
  font-style: normal;
}

.ats-nav button.active,
.ats-nav button:hover {
  background: linear-gradient(135deg, #315ed6, #08b7a4);
  color: #fff;
  box-shadow: 0 18px 38px rgba(49, 94, 214, .2);
}

.ats-nav button.active i,
.ats-nav button:hover i {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.ats-side-note {
  margin-top: auto;
  border-radius: 20px;
  padding: 15px;
  background: #f7fbff;
  border: 1px solid #e4edf7;
}

.ats-side-note b {
  display: block;
  color: #08a891;
  margin-bottom: 6px;
}

.ats-side-note p,
.ats-title-block p,
.section-head p,
.detail-header p,
.session-main p,
.session-note,
.ats-empty,
.empty-detail p,
.report-text p,
.final-note p {
  color: #64748b;
}

.ats-workspace {
  min-width: 0;
}

.ats-topbar {
  border-radius: 30px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.ats-title-block span {
  color: #08a891;
  font-weight: 900;
}

.ats-title-block h1 {
  margin: 6px 0 5px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0;
}

.ats-title-block p {
  margin: 0;
}

.ats-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ats-actions button,
.primary,
.ghost {
  border-radius: 16px;
  padding: 12px 18px;
  border: 1px solid #dbe7f4;
  font-weight: 900;
}

.primary {
  border: 0 !important;
  background: linear-gradient(135deg, #315ed6, #08b7a4);
  color: #fff;
  box-shadow: 0 16px 34px rgba(49, 94, 214, .22);
}

.ghost {
  background: #fff;
  color: #17263d;
}

.compact {
  padding: 10px 14px;
  border-radius: 14px;
}

.ats-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ats-metric {
  border-radius: 22px;
  padding: 16px;
  min-height: 98px;
}

.ats-metric b,
.ready-number b {
  display: block;
  color: #315ed6;
  font-size: 30px;
  line-height: 1;
}

.ats-metric span {
  display: block;
  margin-top: 9px;
  font-weight: 900;
}

.ats-metric small {
  display: block;
  margin-top: 5px;
  color: #7a8aa0;
}

.ats-alert {
  border-radius: 18px;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-weight: 900;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.ats-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 900;
}

.ats-page-stack {
  display: grid;
  gap: 18px;
}

.ats-card {
  border-radius: 26px;
  padding: 20px;
  box-sizing: border-box;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2,
.detail-header h2,
.report-panel h2,
.question-detail h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.section-head p {
  margin: 5px 0 0;
}

.ats-split {
  display: grid;
  grid-template-columns: minmax(390px, .88fr) minmax(540px, 1.12fr);
  gap: 18px;
  align-items: start;
}

.ats-list-pane {
  max-height: calc(100vh - 186px);
  overflow: auto;
  scrollbar-width: thin;
}

.ats-detail-pane {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  scrollbar-width: thin;
}

.ats-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ats-filter-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #33445d;
  font-weight: 900;
}

.ats-filter-row input,
.ats-filter-row select {
  border: 1px solid #d8e4f1;
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  color: #17263d;
  font: inherit;
}

.ats-session-list,
.question-list {
  display: grid;
  gap: 10px;
}

.ats-session-card {
  border: 1px solid #dce7f4;
  background: linear-gradient(180deg, #fbfdff, #f7fbff);
  border-radius: 20px;
  padding: 15px;
}

.session-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #315ed6, #08b7a4);
  color: #fff;
  font-weight: 900;
}

.session-main h3 {
  margin: 0;
  font-size: 18px;
}

.session-main p,
.session-note {
  margin: 4px 0 0;
}

.session-badges,
.chips,
.report-score,
.ready-mini {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.session-badges {
  margin-top: 12px;
}

.session-badges span,
.session-badges b,
.chips span,
.muted-pill,
.ready-mini span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef5ff;
  color: #315ed6;
  font-weight: 900;
}

.session-badges b {
  background: #17263d;
  color: #fff;
  margin-inline-start: auto;
}

.session-note {
  margin: 12px 0;
}

.muted-pill {
  display: inline-block;
  color: #64748b;
  background: #f1f5f9;
  font-style: normal;
}

.empty-detail,
.ats-empty {
  border: 1px dashed #cbd8e6;
  background: #f8fbff;
  border-radius: 22px;
  padding: 26px;
  text-align: center;
}

.empty-detail {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
}

.empty-detail div {
  width: 78px;
  height: 78px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #eef5ff, #e9fbf8);
  color: #315ed6;
  font-size: 38px;
}

.report-score {
  margin: 14px 0;
}

.report-score div {
  flex: 1;
  min-width: 170px;
  border-radius: 18px;
  background: #f7fbff;
  border: 1px solid #e0eaf5;
  padding: 14px;
}

.report-score span,
.detail-header span {
  display: block;
  color: #08a891;
  font-weight: 900;
  margin-bottom: 5px;
}

.report-score b {
  display: block;
  font-size: 25px;
  color: #17263d;
}

.dim-bars {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}

.dim-bar,
.weight-row {
  display: grid;
  grid-template-columns: 104px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.dim-bar span,
.weight-row span {
  font-weight: 900;
  color: #33445d;
}

.dim-bar div,
.weight-row div,
.progress {
  height: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf3fa;
}

.dim-bar i,
.weight-row i,
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #315ed6, #08b7a4);
}

.report-text,
.final-note,
.detail-block {
  border: 1px solid #e0eaf5;
  background: #fbfdff;
  border-radius: 20px;
  padding: 15px;
  margin-top: 12px;
}

.report-grid,
.guide-grid,
.detail-columns,
.ats-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.mini-box {
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e0eaf5;
  padding: 14px;
}

.mini-box h3,
.detail-block h3,
.report-text h3,
.final-note h3 {
  margin: 0 0 10px;
  color: #17263d;
}

.mini-box ul,
.gap-list {
  margin: 0;
  padding-inline-start: 22px;
  color: #475569;
  line-height: 1.8;
}

.readiness-card.is-ready {
  border-top: 5px solid #10b981;
}

.readiness-card.not-ready {
  border-top: 5px solid #f59e0b;
}

.ready-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0;
}

.ready-number b {
  font-size: 42px;
}

.ready-mini {
  margin-bottom: 14px;
}

.ready-mini span b {
  margin-inline-end: 5px;
}

.question-layout {
  grid-template-columns: minmax(430px, .82fr) minmax(620px, 1.18fr);
}

.question-filter-row {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.question-row {
  width: 100%;
  border: 1px solid #dce7f4;
  background: #fbfdff;
  color: #17263d;
  border-radius: 18px;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  text-align: right;
}

.question-row:hover,
.question-row.selected {
  border-color: #315ed6;
  background: #eef6ff;
  box-shadow: 0 14px 32px rgba(49, 94, 214, .14);
}

.question-row b,
.question-row span,
.question-row small {
  display: block;
}

.question-row b {
  color: #315ed6;
}

.question-row span {
  margin: 4px 0;
  font-weight: 900;
}

.question-row small {
  color: #64748b;
}

.row-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.row-meta span,
.row-meta em,
.row-meta i {
  font-style: normal;
  border-radius: 999px;
  padding: 6px 9px;
  background: #eef5ff;
  color: #315ed6;
  font-weight: 900;
  white-space: nowrap;
}

.row-meta em {
  background: #fff7ed;
  color: #9a3412;
}

.row-meta i {
  background: #ecfdf5;
  color: #047857;
}

.detail-header {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 14px;
  margin-bottom: 12px;
}

.question-text {
  font-size: 18px;
  line-height: 1.95;
  color: #17263d;
}

.option-grid {
  display: grid;
  gap: 10px;
}

.option-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dce7f4;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
}

.option-card b {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: #315ed6;
  font-weight: 900;
}

.option-card p {
  margin: 0;
  line-height: 1.7;
}

.option-card.correct {
  border-color: #10b981;
  background: #ecfdf5;
}

.option-card.correct b {
  background: #10b981;
  color: #fff;
}

.option-card span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #d1fae5;
  color: #047857;
  font-weight: 900;
  white-space: nowrap;
}

.weight-list {
  display: grid;
  gap: 10px;
}

.valid-box {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 13px;
  font-weight: 900;
}

.gap-list {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 13px 30px;
}

.detail-block pre {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  border-radius: 16px;
  padding: 14px;
  background: #132238;
  color: #e8f0fb;
  font-family: Consolas, monospace;
}

.detail-block small {
  display: block;
  color: #64748b;
  line-height: 1.8;
}

.ata-page-header,
.ata-stats6,
.ata-levels-strip,
.ata-readiness-section,
.ata-table-section,
.ata-review-section,
.ata-tabs-enhanced,
.ata-panels-enhanced {
  display: none !important;
}

@media (max-width: 1280px) {
  .ats-admin-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .ats-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ats-split,
  .question-layout { grid-template-columns: minmax(0, 1fr); }
  .ats-list-pane,
  .ats-detail-pane { max-height: none; }
  .ats-detail-pane { position: static; }
}

@media (max-width: 820px) {
  .ats-admin-shell { grid-template-columns: 1fr; padding: 12px; }
  .ats-sidebar { position: static; height: auto; }
  .ats-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ats-topbar { flex-direction: column; align-items: stretch; }
  .ats-metrics,
  .ats-readiness-grid,
  .report-grid,
  .guide-grid,
  .detail-columns,
  .ats-filter-row,
  .question-filter-row { grid-template-columns: 1fr; }
  .question-row,
  .option-card { grid-template-columns: 1fr; }
  .row-meta { justify-items: start; display: flex; flex-wrap: wrap; }
}

/* Focused review drawer: keeps details visible without scrolling below lists. */
.ats-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: stretch end;
  padding: 18px;
  box-sizing: border-box;
  animation: drawerFade .18s ease both;
}

.ats-drawer {
  width: min(980px, 92vw);
  height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid #dbe7f4;
  box-shadow: 0 30px 90px rgba(2, 8, 23, .30);
  padding: 24px;
  box-sizing: border-box;
  direction: rtl;
  animation: drawerSlide .22s ease both;
}

.report-drawer {
  width: min(1040px, 92vw);
}

.drawer-close {
  position: sticky;
  top: 0;
  z-index: 5;
  float: left;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #17263d;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(23, 38, 61, .22);
}

.ats-drawer .detail-header,
.ats-drawer .report-panel .detail-header {
  padding-top: 8px;
  padding-inline-end: 120px;
}

.alt-list {
  display: grid;
  gap: 10px;
}

.alt-card {
  border: 1px solid #dbe7f4;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 18px;
  padding: 13px;
}

.alt-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.alt-card b {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
}

.alt-card span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef5ff;
  color: #315ed6;
  font-weight: 900;
}

.alt-card p,
.alt-empty {
  margin: 0;
  color: #475569;
  line-height: 1.8;
}

.alt-empty {
  border: 1px dashed #cbd8e6;
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

@keyframes drawerFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawerSlide {
  from { opacity: 0; transform: translateX(-18px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .ats-drawer-backdrop { padding: 8px; }
  .ats-drawer { width: 100%; height: calc(100vh - 16px); border-radius: 22px; padding: 16px; }
  .ats-drawer .detail-header,
  .ats-drawer .report-panel .detail-header { padding-inline-end: 0; padding-top: 48px; }
  .drawer-close { float: none; position: fixed; top: 18px; left: 18px; }
  .alt-card div { align-items: flex-start; flex-direction: column; }
}
