/* PEF QAT Test Studio — Design layer (loads after qat-frontend.css). Visual only. */
/* =====================================================================
   DESIGN V2 — Navy & Gold professional skin (visual layer only).
   No markup, script or logic is changed; plan strip and Google sign-in
   are hidden from the public sign-in screen with CSS.
   ===================================================================== */
.qat-root {
  --qat-navy: #0F2A47;
  --qat-navy-2: #1B4672;
  --qat-gold: #D4A84B;
  --qat-gold-soft: #FBF3DF;
  --qat-gold-dk: #8A6A12;
  --qat-bg: #F4F6FA;
  --qat-line: #E3E8F0;
  background: var(--qat-bg);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 24px 60px -28px rgba(15, 42, 71, 0.45);
  color: #14233A;
}

/* ---- Hidden on purpose: plans strip + Google sign-in (sign-in screen) ---- */
.qat-auth-plans-strip,
.qat-auth-card .qat-divider,
.qat-auth-card .qat-google-box {
  display: none !important;
}

/* "or Google" wording follows the hidden button (sign-in panel only) */
.qat-auth-card:has(#qat-login-panel:not([hidden])) #qat-auth-subhead {
  font-size: 0;
}
.qat-auth-card:has(#qat-login-panel:not([hidden])) #qat-auth-subhead::after {
  content: "Sign in with your teacher account to continue.";
  font-size: 13px;
}

/* ---- Buttons ---- */
.qat-btn {
  border-radius: 12px;
  min-height: 44px;
  padding: 11px 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.qat-btn-primary {
  background: linear-gradient(135deg, var(--qat-navy) 0%, var(--qat-navy-2) 100%);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(15, 42, 71, 0.8);
}
.qat-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0B2038 0%, var(--qat-navy) 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(15, 42, 71, 0.85);
}
.qat-btn-outline {
  background: #fff;
  color: var(--qat-navy);
  border-color: #C9D3E0;
}
.qat-btn-outline:hover:not(:disabled) {
  background: var(--qat-gold-soft);
  border-color: var(--qat-gold);
}
.qat-btn-ghost:hover {
  background: var(--qat-gold-soft);
  color: var(--qat-navy);
}
.qat-text-btn {
  color: var(--qat-gold-dk);
  font-weight: 700;
}
.qat-text-btn:hover {
  text-decoration: underline;
}

