/* ===== ESSAY MARKING WIZARD STYLES ===== */

/* ---- Wizard Shell ---------------------------------------- */
.emw-wizard-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 auto;
}

/* ---- Step Progress Bar ----------------------------------- */
.emw-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 10px 16px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    flex-wrap: wrap;
}

.emw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 80px;
    max-width: 140px;
}

.emw-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: #ddd;
    transition: background 0.4s;
    z-index: 0;
}

.emw-step.done:not(:last-child)::after,
.emw-step.active:not(:last-child)::after {
    background: #6366f1;
}

.emw-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #aaa;
    transition: all 0.3s;
    z-index: 1;
    position: relative;
}

.emw-step.active .emw-step-circle {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}

.emw-step.done .emw-step-circle {
    border-color: #4f46e5;
    background: #4f46e5;
    color: #fff;
}

.emw-step-label {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.emw-step.active .emw-step-label { color: #6366f1; }
.emw-step.done .emw-step-label   { color: #4f46e5; }

/* ---- Step Panels ----------------------------------------- */
.emw-panel {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 28px 28px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    animation: emw-fade-in 0.3s ease;
}

.emw-panel.active { display: block; }

@keyframes emw-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.emw-panel-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: #333;
}

.emw-panel-sub {
    margin: 0 0 22px;
    color: #888;
    font-size: 14px;
    line-height: 1.55;
}

/* ---- Navigation Buttons ---------------------------------- */
.emw-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 26px;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.emw-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
}

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

.emw-btn-back  { background: #f0f0f0; color: #555; }
.emw-btn-back:hover { background: #e0e0e0; }

.emw-btn-next {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.emw-btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.4); }

.emw-btn-primary {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.emw-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.4); }

.emw-btn-secondary {
    background: #f0f0f0;
    color: #555;
}
.emw-btn-secondary:hover { background: #e0e0e0; }

.emw-btn-danger {
    background: #fee2e2;
    color: #dc2626;
}
.emw-btn-danger:hover { background: #fecaca; }

.emw-btn-process {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 12px 20px;
}
.emw-btn-process:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.4); }

.emw-btn-add {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.emw-btn-add:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,185,129,0.4); }

.emw-btn-large {
    font-size: 16px;
    padding: 14px 32px;
}

.emw-btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ---- Form Fields ----------------------------------------- */
.emw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emw-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.emw-required {
    color: #ef4444;
}

.emw-field-hint {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

.emw-textarea {
    min-height: 80px;
    resize: vertical;
}

.emw-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* ---- Step 1: Essay Setup -------------------------------- */
.emw-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .emw-setup-grid { grid-template-columns: 1fr; }
}

/* ---- Input Method Cards ---------------------------------- */
.emw-input-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.emw-input-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    position: relative;
}

.emw-input-card:hover {
    border-color: #c7c7c7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.emw-input-card.selected {
    border-color: #6366f1;
    background: #f5f3ff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.15);
}

.emw-input-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.emw-input-card-title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.emw-input-card-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.emw-input-card-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Step 2: Rubric Panels ----------------------------- */
.emw-rubric-panel,
.emw-student-panel {
    display: none;
    animation: emw-fade-in 0.3s ease;
}

.emw-rubric-panel.active,
.emw-student-panel.active {
    display: block;
}

.emw-rubric-hint,
.emw-individual-hint {
    background: #f8fafc;
    border-left: 4px solid #6366f1;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 0 8px 8px 0;
}

.emw-rubric-hint h4,
.emw-individual-hint h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}

.emw-rubric-hint p,
.emw-individual-hint p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
}

.emw-rubric-hint ul {
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
}

.emw-rubric-hint li {
    margin-bottom: 4px;
}

.emw-example-label {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin: 12px 0 6px;
}

.emw-example {
    background: #fff;
    border: 1px dashed #cbd5e1;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    font-family: monospace;
    line-height: 1.5;
}

.emw-notes-textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 12px;
}

/* ---- Rubric Output ------------------------------------- */
.emw-rubric-output-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.emw-rubric-output {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    min-height: 120px;
    margin-bottom: 16px;
}

.emw-rubric-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ---- Rubric Display Tables ----------------------------- */
.emw-rubric-display {
    background: #fff;
    border-radius: 8px;
}

