/* ============================================
   AMD Dynamics - Frontend Styles
   Purple Theme — Cards verticales redondeadas
   ============================================ */

:root {
  --amd-primary: #7D87C4;
  --amd-primary-dark: #6B62A8;
  --amd-primary-darker: #5E5594;
  --amd-primary-card: #7D87C4;
  --amd-primary-light: #F2F1FF;
  --amd-primary-bg: #F7F7FF;
  --amd-bg: #F8FAFC;
  --amd-card: #FFFFFF;
  --amd-text: #707070;
  --amd-text-secondary: #707070;
  --amd-text-muted: #9B9B9B;
  --amd-border: #E8E8F0;
  --amd-border-light: #F1F5F9;
  --amd-success: #10B981;
  --amd-shadow: 0 8px 24px rgba(0,0,0,0.08);
  --amd-shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
  --amd-radius: 24px;
  --amd-radius-sm: 16px;
  --amd-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --amd-font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.amd-dynamic *,
.amd-dynamic *::before,
.amd-dynamic *::after {
  box-sizing: border-box;
}

.amd-dynamic {
  font-family: var(--amd-font);
  color: var(--amd-text);
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  padding: 0;
  position: relative;
}

/* ---------- Loader ---------- */
.amd-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.amd-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--amd-border);
  border-top-color: var(--amd-primary);
  border-radius: 50%;
  animation: amd-spin 0.7s linear infinite;
}

@keyframes amd-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Fade Transition ---------- */
.amd-fade-in {
  animation: amd-fadeIn 0.3s ease-out;
}

@keyframes amd-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CARDS GRID — 7 Dynamics
   ============================================ */
.amd-tabs {
  margin-bottom: 20px;
}

.amd-tabs-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.amd-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 24px 10px 24px;
  border-radius: 15px;
  border: none;
  background: #FFFFFF;
  cursor: pointer;
  transition: var(--amd-transition);
  text-align: center;
  min-height: 100px;
  box-shadow: var(--amd-shadow);
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--amd-font);
}

/* --- Active --- */
.amd-tab.active {
  background: var(--amd-primary);
  box-shadow: none;
  cursor: default;
}

/* --- Next (available) --- */
.amd-tab.next {
  background: #FFFFFF;
  box-shadow: var(--amd-shadow);
  cursor: pointer;
}

.amd-tab.next:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* --- Locked --- */
.amd-tab.locked {
  background: #FFFFFF;
  box-shadow: var(--amd-shadow-sm);
  cursor: not-allowed;
  opacity: 0.45;
}

/* Icon */
.amd-tab-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.amd-tab-icon svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: #C4BEE8;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s;
}

.amd-tab.active .amd-tab-icon svg {
  stroke: #FFFFFF;
}

.amd-tab.next .amd-tab-icon svg {
  stroke: #C4BEE8;
}

/* Title */
.amd-tab-title {
  font-family: var(--amd-font);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  color: #A49FCC;
  transition: color 0.25s;
}

.amd-tab.active .amd-tab-title {
  color: #FFFFFF;
}

.amd-tab.next .amd-tab-title {
  color: #A49FCC;
}

/* Subtitle */
.amd-tab-subtitle {
  font-family: var(--amd-font);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.0px;
  color: #A49FCC;
  transition: color 0.25s;
}

.amd-tab.active .amd-tab-subtitle {
  color: rgba(255,255,255,0.85);
}

.amd-tab.next .amd-tab-subtitle {
  color: #A49FCC;
}

/* ============================================
   INSTRUCTION CARD
   ============================================ */
.amd-instruction-card {
  background: var(--amd-primary-card);
  border-radius: var(--amd-radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.amd-instruction-title {
  font-size: 23px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 2px;
}

.amd-instruction-title span {
  font-weight: 400;
}

.amd-instruction-text {
  font-size: 15px;
  color: var(--amd-primary-light);
  line-height: 1.6;
  margin: 4px 0 0;
  font-weight: 500;
  letter-spacing: -1px;
}

/* ============================================
   QUESTION (Affirmation)
   ============================================ */
.amd-question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--amd-text);
  margin-bottom: 28px;
  line-height: 1.6;
  min-height: 44px;
}