/* ---- Top bar ---- */
.qat-topbar {
  background: #fff;
  border-bottom: 1px solid var(--qat-line);
  padding: 14px 32px;
}
.qat-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--qat-navy);
  font-weight: 800;
}
.qat-topbar-brand::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--qat-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.25);
}
.qat-topbar-guest {
  background: var(--qat-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.qat-topbar-guest .qat-topbar-brand {
  color: #fff;
}
.qat-guest-meta {
  color: #D8E3F1;
  letter-spacing: 0.02em;
}
.qat-nav-link {
  border-radius: 10px;
  color: #51627A;
}
.qat-nav-link:hover {
  background: var(--qat-gold-soft);
  color: var(--qat-navy);
}
.qat-nav-link.is-active {
  background: var(--qat-navy);
  color: #fff;
}
.qat-quota-text {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--qat-gold-soft);
  color: var(--qat-navy);
}

/* ---- Step ribbon ---- */
.qat-step-strip {
  border-bottom: 1px solid var(--qat-line);
}
.qat-step-item {
  color: #6B7C93;
}
.qat-step-item.is-active {
  background: var(--qat-gold-soft);
  color: var(--qat-navy);
}
.qat-step-idx {
  border-radius: 8px;
  background: #E6ECF4;
  color: var(--qat-navy);
}
.qat-step-item.is-active .qat-step-idx {
  background: var(--qat-navy);
  color: var(--qat-gold);
}

/* ---- Sign-in screen: hero + card ---- */
.qat-auth-shell {
  position: relative;
  overflow: hidden;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 48px;
  padding: 64px 48px 72px;
  align-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 168, 75, 0.20) 0, rgba(212, 168, 75, 0) 38%),
    radial-gradient(circle at 92% 88%, rgba(27, 70, 114, 0.9) 0, rgba(27, 70, 114, 0) 46%),
    linear-gradient(135deg, #0B2038 0%, var(--qat-navy) 55%, #16385F 100%);
}
.qat-auth-shell::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 38px solid rgba(212, 168, 75, 0.14);
  pointer-events: none;
}
.qat-auth-shell::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 22px;
  width: 150px;
  height: 90px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 1.6px, transparent 1.8px);
  background-size: 15px 15px;
  pointer-events: none;
}
.qat-auth-hero,
.qat-auth-card {
  position: relative;
  z-index: 1;
}
.qat-brand-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 75, 0.55);
  background: rgba(212, 168, 75, 0.12);
  color: var(--qat-gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qat-brand-line::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qat-gold);
}
.qat-auth-title {
  color: #fff;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.qat-auth-title::after {
  content: "";
  display: block;
  width: 84px;
  height: 5px;
  margin-top: 18px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--qat-gold), #F0D48A);
}
.qat-auth-sub {
  max-width: 560px;
  color: #C9D6E8;
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 26px;
}
.qat-qat-highlights {
  gap: 12px;
  margin-bottom: 0;
}
.qat-highlight-item {
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.qat-highlight-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.11);
}
.qat-hl-num {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--qat-gold);
  color: var(--qat-navy);
  font-size: 13px;
  font-weight: 800;
}
.qat-highlight-item strong {
  color: #fff;
  font-size: 14.5px;
  margin-bottom: 3px;
}
.qat-highlight-item p {
  color: #BCCCE0;
  font-size: 12.5px;
  line-height: 1.5;
}
.qat-qat-highlights::after {
  content: "A4 print ready   •   OMR bubble sheet   •   Answer key included";
  display: block;
  margin-top: 6px;
  color: var(--qat-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.qat-auth-card {
  padding: 34px 32px 30px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(var(--qat-gold), var(--qat-gold)) top / 100% 5px no-repeat, #fff;
  box-shadow: 0 34px 70px -26px rgba(0, 0, 0, 0.6);
}
.qat-auth-card::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  z-index: -1;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}
.qat-auth-card-head h2 {
  color: var(--qat-navy);
  font-size: 24px;
  letter-spacing: -0.01em;
}
.qat-create-account-cta {
  border-top: 1px dashed #D5DDE9;
  padding-top: 18px;
  margin-top: 18px;
}
.qat-create-account-cta .qat-btn-outline {
  border-color: var(--qat-gold);
  color: var(--qat-navy);
}
.qat-create-account-cta .qat-btn-outline:hover {
  background: var(--qat-gold-soft);
}

/* ---- Forms ---- */
.qat-field label {
  color: #2A3D57;
  font-weight: 700;
}
.qat-field input,
.qat-field select,
.qat-field textarea {
  padding: 11px 13px;
  border: 1px solid #CBD6E4;
  border-radius: 11px;
  background: #FBFCFE;
}
.qat-field input:focus,
.qat-field select:focus,
.qat-field textarea:focus {
  border-color: var(--qat-gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.22);
}
.qat-auth-success {
  background: #EEF8F1;
  border-color: #BFE3CB;
  color: #1E5B3A;
}

/* ---- Studio (signed-in) ---- */
.qat-builder-panel {
  background: #fff;
  border-right: 1px solid var(--qat-line);
}
.qat-panel-section {
  border-bottom: 1px solid var(--qat-line);
}
.qat-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qat-navy);
  font-size: 14.5px;
}
.qat-section-heading::before {
  content: "";
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: var(--qat-gold);
}
.qat-seg-tabs {
  background: #EAEFF6;
  border-radius: 12px;
}
.qat-seg-btn {
  border-radius: 9px;
  font-weight: 700;
  color: #51627A;
}
.qat-seg-btn.is-active {
  background: var(--qat-navy);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(15, 42, 71, 0.8);
}
.qat-grade-btn {
  border-radius: 11px;
  border-color: #D3DCE8;
  background: #F8FAFD;
}
.qat-grade-btn:hover {
  border-color: var(--qat-gold);
}
.qat-grade-btn.is-active {
  background: var(--qat-navy);
  border-color: var(--qat-navy);
  color: #fff;
}
.qat-grade-btn.is-active .qat-grade-tag {
  color: var(--qat-gold);
}
.qat-units-box,
.qat-cat-row {
  border-color: var(--qat-line);
  border-radius: 11px;
}
.qat-unit-item {
  border-radius: 8px;
}
.qat-unit-item:hover {
  border-color: var(--qat-gold);
  background: var(--qat-gold-soft);
}
.qat-info-box {
  background: var(--qat-gold-soft);
  border: 1px solid #EBD79B;
  color: #4A3A0A;
  border-radius: 11px;
}
.qat-custom-summary {
  background: var(--qat-navy);
  border-radius: 11px;
}
.qat-coming-soon-box {
  border-radius: 11px;
}
.qat-preview-pane {
  background: #E7ECF4;
}
.qat-preview-toolbar {
  border-bottom: 1px solid var(--qat-line);
}
.qat-empty-state {
  border: 2px dashed #D9C28A;
  border-radius: 18px;
  background: #fff;
}
.qat-empty-state::before {
  content: "";
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='46' fill='%23FBF3DF'/%3E%3Crect x='25' y='16' width='46' height='60' rx='6' fill='%23fff' stroke='%230F2A47' stroke-width='3'/%3E%3Cpath d='M34 30h28M34 40h28M34 50h16' stroke='%230F2A47' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='64' cy='66' r='15' fill='%23D4A84B'/%3E%3Cpath d='M57 66l5 5 9-10' fill='none' stroke='%230F2A47' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.qat-empty-state h3 {
  color: var(--qat-navy);
  font-size: 18px;
}
.qat-swap-btn {
  color: var(--qat-navy);
  border-color: #D3DCE8;
}
.qat-swap-btn:hover:not(:disabled) {
  background: var(--qat-gold-soft);
  border-color: var(--qat-gold);
}

/* ---- Plans / history screens (signed-in) ---- */
.qat-subview-header h2 {
  color: var(--qat-navy);
}
.qat-plan-card {
  border: 1px solid var(--qat-line);
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qat-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -26px rgba(15, 42, 71, 0.55);
}
.qat-plan-card.is-featured {
  border: 2px solid var(--qat-gold);
  background: linear-gradient(180deg, #FFFCF3 0%, #fff 40%);
}
.qat-plan-limit {
  color: var(--qat-gold-dk);
}
.qat-upgrade-box,
.qat-table-card {
  border-color: var(--qat-line);
  border-radius: 16px;
}
.qat-table th {
  background: var(--qat-navy);
  color: #fff;
  letter-spacing: 0.04em;
}
.qat-table th:first-child { border-radius: 10px 0 0 0; }
.qat-table th:last-child { border-radius: 0 10px 0 0; }
.qat-status.status-approved { color: #1E7A4C; }
.qat-portal-footer {
  background: var(--qat-navy);
  border-top: 0;
  color: #C9D6E8;
}
.qat-portal-footer strong {
  color: var(--qat-gold);
}
.qat-toast {
  background: var(--qat-navy);
  border-left: 5px solid var(--qat-gold);
}
.qat-toast.is-error {
  background: #B3261E;
}

/* ---- Design v2 responsive ---- */
@media (max-width: 1024px) {
  .qat-auth-shell {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 44px 28px 52px;
  }
  .qat-auth-card::before {
    display: none;
  }
}
@media (max-width: 600px) {
  .qat-root {
    border-radius: 14px;
  }
  .qat-auth-shell {
    padding: 32px 16px 40px;
  }
  .qat-auth-card {
    padding: 26px 20px;
  }
  .qat-topbar {
    padding: 12px 16px;
  }
  .qat-guest-meta {
    white-space: normal;
  }
}

/* ---- Public landing content (before sign-in) ---- */
.qat-landing {
  background: #fff;
}
.qat-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1080px;
  margin: -34px auto 0;
  position: relative;
  z-index: 2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 50px -28px rgba(15, 42, 71, 0.6);
  border: 1px solid var(--qat-line);
  overflow: hidden;
}
.qat-stat-strip > div {
  padding: 20px 22px;
  text-align: center;
  border-right: 1px solid var(--qat-line);
}
.qat-stat-strip > div:last-child {
  border-right: 0;
}
.qat-stat-strip strong {
  display: block;
  color: var(--qat-navy);
  font-size: 19px;
  font-weight: 800;
}
.qat-stat-strip span {
  display: block;
  margin-top: 3px;
  color: #5D6F86;
  font-size: 12.5px;
}
.qat-sec {
  padding: 64px 48px 8px;
  max-width: 1180px;
  margin: 0 auto;
}
.qat-sec-alt {
  max-width: none;
  margin-top: 56px;
  padding: 56px 48px 60px;
  background: var(--qat-bg);
}
.qat-sec-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}
.qat-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--qat-gold-dk);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.qat-eyebrow-light {
  color: var(--qat-gold);
}
.qat-sec h2,
.qat-cta-band h2 {
  margin: 0 0 12px;
  color: var(--qat-navy);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.qat-sec-head p {
  margin: 0;
  color: #52647C;
  font-size: 15.5px;
  line-height: 1.7;
}
.qat-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.qat-feature {
  padding: 24px 20px;
  border: 1px solid var(--qat-line);
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.qat-feature:hover {
  transform: translateY(-5px);
  border-color: var(--qat-gold);
  box-shadow: 0 22px 40px -26px rgba(15, 42, 71, 0.55);
}
.qat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: var(--qat-navy);
}
.qat-ico svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--qat-gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qat-feature h3 {
  margin: 0 0 8px;
  color: var(--qat-navy);
  font-size: 16px;
  font-weight: 800;
}
.qat-feature p {
  margin: 0;
  color: #52647C;
  font-size: 13.5px;
  line-height: 1.65;
}
.qat-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.qat-steps li {
  position: relative;
  padding: 24px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--qat-line);
}
.qat-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--qat-gold);
  color: var(--qat-navy);
  font-size: 16px;
  font-weight: 800;
}
.qat-steps strong {
  display: block;
  color: var(--qat-navy);
  font-size: 15.5px;
  margin-bottom: 6px;
}
.qat-steps p {
  margin: 0;
  color: #52647C;
  font-size: 13.5px;
  line-height: 1.6;
}
.qat-why {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.qat-why h2 {
  margin-bottom: 18px;
}
.qat-checks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.qat-checks li {
  position: relative;
  padding: 9px 0 9px 34px;
  color: #2A3D57;
  font-size: 15px;
  line-height: 1.5;
}
.qat-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--qat-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230F2A47' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.qat-why-card {
  padding: 34px 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0B2038, var(--qat-navy-2));
  color: #D6E2F1;
  box-shadow: 0 30px 60px -30px rgba(15, 42, 71, 0.8);
}
.qat-why-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--qat-gold);
  font-size: 22px;
}
.qat-why-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}
.qat-cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1084px;
  margin: 64px auto 0;
  padding: 36px 40px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(212, 168, 75, 0.28) 0, rgba(212, 168, 75, 0) 45%),
    linear-gradient(135deg, #0B2038, var(--qat-navy));
}
.qat-cta-band h2 {
  color: #fff;
}
.qat-cta-band p {
  margin: 0;
  max-width: 560px;
  color: #C9D6E8;
  font-size: 15px;
  line-height: 1.7;
}
.qat-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 14px 24px;
  border-radius: 16px;
  background: #1FA855;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 34px -16px rgba(31, 168, 85, 0.9);
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.qat-wa-btn:hover {
  background: #178A45;
  color: #fff;
  transform: translateY(-2px);
}
.qat-wa-btn svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}
.qat-wa-btn small {
  display: block;
  font-size: 12px;
  opacity: 0.9;
}
.qat-wa-btn strong {
  display: block;
  font-size: 21px;
  letter-spacing: 0.02em;
}
.qat-faq {
  max-width: 820px;
  margin: 0 auto 64px;
}
.qat-faq details {
  margin-bottom: 12px;
  border: 1px solid var(--qat-line);
  border-radius: 14px;
  background: #fff;
}
.qat-faq summary {
  padding: 16px 20px;
  color: var(--qat-navy);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.qat-faq details[open] {
  border-color: var(--qat-gold);
  background: #FFFCF3;
}
.qat-faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: #52647C;
  font-size: 14px;
  line-height: 1.7;
}
.qat-wa-note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--qat-gold-soft);
  color: var(--qat-navy);
  font-size: 14px;
}
.qat-wa-note a {
  color: #138A45;
}
@media (max-width: 1024px) {
  .qat-feature-grid,
  .qat-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .qat-why {
    grid-template-columns: 1fr;
  }
  .qat-cta-band {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 20px;
    margin-right: 20px;
  }
  .qat-stat-strip {
    margin-left: 20px;
    margin-right: 20px;
    grid-template-columns: repeat(2, 1fr);
  }
  .qat-stat-strip > div:nth-child(2) {
    border-right: 0;
  }
  .qat-stat-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--qat-line);
  }
}
@media (max-width: 600px) {
  .qat-sec,
  .qat-sec-alt {
    padding-left: 16px;
    padding-right: 16px;
  }
  .qat-feature-grid,
  .qat-steps {
    grid-template-columns: 1fr;
  }
  .qat-cta-band {
    padding: 28px 22px;
  }
  .qat-wa-btn {
    width: 100%;
  }
}


