/**
 * Course Editor Premium Styles
 * AGENTS.md v2.0 compliant
 * Design System: #667eea (primary) + #764ba2 (secondary)
 * Date: 02/10/2025
 */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --editor-primary: #667eea;
    --editor-secondary: #764ba2;
    --editor-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --editor-success: #10B981;
    --editor-warning: #F59E0B;
    --editor-error: #EF4444;
    --editor-text: #1E293B;
    --editor-text-muted: #64748B;
    --editor-border: #E2E8F0;
    --editor-bg: #F8FAFC;
    --editor-surface: #FFFFFF;
    --editor-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --editor-shadow-hover: 0 8px 24px rgba(102, 126, 234, 0.2);
}

/* ==================== MAIN CONTAINER ==================== */
.course-editor-isolated {
    min-height: 100vh;
    background: var(--editor-bg);
    padding: 0;
    margin: 0;
    width: 100%;
}

/* ==================== HEADER PREMIUM ==================== */
.editor-header {
    background: var(--editor-gradient);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    flex: 1;
}

.title-section h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 2rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-back {
    background: rgba(255, 255, 255, 0.15);
}

.btn-save {
    background: rgba(16, 185, 129, 0.9);
    border-color: rgba(16, 185, 129, 1);
}

.btn-save:hover {
    background: rgba(16, 185, 129, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ==================== LOADING STATE ==================== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--editor-border);
    border-top-color: var(--editor-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--editor-text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ==================== MAIN EDITOR ==================== */
.editor-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* ==================== TABS PREMIUM ==================== */
.editor-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--editor-border);
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--editor-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--editor-primary);
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
    color: var(--editor-primary);
    border-bottom-color: var(--editor-primary);
    background: rgba(102, 126, 234, 0.1);
}

/* ==================== FORM CONTAINER ==================== */
.form-container {
    background: var(--editor-surface);
    border-radius: 12px;
    box-shadow: var(--editor-shadow);
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* ==================== FORM SECTIONS ==================== */
.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--editor-border);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    color: #1E293B;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-description {
    color: #64748B;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ==================== FORM GRID ==================== */
.form-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    color: #1E293B;
    font-weight: 600;
    font-size: 0.95rem;
}

.required {
    color: var(--editor-error);
    margin-left: 0.25rem;
}

/* ==================== FORM INPUTS PREMIUM ==================== */
.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1E293B !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--editor-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
    color: #1E293B !important;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--editor-primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94A3B8;
    opacity: 1;
}

.form-input::-webkit-input-placeholder,
.form-textarea::-webkit-input-placeholder {
    color: #94A3B8;
}

