/* ===== TẠO ĐỀ THI — EduPass Design System ===== */
:root {
    --ep-green: #00c853;
    --ep-blue: #0288d1;
    --ep-dark: #1a1a2e;
    --ep-grad: linear-gradient(135deg, #0288d1 0%, #00c853 100%);
    --ep-grad-r: linear-gradient(135deg, #00c853 0%, #0288d1 100%);
    --ep-bg: linear-gradient(160deg, #f0fffe 0%, #e8f4ff 100%);
    --ep-card-shadow: 0 4px 24px rgba(2,136,209,0.10);
    --ep-radius: 20px;
}

/* ── Hero ── */
.tde-hero {
    background: linear-gradient(135deg, #0d1f3c 0%, #0288d1 50%, #00897b 100%);
    padding: 3.5rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.tde-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(0,200,83,.18) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(2,136,209,.2) 0%, transparent 50%);
    pointer-events: none;
}
.tde-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.tde-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #b2dfdb;
    font-size: .78rem;
    font-weight: 700;
    padding: .35rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: .4px;
}
.tde-hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 .75rem;
    text-shadow: 0 2px 16px rgba(0,0,0,.2);
    letter-spacing: -.5px;
}
.tde-hero-desc {
    color: rgba(255,255,255,.82);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 1.8rem;
    line-height: 1.65;
}
.tde-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.tde-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}
.tde-stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.tde-stat-lbl {
    font-size: .72rem;
    color: rgba(255,255,255,.7);
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.create-exam-page {
    background: var(--ep-bg);
    min-height: 100vh;
}
.create-exam-page > .container {
    padding-top: 2.5rem;
    padding-bottom: 6rem;
}

/* ── Layout ── */
.exam-creator-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

/* ── Creator Cards ── */
.creator-card {
    background: white;
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-card-shadow);
    margin-bottom: 1.8rem;
    overflow: hidden;
    border: 1px solid rgba(2,136,209,0.08);
    transition: box-shadow 0.25s;
}

.creator-card:hover {
    box-shadow: 0 8px 32px rgba(2,136,209,0.16);
}