/* =====================================================================
   TEACHER APP (after sign-in): sidebar dashboard, green theme
   The sign-in page above keeps its navy & gold look.
   ===================================================================== */
.qat-root [hidden] { display: none !important; }

.qat-app {
  --qat-navy: #0B5D3F;
  --qat-navy-2: #16875D;
  --qat-gold: #2DBE7B;
  --qat-gold-soft: #E3F6EC;
  --qat-gold-dk: #0B6B47;
  --qat-bg: #EDF7F1;
  --qat-line: #D8EADF;
  display: flex;
  align-items: stretch;
  min-height: 680px;
  background: linear-gradient(180deg, #E8F6EE 0%, #F4FAF7 55%, #FFFFFF 100%);
}
.qat-app .qat-btn-primary {
  background: linear-gradient(135deg, #0B6B47 0%, #138A5E 100%);
  box-shadow: 0 10px 22px -12px rgba(11, 107, 71, 0.85);
}
.qat-app .qat-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #095A3B 0%, #0B6B47 100%);
}
.qat-app .qat-btn-lg {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.qat-app .qat-i { flex-shrink: 0; }

/* ---- Sidebar ---- */
.qat-sidebar {
  flex: 0 0 240px;
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 26px 14px 20px;
  background: linear-gradient(180deg, #0C6444 0%, #08432E 100%);
  color: #fff;
}
.qat-side-brand {
  text-align: center;
  padding: 0 8px 22px;
}
.qat-side-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.qat-side-name {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}
.qat-side-brand small {
  display: block;
  margin-top: 4px;
  color: #A9DCC4;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.qat-side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.qat-side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #D5EFE2;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.qat-side-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.qat-side-link.is-active {
  background: #1E9566;
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.6);
}
.qat-side-link .qat-nav-count {
  margin-left: auto;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11.5px;
  text-align: center;
}
.qat-side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.qat-side-scrim { display: none; }

/* ---- Main column + top bar ---- */
.qat-app-main {
  flex: 1;
  min-width: 0;
  padding: 18px 26px 30px;
}
.qat-appbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--qat-line);
  box-shadow: 0 14px 30px -26px rgba(11, 93, 63, 0.7);
}
.qat-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #E3F6EC;
  color: #0B5D3F;
  cursor: pointer;
}
.qat-welcome strong {
  display: block;
  color: #0F2A21;
  font-size: 16px;
}
.qat-welcome span {
  color: #5C7468;
  font-size: 13px;
}
.qat-appbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.qat-app .qat-quota-text {
  background: #E3F6EC;
  color: #0B5D3F;
}
.qat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B6B47, #2DBE7B);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #BFE8D1;
}
.qat-app-body {
  margin-top: 18px;
}

