html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #f2f2f2;
    color: #333;
}

h1:focus {
    outline: none;
}

/* Build bilgisi — sağ üst köşede yarı saydam */
.build-info {
    position: fixed;
    top: 4px;
    right: 8px;
    z-index: 9999;
    font-size: 11px;
    color: #999;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    pointer-events: none;
    user-select: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ============================================================ */
/* Prism.js syntax highlighting – VS Code dark tema renkleri    */
/* Bu stiller global olmalı çünkü Prism DOM'u JS ile enjekte    */
/* eder, CSS isolation scope attribute'u eklenemez.             */
/* ============================================================ */
.line-number {
    padding: 0 8px;
    display: block !important;
}

.token.comment, 
.token.prolog, 
.token.doctype, 
.token.cdata { color: #6a9955; }
.token.punctuation { color: #d4d4d4; }
.token.namespace { opacity: .7; }
.token.property, 
.token.tag, 
.token.boolean, 
.token.number, 
.token.constant, 
.token.symbol, 
.token.deleted { color: #b5cea8; }
.token.selector, 
.token.attr-name, 
.token.string, 
.token.char, 
.token.builtin, 
.token.inserted { color: #ce9178; }
.token.operator, 
.token.entity, 
.token.url { color: #d4d4d4; }
.token.atrule, 
.token.attr-value, 
.token.keyword { color: #569cd6; }
.token.function, 
.token.class-name { color: #dcdcaa; }
.token.regex, 
.token.important, 
.token.variable { color: #d16969; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================================= */
/* Editor.razor.css styles — merged into global CSS              */
/* ============================================================= */
.editor-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f2f2f2;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(240, 240, 240, 0.97);
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    font-size: 14px;
}

.app-bootstrap-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(0, 122, 204, 0.12), transparent 32%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-bootstrap-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-bootstrap-card {
    min-width: 240px;
    padding: 24px 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 60px rgba(17, 32, 53, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #2b3642;
    backdrop-filter: blur(8px);
}

.page-loading-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(0, 122, 204, 0.08), transparent 30%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.page-loading-card {
    transform: translateY(-6px);
}

.app-bootstrap-title {
    font-size: 15px;
    font-weight: 700;
}

.app-bootstrap-text {
    font-size: 13px;
    color: #5f6b79;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: #007acc;
    border-radius: 50%;
    animation: loading-spin 0.6s linear infinite;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f0f0f0;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

/* --- RUN BUTTON: HIGH VISIBILITY & FEEDBACK --- */
.run-btn {
    background: #007acc;
    color: white;
    border: 1px solid #005a9e;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.1s ease;
    box-shadow: 0 4px 0 #005a9e;
    font-size: 14px;
    user-select: none;
    margin-bottom: 4px;
    position: relative;
    top: 0;
}

.run-btn:hover:not(:disabled) {
    background: #118ad4;
    top: -1px;
    box-shadow: 0 5px 0 #005a9e;
}

.run-btn:active:not(:disabled) {
    top: 3px;
    box-shadow: 0 1px 0 #005a9e;
    background: #005a9e;
}

.run-btn:disabled {
    background: #b0b0b0 !important;
    border-color: #999 !important;
    color: #ddd !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    top: 2px !important;
    opacity: 1 !important;
}

.run-btn:disabled .spinner {
    border-color: rgba(0, 0, 0, 0.08);
    border-top-color: #888;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loading-spin 0.6s linear infinite;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

/* Cancel button */
.cancel-btn {
    background: #d32f2f;
    color: white;
    border: 1px solid #b71c1c;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.cancel-btn:hover:not(:disabled) {
    background: #e53935;
}

.cancel-btn:disabled {
    background: #ccc;
    border-color: #bbb;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.5;
}

.warning-text {
    font-size: 0.78em;
    color: #e67e22;
    margin-left: auto;
    white-space: nowrap;
    user-select: none;
}

/* Student info inline in toolbar */
.student-inline {
    margin-left: auto;
    font-size: 0.82em;
    color: #007acc;
    white-space: nowrap;
    background: rgba(0, 122, 204, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
}

.logout-link {
    border: 1px solid rgba(11, 107, 179, 0.22);
    background: linear-gradient(180deg, rgba(11, 107, 179, 0.08), rgba(11, 107, 179, 0.04));
    color: #0b6bb3;
    font: inherit;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 9px;
    border-radius: 999px;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.logout-link:hover {
    background: rgba(11, 107, 179, 0.14);
    border-color: rgba(11, 107, 179, 0.35);
    color: #084f86;
    transform: translateY(-1px);
}

.logout-link:focus-visible {
    outline: 2px solid rgba(11, 107, 179, 0.35);
    outline-offset: 2px;
}

.access-denied-success {
    border: 1px solid rgba(46, 125, 50, 0.18);
    background: linear-gradient(180deg, rgba(232, 245, 233, 0.98), rgba(248, 252, 248, 0.98));
}

.access-denied-success .access-denied-icon {
    color: #2e7d32;
}
}

.status {
    font-size: 0.85em;
    color: #666;
}

.task-title {
    font-weight: 600;
    color: #4fc1ff;
}

.task-verify-hint {
    font-size: 0.85em;
    color: #888;
    margin-left: auto;
}

/* --- PANES & LAYOUT --- */
.panes {
    display: flex;
    flex: 1;
    min-height: 0;
    background: #f5f5f5;
}

.code-pane,
.right-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.code-pane {
    border-right: 1px solid #e0e0e0;
    position: relative;
}

/* Sağ panel: görev + girdi + çıktı */
.right-pane {
    background: #1e1e1e;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #444;
    font-size: 0.85em;
}

.code-pane .task-desc {
    padding: 8px 12px;
    background: #252526;
    border-bottom: 1px solid #444;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    color: #d4d4d4;
    line-height: 1.5;
    max-height: calc(1.5em * 8 + 16px);
    overflow-y: auto;
    overflow-x: hidden;
}

.code-pane .task-desc .task-desc-content p {
    margin: 4px 0;
}

.code-pane .task-desc .task-desc-content {
    overflow-wrap: anywhere;
}

.code-pane .task-desc .task-desc-content code {
    background: #3c3c3c;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: #ce9178;
}

/* --- EDITOR: PIXEL PERFECT ALIGNMENT --- */
.code-editor-container {
    flex: 1;
    position: relative;
    background: #1e1e1e;
    overflow: hidden;
    display: flex; /* Horizontal layout for gutter + editor */
    border-bottom: 1px solid #e0e0e0;
}

.line-numbers {
    flex: 0 0 45px;
    padding: 16px 0;
    background: #1e1e1e;
    border-right: 1px solid #333;
    color: #858585;
    text-align: right;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    user-select: none;
    overflow: hidden;
}

.editor-layers {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.code-editor,
.code-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 16px !important;
    box-sizing: border-box;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
    font-kerning: none !important;
    font-variant-ligatures: none !important;
    font-feature-settings: "liga" 0, "calt" 0 !important;
    tab-size: 4 !important;
    white-space: pre !important; /* Force pre for line number sync */
    word-wrap: normal !important;
    word-break: normal !important;
    border: none !important;
    outline: none !important;
    overflow: auto;
}

.code-editor {
    background: transparent !important;
    color: transparent !important;
    caret-color: #d4d4d4 !important;
    resize: none !important;
    z-index: 2;
}

.code-highlight {
    background: #1e1e1e !important;
    z-index: 1;
    overflow: hidden !important;
    pointer-events: none;
    color: #d4d4d4;
}

.code-highlight code {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-kerning: inherit !important;
    font-variant-ligatures: inherit !important;
    font-feature-settings: inherit !important;
    tab-size: inherit !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    white-space: inherit !important;
}

/* (right-pane ve task-desc yukarıda tanımlandı) */

.stdin-editor {
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    max-height: 25%;
    border: none;
    outline: none;
    padding: 8px 12px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.4;
    background: #252526;
    color: #d4d4d4;
    resize: vertical;
    tab-size: 4;
    border-bottom: 1px solid #333;
}

.diagnostics-pane {
    flex: 0 0 180px;
    min-height: 140px;
    overflow: auto;
    background: #fff5f5;
    border-top: 1px solid #f5c6cb;
    color: #721c24;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 12px;
}

/* Build hataları listesi (satır satır, numaralı) */
.build-errors-list {
    padding: 4px 0;
}

.build-error-item {
    display: flex;
    gap: 6px;
    padding: 3px 12px;
    font-size: 12px;
    line-height: 1.5;
    border-bottom: 1px solid #f0d0d0;
    align-items: baseline;
}

.build-error-item:last-child {
    border-bottom: none;
}

.build-error-num {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d32f2f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
}

.build-error-loc {
    flex-shrink: 0;
    color: #a55;
    font-size: 11px;
    min-width: 56px;
}

.build-error-id {
    flex-shrink: 0;
    color: #a33;
    font-weight: 600;
    min-width: 60px;
}

.build-error-msg {
    flex: 1;
    color: #721c24;
    word-break: break-word;
}

.diag-empty {
    padding: 6px 12px;
    color: #c44;
}

.diag-item {
    display: flex;
    gap: 10px;
    padding: 4px 12px;
    border-bottom: 1px solid #e8e8e8;
    white-space: pre-wrap;
    word-break: break-word;
}

.diag-item:last-child {
    border-bottom: none;
}

.diag-loc {
    color: #888;
    flex: 0 0 auto;
    min-width: 56px;
}

.diag-id {
    flex: 0 0 auto;
    min-width: 56px;
}

.diag-msg {
    flex: 1;
    min-width: 0;
}

.diag-error .diag-id {
    color: #f48771;
}

.diag-warning .diag-id {
    color: #cca700;
}

.diag-info .diag-id {
    color: #75beff;
}

.output-header {
    padding: 5px 12px;
    background: #333;
    color: #999;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid #444;
}

.output-header.error {
    color: #f48771;
    background: #3d1a1a;
}

.output-text {
    flex: 1;
    margin: 0;
    padding: 12px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d4d4d4;
    background: #1e1e1e;
}

.output-text.error {
    color: #f48771;
    flex: 0 0 auto;
    max-height: 30%;
    background: #3d1a1a;
}

/* Access denied */
.access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background: #f8f8f8;
    color: #555;
    padding: 20px;
}

.access-denied-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.access-denied h2 {
    font-size: 24px;
    color: #d32f2f;
    margin: 0 0 8px 0;
}

.access-denied p {
    font-size: 14px;
    margin: 4px 0;
    max-width: 400px;
}

.access-denied-hint {
    color: #888;
    font-size: 13px;
    margin-top: 12px !important;
}

/* ============================================================= */
/* HistoryPanel.razor.css styles — merged into global CSS        */
/* ============================================================= */
.sidebar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    color: #333;
    width: 280px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- GÖREVLER --- */
.tasks-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f0f6fc;
    border-bottom: 1px solid #d6e6f5;
}

.tasks-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #007acc;
}

.server-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
}

.server-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.25);
    animation: server-dot-pulse 1.4s ease-out infinite;
}

.server-badge-online {
    color: #1b8f3a;
    background: #e9f8ee;
    border-color: #bfe8cb;
}

.server-badge-offline {
    color: #b23a3a;
    background: #fdecec;
    border-color: #f4b7b7;
}

@keyframes server-dot-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.22);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
    }
}

/* Task search bar */
.task-search-bar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

.task-search-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Consolas', monospace;
    outline: none;
    min-width: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.task-search-input:focus {
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.15);
}

.task-search-btn {
    background: #007acc;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.task-search-btn:hover {
    background: #005a9e;
}

.task-search-btn:disabled {
    background: #c4c8ce;
    color: #f1f3f5;
    cursor: not-allowed;
    opacity: 1;
}

.task-search-error {
    padding: 4px 10px;
    color: #c62828;
    font-size: 11px;
    font-weight: 600;
    background: #ffebee;
    border-bottom: 1px solid #ffcdd2;
}

.task-search-success {
    padding: 4px 10px;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 600;
    background: #e8f5e9;
    border-bottom: 1px solid #c8e6c9;
}

.tasks-loading,
.tasks-empty {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.tasks-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 50px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.task-item:hover {
    border-color: #007acc;
    background: #f0f6fc;
    box-shadow: 0 1px 3px rgba(0, 122, 204, 0.12);
}

.task-item.task-selected {
    border-color: #007acc;
    background: #d6eaf8;
    box-shadow: 0 1px 4px rgba(0, 122, 204, 0.2);
}

.task-item.task-run-success {
    background: #eaf8ea;
    border-color: #b9e3bf;
}

.task-item.task-run-success:hover {
    background: #dff3df;
    border-color: #9fd9a8;
}

.task-item.task-run-error {
    background: #ffeef3;
    border-color: #f3bfd0;
}

.task-item.task-run-error:hover {
    background: #ffe4ec;
    border-color: #ec9fba;
}

.task-item.task-run-success.task-selected,
.task-item.task-run-error.task-selected {
    border-color: #007acc;
    box-shadow: 0 1px 4px rgba(0, 122, 204, 0.2);
}

.task-item.task-free {
    border-left: 3px solid #4caf50;
}

.task-order-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #007acc;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    font-family: 'Consolas', monospace;
}

.task-item.task-free .task-order-badge {
    background: #4caf50;
    font-size: 16px;
}

.task-title-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    padding-top: 4px;
}

.task-desc {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-remove-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid #e0b4b4;
    background: #fff5f5;
    color: #b23a3a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    margin-top: 1px;
}

.task-remove-btn:hover {
    background: #ffe8e8;
    border-color: #d88f8f;
}

/* --- SIDEBAR COLLAPSE WRAPPER --- */
.sidebar-wrapper {
    display: flex;
    position: relative;
    transition: width 0.2s ease;
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
}

.sidebar-wrapper.sidebar-collapsed {
    width: 32px;
    min-width: 32px;
}

/* --- TOGGLE BUTTON --- */
.sidebar-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 100%;
    z-index: 5;
    background: #e8e8e8;
    border: 1px solid #d0d0d0;
    border-left: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: #007acc;
    color: #fff;
    border-color: #007acc;
}

