#correcao-app-root {
--bg-color: #f4f7f6;
            --panel-bg: #ffffff;
            --text-main: #2c3e50;
            --text-muted: #7f8c8d;
            --primary: #3498db;
            --primary-hover: #2980b9;
            --success: #2ecc71;
            --highlight: rgba(241, 196, 15, 0.4);
            --highlight-active: rgba(241, 196, 15, 0.8);
            --border-radius: 12px;
            --shadow: 0 10px 30px rgba(0,0,0,0.05);
            --transition: all 0.3s ease;
}
/* Header / Toggle */
#correcao-app-root header {
            background: var(--panel-bg);
            padding: 15px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            z-index: 10;
        }

#correcao-app-root .logo {
            font-size: 1.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, #3498db, #8e44ad);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

#correcao-app-root .view-toggle {
            display: flex;
            background: #e0e6ed;
            border-radius: 30px;
            padding: 4px;
            position: relative;
        }

#correcao-app-root .toggle-btn {
            background: transparent;
            border: none;
            padding: 8px 20px;
            border-radius: 26px;
            cursor: pointer;
            font-weight: 600;
            color: var(--text-muted);
            transition: var(--transition);
            z-index: 2;
        }

#correcao-app-root .toggle-btn.active {
            color: white;
        }

#correcao-app-root .toggle-pill {
            position: absolute;
            top: 4px;
            left: 4px;
            height: calc(100% - 8px);
            width: calc(50% - 4px);
            background: linear-gradient(135deg, #3498db, #2980b9);
            border-radius: 26px;
            transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            z-index: 1;
            box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
        }

#correcao-app-root .view-student-active .toggle-pill {
            transform: translateX(100%);
        }

        /* Main Workspace */
#correcao-app-root .workspace {
            display: flex;
            flex: 1;
            overflow: hidden;
            padding: 20px;
            gap: 20px;
        }

        /* Document Area */
#correcao-app-root .document-container {
            flex: 1;
            background: #cbd5e1; /* Fundo cinza para contrastar com o papel */
            border-radius: var(--border-radius);
            box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }

#correcao-app-root .document-header {
            padding: 15px 25px;
            border-bottom: 1px solid #94a3b8;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #f8fafc;
            z-index: 10;
        }

#correcao-app-root .doc-title {
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.1rem;
            color: #334155;
        }

#correcao-app-root .doc-icon {
            background: #ef4444;
            color: white;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: bold;
            letter-spacing: 0.5px;
        }

#correcao-app-root .document-content {
            overflow-y: auto;
            flex: 1;
            padding: 20px;
        }

#correcao-app-root .paper-sheet {
            background: white;
            max-width: 850px;
            margin: 20px auto 60px auto;
            padding: 40px 50px; /* Reduzido para caber mais texto */
            box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
            border-radius: 4px;
            min-height: 100%;
            font-size: 1.1rem; /* Reduzido levemente */
            line-height: 1.8;
            color: #1e293b;
            font-family: 'Georgia', 'Times New Roman', serif;
        }

#correcao-app-root .paper-sheet p {
            margin-bottom: 20px;
            position: relative;
        }

#correcao-app-root .para-num {
            font-weight: bold;
            color: #94a3b8;
            margin-right: 8px;
            font-size: 0.8em;
            font-family: 'Inter', sans-serif;
            position: absolute;
            left: -25px;
        }

        /* Highlights */
#correcao-app-root .highlight {
            background-color: var(--highlight);
            border-radius: 3px;
            cursor: pointer;
            transition: var(--transition);
            border-bottom: 2px solid transparent;
        }

#correcao-app-root .highlight:hover, #correcao-app-root .highlight.active {
            background-color: var(--highlight-active);
            border-bottom: 2px solid #f39c12;
        }
#correcao-app-root .highlight-ai {
            background-color: #dcfce7 !important;
            border-bottom: 2px solid transparent !important;
        }
#correcao-app-root .highlight-ai:hover, #correcao-app-root .highlight-ai.active {
            background-color: #bbf7d0 !important;
            border-bottom: 2px solid #22c55e !important;
        }

        /* Floating Tooltip */
#correcao-app-root #selection-tooltip {
            position: absolute;
            display: none;
            background: #2c3e50;
            padding: 6px;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transform: translate(-50%, -120%);
            z-index: 100;
            animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            white-space: nowrap;
            gap: 4px;
        }

#correcao-app-root #selection-tooltip::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px 5px 0;
            border-style: solid;
            border-color: #2c3e50 transparent transparent transparent;
        }

#correcao-app-root .tooltip-btn {
            background: transparent;
            border: none;
            color: white;
            padding: 8px 12px;
            cursor: pointer;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: var(--transition);
        }

