/* ═══════════════════════════════════════════════════════════════════════════
   RupIELTS — Public Styles  v4  (IDP CBT Interface)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared font / reset ────────────────────────────────────────────────── */
.rupielts-player,
.rupielts-tests-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    box-sizing: border-box;
}
.rupielts-player *, .rupielts-tests-page * { box-sizing: inherit; }

/* ═══════════════════════════════════════════════════════════════════════════
   TESTS LISTING PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.rupielts-tests-page          { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.rupielts-page-header         { text-align:center; margin-bottom:32px; }
.rupielts-page-header h2      { font-size:28px; color:#1a1a2e; margin-bottom:8px; }
.rupielts-page-header p       { color:#666; }
.rupielts-book-group          { margin-bottom:32px; }
.rupielts-book-header         { display:flex; align-items:center; gap:10px; margin-bottom:16px; padding-bottom:10px; border-bottom:2px solid #e8ecf0; }
.rupielts-book-header h3      { margin:0; font-size:20px; color:#1a1a2e; }
.rupielts-book-icon           { font-size:22px; }
.rupielts-tests-grid          { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.rupielts-test-card           { background:#fff; border:1px solid #e0e6ed; border-radius:12px; padding:16px; box-shadow:0 2px 8px rgba(0,0,0,.06); transition:box-shadow .2s; }
.rupielts-test-card:hover     { box-shadow:0 4px 16px rgba(0,0,0,.12); }
.rupielts-test-card-header    { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.rupielts-test-num            { font-weight:700; font-size:15px; color:#1a1a2e; }
.rupielts-days-badge          { font-size:11px; padding:2px 8px; border-radius:10px; background:#e8f5e9; color:#2e7d32; font-weight:600; }
.rupielts-days-badge.expiring { background:#fff3e0; color:#e65100; }
.rupielts-skills-grid         { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.rupielts-skill-btn           { display:flex; flex-direction:column; align-items:center; padding:12px 8px; border-radius:8px; background:color-mix(in srgb,var(--skill-color) 10%,#fff); border:1.5px solid color-mix(in srgb,var(--skill-color) 30%,#fff); color:var(--skill-color); text-decoration:none; font-size:12px; font-weight:600; transition:all .15s; cursor:pointer; }
.rupielts-skill-btn:hover     { background:var(--skill-color); color:#fff; text-decoration:none; transform:translateY(-1px); }
.rupielts-skill-icon          { font-size:20px; margin-bottom:4px; }
.rupielts-skill-name          { font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.rupielts-skill-score         { font-size:11px; margin-top:4px; font-weight:700; }
.rupielts-test-expires        { margin-top:10px; font-size:11px; color:#999; text-align:center; }
.rupielts-empty-state         { text-align:center; padding:60px 20px; color:#666; }
.rupielts-empty-icon          { font-size:48px; margin-bottom:16px; }
.rupielts-shop-section        { margin-top:40px; }
.rupielts-shop-section h3     { font-size:20px; margin-bottom:16px; }
.rupielts-test-card-shop      { border-style:dashed; }
.rupielts-buy-area            { display:flex; justify-content:space-between; align-items:center; margin-top:12px; }
.rupielts-price               { font-size:20px; font-weight:700; color:#1a1a2e; }
.rupielts-buy-btn             { background:#1a73e8; color:#fff; border:none; padding:9px 18px; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; }
.rupielts-buy-btn:hover       { background:#1558b0; }
.rupielts-login-prompt        { text-align:center; padding:40px; background:#f8f9fa; border-radius:12px; }
.rupielts-no-access           { display:flex; justify-content:center; padding:60px 20px; }
.rupielts-no-access-box       { text-align:center; max-width:360px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER SHELL
   ═══════════════════════════════════════════════════════════════════════════ */