.form-input::-moz-placeholder,
.form-textarea::-moz-placeholder {
    color: #94A3B8;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ==================== OBJECTIVES SECTION ==================== */
.objectives-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.objective-group h3 {
    color: #1E293B;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.objective-item,
.resource-item,
.eval-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.objective-item textarea,
.resource-item input,
.eval-item input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    font-size: 0.9rem;
    min-height: 80px;
    resize: vertical;
    transition: all 0.2s;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #1E293B !important;
}

.resource-item input,
.eval-item input {
    min-height: unset;
}

.objective-item textarea:focus,
.resource-item input:focus,
.eval-item input:focus {
    outline: none;
    border-color: var(--editor-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ==================== BUTTONS PREMIUM ==================== */
.add-btn,
.remove-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.add-btn {
    background: var(--editor-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.remove-btn {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.remove-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--editor-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ==================== RESOURCES SECTION ==================== */
.resources-section,
.evaluation-section {
    margin-top: 1rem;
}

.resources-list,
.eval-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ==================== EVALUATION SECTION ==================== */
.evaluation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.eval-group h3 {
    color: #1E293B;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.eval-group.full-width {
    grid-column: 1 / -1;
}

/* ==================== SCHEDULE SECTION ==================== */
.schedule-section {
    margin-top: 1.5rem;
}

.schedule-header {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--editor-border);
}

.schedule-controls {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    color: var(--editor-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.control-group .form-input {
    width: 150px;
}

.schedule-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    color: var(--editor-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-value {
    color: var(--editor-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.schedule-tools {
    display: flex;
    gap: 1rem;
}

.schedule-grid {
    min-height: 300px;
}

.schedule-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--editor-text-muted);
}

.schedule-empty-state p:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-hint {
    font-size: 0.9rem;
    color: var(--editor-text-muted);
    margin-top: 0.5rem;
}

/* ==================== SCHEDULE WEEKS CONTAINER ==================== */
.schedule-weeks-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.week-card {
    background: var(--editor-surface);
    border: 2px solid var(--editor-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--editor-shadow);
    transition: all 0.2s ease;
}

.week-card:hover {
    box-shadow: var(--editor-shadow-hover);
    border-color: var(--editor-primary);
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--editor-border);
}

.week-header h3 {
    color: var(--editor-text);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.week-lessons-count {
    background: var(--editor-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lesson-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lesson-item:hover {
    background: white;
    border-color: var(--editor-primary);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.lesson-number {
    background: var(--editor-gradient);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.lesson-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lesson-title {
    color: var(--editor-text);
    font-weight: 600;
    font-size: 1rem;
}

.lesson-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--editor-text-muted);
}

.lesson-items {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lesson-items::before {
    content: "🎯";
    font-size: 1rem;
}

/* Lesson Techniques Display */
.lesson-techniques {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--editor-border);
}

.techniques-label {
    color: var(--editor-primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.techniques-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.techniques-list li {
    color: var(--editor-text);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--editor-primary);
    transition: all 0.2s ease;
}

.techniques-list li:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(2px);
}

.no-techniques {
    color: var(--editor-text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0.5rem 0 0 0;
}

/* ==================== TECHNIQUES SECTION ==================== */
.schedule-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.techniques-section {
    background: var(--editor-surface);
    border: 2px solid var(--editor-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.techniques-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--editor-border);
}

.techniques-header h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.techniques-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--editor-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--editor-text-muted);
    font-weight: 600;
}

.techniques-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.technique-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.technique-item:hover {
    background: white;
    border-color: var(--editor-primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.technique-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.technique-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--editor-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.technique-details {
    flex: 1;
}

.technique-name {
    font-weight: 600;
    color: var(--editor-text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.technique-name a {
    color: var(--editor-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.technique-name a:hover {
    color: var(--editor-secondary);
    text-decoration: underline;
}

.technique-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--editor-text-muted);
}

.technique-badge {
    background: var(--editor-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.technique-lessons {
    padding: 0.25rem 0.75rem;
    background: var(--editor-surface-alt);
    color: var(--editor-primary);
    border: 1px solid var(--editor-border);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: help;
    transition: all 0.2s ease;
}

.technique-lessons:hover {
    background: var(--editor-primary-light);
    border-color: var(--editor-primary);
}

.technique-actions {
    display: flex;
    gap: 0.5rem;
}

.technique-actions button {
    padding: 0.5rem 0.75rem;
    border: none;
    background: var(--editor-bg);
    color: var(--editor-text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.technique-actions button:hover {
    background: var(--editor-primary);
    color: white;
}

.techniques-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--editor-text-muted);
}

.techniques-empty-state p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--editor-text-muted);
}

.lessons-section {
    background: var(--editor-surface);
    border: 2px solid var(--editor-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.lessons-section .schedule-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.lessons-section .schedule-header h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.schedule-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--editor-text);
}

.form-input.small {
    width: 80px;
    padding: 0.5rem;
}

.schedule-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ==================== RAG SECTION ==================== */
.rag-section {
    margin-top: 1.5rem;
}

.rag-overview {
    margin-bottom: 2rem;
}

.overview-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--editor-border);
}

.overview-card h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.overview-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.overview-label {
    color: var(--editor-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.overview-value {
    color: var(--editor-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.rag-configuration {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--editor-border);
}

.rag-configuration h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.rag-options {
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--editor-text);
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--editor-primary);
}

.rag-actions {
    margin: 2rem 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==================== RAG PROGRESS ==================== */
.rag-progress {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid var(--editor-primary);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.progress-status {
    color: var(--editor-primary);
    font-weight: 600;
}

.progress-bar {
    height: 12px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--editor-gradient);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-details {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.progress-log {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--editor-text-muted);
    line-height: 1.6;
}

/* ==================== RAG RESULTS ==================== */
.rag-results {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid var(--editor-success);
}

.rag-results h3 {
    color: var(--editor-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.results-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.results-preview {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--editor-text-muted);
}

.empty-state p {
    margin: 0.5rem 0;
}

/* ==================== LESSON PLANS SUMMARY ==================== */
#lessonPlansSummary {
    margin-top: 1rem;
}

#lpSummaryList {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#lpSummaryList li {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--editor-primary);
    color: var(--editor-text);
    font-weight: 500;
}

.lp-import {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #FECACA;
}

.lp-import label.form-label {
    color: var(--editor-text);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .form-grid.two-columns,
    .objectives-section,
    .evaluation-grid,
    .overview-stats {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .schedule-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group .form-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .editor-main {
        padding: 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .editor-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .header-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ==================== SCHEDULE TAB - ENHANCED LESSON CARDS ==================== */
.lesson-item-card {
    background: white;
    border: 1px solid var(--editor-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--editor-shadow);
    transition: all 0.3s ease;
}

.lesson-item-card:hover {
    box-shadow: var(--editor-shadow-hover);
    transform: translateY(-2px);
}

/* Clickable lesson card - cursor pointer + hover effect */
.lesson-item-card.clickable-lesson {
    cursor: pointer;
    position: relative;
}

.lesson-item-card.clickable-lesson::after {
    content: '👆 Clique para editar';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--editor-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lesson-item-card.clickable-lesson:hover::after {
    opacity: 1;
}

.lesson-item-card.clickable-lesson:hover {
    border-color: var(--editor-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
}

.lesson-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--editor-border);
}

.lesson-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lesson-number-badge {
    background: var(--editor-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.lesson-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--editor-text);
    margin: 0;
}

.lesson-actions-header {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-lesson {
    background: var(--editor-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.btn-edit-lesson:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Techniques Section */
.lesson-techniques-section {
    margin-bottom: 1.5rem;
}

.techniques-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 8px;
}

.techniques-icon {
    font-size: 1.5rem;
}

.techniques-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--editor-text);
}

.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.technique-card {
    background: white;
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: default;
}

/* Clickable technique card - enhanced interactivity */
.technique-card.clickable-technique {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.technique-card.clickable-technique::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.technique-card.clickable-technique:hover::before {
    left: 100%;
}

.technique-card:hover {
    border-color: var(--editor-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.technique-card.clickable-technique:hover {
    border-color: var(--editor-primary);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
    transform: translateY(-3px) scale(1.02);
}

.technique-click-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--editor-gradient);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.technique-card.clickable-technique:hover .technique-click-hint {
    opacity: 1;
}

.technique-order {
    background: var(--editor-gradient);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.technique-info {
    flex: 1;
}

.technique-name {
    font-weight: 600;
    color: var(--editor-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.technique-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.technique-category {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.badge-stance { background: #DBEAFE; color: #1E40AF; }
.badge-attack { background: #FEE2E2; color: #991B1B; }
.badge-defense { background: #D1FAE5; color: #065F46; }
.badge-fall { background: #FEF3C7; color: #92400E; }
.badge-tactics { background: #E9D5FF; color: #6B21A8; }

.technique-difficulty,
.technique-duration {
    color: var(--editor-text-muted);
    font-size: 0.8rem;
}

/* Empty State */
.lesson-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--editor-text-muted);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1rem;
    margin: 0;
}

/* Lesson Card Footer */
.lesson-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--editor-border);
}

.btn-add-techniques {
    background: white;
    color: var(--editor-primary);
    border: 2px solid var(--editor-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-add-techniques:hover {
    background: var(--editor-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lesson-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lesson-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .lesson-actions-header {
        width: 100%;
    }
    
    .btn-edit-lesson {
        width: 100%;
        justify-content: center;
    }
    
    .techniques-grid {
        grid-template-columns: 1fr;
    }
    
    .lesson-card-footer {
        flex-direction: column;
    }
    
    .btn-add-techniques {
        width: 100%;
    }
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

