
.console {
    width: 100%;
    margin: 24px auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}

/* HEADER */

.console-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 16px;
    box-sizing: border-box;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #263448;
    font: 600 13px Arial, sans-serif;
}

.console-header::before {
    content: "● ● ●";
    flex-shrink: 0;
    color: #22c55e;
    font: 10px Arial, sans-serif;
    letter-spacing: 2px;
}

.console.offline .console-header::before {
    color: #ef4444;
}

/* CONTENT */

.console-content {
    position: relative;
    box-sizing: border-box;
    height: 360px;
    padding: 16px;
    overflow: auto;
    background: #fff;
    color: #334155;
    font: 12px/1.8 Consolas, "Courier New", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.console-content::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.console-content::-webkit-scrollbar-track {
    background: #f8fafc;
}

.console-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.console-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* LOADING */

.console-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.console-loading-spinner {
    width: 38px;
    height: 38px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border: 3px solid #e5e7eb;
    border-top-color: #f58220;
    border-right-color: #f58220;
    border-radius: 50%;
    animation: console-spin .8s linear infinite;
}

.console-loading-title {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.console-loading-text {
    max-width: 360px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

@keyframes console-spin {
    to {
        transform: rotate(360deg);
    }
}

/* FOOTER */

.console-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    box-sizing: border-box;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.txt-console {
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    outline: none;
    color: #334155;
    font: 13px Consolas, "Courier New", monospace;
    transition: border-color .2s, box-shadow .2s;
}

.txt-console::placeholder {
    color: #94a3b8;
}

.txt-console:focus {
    border-color: #f58220;
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .12);
}

/* BUTTON */

.btn-console {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 40px;
    padding: 0 20px;
    background: #f58220;
    border: 1px solid #f58220;
    border-radius: 5px;
    color: #fff;
    font: 600 13px Arial, sans-serif;
    cursor: pointer;
    transition: background .2s;
}

.btn-console:hover {
    background: #e87312;
    border-color: #e87312;
}

.btn-console:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* OFFLINE */

.console.offline .txt-console,
.console.offline .btn-console {
    opacity: .5;
    cursor: not-allowed;
}

/* RESPONSIVE */

@media (max-width: 576px) {
    .console {
        margin: 16px auto;
    }

    .console-content {
        height: 300px;
        padding: 12px;
        font-size: 11px;
    }

    .console-footer {
        gap: 8px;
        padding: 9px;
    }

    .btn-console {
        padding: 0 14px;
    }
}

.file-editor {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow: hidden;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
    font-family: Arial, sans-serif;
}

.file-editor form {
    display: block;
    width: 100%;
    margin: 0;
}

.file-editor_header {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 22px;
    color: #1e293b;
    background: #fff;
    border-bottom: 1px solid #edf0f4;
    font-size: 16px;
    font-weight: 700;
}

.file-editor_content {
    display: block;
    width: 100%;
    padding: 22px;
}

.file-editor .form-control {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 20px;
    padding: 0;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.file-editor .form-control label {
    display: block;
    margin: 0 0 9px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.file-editor select.form-control {
    height: 44px;
    padding: 0 13px;
    background-color: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 7px;
    font-size: 13px;
}

.file-editor select.form-control:focus {
    border-color: #f58220;
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .12);
}

.file-editor textarea.form-control {
    display: block;
    width: 100%;
    height: 700px !important;
    min-height: 350px;
    max-height: none;
    margin: 0;
    padding: 16px;
    resize: vertical;
    color: #334155;
    background: #fbfcfe;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
    overflow: auto;
    box-shadow: none;
}

.file-editor textarea.form-control:focus {
    color: #1e293b;
    background: #fff;
    border-color: #f58220;
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .09);
}

.file-editor input.btn.btn-primary,
.file-editor input.btn-block {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 20px;
    color: #fff;
    background: #f58220;
    border: 1px solid #f58220;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(245, 130, 32, .15);
    transition: background .2s, box-shadow .2s;
}

.file-editor input.btn.btn-primary:hover,
.file-editor input.btn-block:hover {
    color: #fff;
    background: #e87312;
    border-color: #e87312;
    box-shadow: 0 4px 10px rgba(245, 130, 32, .18);
}

.file-editor input.btn.btn-primary:focus,
.file-editor input.btn-block:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .2);
}

@media (max-width: 768px) {
    .file-editor {
        margin: 16px 0;
        border-radius: 9px;
    }

    .file-editor_header {
        min-height: 50px;
        padding: 0 15px;
        font-size: 15px;
    }

    .file-editor_content {
        padding: 15px;
    }

    .file-editor textarea.form-control {
        height: 650px !important;
        min-height: 300px;
        padding: 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .file-editor_content {
        padding: 12px;
    }

    .file-editor textarea.form-control {
        height: 600px !important;
    }
}
