body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f6f9;
}

.app-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-panel {
    flex: 1;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.hex-editor-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.hex-editor-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

#hexInput {
    width: 100%;
    height: 80px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    resize: vertical;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#btnConnect { background-color: #007bff; color: white; }
#btnDisconnect { background-color: #dc3545; color: white; }
.btn-calc { background-color: #17a2b8; color: white; }
#btnSendManual { background-color: #28a745; color: white; }

.btn:disabled {
    background-color: #6c757d !important;
    opacity: 0.6;
    cursor: not-allowed;
}

.log-container {
    margin-top: 20px;
}

#connStatus {
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fff;
    border-left: 5px solid #dc3545;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#serialLog {
    width: 100%;
    height: 200px;
    background-color: #1e1e1e;
    color: #10b981;
    font-family: monospace;
    padding: 12px;
    border-radius: 6px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* ДЕСЕН ВЕРТИКАЛЕН ПАНЕЛ */
.commands-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 300px;
    box-sizing: border-box;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.commands-sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.auto-send-wrapper {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #e8f4fd;
    border: 1px solid #bbeeef;
    border-radius: 6px;
}

.auto-send-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: bold;
    color: #0c5460;
    cursor: pointer;
}

.auto-send-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.commands-sidebar button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.commands-sidebar button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateX(4px);
}

.commands-sidebar button span {
    font-weight: bold;
    font-size: 14px;
    color: #212529;
}

.commands-sidebar button small {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}