/* ============================================
   SLIDER
   ============================================ */
.amd-slider-area {
  margin-bottom: 28px;
}

.amd-slider-area .noUi-target {
  height: 6px;
  border: none;
  border-radius: 3px;
  background: #D1D5F0;
  box-shadow: none;
}

.amd-slider-area .noUi-connect {
  background: var(--amd-primary);
  border-radius: 3px;
}

.amd-slider-area .noUi-handle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  box-shadow: none;
  cursor: pointer;
  top: -8px;
  right: -11px;
  transition: transform 0.15s;
}

.amd-slider-area .noUi-handle::before,
.amd-slider-area .noUi-handle::after {
  display: none;
}

.amd-slider-area .noUi-handle:hover {
  transform: scale(1.08);
}

.amd-slider-area .noUi-handle.noUi-active {
  transform: scale(1.08);
}

.amd-slider-area .noUi-pips {
  display: none;
}

.amd-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--amd-text-muted);
  margin-top: 8px;
  font-weight: 400;
}

.amd-select-area {
  margin-bottom: 28px;
}

.amd-select {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--amd-text);
  background: var(--amd-card);
  border: 2px solid var(--amd-border);
  border-radius: var(--amd-radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.amd-select:hover {
  border-color: var(--amd-primary-light);
}

.amd-select:focus {
  outline: none;
  border-color: var(--amd-primary);
  box-shadow: 0 0 0 3px rgba(125, 135, 196, 0.15);
}

.amd-select option {
  font-weight: 400;
  color: var(--amd-text);
  background: var(--amd-card);
}

/* ============================================
   BUTTONS
   ============================================ */
.amd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--amd-radius-sm);
  cursor: pointer;
  transition: var(--amd-transition);
  text-decoration: none;
  line-height: 1.2;
  -webkit-appearance: none;
}

.amd-btn-primary {
  background: var(--amd-primary);
  color: #FFFFFF;
  padding: 10px 28px;
}

.amd-btn-primary:hover {
  background: var(--amd-primary-dark);
}

.amd-btn-primary:active {
  transform: scale(0.98);
}

.amd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.amd-btn-outline {
  background: transparent;
  color: var(--amd-text-muted);
  border: 1px solid var(--amd-border);
  padding: 10px 20px;
}

.amd-btn-outline:hover {
  border-color: var(--amd-primary);
  color: var(--amd-primary);
}

.amd-btn-block {
  width: 100%;
}

/* ============================================
   QUESTION SCREEN
   ============================================ */
.amd-question-screen {
  background: var(--amd-card);
  border-radius: var(--amd-radius);
  padding: 24px;
}

.amd-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.amd-question-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--amd-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.amd-timer {
  font-size: 12px;
  font-weight: 500;
  color: var(--amd-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.amd-timer svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.amd-progress-bar {
  width: 100%;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}

.amd-progress-fill {
  height: 100%;
  background: var(--amd-primary);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.amd-nav {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.amd-nav .amd-btn {
  flex: 0 0 auto;
}

.amd-nav .amd-btn-outline {
  background: transparent;
  color: var(--amd-text-muted);
  border: 1px solid var(--amd-border);
  padding: 10px 20px;
}

.amd-nav .amd-btn-outline:hover {
  border-color: var(--amd-primary);
  color: var(--amd-primary);
}

/* ============================================
   RESULTS
   ============================================ */
.amd-results {
  background: transparent;
}

.amd-rs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--amd-border);
}

.amd-rs-header-icon {
  width: 48px;
  height: 48px;
  background: var(--amd-primary-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.amd-rs-header-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--amd-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.amd-rs-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--amd-text);
  margin: 0;
  line-height: 1.2;
}

.amd-rs-header-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--amd-text-secondary);
  margin: 2px 0 0;
}