.emw-rubric-display h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 8px;
}

.emw-rubric-display > p {
    margin: 0 0 20px;
    font-size: 16px;
    color: #4f46e5;
    font-weight: 600;
}

.emw-rubric-criterion {
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.emw-rubric-criterion h4 {
    margin: 0;
    padding: 12px 16px;
    background: #f5f3ff;
    font-size: 15px;
    color: #4f46e5;
    border-bottom: 1px solid #e2e8f0;
}

.emw-max-marks {
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.emw-rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.emw-rubric-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e2e8f0;
    font-size: 12px;
    text-transform: uppercase;
}

.emw-rubric-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.emw-rubric-table tr:last-child td {
    border-bottom: none;
}

.emw-rubric-table tr:hover {
    background: #f8fafc;
}

.emw-mark-range {
    white-space: nowrap;
    font-weight: 600;
    color: #6366f1;
    width: 100px;
}

.emw-description {
    line-height: 1.5;
    color: #4b5563;
}

/* ---- Step 3: Bulk Upload ------------------------------- */
.emw-upload-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .emw-upload-layout { grid-template-columns: 1fr; }
}

.emw-upload-hint {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.emw-upload-hint h4 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #333;
}

.emw-upload-hint p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #666;
}

.emw-upload-hint ul {
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
}

.emw-upload-hint li {
    margin-bottom: 6px;
}

.emw-file-types {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ---- Import Buttons ------------------------------------- */
.emw-import-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emw-import-buttons .emw-btn {
    font-size: 12px;
    padding: 6px 12px;
}

.emw-import-gdrive-btn {
    background: #fff;
    color: #4285f4;
    border: 1px solid #4285f4;
}

.emw-import-gdrive-btn:hover {
    background: #4285f4;
    color: #fff;
}

.emw-import-onedrive-btn {
    background: #fff;
    color: #0078d4;
    border: 1px solid #0078d4;
}

.emw-import-onedrive-btn:hover {
    background: #0078d4;
    color: #fff;
}

/* ---- Drop Zone ----------------------------------------- */
.emw-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s;
    cursor: pointer;
}

.emw-drop-zone:hover,
.emw-drop-zone.drag-over {
    border-color: #6366f1;
    background: #f5f3ff;
}

.emw-drop-inner {
    padding: 40px 20px;
    text-align: center;
}

/* ---- Multi-Page Essay Hint ---------------------------- */
.emw-multi-page-hint {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 6px;
}