#correcao-app-root .tooltip-btn:hover { background: rgba(255,255,255,0.1); }

        /* Sidebar Area */
#correcao-app-root .sidebar {
            background: var(--panel-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            width: 35%; /* Flexível */
            min-width: 320px;
            max-width: 450px;
            flex-shrink: 0;
            border: 1px solid #e2e8f0;
        }

#correcao-app-root .sidebar-header {
            padding: 20px;
            background: linear-gradient(to right, #f8f9fa, #ffffff);
            border-bottom: 1px solid #eee;
        }

#correcao-app-root .sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

#correcao-app-root .sidebar-section {
            background: #fdfdfd;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 15px;
            flex-shrink: 0;
        }

#correcao-app-root .section-title {
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 15px;
            font-weight: 700;
        }

        /* Forms & Inputs */
#correcao-app-root .input-group {
            margin-bottom: 15px;
        }

#correcao-app-root input[type="number"], #correcao-app-root textarea {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            transition: var(--transition);
        }

#correcao-app-root input[type="number"]:focus, #correcao-app-root textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

#correcao-app-root textarea {
            resize: vertical;
            min-height: 100px;
        }

        /* Comments List */
#correcao-app-root .comment-item {
            background: white;
            border-left: 4px solid var(--primary);
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 15px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            transition: var(--transition);
            position: relative;
            cursor: pointer;
        }
#correcao-app-root .comment-item:hover, #correcao-app-root .comment-item.active {
            transform: translateX(5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
#correcao-app-root .ai-comment {
            border-left: 4px solid #10b981;
            background: #f0fdf4;
        }
#correcao-app-root .ai-comment .comment-para-num {
            color: #10b981 !important;
        }

#correcao-app-root .comment-para-num {
            font-weight: bold;
            font-size: 0.8rem;
            color: var(--primary);
            margin-bottom: 5px;
        }

#correcao-app-root .comment-text-snippet {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-style: italic;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            background: #f9f9f9;
            padding: 5px;
            border-radius: 4px;
        }

#correcao-app-root .comment-feedback {
            font-size: 0.95rem;
            color: var(--text-main);
        }

#correcao-app-root .delete-btn {
            background: transparent;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            float: right;
            font-size: 0.8rem;
            opacity: 0.5;
            transition: opacity 0.2s;
        }

#correcao-app-root .comment-item:hover .delete-btn {
            opacity: 1;
        }

        /* Action Buttons */
#correcao-app-root .action-footer {
            padding: 20px;
            border-top: 1px solid #eee;
            background: white;
            display: flex;
            flex-direction: row;
            gap: 10px;
        }

#correcao-app-root .btn {
            width: 100%;
            padding: 12px 8px;
            border: none;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            text-decoration: none;
            text-align: center;
            line-height: 1.2;
        }

#correcao-app-root .btn-primary { background: var(--primary); color: white; }
#correcao-app-root .btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4); }
        
#correcao-app-root .btn-success { background: var(--success); color: white; }
#correcao-app-root .btn-success:hover { background: #27ae60; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4); }

#correcao-app-root .btn-secondary { background: #95a5a6; color: white; }
#correcao-app-root .btn-secondary:hover { background: #7f8c8d; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4); }

        /* Student View Specific Styles */
#correcao-app-root .student-grade-display {
            font-size: 3rem;
            font-weight: 800;
            color: var(--primary);
            text-align: center;
            margin: 10px 0;
            text-shadow: 2px 2px 0px rgba(52,152,219,0.1);
        }

#correcao-app-root .student-feedback-display {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid var(--success);
            line-height: 1.6;
            color: var(--text-main);
        }

#correcao-app-root .hidden {
            display: none !important;
        }

        /* Animations */
@keyframes popIn {
#correcao-app-root 0% { opacity: 0; transform: translate(-50%, -100%) scale(0.8); }
#correcao-app-root 100% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
        }

@keyframes fadeIn {
#correcao-app-root from { opacity: 0; transform: translateY(10px); #correcao-app-root to { opacity: 1; transform: translateY(0); }
        }

#correcao-app-root .fade-in {
            animation: fadeIn 0.4s ease forwards;
        }

#correcao-app-root [contenteditable]:empty:before {
            content: attr(placeholder);
            color: #999;
            pointer-events: none;
            display: block;
        }
#correcao-app-root .rte-btn {
            background: white; border: 1px solid #ddd; padding: 4px 8px; cursor: pointer; border-radius: 4px; color: #333; transition: background 0.2s;
        }
#correcao-app-root .rte-btn:hover { background: #eee; }
#correcao-app-root .rte-color { width: 30px; height: 30px; padding: 0; border: none; cursor: pointer; border-radius: 4px; }
    