.amd-rs-header-sub span {
  color: var(--amd-text-muted);
  font-weight: 400;
}

/* Grid layout */
.amd-rs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Cards base */
.amd-rs-card {
  background: var(--amd-primary-bg);
  border-radius: var(--amd-radius);
  padding: 24px;
}

.amd-rs-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--amd-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}

/* Donut card */
.amd-rs-card-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.amd-rs-donut-svg {
  width: 160px;
  height: 160px;
  display: block;
}

.amd-rs-donut-arc {
  transition: stroke-dashoffset 0.8s ease-out;
}

.amd-rs-donut-pct {
  font-size: 22px;
  font-weight: 800;
  fill: var(--amd-text);
}

.amd-rs-donut-level {
  font-size: 11px;
  font-weight: 600;
  fill: var(--amd-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.amd-rs-donut-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.amd-rs-score-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--amd-text);
  line-height: 1;
}

.amd-rs-score-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--amd-text-muted);
}

/* Level scale card */
.amd-rs-card-levels {
  display: flex;
  flex-direction: column;
}

.amd-rs-lvl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.amd-rs-lvl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s;
}

.amd-rs-lvl-row.active {
  background: var(--amd-primary-light);
}

.amd-rs-lvl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.amd-rs-lvl-row.active .amd-rs-lvl-dot {
  width: 20px;
  height: 20px;
}

.amd-rs-lvl-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  transition: opacity 0.2s;
}

.amd-rs-lvl-row.active .amd-rs-lvl-inner {
  opacity: 1;
}

.amd-rs-lvl-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--amd-text-secondary);
  flex: 1;
}

.amd-rs-lvl-row.active .amd-rs-lvl-name {
  font-weight: 700;
  color: var(--amd-text);
}

.amd-rs-lvl-badge {
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--amd-primary);
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Advice text card */
.amd-rs-card-text {
  margin-bottom: 16px;
}

.amd-rs-card-text .amd-rs-text {
  margin: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: var(--amd-text-secondary);
}

/* Tips card */
.amd-rs-card-tips {
  margin-bottom: 16px;
}

.amd-rs-tips-head {
  margin-bottom: 16px;
}

.amd-rs-tips-badge {
  display: inline-block;
  background: var(--amd-primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 24px;
  border-radius: 20px;
}

.amd-rs-tips {
  list-style: none;
  margin: 0;
  padding: 0;
}

.amd-rs-tips li {
  position: relative;
  padding: 0 0 0 20px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--amd-text-secondary);
  line-height: 1.5;
}

.amd-rs-tips li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  color: var(--amd-primary);
  font-weight: 700;
}

/* Action buttons */
.amd-rs-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 4px;
}

.amd-rs-actions .amd-btn-outline {
  background: transparent;
  color: var(--amd-text-muted);
  border: 1px solid var(--amd-border);
  padding: 10px 20px;
}

.amd-rs-actions .amd-btn-outline:hover {
  border-color: var(--amd-primary);
  color: var(--amd-primary);
}

/* ============================================
   REPLAY WARNING
   ============================================ */
.amd-replay-warning {
  background: var(--amd-card);
  border-radius: var(--amd-radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 16px;
}

.amd-warning-card {
  max-width: 400px;
  margin: 0 auto;
}

.amd-warning-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--amd-text);
  margin: 0 0 12px;
}

.amd-warning-text {
  font-size: 14px;
  color: var(--amd-text-secondary);
  line-height: 1.6;
  margin: 0 0 8px;
}

.amd-attempts {
  font-size: 12px;
  color: var(--amd-text-muted);
  margin: 4px 0 16px;
}

