@import url('https://fonts.googleapis.com/css2?family=Oswald&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@media print {
    body {
        margin: 0 !important;
    }
}

.main-container {
    font-family: 'Lato';
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ck-content {
    font-family: 'Lato';
    line-height: 1.6;
    word-break: break-word;
    min-height: auto !important;
}

.editor-container_classic-editor .editor-container__editor {
    min-width: 795px;
    max-width: 795px;
}

.ck-content h3.category {
    font-family: 'Oswald';
    font-size: 20px;
    font-weight: bold;
    color: #555;
    letter-spacing: 10px;
    margin: 0;
    padding: 0;
}

.ck-content h2.document-title {
    font-family: 'Oswald';
    font-size: 50px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    border: 0;
}

.ck-content h3.document-subtitle {
    font-family: 'Oswald';
    font-size: 20px;
    color: #555;
    margin: 0 0 1em;
    font-weight: bold;
    padding: 0;
}

.ck-content p.info-box {
    --background-size: 30px;
    --background-color: #e91e63;
    padding: 1.2em 2em;
    border: 1px solid var(--background-color);
    background:
        linear-gradient(135deg, var(--background-color) 0%, var(--background-color) var(--background-size), transparent var(--background-size)),
        linear-gradient(135deg,
            transparent calc(100% - var(--background-size)),
            var(--background-color) calc(100% - var(--background-size)),
            var(--background-color));
    border-radius: 10px;
    margin: 1.5em 2em;
    box-shadow: 5px 5px 0 #ffe6ef;
}

.ck-content span.marker {
    background: yellow;
}

.ck-content span.spoiler {
    background: #000;
    color: #000;
}

.ck-content span.spoiler:hover {
    background: #000;
    color: #fff;
}

.ck-content .button {
    display: inline-block;
    width: 260px;
    border-radius: 8px;
    margin: 0 auto;
    padding: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.ck-content .button--green {
    background-color: #406b1e;
}

.ck-content .button--black {
    background-color: #141517;
}

.main-container {
    font-family: 'Lato', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.editor-container_classic-editor .editor-container__editor {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.editor-container_include-word-count.editor-container_classic-editor .editor-container__editor .ck-editor .ck-editor__editable {
    border-radius: 0;
}

.ck.ck-toolbar {
    flex-wrap: wrap;
    padding: 5px;
}

@media screen and (max-width: 768px) {
    .main-container {
        padding: 0 10px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 150px;
    }

    .ck.ck-toolbar {
        font-size: 14px;
    }

    .ck.ck-toolbar .ck.ck-toolbar__items {
        gap: 5px;
    }

    .ck-editor__editable {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-container {
        padding: 0 5px;
    }

    .ck.ck-toolbar {
        font-size: 12px;
    }

    .ck-editor__editable {
        font-size: 13px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 120px;
    }
}

.ck.ck-powered-by {
    display: none;
}

.ck.ck-evaluation-badge {
    display: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 40px !important;
}

@media (max-width: 1199px) {
    .ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
        top: 10px !important;
    }
}

/* show-format-symbols */
.editor-container p::after {
    content: " ¶";
    color: gray;
    font-size: 0.8em;
    pointer-events: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck-content.show-format-symbols span.whitespace::after {
    content: '⋅';
    margin-inline-start: -0.2em;
    color: #999;
}

.editor-container span.wrapped-br::before {
    content: '↵';
    color: #999;
}

/* Line-height */
.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6,
.ck-content .h1,
.ck-content .h2,
.ck-content .h3,
.ck-content .h4,
.ck-content .h5,
.ck-content .h6 {
    margin: 1em 0 1em 0;
    padding: 0;
    line-height: normal;
    font-weight: bold;
}

.ck-content code {
    margin: 0;
    padding: 0.15em 0.25em;
    background-color: #f7f8fa;
    border-radius: 2px;
    font-family: monospace;
    font-size: 1em;
    color: #e83e8c;
    word-wrap: break-word;
}

.underline-menu {
    z-index: 1000;
}

.ck-balloon-panel .ck-balloon-rotator .ck-balloon-rotator__content .underline-menu {
    z-index: 9999 !important;
    max-height: calc(100vh - 60px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
    overflow-y: auto;
}

.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-underline-apply-btn:hover,
.ck-underline-clear-btn:hover {
    background: #0285ff !important;
}

.selected {
    background-color: #aec4ff !important;
}

.hr-style-wrapper:hover,
.hr-style-option:hover {
    background-color: #aec4ff !important;
}

.ck-hr-apply-btn:hover,
.ck-hr-clear-btn:hover {
    background: #0285ff !important;
}

.ck.ck-balloon-panel.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 15px;
}

.ck-table-row-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: var(--ck-table-column-resizer-position-offset);
    top: 0;
    user-select: none;
    width: var(--ck-table-column-resizer-width);
    z-index: var(--ck-z-default);
}

.ck-table-row-resizer:hover {
    background: rgba(0, 0, 255, 0.6);
}

.wrap-text-right~* {
    clear: left !important;
}

.wrap-text-left~* {
    clear: right !important;
}

.ck-content .table .ck-table-resized {
    table-layout: auto !important;
}

/* Paste Form */
.ck.ck-balloon-panel.ck-balloon-panel_arrowless.ck-balloon-panel_visible.popup-before-paste {
    border-radius: 15px;
}

.ck-paste-options-form {
    display: flex;
    flex-direction: column;
    padding: 16px;
    width: 320px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative !important;
}

.ck-paste-options-form .ck-button {
    justify-content: center;
}

.ck-preview-box {
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.ck.ck-paste-overlay {
    max-height: calc(100vh - 200px) !important;
    max-width: 100% !important;
    overflow-y: auto;
    padding: 20px !important;
    border: 1px solid #ccc;
    margin-bottom: 1em;
}

.popup-before-paste {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    height: revert !important;
    width: 60% !important;
    max-height: calc(100vh - 60px);
    padding: 2rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.popup-before-paste::-webkit-scrollbar {
    width: 12px;
}

.popup-before-paste::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.popup-before-paste::-webkit-scrollbar-track {
    background-color: transparent;
}

.ck.ck-button.ck-button-paste-styles,
.ck.ck-button.ck-button-paste-plain {
    left: 0;
    width: 100%;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: inline;
}

.ck-button-paste-styles:hover,
.ck-button-paste-plain:hover {
    background-color: #0056b3;
}

.ck.ck-button.ck-button-paste-styles {
    border-radius: 0px 0px 0px 15px !important;
}

.ck.ck-button.ck-button-paste-plain {
    border-radius: 0px 0px 15px 0px !important;
}

.ck-button-container {
    display: flex;
    gap: 0px;
    height: 50px !important;
    z-index: 1;
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 4.5% !important;
}

.ck.ck-button.ck-button-close.ck-off {
    float: right;
    margin: 20px 20px 10px 10px;
    background: #cccccc;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
}

.ck-button-close .ck-off:hover {
    background: #ededed;
}

#paste-buttons-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ck.ck-powered-by,
.ck.ck-evaluation-badge {
    display: none;
}

.ck-off.ck-button_with-text {
    position: absolute;
    top: 2%;
}

.ck-paste-title {
    padding: 10px 10px 10px 20px !important;
    position: absolute !important;
    font-size: x-large !important;
    font-weight: bold !important;
}

.ck-paste-divider {
    border: none;
    height: 1px !important;
    background-color: #e0e0e0 !important;
    margin: 8px 0 !important;
    width: 97% !important;
    align-self: center !important;
}

#addTemplate:hover {
    background-color: #43ab43 !important;
    color: white !important;
}

#updateTemplate:hover {
    background-color: #f9b12d !important;
    color: white !important;
}

#deleteTemplate:hover {
    background-color: #f15252 !important;
    color: white !important;
}

#closeModal:hover {
    background-color: #f0f0f0 !important;
}

.ck-content ul.bullet-circle,
.ck-content ul.bullet-circle li {
    list-style-type: circle !important;
}

.ck-content ul.bullet-square,
.ck-content ul.bullet-square li {
    list-style-type: square !important;
}

.ck-content ul.bullet-arrow,
.ck-content ul.bullet-star,
.ck-content ul.bullet-diamond,
.ck-content ul.bullet-triangle,
.ck-content ul.custom-check,
.ck-content ul.custom-cross{
    list-style-type: none !important;
}

.ck-content ul.bullet-arrow li,
.ck-content ul.bullet-star li,
.ck-content ul.bullet-diamond li,
.ck-content ul.bullet-triangle li,
.ck-content ul.custom-check li,
.ck-content ul.custom-cross li {
    position: relative;
    list-style-type: none !important;
}

.ck-content ul.bullet-arrow li,
.ck-content ul.bullet-star li,
.ck-content ul.bullet-diamond li,
.ck-content ul.bullet-triangle li,
.ck-content ul.custom-check li,
.ck-content ul.custom-cross li {
    padding-left: 1.5em;
    text-indent: -1.5em;
}

.ck-content ul.bullet-arrow li p,
.ck-content ul.bullet-star li p,
.ck-content ul.bullet-diamond li p,
.ck-content ul.bullet-triangle li p,
.ck-content ul.custom-check li p,
.ck-content ul.custom-cross li p {
    margin: 0;
    padding: 0;
    display: inline;
}

.ck-content ul.bullet-arrow li::before {
    content: "➤";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-star li::before {
    content: "★";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-diamond li::before {
    content: "♦";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-triangle li::before {
    content: "►";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-check li::before {
    content: "✓";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-cross li::before {
    content: "✗";
    font-weight: bold;
    display: inline-block;
}

.ck-underline-apply-btn:hover {
    background-color: #0165cf !important;
}

.ck-underline-clear-btn:hover {
    background-color: #d63737 !important;
}

/* ============================================
   TABLE COLUMN/ROW HOVER STYLES - PRODUCTION
   For CKEditor 5 Table Styling Plugin
   ============================================ */

/* Base table container */
.ck-widget.table {
    position: relative;
}

.ck-widget.table table {
    position: relative;
    border-collapse: separate;
    border-spacing: 0;
}

/* ============================================
   COLUMN HOVER EFFECTS
   ============================================ */

/* Column hover highlighting */
.ck-widget.table table td:hover,
.ck-widget.table table th:hover {
    background-color: rgba(0, 102, 204, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.4) !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Visual column indicator on top border */
.ck-widget.table table td:hover::before,
.ck-widget.table table th:hover::before {
    content: "";
    position: absolute;
    top: -5px;
    /* left: -2px; */
    right: -2px;
    height: 5px;
    background: linear-gradient(90deg, #0066cc, #4da6ff);
    z-index: 15;
    border-radius: 3px 3px 0 0;
    pointer-events: none;
}

/* Column highlight classes */
.ck-widget.table table td.column-highlight,
.ck-widget.table table th.column-highlight {
    background-color: rgba(0, 102, 204, 0.08) !important;
    border-left: 2px solid rgba(0, 102, 204, 0.4) !important;
    border-right: 2px solid rgba(0, 102, 204, 0.4) !important;
}

.ck-widget.table table td.column-highlight:first-child,
.ck-widget.table table th.column-highlight:first-child {
    border-left: 3px solid #0066cc !important;
}

.ck-widget.table table td.column-highlight:last-child,
.ck-widget.table table th.column-highlight:last-child {
    border-right: 3px solid #0066cc !important;
}

/* Style indicators for styled columns */
.ck-widget.table table th[data-column-styled="true"]::after {
    content: "●";
    position: absolute;
    top: 2px;
    right: 2px;
    color: #0066cc;
    font-size: 10px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ROW HOVER EFFECTS
   ============================================ */

/* Row hover highlighting */
.ck-widget.table table tr:hover {
    background-color: rgba(34, 197, 94, 0.12) !important;
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.4) !important;
    position: relative !important;
    /* transform: translateX(2px); */
}

/* Row highlight classes */
.ck-widget.table table td.row-highlight,
.ck-widget.table table th.row-highlight {
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-top: 1px solid rgba(34, 197, 94, 0.3) !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* Row styling area */
.ck-widget.table table tbody tr {
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ck-widget.table table tbody tr:hover {
    border-left: 3px solid #22c55e;
    box-shadow: -3px 0 10px rgba(34, 197, 94, 0.2);
}

/* Style indicators for styled rows */
.ck-widget.table table tr[data-row-styled="true"]::before {
    content: "●";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    font-size: 12px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid #22c55e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ENHANCED VISUAL FEEDBACK
   ============================================ */

.ck-widget.table table {
    border-collapse: separate !important;
}

/* Table cell base styling */
.ck-widget.table table td,
.ck-widget.table table th {
    transition: all 0.2s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    border-right: 1px solid rgba(0, 102, 204, 0.1);
}

.ck-widget.table table tr {
    transition: all 0.2s ease !important;
}

/* Special styling for first row */
.ck-widget.table table tr:first-child td:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2), rgba(0, 102, 204, 0.1)) !important;
    border-top: 3px solid #0066cc !important;
    transform: translateY(-1px);
    font-weight: 600 !important;
    color: #0066cc !important;
}

/* ============================================
   UNIFIED FORM MENU STYLING
   ============================================ */

/* Base menu styling - ĐỒNG BỘ CHO CẢ 2 MENUS */
.column-menu,
.row-menu,
.cell-menu {
    padding: 10px !important;
    font-size: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 300px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    max-height: 600px !important;
    overflow-y: auto !important;
}

/* Menu headers - ĐỒNG BỘ - GRAY BACKGROUND FOR BOTH */
.column-menu>label:first-child,
.row-menu>label:first-child,
.cell-menu>label:first-child,
.column-menu>div:first-child,
.row-menu>div:first-child,
.cell-menu>div:first-child {
    font-size: 20px !important;
    width: 100% !important;
    text-align: center !important;
    font-weight: 1000 !important;
    color: #1f2937 !important;
    margin-bottom: 5px !important;
    padding: 8px 0 !important;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
}

/* HR separators - ĐỒNG BỘ */
.column-menu hr,
.row-menu hr,
.cell-menu hr {
    height: 2px !important;
    border: none !important;
    background: #ccc !important;
    margin: 8px 0 !important;
}

/* Form rows - ĐỒNG BỘ */
.column-menu>div[style*="display: flex"],
.row-menu>div[style*="display: flex"],
.cell-menu>div[style*="display: flex"] {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

/* Labels - ĐỒNG BỘ */
.column-menu label,
.row-menu label,
.cell-menu label {
    font-size: 13px !important;
    text-align: center !important;
    color: #374151 !important;
    font-weight: 500 !important;
    min-width: 80px !important;
}

/* Input fields - ĐỒNG BỘ */
.column-menu input[type="text"],
.row-menu input[type="text"],
.cell-menu input[type="text"] {
    flex: 1 !important;
    padding: 4px !important;
    font-size: 13px !important;
    text-align: center !important;
    border: 1px solid #dedede !important;
    border-radius: 4px !important;
    background: white !important;
    transition: border-color 0.2s ease !important;
}

.column-menu input[type="text"]:focus,
.row-menu input[type="text"]:focus,
.cell-menu input[type="text"]:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.column-menu input[type="text"]:hover,
.row-menu input[type="text"]:hover,
.cell-menu input[type="text"]:hover {
    border-color: #9ca3af !important;
}

/* Select dropdowns - ĐỒNG BỘ */
.column-menu select,
.row-menu select,
.cell-menu select {
    padding: 4px !important;
    font-size: 13px !important;
    border: 1px solid #dedede !important;
    border-radius: 4px !important;
    background: white !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
    min-width: 60px !important;
}

.column-menu select:focus,
.row-menu select:focus,
.cell-menu select:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.column-menu select:hover,
.row-menu select:hover,
.cell-menu select:hover {
    border-color: #9ca3af !important;
}

/* Buttons - ĐỒNG BỘ */
.ck-column-apply-btn,
.ck-column-clear-btn,
.ck-row-apply-btn,
.ck-row-clear-btn,
.ck-cell-apply-btn,
.ck-cell-clear-btn {
    flex: 1 !important;
    padding: 6px !important;
    cursor: pointer !important;
    text-align: center !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    text-transform: capitalize !important;
}

/* Apply buttons - ĐỒNG BỘ */
.ck-column-apply-btn,
.ck-row-apply-btn,
.ck-cell-apply-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
}

.ck-column-apply-btn:hover,
.ck-row-apply-btn:hover,
.ck-cell-apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Clear buttons - ĐỒNG BỘ */
.ck-column-clear-btn,
.ck-row-clear-btn,
.ck-cell-clear-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3) !important;
}

.ck-column-clear-btn:hover,
.ck-row-clear-btn:hover,
.ck-cell-clear-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4) !important;
}

/* Button container - ĐỒNG BỘ */
.column-menu>div:last-child,
.row-menu>div:last-child,
.cell-menu>div:last-child {
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Info boxes cho từng menu - KHÁC BIỆT MÀU SẮC */
.column-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #0066cc !important;
    text-align: center !important;
    padding: 8px !important;
    background: #e0f2fe !important;
    border: 1px solid #81d4fa !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

.row-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #22c55e !important;
    text-align: center !important;
    padding: 8px !important;
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

.cell-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #8b5cf6 !important;
    text-align: center !important;
    padding: 8px !important;
    background: #faf5ff !important;
    border: 1px solid #c084fc !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

/* Enhanced placeholders - ĐỒNG BỘ */
.column-menu input::placeholder,
.row-menu input::placeholder,
.cell-menu input::placeholder {
    color: #9ca3af !important;
    font-style: italic !important;
    font-size: 12px !important;
}

/* Section dividers - special styling cho row menu có nhiều sections */
.row-menu>div:nth-child(even) {
    border-top: 1px solid #f3f4f6 !important;
    padding-top: 8px !important;
    margin-top: 8px !important;
}

/* ============================================
   ANIMATIONS - ĐỒNG BỘ
   ============================================ */

@keyframes slideInMenu {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    70% {
        transform: scale(0.9);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply animations - ĐỒNG BỘ */
.column-menu,
.row-menu,
.cell-menu {
    animation: slideInMenu 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.ck-widget.table table th[data-column-styled="true"]::after,
.ck-widget.table table tr[data-row-styled="true"]::before {
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

.ck-column-apply-btn:active,
.ck-column-clear-btn:active,
.ck-row-apply-btn:active,
.ck-row-clear-btn:active,
.ck-cell-apply-btn:active,
.ck-cell-clear-btn:active {
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

/* ============================================
   RESPONSIVE DESIGN - ĐỒNG BỘ
   ============================================ */

@media (max-width: 768px) {

    .column-menu,
    .row-menu,
    .cell-menu {
        width: 280px !important;
        max-width: 90vw !important;
        margin: 10px !important;
        font-size: 13px !important;
    }

    .ck-widget.table table th,
    .ck-widget.table table td {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 8px !important;
    }

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover {
        background-color: rgba(0, 102, 204, 0.05) !important;
        box-shadow: inset 0 0 0 1px rgba(0, 102, 204, 0.2) !important;
    }

    .ck-widget.table table tr:hover {
        background-color: rgba(34, 197, 94, 0.05) !important;
        box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2) !important;
    }

    .ck-column-apply-btn,
    .ck-column-clear-btn,
    .ck-row-apply-btn,
    .ck-row-clear-btn,
    .ck-cell-apply-btn,
    .ck-cell-clear-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {

    .ck-widget.table table th[data-column-styled="true"]::after,
    .ck-widget.table table tr[data-row-styled="true"]::before {
        display: none !important;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        padding: 8px !important;
        width: 260px !important;
        gap: 8px !important;
    }
}

/* ============================================
   ACCESSIBILITY - ĐỒNG BỘ
   ============================================ */

@media (prefers-contrast: high) {

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover {
        background-color: rgba(0, 0, 0, 0.1) !important;
        border: 2px solid #000;
        box-shadow: none;
    }

    .ck-widget.table table tr:hover {
        background-color: rgba(0, 0, 0, 0.05) !important;
        border: 2px solid #000;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ck-widget.table table td,
    .ck-widget.table table th,
    .ck-widget.table table tr {
        transition: none;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        animation: none !important;
    }
}

/* Focus states for keyboard navigation - ĐỒNG BỘ */
.ck-widget.table table td:focus,
.ck-widget.table table th:focus {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
    background-color: rgba(0, 102, 204, 0.1) !important;
}

.ck-widget.table table tr:focus {
    outline: 2px solid #22c55e;
    outline-offset: -2px;
    background-color: rgba(34, 197, 94, 0.1) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Disable hover effects when needed */
.table-styling-disabled .ck-widget.table table td:hover,
.table-styling-disabled .ck-widget.table table th:hover,
.table-styling-disabled .ck-widget.table table tr:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Enhanced styling for tables with custom styles */
.ck-widget.table[data-has-column-styles] {
    border-top: 3px solid #0066cc;
}

.ck-widget.table[data-has-row-styles] {
    border-left: 3px solid #22c55e;
}

.ck-widget.table[data-has-both-styles] {
    border: 3px solid #8b5cf6;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .ck-widget.table table th[data-column-styled="true"]::after,
    .ck-widget.table table tr[data-row-styled="true"]::before {
        display: none !important;
    }

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover,
    .ck-widget.table table tr:hover {
        background-color: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        display: none !important;
    }
}