.emw-multi-page-hint h5 {
    margin: 0 0 8px 0;
    color: #0369a1;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.emw-multi-page-hint p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

.emw-multi-page-hint code {
    font-family: 'Courier New', monospace;
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #0369a1;
}

.emw-naming-formats {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* ---- Page Count Indicator in Roster ------------------- */
.emw-page-indicator {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
    cursor: help;
}

/* ---- Rubric Display in Modal -------------------------- */
.emw-score-highlight {
    color: #ff6600;
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff3e6;
    border-radius: 6px;
    display: inline-block;
}

.emw-score-column {
    background: #ff6600 !important;
    color: white !important;
}

.emw-score-cell {
    font-weight: bold;
    text-align: center;
    background: #fff8f0;
}

.emw-awarded-score {
    color: #ff6600;
    font-size: 16px;
}

.emw-score-awarded {
    background-color: #fff8f0 !important;
}

.emw-band-achieved {
    background-color: #d4edda !important;
    color: #155724;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}
.emw-rubric-display {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.emw-rubric-display h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.emw-rubric-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

.emw-rubric-table th {
    background: #ff6600;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e55a00;
}

.emw-rubric-table td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

.emw-rubric-table tr:nth-child(even) {
    background: #f8f9fa;
}

.emw-rubric-table tr:hover {
    background: #e9ecef;
}

.emw-bands-list {
    margin: 0;
    padding-left: 18px;
    list-style-type: disc;
}

.emw-bands-list li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.emw-bands-list li:last-child {
    margin-bottom: 0;
}

/* Modal Feedback Formatting */
#emw-modal-feedback h2,
#emw-modal-feedback h3,
#emw-modal-feedback h4 {
    color: #ff6600;
    margin-top: 20px;
    margin-bottom: 10px;
}

#emw-modal-feedback strong {
    color: #333;
}

#emw-modal-feedback p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.emw-drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.emw-drop-inner p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #666;
}

.emw-drop-or {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin: 8px 0;
}

/* ---- Progress Bar -------------------------------------- */
.emw-bulk-progress,
.emw-marking-progress {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.emw-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.emw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    width: 0%;
    transition: width 0.3s ease;
}

.emw-progress-text {
    margin: 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* ---- Student Roster Table ------------------------------ */
.emw-students-roster-section {
    margin-top: 24px;
}

.emw-roster-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
}

.emw-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.emw-roster-table th,
.emw-roster-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.emw-roster-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emw-roster-table tr:hover {
    background: #f8fafc;
}

.emw-roster-table tr:last-child td {
    border-bottom: none;
}

.emw-roster-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

/* ---- Individual Student Form Cards ---------------------- */
.emw-student-form-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.emw-student-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.emw-student-form-header h5 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.emw-remove-student-btn {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.emw-student-form-body {
    padding: 16px;
}

.emw-import-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Step 4: Results ----------------------------------- */
.emw-mark-all-section {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 24px;
}

.emw-mark-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.emw-results-section {
    margin-top: 24px;
}

.emw-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.emw-results-summary {
    display: flex;
    gap: 16px;
}

.emw-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.emw-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s;
}

.emw-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.emw-result-card.pending {
    opacity: 0.7;
    background: #f8fafc;
}

.emw-result-card.error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.emw-result-card.error:hover {
    background: #fee2e2;
}

.emw-retry-hint {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    background: #fee2e2;
    border-radius: 4px;
    display: inline-block;
}

.emw-summary-error {
    background: #ef4444 !important;
    color: white;
}

.emw-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.emw-result-name {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}

.emw-result-score {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.emw-result-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Modal --------------------------------------------- */
.emw-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.emw-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.emw-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.emw-modal-close:hover {
    color: #333;
}

.emw-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emw-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.emw-modal-score {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.emw-modal-body {
    padding: 24px;
}

.emw-modal-section {
    margin-bottom: 24px;
}

.emw-modal-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emw-modal-question-text,
.emw-modal-rubric-display,
.emw-modal-answer-text,
.emw-modal-feedback-text {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.emw-modal-rubric-display {
    background: #f5f3ff;
}

.emw-modal-feedback-text {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
}

.emw-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

/* ---- Export Section ------------------------------------ */
.emw-export-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.emw-export-section h4 {
    margin: 0 0 16px;
    font-size: 15px;
    color: #333;
}

.emw-export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.emw-export-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 100px;
}

.emw-export-btn:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99,102,241,0.15);
}

.emw-export-btn img {
    width: 32px;
    height: 32px;
}

.emw-export-btn span {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.emw-export-gdocs-btn {
    border-color: #4285f4;
}

.emw-export-gdocs-btn:hover {
    background: #4285f4;
    border-color: #4285f4;
}

.emw-export-gdocs-btn:hover span {
    color: white;
}

.emw-export-onedrive-btn {
    border-color: #0078d4;
}

.emw-export-onedrive-btn:hover {
    background: #0078d4;
    border-color: #0078d4;
}

.emw-export-onedrive-btn:hover span {
    color: white;
}

/* ---- Restricted State ------------------------------------ */
.restricted {
    position: relative;
    pointer-events: none;
}

.restricted::after {
    content: 'Pro Feature';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(99,102,241,0.95);
    color: #fff;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    z-index: 10;
}

/* ---- Responsive ---------------------------------------- */
@media (max-width: 640px) {
    .emw-steps {
        padding: 16px 8px;
    }
    
    .emw-step-label {
        font-size: 9px;
    }
    
    .emw-panel {
        padding: 20px 16px;
    }
    
    .emw-input-cards {
        grid-template-columns: 1fr;
    }
    
    .emw-results-grid {
        grid-template-columns: 1fr;
    }
    
    .emw-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

/* ---- Export Buttons (consistent with other tools) -------- */
.export-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.export-button-emw {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    min-height: 90px;
}

.export-button-emw:hover {
    border-color: #ff6600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.export-button-emw img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
}

.export-button-emw .export-label {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
}

/* Marks sync notification */
.emw-marks-synced-notice {
    background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

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