.amd-warning-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.amd-warning-actions .amd-btn-outline {
  background: transparent;
  color: var(--amd-text-muted);
  border: 1px solid var(--amd-border);
  padding: 10px 24px;
}

.amd-warning-actions .amd-btn-outline:hover {
  border-color: var(--amd-primary);
  color: var(--amd-primary);
}

/* ============================================
   USER HEADER
   ============================================ */
.amd-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  height: auto;
  padding: 0;
  font-family: var(--amd-font);
}

.auh-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.auh-icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auh-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}

.auh-icon-bell {
  position: relative;
}

.auh-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #7C70C4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.auh-center {
  flex: 1;
  text-align: right;
  min-width: 0;
}

.auh-name {
  font-family: var(--amd-font);
  font-weight: 600;
  font-size: 18px;
  color: #707070;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auh-link {
  font-family: var(--amd-font);
  font-weight: 600;
  font-size: 13px;
  color: #7C70C4;
  cursor: pointer;
  text-decoration: none;
  display: block;
  text-align: right;
  line-height: 1.4;
}

.auh-link:hover {
  text-decoration: underline;
}

.auh-right {
  flex-shrink: 0;
}

.auh-avatar-frame {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.auh-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   PROGRESS SHORTCODE
   ============================================ */
.amd-progress {
  font-family: var(--amd-font);
  padding: 0;
}

.amd-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--amd-text-secondary);
  margin-bottom: 8px;
  text-align: left;
}

.amd-progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.amd-progress-track {
  flex: 1;
  height: 20px;
  background: #E2E6FF;
  border: 2px solid #D5DAFF;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.amd-progress-bar {
  height: 100%;
  background: #7D87C4;
  border-radius: 18px;
  transition: width 0.5s ease-out;
  width: 0%;
}

.amd-progress-pct {
  font-family: var(--amd-font);
  font-size: 25px;
  font-weight: 700;
  color: var(--amd-text);
  line-height: 1;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* ============================================
   CALENDAR SHORTCODE
   ============================================ */
.amd-calendar {
  font-family: var(--amd-font);
  padding: 0;
}

.amd-cal-card {
  background: #FFFFFF;
  border-radius: var(--amd-radius);
  box-shadow: var(--amd-shadow);
  padding: 14px 12px;
}

.amd-cal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--amd-text);
  text-align: center;
  margin-bottom: 0;
  line-height: 1.3;
}

.amd-cal-month {
  font-size: 11px;
  font-weight: 500;
  color: var(--amd-text-muted);
  text-align: center;
  margin-bottom: 8px;
}

.amd-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.amd-cal-header .amd-cal-month {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--amd-text);
}

.amd-cal-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amd-text-muted);
  transition: color 0.2s;
  border-radius: 4px;
}

.amd-cal-arrow:hover {
  color: var(--amd-primary);
}

.amd-cal-arrow svg {
  width: 18px;
  height: 18px;
}

.amd-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.amd-cal-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--amd-text-muted);
  text-align: center;
  padding: 4px 0;
  text-transform: uppercase;
}

.amd-cal-cell {
  text-align: center;
  padding: 2px 0;
  position: relative;
}

.amd-cal-empty {
  visibility: hidden;
}

.amd-cal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--amd-text);
  border-radius: 50%;
  transition: 0.2s;
}

.amd-cal-today .amd-cal-num {
  border: 2px solid #7D87C4;
  background: transparent;
  color: #7D87C4;
  font-weight: 700;
}

.amd-cal-completed .amd-cal-num {
  background: #7D87C4;
  color: #FFFFFF;
  font-weight: 700;
}

.amd-cal-completed {
  cursor: pointer;
}

.amd-cal-popup {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A2E;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  line-height: 1.3;
}

.amd-cal-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1A1A2E;
}

/* ============================================
   RESULTS SHORTCODE
   ============================================ */
.amd-results-list {
  font-family: var(--amd-font);
  padding: 0;
}

