body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
}

.admin-header {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.block-buttons {
    display: flex;
    gap: 10px;
}

.btn-block {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: opacity 0.2s;
}

.btn-block:hover {
    opacity: 0.8;
}

.btn-block.active {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #333;
}

.bg-blue { background: #3498db; }
.bg-yellow { background: #f1c40f; color: #333; }
.bg-green { background: #2ecc71; }
.bg-pink { background: #e74c3c; }

.admin-layout {
    display: flex;
    height: calc(100vh - 65px);
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.search-box {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.question-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

.question-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.question-item:hover {
    background: #f9f9f9;
}

.question-item.active {
    background: #ebf5fb;
    border-left: 4px solid #3498db;
}

.q-id {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.q-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Editor */
.editor-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f7fa;
}

.editor-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto;
}

.editor-group {
    margin-bottom: 20px;
}

.editor-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.editor-input, .editor-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
}

.editor-textarea {
    resize: vertical;
    min-height: 100px;
}

.editor-textarea.large {
    min-height: 150px;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.option-radio {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Save Bar */
.save-bar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-save {
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #27ae60;
}

.save-status {
    font-weight: bold;
    color: #2ecc71;
    display: none;
}

/* Placeholder */
.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
    text-align: center;
}

/* Стандартизация редактора под стиль приложения */
.ql-editor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    color: #333 !important;
}

/* Защита от кривого копипаста: сбрасываем все инлайн-стили (цвет фона, огромные шрифты и тд) */
.ql-editor * {
    font-size: 16px !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    background-color: transparent !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

/* Разрешаем только базовое форматирование */
.ql-editor strong, .ql-editor b, .ql-editor strong * {
    font-weight: bold !important;
}
.ql-editor em, .ql-editor i, .ql-editor em * {
    font-style: italic !important;
}
.ql-editor u, .ql-editor u * {
    text-decoration: underline !important;
}

.ql-editor p {
    margin-bottom: 0 !important;
}