.sidebar-collapsed .sidebar-toggle {
    position: static;
    transform: none;
    border-radius: 0;
    border: none;
    border-right: 1px solid #d0d0d0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 10px 6px;
    font-size: 12px;
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #888;
}

.sidebar-collapsed .sidebar-toggle:hover {
    background: #007acc;
    color: #fff;
}

/* ============================================================= */
/* Responsive: dar ekranda sidebar gizlenir, paneller dikey olur */
/* ============================================================= */
@media (max-width: 900px) {
    .sidebar-wrapper {
        display: none !important;
    }

    .panes {
        flex-direction: column;
    }

    .code-pane {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .code-pane,
    .right-pane {
        flex: none;
        height: 50%;
    }
}

@media (max-width: 600px) {
    .toolbar {
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px 8px;
    }

    .run-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .cancel-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .warning-text {
        font-size: 0.7em;
    }

    .code-pane,
    .right-pane {
        height: 50%;
    }
}
/* --- SUNUCU CEVRIMDISI OVERLAY --- */
.offline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 30, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(3px);
}

.offline-box {
    background: #1e1e2e;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 40px 48px;
    text-align: center;
    color: #e0e0e0;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.offline-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.offline-box h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #ff6b6b;
}

.offline-box p {
    margin: 0 0 24px;
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
}

.offline-reload-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.offline-reload-btn:hover {
    background: #005a9e;
}

.task-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
}