/* ---- Dashboard home ---- */
.qat-hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 40px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(120deg, #D4F2E2 0%, #BDE9D2 100%);
  box-shadow: 0 22px 44px -32px rgba(11, 93, 63, 0.75);
}
.qat-hero-copy { position: relative; z-index: 1; max-width: 460px; }
.qat-hero-copy h1 {
  margin: 0 0 12px;
  color: #0B2F22;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.qat-hero-copy p {
  margin: 0 0 22px;
  color: #1E4A38;
  font-size: 15.5px;
  line-height: 1.6;
}
.qat-hero-art {
  flex-shrink: 0;
  width: 340px;
  max-width: 42%;
  height: auto;
}
.qat-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
.qat-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.qat-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--qat-line);
  box-shadow: 0 14px 28px -26px rgba(11, 93, 63, 0.7);
}
.qat-stat-card strong {
  display: block;
  color: #0F2A21;
  font-size: 24px;
  line-height: 1.1;
}
.qat-stat-card strong.qat-stat-plan {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.25;
}
.qat-stat-card span:last-child,
.qat-stat-card div > span {
  display: block;
  margin-top: 3px;
  color: #5C7468;
  font-size: 12.5px;
}
.qat-sc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.qat-sc-ico.is-green { background: #D6F3E4; color: #0B7A50; }
.qat-sc-ico.is-blue { background: #DCEBFB; color: #2D6CB3; }
.qat-sc-ico.is-amber { background: #FDEDC9; color: #B7791F; }
.qat-sc-ico.is-violet { background: #E8E1FA; color: #6A4CC4; }

.qat-card {
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--qat-line);
  box-shadow: 0 14px 28px -26px rgba(11, 93, 63, 0.7);
}
.qat-card h2 {
  margin: 0;
  color: #0F2A21;
  font-size: 18px;
  font-weight: 800;
}
.qat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.qat-rt-head,
.qat-rt-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 96px 124px 84px;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
}
.qat-rt-head {
  border-radius: 10px;
  background: #EAF5EF;
  color: #274A3A;
  font-size: 12.5px;
  font-weight: 800;
}
.qat-rt-row {
  border-bottom: 1px solid #EEF4F0;
}
.qat-rt-row:last-child { border-bottom: 0; }
.qat-rt-topic strong {
  display: block;
  color: #0F2A21;
  font-size: 14.5px;
}
.qat-rt-topic small {
  display: block;
  margin-top: 2px;
  color: #6A8478;
  font-size: 12px;
}
.qat-rt-q em { font-style: normal; color: #6A8478; font-size: 12px; }
.qat-rt-date { color: #3C5A4C; font-size: 13.5px; }
.qat-view-pill {
  padding: 6px 18px;
  border: 1.5px solid #2DBE7B;
  border-radius: 999px;
  background: #fff;
  color: #0B6B47;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.qat-view-pill:hover { background: #E3F6EC; }
.qat-recent-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 10px;
  text-align: center;
  color: #5C7468;
}
.qat-recent-empty strong { color: #0F2A21; font-size: 16px; }

.qat-home-side { display: flex; flex-direction: column; gap: 16px; }
.qat-quick { display: flex; flex-direction: column; gap: 10px; }
.qat-quick h2 { margin-bottom: 4px; font-size: 16px; }
.qat-qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: #E6F6EE;
  color: #0B4D36;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease;
}
.qat-qa-btn:hover { background: #D5F0E3; transform: translateX(3px); }
.qat-qa-btn.is-primary { background: #0B6B47; color: #fff; }
.qat-qa-btn.is-primary:hover { background: #095A3B; }
.qat-cheer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  background: linear-gradient(180deg, #FFF7D9 0%, #F5FAE6 100%);
}
.qat-cheer strong { color: #0F2A21; font-size: 16px; }
.qat-cheer span { color: #5C7468; font-size: 13px; }

/* ---- Create New Paper: stepper + wizard ---- */
.qat-app .qat-step-strip {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 16px;
  padding: 12px 18px;
  border: 1px solid var(--qat-line);
  border-radius: 16px;
  background: #fff;
  overflow-x: auto;
}
.qat-app .qat-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 6px 4px;
  border-radius: 10px;
  background: transparent;
  color: #6A8478;
  font-weight: 700;
  cursor: pointer;
}
.qat-app .qat-step-item:last-child { flex: 0 0 auto; }
.qat-app .qat-step-item:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 18px;
  height: 2px;
  margin: 0 8px 0 6px;
  border-radius: 2px;
  background: #D8EADF;
}
.qat-app .qat-step-item .qat-step-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E6F1EA;
  color: #0B5D3F;
  font-size: 13px;
}
.qat-app .qat-step-item.is-active { background: transparent; color: #6A8478; }
.qat-app .qat-step-item.is-done .qat-step-idx { background: #2DBE7B; color: #fff; }
.qat-app .qat-step-item.is-done:not(:last-child)::after { background: #2DBE7B; }
.qat-app .qat-step-item.is-current { color: #0B3D2B; }
.qat-app .qat-step-item.is-current .qat-step-idx {
  background: #0B6B47;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(45, 190, 123, 0.28);
}

.qat-app .qat-builder-panel {
  padding: 24px 26px 22px;
  border: 1px solid var(--qat-line);
  border-radius: 20px;
  box-shadow: 0 14px 28px -26px rgba(11, 93, 63, 0.7);
}
.qat-app .qat-section-heading { font-size: 17px; }
.qat-app .qat-panel-section { border-bottom: 0; padding-bottom: 0; }
.qat-app .qat-preview-pane { margin-top: 18px; border-radius: 20px; }

.qat-wiz-nav, .qat-wiz-back-inline { display: none; }
.qat-wizard-on [data-wiz-step] { display: none; }
.qat-wizard-on [data-wiz-step].is-wiz-current { display: block; }
.qat-wizard-on .qat-action-bar[data-wiz-step].is-wiz-current { display: flex; }
.qat-wizard-on .qat-wiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--qat-line);
}
.qat-wizard-on .qat-wiz-back-inline { display: inline-flex; }
.qat-wiz-hint { color: #6A8478; font-size: 13px; font-weight: 700; }
.qat-wiz-summary {
  flex: 1;
  min-width: 160px;
  text-align: center;
  color: #0B5D3F;
  font-size: 12.5px;
  font-weight: 700;
}
.qat-wizard-on .qat-panel-section-last.is-wiz-current { padding-bottom: 0; }
.qat-wiz-btn { min-width: 120px; }

/* ---- Mobile bottom navigation ---- */
.qat-bottom-nav { display: none; }

/* ---- App responsive ---- */
@media (max-width: 1100px) {
  .qat-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qat-home-grid { grid-template-columns: 1fr; }
  .qat-home-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .qat-app { display: block; min-height: 0; }
  .qat-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10001;
    width: 268px;
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }
  .qat-app.is-side-open .qat-sidebar { transform: none; }
  .qat-app.is-side-open .qat-side-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5, 30, 20, 0.5);
  }
  .qat-burger { display: inline-flex; }
  .qat-app-main { padding: 12px 12px 92px; }
  .qat-appbar { padding: 10px 12px; }
  .qat-welcome strong { font-size: 14px; }
  .qat-welcome span { font-size: 12px; }
  .qat-app .qat-quota-text { display: none; }
  .qat-hero-banner { padding: 24px 20px; border-radius: 18px; }
  .qat-hero-art { display: none; }
  .qat-home-side { grid-template-columns: 1fr; }
  .qat-rt-head { display: none; }
  .qat-rt-row { grid-template-columns: 26px minmax(0, 1fr) 62px 70px; }
  .qat-rt-date { display: none; }
  .qat-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--qat-line);
    box-shadow: 0 -12px 30px -22px rgba(11, 93, 63, 0.6);
  }
  .qat-bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 6px 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #6A8478;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .qat-bn-item.is-active { color: #0B6B47; background: #E3F6EC; }
  .qat-app .qat-builder-panel { padding: 18px 14px; }
  .qat-app .qat-step-label { display: none; }
  .qat-app .qat-step-item.is-current .qat-step-label { display: inline; }
  .qat-wizard-on .qat-wiz-nav { flex-direction: column-reverse; align-items: stretch; }
  .qat-wiz-summary { text-align: center; }
  .qat-wiz-btn { width: 100%; }
}
@media (max-width: 520px) {
  .qat-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .qat-stat-card { padding: 12px 10px; gap: 9px; }
  .qat-sc-ico { flex-basis: 38px; width: 38px; height: 38px; }
  .qat-stat-card strong { font-size: 20px; }
}

.qat-home-grid > *,
.qat-home-main { min-width: 0; }
.qat-stat-card > div { min-width: 0; }
.qat-stat-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qat-app .qat-step-item { border: 0; }
.qat-app .qat-step-strip { scrollbar-width: none; }
@media (max-width: 860px) {
  .qat-app .qat-step-strip { padding: 10px 12px; justify-content: space-between; overflow-x: visible; }
  .qat-app .qat-step-item { flex: 0 1 auto; min-width: 0; gap: 8px; }
  .qat-app .qat-step-item::after { display: none; }
}