.rupielts-player {
    position: relative;
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ──────────────────────────────────────────────────────────────── */
.rp-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.rp-topbar-left   { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.rp-topbar-center { flex:0 0 auto; }
.rp-topbar-right  { display:flex; justify-content:flex-end; flex:1; }

.rp-back-btn {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 4px;
    white-space: nowrap;
    transition: all .15s;
}
.rp-back-btn:hover { color:#fff; border-color:rgba(255,255,255,.6); text-decoration:none; }

.rp-test-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}
.rp-skill-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.skill-reading   { background:#1a73e8; }
.skill-listening { background:#34a853; }
.skill-writing   { background:#ea8600; }
.skill-speaking  { background:#9c27b0; }

.rp-timer {
    background: rgba(255,255,255,.12);
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}
.rp-timer.warning { background:#dc3232; animation:rp-pulse 1s infinite; }
@keyframes rp-pulse { 0%,100%{opacity:1} 50%{opacity:.65} }

.rp-btn-submit-top {
    background: #34a853;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.rp-btn-submit-top:hover { background:#2d8e47; }

/* ── Start Overlay ────────────────────────────────────────────────────────── */
.rp-start-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.rp-start-box {
    background: #fff;
    border-radius: 14px;
    padding: 40px 48px;
    max-width: 520px;
    width: 95%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.rp-start-icon   { font-size:52px; margin-bottom:12px; }
.rp-start-box h2 { font-size:22px; margin:0 0 12px; color:#1a1a2e; }
.rp-start-meta   { display:flex; justify-content:center; gap:8px; color:#666; font-size:13px; margin-bottom:20px; flex-wrap:wrap; }
.rp-start-instructions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    margin-bottom: 24px;
    font-size: 13px;
    color: #555;
    line-height: 1.75;
}
.rp-start-instructions p { margin:0 0 6px; }
.rp-start-instructions p:last-child { margin-bottom:0; }
.rp-already-submitted { background:#fff8e1; padding:16px; border-radius:8px; margin-bottom:20px; display:flex; flex-direction:column; gap:10px; align-items:center; }
.rp-already-submitted p { margin:0; font-size:14px; }
.rp-band-display  { display:flex; flex-direction:column; align-items:center; margin:10px 0; }
.rp-band-num      { font-size:48px; font-weight:900; color:#1a73e8; line-height:1; }
.rp-band-label    { font-size:11px; color:#888; text-transform:uppercase; }
.rp-btn-start {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 13px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    display: inline-block;
}
.rp-btn-start:hover { background:#1558b0; text-decoration:none; color:#fff; }
.rp-btn-reattempt { background:#fff; color:#1a73e8; border:2px solid #1a73e8; }
.rp-btn-reattempt:hover { background:#e8f0fe; color:#1a73e8; }

/* ── Main area ────────────────────────────────────────────────────────────── */
.rp-main {
    margin-top: 52px;   /* topbar height */
    margin-bottom: 48px; /* bottombar height */
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* Writing uses same bottom margin as other skills - button is in bottombar */
.rupielts-player[data-skill="writing"] .rp-main {
    margin-bottom: 48px;
}

/* ── Part header (IDP grey banner) ───────────────────────────────────────── */
.rp-part-header {
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
    padding: 7px 16px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-shrink: 0;
}
.rp-part-label { font-weight: 700; font-size: 13px; color: #1a1a2e; }
.rp-part-inst  { font-size: 12px; color: #555; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPLIT PANE
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-split-pane {
    display: flex;
    flex: 1;
    height: calc(100vh - 52px - 48px - 32px); /* viewport minus topbar, bottombar, part-header */
    min-height: 400px;
    overflow: hidden;
}

/* Left pane */
.rp-pane-left {
    width: 50%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    min-width: 200px;
}

/* Right pane */
.rp-pane-right {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-width: 200px;
}
/* Writing right pane — let textarea grow to fill height */
.rp-writing-section .rp-pane-right,
.rp-pane-right:has(.rp-idp-textarea) {
    overflow-y: auto;
}

/* Divider */
.rp-pane-divider {
    width: 12px;
    background: #e8ecf0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    flex-shrink: 0;
    user-select: none;
    position: relative;
    z-index: 10;
}
.rp-divider-btn {
    background: #cdd5de;
    border: 1px solid #b0bcc8;
    border-radius: 3px;
    padding: 4px 3px;
    font-size: 11px;
    cursor: col-resize;
    color: #555;
    line-height: 1;
}
.rp-pane-divider:hover { background:#d0d8e0; }

/* ── Passage panel ────────────────────────────────────────────────────────── */
.rp-passage-title {
    background: #f8f9fb;
    border-bottom: 1px solid #e0e6ed;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    flex-shrink: 0;
}
.rp-passage-content {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.85;
    color: #2c3e50;
    flex: 1;
    user-select: text;
    -webkit-user-select: text;
}
.rp-passage-content h1,
.rp-passage-content h2,
.rp-passage-content h3 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.rp-passage-content p  { margin: 0 0 12px; }

/* ── Questions pane ───────────────────────────────────────────────────────── */
.rp-q-range-header {
    background: #f8f9fb;
    border-bottom: 1px solid #e0e6ed;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
    flex-shrink: 0;
}
.rp-questions-scroll {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUESTION RENDERING
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-question {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.rp-question:last-child { border-bottom: none; }

/* ── Instruction block ────────────────────────────────────────────────────── */
.rp-q-instruction-block {
    background: #f8f9fa;
    border-top: 2px solid #1a1a2e;
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    line-height: 1.7;
    margin: 20px 0 14px;
}
.rp-q-instruction-block strong { color: #1a1a2e; }
.rp-q-instruction-block:first-child { margin-top: 0; }

/* ── List / table ─────────────────────────────────────────────────────────── */
.rp-q-list {
    background: #fff;
    border: 1.5px solid #c8d4de;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.7;
}
.rp-q-table-wrap           { overflow-x:auto; margin-bottom:14px; }
.rp-q-table-wrap table     { width:100%; border-collapse:collapse; font-size:13px; line-height:1.5; }
.rp-q-table-wrap th        { background:#1a1a2e; color:#fff; padding:8px 12px; text-align:left; font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.4px; }
.rp-q-table-wrap td        { border:1px solid #ddd; padding:8px 12px; vertical-align:top; background:#fff; }
.rp-q-table-wrap tr:nth-child(even) td { background:#f8f9fa; }
.rp-q-table-wrap td input.rp-text-input { width: 280px; }

/* ── Question number ──────────────────────────────────────────────────────── */
.rp-q-num {
    display: inline-block;
    min-width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 8px;
}
.rp-q-stem {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

/* ── MCQ ──────────────────────────────────────────────────────────────────── */
.rp-mcq-row  { display:flex; align-items:flex-start; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.rp-options  { display:flex; flex-direction:column; gap:6px; padding-left:4px; }
.rp-option   {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid #d0d8e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all .12s;
    line-height: 1.5;
}
.rp-option:hover             { border-color:#1a73e8; background:#f0f6ff; }
.rp-option input             { margin-top:2px; accent-color:#1a73e8; flex-shrink:0; }
.rp-option-letter            { font-weight:700; color:#1a1a2e; min-width:16px; flex-shrink:0; }
.rp-option-text              { color:#333; }
.rp-option-correct           { border-color:#34a853; background:#e8f5e9; }
.rp-option input:checked ~ .rp-option-letter { color:#1a73e8; }

/* ── True/False/NG ────────────────────────────────────────────────────────── */
.rp-tfng-row   { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
.rp-tfng-btns  { display:flex; gap:6px; flex-wrap:wrap; margin-top:2px; }
.rp-tfng-btn   {
    border: 1.5px solid #c8d4de;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
}
.rp-tfng-btn:hover { border-color:#1a73e8; background:#f0f6ff; }
.rp-tfng-btn input { display:none; }
.rp-tfng-btn:has(input:checked) { background:#1a73e8; border-color:#1a73e8; color:#fff; }

/* ── Text completion ──────────────────────────────────────────────────────── */
.rp-completion-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.rp-text-input {
    border: 1.5px solid #aab8c4;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    width: 280px;
    outline: none;
    transition: border-color .12s;
    background: #fff;
}
.rp-text-input:focus { border-color:#1a73e8; box-shadow:0 0 0 2px rgba(26,115,232,.15); }
.rp-text-input[readonly] { background:#f5f5f5; color:#666; }

.rp-correct-inline {
    font-size: 12px;
    color: #34a853;
    font-weight: 600;
    align-self: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRAG-AND-DROP
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tile pool */
.rp-dnd-tile-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 6px;
}

/* Letter-only tile — compact square */
.rp-dnd-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 5px 10px;
    border: 1.5px solid #888;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: grab;
    user-select: none;
    transition: box-shadow .12s, opacity .12s;
    white-space: nowrap;
    line-height: 1.4;
}
.rp-dnd-tile:hover    { box-shadow: 0 2px 8px rgba(0,0,0,.2); border-color:#333; }
.rp-dnd-tile.dragging { opacity: .4; }
.rp-dnd-tile.rp-dnd-placed { cursor:default; border-color:#1a73e8; background:#eef4ff; }

/* Options description box — shown above tiles for matching questions */
.rp-dnd-options-box {
    border: 1.5px solid #bbb;
    border-radius: 6px;
    padding: 10px 16px 8px;
    margin: 10px 0 6px;
    background: #fafafa;
    display: inline-block;
    min-width: 260px;
    max-width: 420px;
}
.rp-dnd-box-title {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 8px;
    color: #1a1a1a;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}
.rp-dnd-box-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 2px 0;
    font-size: 0.88rem;
    line-height: 1.5;
}
.rp-dnd-box-letter {
    font-weight: 800;
    min-width: 18px;
    color: #1a1a1a;
}
.rp-dnd-box-desc {
    color: #333;
}

/* Drop zone */
.rp-dnd-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.rp-dnd-dropzone {
    min-width: 52px;
    min-height: 32px;
    border: 2px dashed #aaa;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    transition: border-color .15s, background .15s;
    position: relative;
    cursor: pointer;
}
.rp-dnd-dropzone.rp-dnd-over {
    border-color: #1a73e8;
    background: #eef4ff;
    border-style: dashed;
}
.rp-dnd-dropzone.rp-dnd-filled {
    border-style: solid;
    border-color: #1a73e8;
    background: #eef4ff;
}
.rp-dnd-dropzone.rp-dnd-submitted {
    border-style: solid;
    border-color: #34a853;
    background: #e8f5e9;
    cursor: default;
}
/* The question number placeholder inside an empty drop zone */
.rp-dnd-placeholder {
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    padding: 2px 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTENING LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-listening-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 52px - 48px);
    min-height: 400px;
    overflow: hidden;
}
.rp-audio-bar {
    background: #1e2a3a;
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.rp-section-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.rp-audio-el      { flex: 1; height: 36px; }
.rp-audio-warn    { font-size: 11px; color: #ffcc00; white-space: nowrap; }

/* Split: sticky map left, scrolling questions right */
.rp-listening-split {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Map/image pane — sticky (does not scroll) */
.rp-listening-map-pane {
    width: 50%;
    min-width: 220px;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    overflow: hidden; /* the pane itself doesn't scroll */
    flex-shrink: 0;
}
.rp-listening-map-label {
    background: #1e2a3a;
    color: #fff;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.rp-listening-map-content {
    flex: 1;
    overflow: auto; /* allow zoom/pan on very large maps */
    padding: 12px;
    background: #fafafa;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.rp-listening-map-content img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Support inline diagrams / SVG / tables in passage */
.rp-listening-map-content table {
    border-collapse: collapse;
    font-size: 12px;
    width: 100%;
}
.rp-listening-map-content td,
.rp-listening-map-content th {
    border: 1px solid #ccc;
    padding: 5px 8px;
}

/* Questions pane — scrolls independently */
.rp-listening-q-pane {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}
.rp-listening-qs { padding: 16px; }

/* Full-width questions (no map) */
.rp-questions-panel  { flex: 1; overflow-y: auto; }
.rp-generic-layout   { padding: 16px; max-width: 720px; margin: 0 auto; }

/* ── Inline listening notes (subheadings + context between questions) ── */
.rp-listening-notes-inline {
    margin: 16px 16px 4px 16px;
    padding: 10px 14px;
    background: #f0f4ff;
    border-left: 4px solid #4a6fa5;
    border-radius: 0 6px 6px 0;
}
/* Main title e.g. "VICTOR HUGO", "ELEPHANT TRANSLOCATION" */
.rp-lnotes-title {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #1a2744;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: inherit;
}
/* Subheading e.g. "His early career", "His house on Guernsey" */
.rp-lnotes-subheading {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e3a6b;
    margin-top: 4px;
    margin-bottom: 2px;
    font-family: inherit;
}
/* Context bullet e.g. "• Victor Hugo lived in this house until..." */
.rp-lnotes-bullet {
    font-size: 0.9rem;
    font-weight: 500;
    color: #3a4a6b;
    margin-left: 8px;
    line-height: 1.6;
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WRITING LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-writing-section        { display:flex; flex-direction:column; flex:1; }
.rp-writing-section-hidden { display:none; }

.rp-writing-prompt {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.75;
    color: #2c3e50;
    border-bottom: 1px solid #e8ecf0;
}
.rp-writing-task-text {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
    color: #1a1a2e;
    background: #f8f9fa;
    border-bottom: 1px solid #e8ecf0;
}

/* IDP-style writing textarea */
.rp-idp-textarea {
    flex: 1;
    width: 100%;
    min-height: calc(100vh - 52px - 48px - 32px - 80px); /* fill all available vertical space */
    border: 1px solid #ccc;
    border-radius: 0;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.8;
    color: #222;
    resize: vertical;
    outline: none;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}
.rp-idp-textarea:focus { border-color:#1a73e8; }
.rp-idp-textarea[readonly] { background:#f9f9f9; color:#555; }

/* IDP word-count bar — bottom-right of right pane */
.rp-wc-bar {
    display: flex;
    justify-content: flex-end;
    padding: 6px 14px;
    background: #f8f9fb;
    border-top: 1px solid #e0e6ed;
    font-size: 12px;
    color: #555;
    flex-shrink: 0;
}
.rp-wc-count { font-weight: 600; color: #333; }

/* Writing action bar — hidden, buttons moved into bottombar */
.rp-writing-actions { display: none !important; }
.rp-writing-bottombar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.rp-writing-wc-summary { font-size:12px; color:#666; flex:1; }
.rp-btn-writing {
    padding: 9px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s;
}
.rp-btn-writing:disabled { opacity:.5; cursor:not-allowed; }
.rp-btn-teacher { background:#1a4a6b; color:#fff; }
.rp-btn-teacher:hover { background:#153a55; }
.rp-btn-ai { background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; }
.rp-btn-ai:hover { opacity:.9; }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-bottombar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 48px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 16px;
    z-index: 1000;
}
.rp-section-indicators { display:flex; gap:6px; flex-wrap:nowrap; overflow-x:auto; }
.rp-section-dot {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,.3);
    background: transparent;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
    transition: all .12s;
}
.rp-section-dot:hover  { border-color:rgba(255,255,255,.7); color:#fff; }
.rp-section-dot.active { background:#1a73e8; border-color:#1a73e8; color:#fff; }

/* IDP-style nav arrows */
.rp-nav-arrows { display:flex; gap:0; flex-shrink:0; }
.rp-arrow-btn {
    width: 44px;
    height: 36px;
    background: #2d3a4f;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rp-arrow-btn:first-child { border-radius:4px 0 0 4px; border-right:1px solid #1a1a2e; }
.rp-arrow-btn:last-child  { border-radius:0 4px 4px 0; }
.rp-arrow-btn:hover:not(:disabled) { background:#3d4f68; }
.rp-arrow-btn:disabled { opacity:.35; cursor:not-allowed; }

/* ═══════════════════════════════════════════════════════════════════════════
   HIGHLIGHT TOOL
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-highlight-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1e2a3a;
    border-bottom: 1px solid #2d3f55;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.rp-hl-label { color:#aaa; font-size:11px; }
.rp-hl-btn   { border:none; cursor:pointer; padding:3px 10px; border-radius:3px; font-size:11px; font-weight:600; transition:opacity .12s; }
.rp-hl-btn:hover  { opacity:.8; }
.rp-hl-btn.active { box-shadow:0 0 0 2px #fff; }
.rp-hl-yellow { background:#ffe066; color:#333; }
.rp-hl-green  { background:#6fcf97; color:#fff; }
.rp-hl-blue   { background:#56b4e9; color:#fff; }
.rp-hl-pink   { background:#f4a0c6; color:#333; }
.rp-hl-clear  { background:#555; color:#fff; }
.rp-hl-yellow-applied { background:#ffe066; color:#000; border-radius:2px; padding:0 1px; }
.rp-hl-green-applied  { background:#6fcf97; color:#000; border-radius:2px; padding:0 1px; }
.rp-hl-blue-applied   { background:#56b4e9; color:#000; border-radius:2px; padding:0 1px; }
.rp-hl-pink-applied   { background:#f4a0c6; color:#000; border-radius:2px; padding:0 1px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-results-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.rp-results-box { background:#fff; border-radius:14px; padding:48px; max-width:420px; width:95%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.rp-results-icon { font-size:56px; margin-bottom:16px; }
.rp-results-box h2 { font-size:24px; margin:0 0 20px; color:#1a1a2e; }
.rp-result-band  { font-size:72px; font-weight:900; color:#1a73e8; line-height:1; margin:10px 0; }
.rp-result-raw   { font-size:18px; color:#666; margin-bottom:8px; }
.rp-result-label { font-size:12px; color:#aaa; text-transform:uppercase; letter-spacing:1px; }

/* ═══════════════════════════════════════════════════════════════════════════
   AI EVALUATION REPORT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-eval-overlay  { position:fixed; inset:0; background:rgba(0,0,0,.72); z-index:99999; display:flex; align-items:flex-start; justify-content:center; padding:20px; overflow-y:auto; }
.rp-eval-modal    { background:#fff; border-radius:12px; max-width:800px; width:100%; margin:auto; box-shadow:0 20px 60px rgba(0,0,0,.3); overflow:hidden; }
.rp-eval-header   { background:linear-gradient(135deg,#1a1a2e,#16213e); color:#fff; padding:22px 28px; display:flex; justify-content:space-between; align-items:flex-start; }
.rp-eval-header h2 { margin:0 0 4px; font-size:1.3rem; }
.rp-eval-header p  { margin:0; opacity:.7; font-size:12px; }
.rp-eval-close     { background:rgba(255,255,255,.15); border:none; color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.rp-eval-body      { padding:22px 28px; }
.rp-eval-overall   { text-align:center; padding:18px; background:#f0f6ff; border-radius:8px; margin-bottom:22px; }
.rp-eval-overall .rp-band-big { font-size:3.8rem; font-weight:900; color:#1a4a6b; line-height:1; }
.rp-eval-overall p { margin:4px 0 0; color:#666; font-size:13px; }
.rp-eval-task      { margin-bottom:24px; }
.rp-eval-task h3   { font-size:1.05rem; color:#1a1a2e; margin:0 0 10px; padding-bottom:7px; border-bottom:2px solid #e0e6ed; display:flex; justify-content:space-between; align-items:center; }
.rp-task-band      { background:#1a4a6b; color:#fff; padding:2px 12px; border-radius:16px; font-size:.85rem; }
.rp-criterion      { background:#f8f9fb; border-radius:6px; padding:12px 14px; margin-bottom:8px; border-left:4px solid #ddd; }
.rp-criterion.band-high { border-left-color:#46b450; }
.rp-criterion.band-mid  { border-left-color:#ffb900; }
.rp-criterion.band-low  { border-left-color:#e74c3c; }
.rp-criterion-header    { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.rp-criterion-name      { font-weight:700; font-size:12px; color:#333; }
.rp-criterion-band      { font-weight:900; font-size:1.15rem; color:#1a4a6b; }
.rp-criterion-bar       { height:5px; background:#e0e6ed; border-radius:3px; margin-bottom:8px; overflow:hidden; }
.rp-criterion-bar-fill  { height:100%; border-radius:3px; transition:width .5s; }
.rp-criterion-details   { font-size:11px; }
.rp-criterion-details .rp-strengths  { color:#27ae60; margin-bottom:3px; }
.rp-criterion-details .rp-weaknesses { color:#e74c3c; margin-bottom:3px; }
.rp-criterion-details .rp-advice     { color:#555; font-style:italic; }
.rp-criterion-details ul { margin:2px 0 5px 14px; padding:0; }
.rp-criterion-details li { margin-bottom:2px; }
.rp-eval-summary { background:#fff8e1; border:1.5px solid #ffe082; border-radius:7px; padding:14px; margin-bottom:14px; }
.rp-eval-summary h4 { margin:0 0 7px; color:#e65100; font-size:13px; }
.rp-eval-priorities { list-style:none; margin:0; padding:0; }
.rp-eval-priorities li { padding:5px 0 5px 22px; position:relative; font-size:12px; border-bottom:1px solid rgba(0,0,0,.05); }
.rp-eval-priorities li:before { content:"→"; position:absolute; left:0; color:#e65100; font-weight:700; }
.rp-eval-footer { padding:14px 28px; background:#f8f9fb; border-top:1px solid #e0e6ed; display:flex; gap:10px; justify-content:flex-end; }
.rp-btn-save-pdf  { background:#e74c3c; color:#fff; border:none; padding:9px 18px; border-radius:5px; cursor:pointer; font-weight:700; font-size:13px; }
.rp-btn-close-eval{ background:#555; color:#fff; border:none; padding:9px 18px; border-radius:5px; cursor:pointer; font-weight:700; font-size:13px; }

.rp-hl-toolbar-listening {
    background: #1e2a3a;
    border-bottom: 1px solid #2d3f55;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}
/* responsive */
@media (max-width: 720px) {
    .rp-listening-split    { flex-direction: column; }
    .rp-listening-map-pane { width: 100%; max-width: 100%; border-right: none; border-bottom: 1px solid #ddd; max-height: 45vh; overflow-y: auto; }
    .rp-split-pane         { flex-direction: column; height: auto; }
    .rp-pane-left          { width: 100%; border-right: none; border-bottom: 1px solid #ddd; max-height: 40vh; }
    .rp-pane-divider       { display: none; }
    .rp-test-title         { max-width: 130px; font-size: 11px; }
    .rupielts-tests-grid   { grid-template-columns: 1fr 1fr; }
    .rp-start-box          { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPEAKING TEST
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-speaking-layout {
    width: 100%;
    box-sizing: border-box;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rp-speaking-part-header {
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
    padding: 10px 16px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.rp-speaking-part-label { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.rp-speaking-part-tip   { font-size: 12px; color: #666; }

/* Cue card (Part 2) */
.rp-speaking-cue-card {
    background: #fffde7;
    border: 2px solid #ffe082;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.rp-cue-card-label { font-weight: 700; font-size: 12px; color: #f57c00; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.rp-cue-card-body  { font-size: 14px; line-height: 1.75; color: #2c3e50; }

/* Individual speaking question */
.rp-speaking-question {
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.rp-speaking-q-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.rp-speaking-q-text { font-size: 14px; color: #1a1a2e; font-weight: 600; line-height: 1.6; }

/* Recorder controls */
.rp-recorder { }
.rp-recorder-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rp-rec-btn {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rp-rec-start  { background: #1a73e8; color: #fff; }
.rp-rec-start:hover:not(:disabled) { background: #1558b0; }
.rp-rec-start:disabled { opacity: .45; cursor: not-allowed; }
.rp-rec-stop   { background: #dc3232; color: #fff; animation: rp-pulse 1s infinite; }
.rp-rec-stop:hover { opacity: .85; }

.rp-rec-status {
    font-size: 12px;
    color: #666;
    flex: 1;
}
.rp-rec-status.recording { color: #dc3232; font-weight: 600; }
.rp-rec-status.done      { color: #34a853; font-weight: 600; }
.rp-rec-status.no-support { color: #e65100; }

.rp-rec-timer {
    font-size: 13px;
    font-weight: 700;
    color: #dc3232;
    font-variant-numeric: tabular-nums;
    min-width: 44px;
}

/* Transcript area */
.rp-transcript-wrap { }
.rp-transcript-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.rp-transcript-note { font-weight: 400; color: #999; }
.rp-transcript-area {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100px;
    box-sizing: border-box;
    border: 1.5px solid #c8d4de;
    border-radius: 5px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    font-family: inherit;
    color: #333;
    resize: vertical;
    outline: none;
    transition: border-color .12s;
    background: #fff;
}
.rp-transcript-area:focus  { border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,.12); }
.rp-transcript-area[readonly] { background: #f9f9f9; color: #555; }
.rp-transcript-area.live   { border-color: #dc3232; background: #fff8f8; }

.rp-transcript-wc { font-size: 11px; color: #999; text-align: right; margin-top: 3px; }

/* AI eval bar (per section) */
.rp-speaking-eval-bar {
    padding: 12px 0;
    display: flex;
    justify-content: flex-end;
}
.rp-btn-speaking-eval {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .15s;
}
.rp-btn-speaking-eval:hover    { opacity: .9; }
.rp-btn-speaking-eval:disabled { opacity: .5; cursor: not-allowed; }

/* ─ Speaking Eval Report Modal ─ */
.rp-spk-eval-overlay { position:fixed; inset:0; background:rgba(0,0,0,.72); z-index:99999; display:flex; align-items:flex-start; justify-content:center; padding:20px; overflow-y:auto; }
.rp-spk-eval-modal   { background:#fff; border-radius:12px; max-width:760px; width:100%; margin:auto; box-shadow:0 20px 60px rgba(0,0,0,.3); overflow:hidden; }
.rp-spk-eval-header  { background:linear-gradient(135deg,#1a1a2e,#16213e); color:#fff; padding:20px 26px; display:flex; justify-content:space-between; align-items:flex-start; }
.rp-spk-eval-header h2 { margin:0 0 3px; font-size:1.2rem; }
.rp-spk-eval-header p  { margin:0; opacity:.7; font-size:12px; }
.rp-spk-eval-close   { background:rgba(255,255,255,.15); border:none; color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:16px; }
.rp-spk-eval-body    { padding:20px 26px; }
.rp-spk-part         { margin-bottom:22px; }
.rp-spk-part h3      { font-size:1rem; color:#1a1a2e; margin:0 0 10px; padding-bottom:6px; border-bottom:2px solid #e0e6ed; display:flex; justify-content:space-between; align-items:center; }
.rp-spk-eval-footer  { padding:12px 26px; background:#f8f9fb; border-top:1px solid #e0e6ed; display:flex; gap:10px; justify-content:flex-end; }

/* ── Audio Playback (after recording) ────────────────────────────────────── */
.rp-playback-wrap {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f0f6ff;
    border: 1.5px solid #c2d8f8;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.rp-playback-label {
    font-size: 12px;
    font-weight: 600;
    color: #1a4a6b;
    white-space: nowrap;
}
.rp-playback-audio {
    flex: 1;
    min-width: 200px;
    height: 36px;
}
.rp-playback-delete {
    background: none;
    border: 1px solid #c8342a;
    color: #c8342a;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
}
.rp-playback-delete:hover {
    background: #c8342a;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN / REGISTER PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.rupielts-auth-panel {
    max-width: 440px;
    margin: 48px auto;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
}

/* Tabs */
.rp-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e0e6ed;
}
.rp-auth-tab {
    flex: 1;
    padding: 14px;
    background: #f8f9fa;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all .15s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.rp-auth-tab:hover  { color: #1a1a2e; background: #f0f4f8; }
.rp-auth-tab.active { background: #fff; color: #1a73e8; border-bottom-color: #1a73e8; }

/* Box content */
.rp-auth-box {
    padding: 28px 32px 32px;
}
.rp-auth-intro {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 20px;
}

/* Login button */
.rp-auth-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity .15s;
    box-sizing: border-box;
}
.rp-btn-login    { background: #1a1a2e; color: #fff; }
.rp-btn-login:hover { opacity: .85; text-decoration: none; color: #fff; }
.rp-btn-register { background: #1a73e8; color: #fff; margin-top: 6px; }
.rp-btn-register:hover:not(:disabled) { opacity: .88; }
.rp-btn-register:disabled { opacity: .5; cursor: not-allowed; }

.rp-auth-sub {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 14px 0 0;
}
.rp-auth-sub a { color: #1a73e8; }

/* Register form */
.rp-reg-field {
    margin-bottom: 14px;
}
.rp-reg-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.rp-req      { color: #e74c3c; }
.rp-optional { color: #aaa; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.rp-reg-field input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #c8d4de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    outline: none;
    transition: border-color .12s;
    box-sizing: border-box;
}
.rp-reg-field input:focus { border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,.12); }

/* Feedback messages */
.rp-reg-success {
    background: #e8f5e9;
    border: 1.5px solid #a5d6a7;
    border-radius: 7px;
    padding: 14px 16px;
    font-size: 13px;
    color: #2e7d32;
    line-height: 1.6;
    margin-bottom: 16px;
}
.rp-reg-error {
    background: #fdecea;
    border: 1.5px solid #f5c6c2;
    border-radius: 7px;
    padding: 12px 16px;
    font-size: 13px;
    color: #c62828;
    margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUESTION NAVIGATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-qnum-toggle {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
    flex-shrink: 0;
}
.rp-qnum-toggle:hover { background: rgba(255,255,255,.22); }

.rp-qnav-panel {
    position: fixed;
    bottom: 48px;
    left: 0; right: 0;
    background: #fff;
    border-top: 2px solid #1a1a2e;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
    max-height: 55vh;
    overflow-y: auto;
}
.rp-qnav-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: #1a1a2e;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: wrap;
}
.rp-qnav-title  { font-weight: 700; font-size: 13px; }
.rp-qnav-legend { display:flex; gap:14px; font-size:11px; color:rgba(255,255,255,.7); flex:1; flex-wrap:wrap; }
.rp-qnav-leg    { display:flex; align-items:center; gap:5px; }
.rp-qnav-close  {
    background: rgba(255,255,255,.15); border: none; color: #fff;
    padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.rp-qnav-close:hover { background: rgba(255,255,255,.28); }

.rp-qnav-grid { padding: 14px 16px; display:flex; flex-wrap:wrap; gap:16px; }

.rp-qnav-section-group { }
.rp-qnav-sec-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    margin-bottom: 8px;
}
.rp-qnav-nums { display:flex; flex-wrap:wrap; gap:6px; }

.rp-qnav-num {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 1.5px solid #c8d4de;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    transition: all .12s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rp-qnav-num:hover          { border-color: #1a73e8; background: #f0f6ff; }
.rp-qnav-num.rp-qnav-answered   { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.rp-qnav-num.rp-qnav-current    { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.rp-qnav-num.rp-qnav-unanswered { background: #fff; color: #444; border-color: #c8d4de; }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.rupielts-dashboard { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }

.rp-dash-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #1a1a2e;
    color: #fff;
    padding: 20px 24px;
    border-radius: 10px;
    margin-bottom: 24px;
}
.rp-dash-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #1a73e8;
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rp-dash-name { margin:0 0 4px; font-size:18px; }
.rp-dash-sub  { margin:0; font-size:12px; color:rgba(255,255,255,.6); }

.rp-dash-empty { text-align:center; padding:60px 20px; }
.rp-dash-empty-icon { font-size:52px; margin-bottom:12px; }
.rp-dash-empty h3   { font-size:18px; color:#1a1a2e; margin:0 0 8px; }
.rp-dash-empty p    { color:#888; margin:0 0 20px; }
.rp-dash-btn        { background:#1a73e8; color:#fff; padding:10px 24px; border-radius:6px; text-decoration:none; font-weight:700; font-size:14px; }
.rp-dash-btn:hover  { background:#1558b0; text-decoration:none; color:#fff; }

.rp-dash-skill-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.rp-dash-skill-card {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.rp-dash-skill-icon { font-size: 26px; margin-bottom: 4px; }
.rp-dash-skill-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #888; margin-bottom: 8px; }
.rp-dash-band-big   { font-size: 40px; font-weight: 900; line-height: 1; }
.rp-dash-band-none  { color: #ddd !important; }
.rp-dash-band-sub   { font-size: 11px; color: #888; margin-top: 2px; }
.rp-dash-band-avg   { font-size: 11px; color: #aaa; margin-top: 4px; }

.rp-dash-card       { background:#fff; border:1px solid #e0e6ed; border-radius:10px; padding:20px 24px; margin-bottom:20px; box-shadow:0 1px 6px rgba(0,0,0,.06); }
.rp-dash-card-title { margin:0 0 16px; font-size:15px; color:#1a1a2e; padding-bottom:10px; border-bottom:1px solid #eee; }

.rp-dash-table-wrap { overflow-x: auto; }
.rp-dash-table      { width:100%; border-collapse:collapse; font-size:13px; }
.rp-dash-table th   { background:#f8f9fa; text-align:left; padding:9px 12px; font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:#666; border-bottom:2px solid #e0e6ed; white-space:nowrap; }
.rp-dash-table td   { padding:10px 12px; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.rp-dash-table tr:last-child td { border-bottom:none; }
.rp-dash-table tr.rp-row-inprogress td { background:#fffde7; }
.rp-dash-table tr:hover td { background:#f8f9fa; }

.rp-dash-test-name   { font-weight:600; color:#1a1a2e; }
.rp-dash-date        { color:#888; white-space:nowrap; }
.rp-dash-time        { color:#888; white-space:nowrap; font-variant-numeric:tabular-nums; }
.rp-dash-raw         { font-weight:600; color:#444; }
.rp-dash-skill-tag   { display:inline-block; padding:3px 8px; border-radius:10px; font-size:10px; font-weight:700; color:#fff; text-transform:uppercase; white-space:nowrap; }
.rp-dash-band-pill   { display:inline-block; padding:4px 12px; border-radius:12px; font-size:14px; font-weight:900; color:#fff; }
.rp-band-pending     { background:#888; font-size:11px; font-weight:600; padding:4px 8px; }
.rp-dash-inprogress  { font-size:11px; color:#ea8600; font-weight:600; }
.rp-dash-review-btn  { display:inline-block; padding:5px 12px; background:#f0f6ff; color:#1a73e8; border-radius:4px; font-size:12px; font-weight:700; text-decoration:none; white-space:nowrap; border:1px solid #c2d8f8; }
.rp-dash-review-btn:hover { background:#1a73e8; color:#fff; text-decoration:none; }

@media (max-width:720px) {
    .rp-dash-skill-cards { grid-template-columns: 1fr 1fr; }
}

/* Question flash highlight when jumping from nav */
@keyframes rp-q-flash {
    0%   { background: #fff3cd; }
    60%  { background: #fff3cd; }
    100% { background: transparent; }
}
.rp-q-highlight-flash { animation: rp-q-flash 1.2s ease; border-radius: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   USER BAR (tests listing page)
   ═══════════════════════════════════════════════════════════════════════════ */
.rp-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a1a2e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.rp-user-bar-left  { display:flex; align-items:center; gap:12px; }
.rp-user-bar-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.rp-user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #1a73e8;
    font-size: 16px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.rp-user-greeting { font-size: 13px; color: rgba(255,255,255,.9); }
.rp-user-sub      { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }

.rp-userbar-btn {
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.85);
    transition: all .12s;
    white-space: nowrap;
}
.rp-userbar-btn:hover         { border-color: rgba(255,255,255,.7); color: #fff; text-decoration: none; }
.rp-userbar-logout            { border-color: rgba(220,50,50,.5); color: rgba(255,150,150,.9); }
.rp-userbar-logout:hover      { background: #dc3232; border-color: #dc3232; color: #fff; }

@media (max-width: 560px) {
    .rp-user-bar { flex-direction: column; align-items: flex-start; }
    .rp-user-bar-right { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WP ADMIN BAR OFFSET + MOBILE OVERFLOW SAFETY
   ═══════════════════════════════════════════════════════════════════════════ */

/* When WP admin bar is present (logged-in admins), subtract its height */
.admin-bar .rp-topbar          { top: 32px; }
.admin-bar .rp-main            { margin-top: calc(52px + 32px); }
.admin-bar .rp-split-pane      { height: calc(100vh - 52px - 48px - 32px - 32px); }
.admin-bar .rp-listening-layout { height: calc(100vh - 52px - 48px - 32px); }
.admin-bar .rp-bottombar,
.admin-bar .rp-writing-actions { bottom: 0; }

@media (max-width: 782px) {
    /* WP admin bar shrinks to 46px on mobile */
    .admin-bar .rp-topbar           { top: 46px; }
    .admin-bar .rp-main             { margin-top: calc(52px + 46px); }
    .admin-bar .rp-split-pane       { height: calc(100vh - 52px - 48px - 46px - 32px); }
    .admin-bar .rp-listening-layout { height: calc(100vh - 52px - 48px - 46px); }
}

/* On very small screens, let listening/reading scroll naturally instead of clipping */
@media (max-width: 480px) {
    .rp-listening-layout,
    .rp-split-pane { height: auto; min-height: 0; overflow: visible; }
    .rp-listening-q-pane,
    .rp-pane-left,
    .rp-pane-right { overflow: visible; height: auto; max-height: none; }
    .rp-questions-panel { overflow: visible; }
}