.card-header {
    background: var(--ep-grad);
    color: white;
    padding: 1.2rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card-icon { font-size: 1.6rem; }

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-body { padding: 1.8rem; }

/* ── Form Elements ── */
.form-group { margin-bottom: 1.4rem; }

.form-group label {
    display: block;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}

.required { color: #e53935; }
.optional { color: #90a4ae; font-weight: 400; font-size: 0.82rem; }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0eaf0;
    border-radius: 12px;
    font-size: 0.97rem;
    font-family: inherit;
    background: #f8fbff;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1a2a3a;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ep-blue);
    box-shadow: 0 0 0 3px rgba(2,136,209,0.12);
    background: white;
}

.form-input::placeholder,
.form-textarea::placeholder { color: #b0bec5; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Tabs ── */
.create-method-tabs {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    background: #f0f6ff;
    padding: 0.4rem;
    border-radius: 14px;
}

.tab-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #5a7a8a;
    transition: all 0.2s;
}

.tab-btn:hover { background: rgba(2,136,209,0.08); color: var(--ep-blue); }

.tab-btn.active {
    background: var(--ep-grad);
    color: white;
    box-shadow: 0 3px 12px rgba(2,136,209,0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInTab 0.25s ease; }

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Add Question Button ── */
.btn-add-question {
    width: 100%;
    padding: 0.9rem;
    background: var(--ep-grad);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.2rem;
    box-shadow: 0 3px 14px rgba(2,136,209,0.25);
}

.btn-add-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2,136,209,0.35);
}

/* ── Questions List ── */
.questions-list { display: flex; flex-direction: column; gap: 1rem; }

.empty-state {
    text-align: center;
    color: #90a4ae;
    padding: 2rem;
    font-style: italic;
    background: #f8fbff;
    border-radius: 12px;
    border: 2px dashed #cde;
}

.question-card {
    background: #f8fbff;
    border: 2px solid #e0eaf0;
    border-radius: 14px;
    padding: 1.4rem;
    position: relative;
    transition: all 0.2s;
}

.question-card:hover {
    border-color: var(--ep-blue);
    box-shadow: 0 4px 16px rgba(2,136,209,0.12);
}

.question-number {
    position: absolute;
    top: -12px;
    left: 1rem;
    background: var(--ep-grad);
    color: white;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.82rem;
}

.question-text {
    font-weight: 600;
    color: #1a2a3a;
    margin-bottom: 0.8rem;
    padding-top: 0.4rem;
}

.question-answers { display: grid; gap: 0.4rem; margin-bottom: 0.8rem; }

.answer-option {
    padding: 0.5rem 0.8rem;
    background: white;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #4a5568;
    border: 1px solid #e0eaf0;
}

.answer-option.correct {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid var(--ep-green);
    font-weight: 700;
    color: #1b5e20;
}

.question-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

.btn-edit, .btn-delete {
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-edit { background: linear-gradient(135deg, #0288d1, #42a5f5); color: white; }
.btn-edit:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(2,136,209,0.3); }
.btn-delete { background: linear-gradient(135deg, #e53935, #ef5350); color: white; }
.btn-delete:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(229,57,53,0.3); }

/* ── Radio Group ── */
.radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fbff;
    border: 2px solid #e0eaf0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.6rem;
}

.radio-label:hover { border-color: var(--ep-blue); background: #e8f4ff; }

.radio-label input[type="radio"] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--ep-blue); }
.radio-label input[type="radio"]:checked + span { font-weight: 700; color: var(--ep-blue); }
.radio-label span { font-size: 0.92rem; color: #4a5568; }

/* ── Toggle Switch ── */
.toggle-group { display: flex; flex-direction: column; gap: 0.8rem; }

.toggle-item {
    background: #f8fbff;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #e0eaf0;
}

.toggle-label { display: flex; align-items: center; cursor: pointer; gap: 0; }
.toggle-input { display: none; }

.toggle-slider {
    position: relative;
    width: 46px;
    height: 24px;
    background: #cfd8dc;
    border-radius: 12px;
    transition: background 0.25s;
    margin-right: 0.9rem;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-slider { background: var(--ep-blue); }
.toggle-input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-text { font-weight: 600; color: #1a2a3a; font-size: 0.92rem; }

/* ── Sidebar ── */
.creator-sidebar { position: relative; }

.action-card {
    background: white;
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-card-shadow);
    padding: 1.6rem;
    border: 1px solid rgba(2,136,209,0.08);
}

.action-card.sticky { position: sticky; top: 90px; }

.action-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a2a3a;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e8f4ff;
}

.action-buttons { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.6rem; }

.btn-action {
    padding: 0.85rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-preview {
    background: linear-gradient(135deg, #0288d1, #42a5f5);
    color: white;
    box-shadow: 0 3px 12px rgba(2,136,209,0.25);
}
.btn-preview:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(2,136,209,0.35); }

.btn-save {
    background: linear-gradient(135deg, #00897b, #00c853);
    color: white;
    box-shadow: 0 3px 12px rgba(0,200,83,0.2);
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,200,83,0.3); }

.btn-start {
    background: var(--ep-grad);
    color: white;
    box-shadow: 0 3px 12px rgba(2,136,209,0.3);
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(2,136,209,0.4); }

/* Summary */
.exam-summary { border-top: 2px solid #e8f4ff; padding-top: 1.2rem; }
.exam-summary h4 { font-size: 1rem; font-weight: 700; color: #1a2a3a; margin-bottom: 0.8rem; }

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f6ff;
    font-size: 0.9rem;
}
.summary-item:last-child { border-bottom: none; }
.summary-item span { color: #78909c; }
.summary-item strong { color: var(--ep-blue); font-weight: 700; }

/* Quick Tips */
.quick-tips { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 2px solid #e8f4ff; }
.quick-tips h4 { font-size: 0.95rem; font-weight: 700; color: #1a2a3a; margin-bottom: 0.8rem; }
.quick-tips ul { list-style: none; padding: 0; margin: 0; }

.quick-tips li {
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border-left: 3px solid var(--ep-green);
    border-radius: 8px;
    color: #1b5e20;
    font-size: 0.84rem;
    line-height: 1.5;
    transition: transform 0.2s;
}
.quick-tips li:hover { transform: translateX(4px); }
.quick-tips li:last-child { margin-bottom: 0; }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-container {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: slideUpModal 0.3s cubic-bezier(0.22,1,0.36,1);
}

@keyframes slideUpModal {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--ep-grad);
    color: white;
    padding: 1.3rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
}

.modal-header h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body { padding: 1.8rem; }

.answers-section { margin-top: 1.2rem; }
.answers-section > label {
    display: block;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 0.8rem;
    font-size: 0.92rem;
}

.answer-item {
    display: grid;
    grid-template-columns: 28px 28px 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.answer-item input[type="radio"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--ep-blue); }

.answer-label { font-weight: 700; color: var(--ep-blue); font-size: 1rem; }

.answer-input {
    padding: 0.7rem 0.9rem;
    border: 2px solid #e0eaf0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8fbff;
}
.answer-input:focus { outline: none; border-color: var(--ep-blue); box-shadow: 0 0 0 3px rgba(2,136,209,0.1); background: white; }

.hint-text { color: #90a4ae; font-size: 0.85rem; font-style: italic; margin-top: 0.8rem; }

.modal-footer {
    padding: 1.2rem 1.8rem;
    border-top: 2px solid #e8f4ff;
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.btn-cancel, .btn-confirm {
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel { background: #eceff1; color: #546e7a; }
.btn-cancel:hover { background: #cfd8dc; }

.btn-confirm { background: var(--ep-grad); color: white; box-shadow: 0 3px 12px rgba(2,136,209,0.25); }
.btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(2,136,209,0.35); }

/* ── Guide Section ── */
.guide-section {
    background: white;
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(2,136,209,0.08);
}

.guide-toggle {
    width: 100%;
    padding: 1.2rem 1.6rem;
    background: var(--ep-grad);
    color: white;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.2s;
}
.guide-toggle:hover { opacity: 0.92; }

.toggle-icon { font-size: 0.9rem; transition: transform 0.3s; }
.guide-toggle.active .toggle-icon { transform: rotate(180deg); }

.guide-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease; }
.guide-content.show { max-height: 2000px; }

.guide-steps { padding: 1.8rem; display: flex; flex-direction: column; gap: 1rem; }

.guide-step {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, #f0fffe, #e8f4ff);
    border-radius: 14px;
    border: 1px solid rgba(2,136,209,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.guide-step:hover { transform: translateX(6px); box-shadow: 0 4px 16px rgba(2,136,209,0.12); }

.step-number {
    min-width: 44px;
    height: 44px;
    background: var(--ep-grad);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(2,136,209,0.3);
    flex-shrink: 0;
}

.step-content h4 { color: #1a2a3a; font-size: 1rem; margin-bottom: 0.4rem; }
.step-content p { color: #4a5568; line-height: 1.6; margin: 0; font-size: 0.92rem; }
.step-content ul { margin: 0.4rem 0 0 1.2rem; color: #4a5568; }
.step-content li { margin-bottom: 0.25rem; line-height: 1.6; font-size: 0.92rem; }
.step-content strong { color: var(--ep-blue); }

.guide-notes {
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    padding: 1.6rem 1.8rem;
    border-top: 2px solid rgba(0,200,83,0.2);
}
.guide-notes h4 { color: #1b5e20; font-size: 1.1rem; margin-bottom: 0.8rem; }
.guide-notes ul { list-style: none; padding: 0; margin: 0; }
.guide-notes li {
    padding: 0.6rem 0;
    color: #2e7d32;
    font-size: 0.92rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(0,200,83,0.1);
}
.guide-notes li:last-child { border-bottom: none; }

/* ── AI Paste Section ── */
.ai-paste-section { display: flex; flex-direction: column; gap: 1.5rem; }

.ai-instructions {
    background: linear-gradient(135deg, #e3f2fd, #e8f5e9);
    padding: 1.6rem;
    border-radius: 16px;
    border: 2px solid rgba(2,136,209,0.2);
}
.ai-instructions h4 { color: #1a2a3a; font-size: 1.1rem; margin-bottom: 1.2rem; text-align: center; }

.instruction-steps { display: flex; flex-direction: column; gap: 1.2rem; }

.step { display: flex; gap: 1rem; align-items: flex-start; }
.step .step-number {
    min-width: 36px; height: 36px;
    background: var(--ep-grad);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem;
    box-shadow: 0 3px 10px rgba(2,136,209,0.25);
    flex-shrink: 0;
}
.step .step-content strong { display: block; color: #1a2a3a; margin-bottom: 0.3rem; font-size: 0.95rem; }
.step .step-content p { color: #5a7a8a; font-size: 0.88rem; margin: 0.3rem 0 0; }

.prompt-box {
    background: #1a2a3a;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.6rem;
    position: relative;
}
.btn-copy-prompt {
    position: absolute; top: 0.6rem; right: 0.6rem;
    background: var(--ep-blue); color: white; border: none;
    padding: 0.4rem 0.9rem; border-radius: 8px;
    cursor: pointer; font-size: 0.82rem; font-weight: 600;
    transition: all 0.2s;
}
.btn-copy-prompt:hover { background: #0277bd; transform: scale(1.04); }
.prompt-box pre {
    color: #b2dfdb; font-size: 0.82rem; line-height: 1.6;
    margin: 0; padding-right: 110px;
    white-space: pre-wrap; font-family: 'Courier New', monospace;
}

.ai-paste-area {
    background: white; padding: 1.6rem;
    border-radius: 16px; border: 2px solid #e0eaf0;
}
.ai-paste-area label { display: block; font-weight: 700; color: #1a2a3a; margin-bottom: 0.8rem; font-size: 1rem; }

.json-input {
    width: 100%; padding: 1rem;
    border: 2px solid #e0eaf0; border-radius: 12px;
    font-family: 'Courier New', monospace; font-size: 0.88rem;
    line-height: 1.6; resize: vertical; background: #f8fbff;
    transition: border-color 0.2s;
}
.json-input:focus { outline: none; border-color: var(--ep-blue); box-shadow: 0 0 0 3px rgba(2,136,209,0.1); background: white; }

.ai-actions { display: flex; gap: 0.8rem; margin-top: 1.2rem; }

.btn-validate {
    flex: 1; background: linear-gradient(135deg, #00897b, #00c853);
    color: white; padding: 0.85rem; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(0,200,83,0.2);
}
.btn-validate:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,200,83,0.3); }

.btn-clear-json {
    background: #eceff1; color: #546e7a; padding: 0.85rem 1.2rem;
    border: none; border-radius: 12px; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.btn-clear-json:hover { background: #cfd8dc; }

/* ── Saved Exams ── */
.saved-exams-section {
    margin: 0 0 2rem;
    padding: 1.8rem;
    background: white;
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-card-shadow);
    border: 1px solid rgba(2,136,209,0.08);
}
.saved-exams-section .section-header { text-align: center; margin-bottom: 1.5rem; }
.saved-exams-section .section-header h2 { color: #1a2a3a; font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; }
.saved-exams-section .section-header p { color: #78909c; font-size: 0.92rem; }

.saved-exams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }

.saved-exam-card {
    background: linear-gradient(135deg, #f0fffe, #e8f4ff);
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 2px 12px rgba(2,136,209,0.08);
    transition: all 0.25s;
    cursor: pointer;
    border-left: 4px solid var(--ep-blue);
    border: 1px solid rgba(2,136,209,0.15);
    border-left: 4px solid var(--ep-blue);
}
.saved-exam-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(2,136,209,0.18); }

.saved-exam-title { font-size: 1rem; font-weight: 700; color: #1a2a3a; margin-bottom: 0.5rem; }
.saved-exam-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; font-size: 0.85rem; color: #5a7a8a; }
.saved-exam-meta span { display: flex; align-items: center; gap: 0.3rem; background: white; padding: 0.25rem 0.7rem; border-radius: 20px; border: 1px solid #e0eaf0; }
.saved-exam-date { font-size: 0.8rem; color: #90a4ae; margin-top: 0.4rem; }

.saved-exam-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.btn-start-saved {
    flex: 1; background: var(--ep-grad); color: white; border: none;
    padding: 0.6rem; border-radius: 10px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-size: 0.88rem;
}
.btn-start-saved:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(2,136,209,0.3); }

.btn-delete-saved {
    background: linear-gradient(135deg, #e53935, #ef5350); color: white; border: none;
    padding: 0.6rem 1rem; border-radius: 10px; cursor: pointer; transition: all 0.2s; font-size: 0.88rem;
}
.btn-delete-saved:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(229,57,53,0.3); }

/* ── Mobile Floating Bar ── */
.mobile-action-bar { display: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .exam-creator-layout { grid-template-columns: 1fr; }
    .action-card.sticky { position: relative; top: 0; }
}

@media (max-width: 768px) {
    .create-exam-page { padding: 1.5rem 0 90px; }
    .page-title h1 { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .radio-group { grid-template-columns: 1fr 1fr; }
    .card-body { padding: 1.2rem; }
    .card-header { padding: 1rem 1.2rem; }
    .creator-sidebar { display: none; }
    .quick-tips { display: none; }

    .mobile-action-bar {
        display: flex;
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(2,136,209,0.15);
        padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
        gap: 0.6rem;
        box-shadow: 0 -4px 20px rgba(2,136,209,0.12);
    }
    .mobile-action-bar .btn-action { flex: 1; padding: 0.75rem 0.4rem; font-size: 0.82rem; min-height: 44px; border-radius: 10px; }

    .modal-container {
        width: 100%; max-width: 100%; border-radius: 20px 20px 0 0;
        position: fixed; bottom: 0; left: 0; right: 0; margin: 0; max-height: 95dvh;
    }
    .modal-overlay { align-items: flex-end; }
    .modal-header { border-radius: 20px 20px 0 0; }
    .modal-footer { flex-direction: row; }
    .btn-cancel, .btn-confirm { flex: 1; min-height: 44px; }

    .guide-step { flex-direction: column; gap: 0.8rem; }
    .step-number { min-width: 38px; height: 38px; font-size: 1rem; }
    .ai-actions { flex-direction: column; }
    .prompt-box pre { padding-right: 0; font-size: 0.78rem; }
    .btn-copy-prompt { position: static; width: 100%; margin-bottom: 0.5rem; }
}

@media (max-width: 480px) {
    .radio-group { grid-template-columns: 1fr; }
    .create-method-tabs { flex-direction: column; }
    .saved-exams-grid { grid-template-columns: 1fr; }
    .page-title h1 { font-size: 1.35rem; }
    .tde-hero { padding: 2rem 0 1.8rem; }
    .tde-hero-title { font-size: 1.5rem; }
    .tde-hero-stats { gap: 1.2rem; }
    .tde-stat-num { font-size: 1.4rem; }
}

/* ===== QUESTION IMAGE ===== */
.qi-tabs { display:flex; gap:.3rem; margin-bottom:.45rem; }
.qi-tab {
    background:#f0f4ff; color:#0288d1;
    border:1.5px solid #e0eaf0; border-radius:8px;
    padding:.28rem .75rem; font-size:.75rem; font-weight:700;
    cursor:pointer; transition:all .15s; font-family:inherit;
}
.qi-tab.active { background:#0288d1; color:#fff; border-color:#0288d1; }
.qi-tab:hover:not(.active) { background:#e0eaf0; }

.qi-pick-btn {
    width:100%; background:#f0f4ff; color:#0288d1;
    border:1.5px dashed #b3d4f0; border-radius:10px;
    padding:.5rem 1rem; font-size:.83rem; font-weight:600;
    cursor:pointer; transition:all .2s; font-family:inherit;
    text-align:center;
}
.qi-pick-btn:hover { background:#e0eaf0; border-color:#0288d1; }

/* Hiển thị ảnh trong question-card */
.question-img {
    width:100%; max-height:160px; object-fit:contain;
    border-radius:10px; margin-bottom:.7rem;
    border:1px solid #e0eaf0; background:#f8fbff;
    display:block;
}
