/* Office platform — global (File Manager, Spreadsheet, Word, Email Center) */

.odm-btn {
    border: none;
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.odm-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.odm-btn-primary {
    background: #0d6efd;
    color: #fff;
    border: 1px solid #0d6efd;
    box-shadow: 0 1px 2px rgba(13, 110, 253, 0.25);
}

.odm-btn-primary:hover:not(:disabled) {
    background: #0b5ed7;
    border-color: #0a58ca;
}

.odm-btn-secondary {
    background: #fff;
    color: #0d6efd;
    border: 1px solid #93c5fd;
    box-shadow: 0 1px 2px rgba(13, 110, 253, 0.12);
}

.odm-btn-secondary:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #0d6efd;
}

.odm-btn-outline {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.odm-btn-outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
}

.odm-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid transparent;
}

.odm-btn-ghost:hover:not(:disabled) {
    background: #f1f5f9;
    color: #334155;
}

.odm-btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

.odm-msg {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.odm-msg.info {
    color: #1e40af;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.odm-cap-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.odm-cap-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.odm-cap-search {
    min-width: 220px;
    flex: 1 1 220px;
}

.office-editor-page {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: calc(100dvh - 140px);
    box-sizing: border-box;
}

.office-editor-toolbar,
.ec-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border-radius: 10px;
    padding: 8px 10px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.office-editor-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.office-editor-picker {
    min-width: 260px;
    flex: 1 1 260px;
}

.office-editor-toolbar .odm-btn-secondary,
.ec-toolbar .odm-btn-secondary {
    background: #fff;
    color: #0d6efd;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.office-editor-toolbar .odm-btn-primary,
.ec-toolbar .odm-btn-primary {
    background: #1e3a8a;
    color: #fff;
    border: 1px solid #1e40af;
}

.office-editor-toolbar .odm-btn-primary:hover:not(:disabled),
.ec-toolbar .odm-btn-primary:hover:not(:disabled) {
    background: #1e40af;
}

.office-sheet-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    min-height: 420px;
    overflow: auto;
}

.office-sheet-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 120px);
    min-height: 0;
}

.office-sheet-fit {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.office-open-dialog {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 420px;
}

.office-open-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.office-open-hint {
    font-size: 11px;
    color: #64748b;
}

.office-open-grid {
    flex: 1;
    min-height: 360px;
}

.office-sheet-host {
    flex: 1;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
}

.office-sheet-grid {
    height: calc(100dvh - 220px);
    font-size: 12px;
}

.office-rich-host {
    flex: 1;
    min-height: 480px;
    background: #e9ecef;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.office-word-page .office-rich-host ::deep .dx-richedit,
.office-word-page .office-rich-host ::deep .dxreView {
    width: 100% !important;
    min-height: 480px;
}

.ec-banner {
    font-size: 12px;
    color: #0f172a;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    padding: 8px 12px;
}

.ec-empty {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}