.amd-results-empty {
  font-size: 14px;
  color: var(--amd-text-muted);
  text-align: center;
  padding: 20px 0;
}

.amd-results-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--amd-text);
  margin-bottom: 12px;
}

.amd-result-card {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.amd-result-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.amd-result-seg-left {
  background: #7D87C4;
  width: 80px;
  height: 80px;
  border-radius: 14px 0 0 14px;
}

.amd-result-seg-left svg {
  width: 35px;
  height: 35px;
  display: block;
}

.amd-result-pill {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  background: #F2F1FF;
  border-radius: 12px;
  padding: 10px 10px;
  margin: 0 -8px;
  z-index: 1;
  gap: 8px;
  height: 80px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.07);
  border: 1px solid #7D87C4;
}

.amd-result-pill-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.amd-result-pill-col:first-child {
  flex-shrink: 0;
}

.amd-result-pill-col:last-child {
  gap: 1px;
}

.amd-result-score {
  font-family: 'Montserrat', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: #707070;
  line-height: 1;
}

.amd-result-status {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #707070;
  line-height: 1.2;
}

.amd-result-time {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #707070;
  line-height: 1.2;
}

.amd-result-seg-right {
  background: #7D87C4;
  width: 80px;
  height: 80px;
  border-radius: 0 14px 14px 0;
}

.amd-result-dl {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amd-result-dl svg {
  width: 38px;
  height: 38px;
  display: block;
}

/* ============================================
   ERROR
   ============================================ */
.amd-error {
  text-align: center;
  padding: 40px 20px;
  color: #EF4444;
  font-size: 15px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .amd-tabs-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .amd-tab {
    min-height: 150px;
    padding: 20px 8px 16px;
    border-radius: 20px;
  }

  .amd-tab-icon {
    width: 40px;
    height: 40px;
  }

  .amd-tab-icon svg {
    width: 40px;
    height: 40px;
  }

  .amd-tab-title {
    font-size: 18px;
  }

  .amd-tab-subtitle {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .amd-tabs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .amd-tab {
    min-height: 120px;
    padding: 16px 6px 12px;
    border-radius: 16px;
  }

  .amd-tab-icon {
    width: 32px;
    height: 32px;
  }

  .amd-tab-icon svg {
    width: 32px;
    height: 32px;
  }

  .amd-tab-title {
    font-size: 15px;
  }

  .amd-tab-subtitle {
    font-size: 10px;
  }

  .amd-instruction-card {
    padding: 16px;
  }

  .amd-instruction-title {
    font-size: 15px;
  }

  .amd-question-screen {
    padding: 16px;
  }

  .amd-question-text {
    font-size: 14px;
  }

  .amd-results {
    padding: 20px 16px;
  }

  .amd-rs-grid {
    grid-template-columns: 1fr;
  }

  .amd-rs-donut-svg {
    width: 120px;
    height: 120px;
  }

  .amd-rs-score-num {
    font-size: 22px;
  }

  .amd-score-total {
    font-size: 36px;
  }

  .amd-btn {
    font-size: 13px;
    padding: 8px 20px;
  }

  .amd-nav .amd-btn-outline {
    padding: 8px 14px;
  }
}

@media (max-width: 400px) {
  .amd-tabs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .amd-tab {
    min-height: 100px;
    padding: 12px 4px 10px;
    border-radius: 14px;
  }

  .amd-tab-icon {
    width: 26px;
    height: 26px;
  }

  .amd-tab-icon svg {
    width: 26px;
    height: 26px;
  }

  .amd-tab-title {
    font-size: 12px;
  }

  .amd-tab-subtitle {
    font-size: 9px;
  }
}

@media (min-width: 901px) {
  .amd-tabs-grid {
    gap: 12px;
  }
}

/* ---------- Print ---------- */
@media print {
  .amd-dynamic {
    box-shadow: none;
    padding: 0;
  }
}
