html { scroll-behavior: smooth; }
  body { font-feature-settings: "ss01","cv01"; }
  .tnum { font-variant-numeric: tabular-nums; }
  .ph-input { width: 100%; height: 2.5rem; padding: 0 0.875rem; border-radius: 0.75rem; background: #f1f5f9; border: 1px solid transparent; outline: none; font-size: 0.875rem; transition: .15s; }
  .ph-input:focus { background: #fff; border-color: #608cfa; }
  .ph-input::placeholder { color: #94a3b8; }
  .dark .ph-input { background: #1e293b; color: #f1f5f9; }
  .dark .ph-input:focus { background: #0f172a; }
  textarea.ph-input { height: auto; padding: 0.625rem 0.875rem; resize: vertical; line-height: 1.5; }
  .ph-check, .ph-radio { width: 1.05rem; height: 1.05rem; accent-color: #2563eb; cursor: pointer; flex: none; }
  /* Scrollbar */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: rgba(100,116,139,.35); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.55); background-clip: padding-box; }
  /* nav active marker */
  .nav-link.active, .nav-parent.active { background: rgba(37,99,235,.10); color: #1d4ed8; }
  .dark .nav-link.active, .dark .nav-parent.active { background: rgba(96,140,250,.14); color: #93b4fd; }
  .nav-link.active .nav-ico { color: inherit; }
  .view { display: none; }
  .view.active { display: block; animation: fade .35s ease both; }
  @keyframes fade { from { transform: translateY(8px); } to { transform: none; } }
  @keyframes pop { from { transform: translateY(10px); } to { transform: none; } }
  .pop { animation: pop .5s cubic-bezier(.2,.7,.3,1) both; }
  @media (prefers-reduced-motion: reduce) { .pop, .view.active { animation: none !important; } }
  /* sidebar collapse */
  .sidebar-collapsed .label, .sidebar-collapsed .nav-group-label, .sidebar-collapsed .brand-text, .sidebar-collapsed .search-box-wrapper { display:none !important; }
  .sidebar-collapsed { width: 76px !important; }
  .sidebar-collapsed .nav-link { justify-content: center; }
  .sidebar-collapsed .nav-link .chev { display:none; }
  /* an auto-opened <details> (current route matches a nav group) still renders its
     submenu list even while collapsed; there's no rail width for that text, so hide it */
  .sidebar-collapsed details > div { display: none !important; }

/* ── Select2 overrides ────────────────────────────────────────────────────── */
.select2-container--default .select2-selection--single {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    min-height: 2.25rem !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    outline: none !important;
    transition: all 0.2s ease-in-out;
    width: 100% !important;
}
.dark .select2-container--default .select2-selection--single {
    background-color: rgba(2,6,23,0.4) !important;
    border-color: #1e293b !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #3b66f5 !important;
    box-shadow: 0 0 0 1px #3b66f5;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    font-size: 0.875rem !important;
    color: #1e293b !important;
    line-height: 2.25rem !important;
}
.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f1f5f9 !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}
.dark .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #64748b !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.25rem !important;
    right: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #94a3b8;
    font-size: 1rem;
    margin-right: 4px;
}
.select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05) !important;
    z-index: 99999 !important;
    padding: 6px !important;
}
.dark .select2-dropdown {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    background-color: #f8fafc !important;
    padding: 6px 10px !important;
    outline: none !important;
    font-size: 0.875rem !important;
}
.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: #1e293b !important;
    background-color: rgba(2,6,23,0.4) !important;
    color: #f1f5f9 !important;
}
.select2-results__option {
    font-size: 0.875rem !important;
    padding: 8px 12px !important;
    border-radius: 0.5rem !important;
    margin-bottom: 2px !important;
    transition: all 0.15s ease-in-out !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3b66f5 !important;
    color: #ffffff !important;
}
.dark .select2-results__option[aria-selected=true] {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

/* ── Media upload wrapper ─────────────────────────────────────────────────── */
.media-upload-btn-wrapper {
    background-color: transparent;
    padding: 0;
    width: 100%;
}
#cat-upload-prompt .media_upload_form_btn {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}
#cat-img-card .media_upload_form_btn,
#cat-img-card #cat-img-remove {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    min-width: 100px !important;
    height: 38px !important;
    padding: 0 16px !important;
}
.media-upload-btn-wrapper .img-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 8px;
    width: 100%;
}
.media-upload-btn-wrapper .img-wrap .img-inner-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
    transition: all 0.2s ease-in-out;
}
.dark .media-upload-btn-wrapper .img-wrap .img-inner-wrap {
    border-color: #334155;
    background-color: #0f172a;
}
.media-upload-btn-wrapper .img-wrap .img-inner-wrap:hover { transform: translateY(-2px); }
.media-upload-btn-wrapper .img-wrap .img-inner-wrap img,
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview img,
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview .thumbnail img,
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview .thumbnail .centered img {
    width: 100% !important; height: 100% !important;
    max-width: 100% !important; max-height: 100% !important;
    min-width: 100% !important; min-height: 100% !important;
    position: static !important; transform: none !important;
    object-fit: cover !important; display: block !important;
}
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .rmv-span {
    position: absolute; top: 6px; right: 6px; z-index: 20;
    width: 22px; height: 22px; border-radius: 50%;
    background-color: rgba(15,23,42,.6); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.1); transition: all 0.2s ease;
}
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .rmv-span:hover { background-color: #ef4444; transform: scale(1.1); }
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .rmv-span i { display: none !important; }
.media-upload-btn-wrapper .img-wrap .img-inner-wrap .rmv-span::before {
    content: "\2715"; font-family: Arial, sans-serif;
    font-size: 9px; font-weight: bold; color: #fff; display: block; line-height: 1;
}
.media-upload-btn-wrapper .img-wrap .attachment-preview,
.media-upload-btn-wrapper .img-wrap .thumbnail,
.media-upload-btn-wrapper .img-wrap .centered {
    width: 100% !important; height: 100% !important;
    max-width: 100% !important; max-height: 100% !important;
    position: relative !important; top: 0 !important; left: 0 !important;
    transform: none !important; display: block !important; background: transparent !important;
}

/* ── Bootstrap modal / tab shim (media uploader) ─────────────────────────── */
.modal { position: fixed; top: 0; left: 0; z-index: 1055; display: none; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; background-color: rgba(0,0,0,.5); }
.modal.show { display: block !important; }
.modal-dialog { position: relative; width: auto; margin: 1.75rem auto; max-width: 850px; pointer-events: none; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background-color: #fff; background-clip: padding-box; border: 1px solid rgba(0,0,0,.2); border-radius: 1rem; outline: 0; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
.dark .modal-content { background-color: #0f172a; border-color: #334155; }
.modal-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid #e2e8f0; border-top-left-radius: calc(1rem - 1px); border-top-right-radius: calc(1rem - 1px); }
.dark .modal-header { border-bottom-color: #334155; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1.5rem; }
.modal-footer { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; justify-content: flex-end; padding: 1.25rem 1.5rem; border-top: 1px solid #e2e8f0; border-bottom-right-radius: calc(1rem - 1px); border-bottom-left-radius: calc(1rem - 1px); }
.dark .modal-footer { border-top-color: #334155; }
.close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: #94a3b8; transition: color 0.15s ease; }
.close:hover { color: #ef4444; }
.nav-tabs { border-bottom: 1px solid #e2e8f0; display: flex; flex-wrap: wrap; padding-left: 0; margin-bottom: 1.5rem; list-style: none; gap: 8px; }
.dark .nav-tabs { border-bottom-color: #334155; }
.nav-tabs .nav-link { margin-bottom: -1px; background: 0 0; border: 1px solid transparent; border-top-left-radius: .5rem; border-top-right-radius: .5rem; display: block; padding: .625rem 1.25rem; color: #64748b; text-decoration: none; font-size: 13px; font-weight: 600; transition: all .15s ease-in-out; }
.dark .nav-tabs .nav-link { color: #94a3b8; }
.nav-tabs .nav-link.active { color: #3b82f6; background-color: #fff; border-color: #e2e8f0 #e2e8f0 #fff; }
.dark .nav-tabs .nav-link.active { color: #fff; background-color: #0f172a; border-color: #334155 #334155 #0f172a; }
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }

/* ── Blog List Page ───────────────────────────────────────────────────────── */
.blog-table-wrapper { overflow-x: auto; }
@media (min-width: 1024px) {
    #blog_table_content,
    #blog_table_content .blog-table-wrapper { overflow: visible !important; }
}

/* Loader Customization */
.loader_bars { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #3b66f5; border-top-color: transparent; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Media Uploader Specific Styles (used in Site Identity, Staff Add, etc.) */
.card-action-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; height: 36px !important; padding: 0 18px !important; min-width: 100px !important; border-radius: 10px !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important; box-sizing: border-box !important; }
.card-action-btn svg { width: 15px !important; height: 15px !important; margin: 0 !important; padding: 0 !important; display: block !important; flex-shrink: 0 !important; }
.card-action-btn span { display: block !important; line-height: 1 !important; padding-top: 1px !important; }
.preview-container { width: 80px; height: 80px; overflow: hidden; display: flex; align-items: center; justify-content: center; }

/* Thumbnail */
.blog-thumb-wrap { width: 48px; height: 48px; border-radius: 0.5rem; overflow: hidden; border: 1px solid #e2e8f0; background: #f1f5f9; flex-shrink: 0; }
.dark .blog-thumb-wrap { border-color: #334155; background: #1e293b; }
.blog-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.blog-thumb-placeholder svg { width: 20px; height: 20px; color: #94a3b8; }

/* Title truncation with native tooltip */
.title-truncate { max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }

/* =========================================================
   Basic Settings – Toggle Switch
   ========================================================= */
.bs-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}
.bs-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.bs-toggle-track {
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: background 0.2s;
    position: relative;
    flex-shrink: 0;
}
.dark .bs-toggle-track { background: #334155; }
.bs-toggle input:checked + .bs-toggle-track { background: #3b66f5; }
.bs-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform 0.2s;
}
.bs-toggle input:checked + .bs-toggle-track .bs-toggle-thumb { transform: translateX(20px); }

/* Toggle row card */
.bs-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e8edf5;
    transition: border-color 0.15s, background 0.15s;
}
.dark .bs-toggle-row { background: #0f172a; border-color: #1e293b; }
.bs-toggle-row:hover { border-color: #c7d2fe; }
.dark .bs-toggle-row:hover { border-color: rgba(59,102,245,0.35); }
.bs-toggle-row-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}
.dark .bs-toggle-row-title { color: #f1f5f9; }
.bs-toggle-row-hint {
    font-size: 0.6875rem;
    color: #64748b;
    margin: 2px 0 0;
    line-height: 1.4;
}
.dark .bs-toggle-row-hint { color: #94a3b8; }

/* Title truncation with native tooltip */
.blog-title-cell { max-width: 240px; }
.blog-title-truncate {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    cursor: default;
}
.dark .blog-title-truncate { color: #f1f5f9; }

/* Status dot */
.blog-status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.blog-status-active { background-color: #10b981; }
.blog-status-draft  { background-color: #f59e0b; }

/* ── Blog Create / Edit Form ──────────────────────────────────────────────── */

/* Permalink bar */
.blog-permalink-bar { display: flex; align-items: center; gap: 0.5rem; }

/* ── Summernote Lite — Classic style with Tailwind colors ─────────────────── */

/* Fix box-sizing so summernote's internal pixel measurements stay correct.
 * Tailwind CDN sets `* { box-sizing: border-box }` globally; we revert only
 * inside the editor so toolbar/button widths aren't miscalculated. */
.note-editor,
.note-editor * { box-sizing: content-box !important; }

/* ── Outer frame ── */
.note-editor.note-frame {
    border-radius: 0.75rem !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.05) !important;
}
.dark .note-editor.note-frame { border-color: #334155 !important; }

/* ── Toolbar ── */
.note-editor .note-toolbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 6px 10px 5px !important;
    line-height: 1 !important;
}
.dark .note-editor .note-toolbar {
    background-color: #1e293b !important;
    border-bottom-color: #334155 !important;
}

/*
 * Button groups — IMPORTANT: overflow must be visible so dropdown menus
 * (position:absolute children) are not clipped. Use border-left separators
 * between groups for visual separation instead of an overflow:hidden container.
 */
.note-toolbar .note-btn-group {
    display: inline-block !important;
    position: relative !important;
    overflow: visible !important;
    margin: 2px 1px !important;
    background: transparent !important;
    vertical-align: middle !important;
    border: none !important;
}
.note-toolbar .note-btn-group + .note-btn-group {
    border-left: 1px solid #e2e8f0 !important;
    padding-left: 2px !important;
    margin-left: 2px !important;
}
.dark .note-toolbar .note-btn-group + .note-btn-group {
    border-left-color: #334155 !important;
}

/* Individual buttons within a group */
.note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 5px !important;
    margin: 1px !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 5px !important;
    color: #374151 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}
.dark .note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button) { color: #94a3b8 !important; }

/* Hover & active states */
.note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button):hover {
    background-color: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}
.dark .note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button):hover {
    background-color: #334155 !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
.note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button).active,
.note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button):active {
    background-color: #dbeafe !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
}
.dark .note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button).active,
.dark .note-toolbar .note-btn:not(.note-color-btn):not(.note-current-color-button):active {
    background-color: rgba(37,99,235,.2) !important;
    border-color: rgba(37,99,235,.4) !important;
    color: #93b4fd !important;
}

/* Dropdown menus */
.note-dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05) !important;
    padding: 4px !important;
    z-index: 9999 !important;
    min-width: 130px !important;
}
/* Scrollable dropdowns for font families and sizes */
.note-dropdown-menu:not(.note-color-all) {
    max-height: 240px !important;
    overflow-y: auto !important;
}
.dark .note-dropdown-menu {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
.note-dropdown-item {
    display: block !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    color: #374151 !important;
    padding: 5px 10px !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
}
.dark .note-dropdown-item { color: #94a3b8 !important; }
.note-dropdown-item:hover,
.note-dropdown-item.checked {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}
.dark .note-dropdown-item:hover,
.dark .note-dropdown-item.checked {
    background-color: rgba(37,99,235,.1) !important;
    color: #93b4fd !important;
}

/* Ensure background color buttons in palette display their colors properly */
.note-color-palette .note-color-btn {
    border-radius: 3px !important;
    cursor: pointer !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    margin: 2px !important;
    box-sizing: border-box !important;
}

/* ── Editable content area ── */
.note-editor .note-editing-area .note-editable {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 1rem 1.25rem !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    min-height: 200px !important;
}
.dark .note-editor .note-editing-area .note-editable {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

/* Content typography (Tailwind's preflight strips these from all elements) */
.note-editable p          { margin-bottom: 0.5em !important; }
.note-editable ul         { list-style: disc !important; padding-left: 2em !important; margin: 0.5em 0 !important; }
.note-editable ol         { list-style: decimal !important; padding-left: 2em !important; margin: 0.5em 0 !important; }
.note-editable h1         { font-size: 2em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable h2         { font-size: 1.5em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable h3         { font-size: 1.17em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable h4         { font-size: 1em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable h5         { font-size: 0.83em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable h6         { font-size: 0.67em !important; font-weight: 700 !important; margin: 0.5em 0 !important; }
.note-editable blockquote { border-left: 4px solid #e2e8f0 !important; padding-left: 1em !important; margin: 0.5em 0 !important; color: #64748b !important; }
.dark .note-editable blockquote { border-left-color: #334155 !important; }
.note-editable a          { color: #2563eb !important; text-decoration: underline !important; }
.note-editable pre        { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 6px !important; padding: 0.75rem !important; font-family: monospace !important; font-size: 13px !important; overflow-x: auto !important; }
.dark .note-editable pre  { background: #1e293b !important; border-color: #334155 !important; color: #f1f5f9 !important; }
.note-editable table      { border-collapse: collapse !important; width: 100% !important; margin: 0.5em 0 !important; }
.note-editable table td,
.note-editable table th   { border: 1px solid #e2e8f0 !important; padding: 6px 10px !important; font-size: 13px !important; }
.dark .note-editable table td,
.dark .note-editable table th { border-color: #334155 !important; }

/* ── Status bar (resize handle) ── */
.note-editor .note-statusbar {
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 0.75rem 0.75rem !important;
    background-color: #f8fafc !important;
}
.dark .note-editor .note-statusbar {
    border-top-color: #334155 !important;
    background-color: #1e293b !important;
}

/* ── Code view ── */
.note-editor .note-codable {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    padding: 1rem !important;
}

/* ── Popover (link / image controls that float above selected content) ── */
.note-popover .popover-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.625rem !important;
    padding: 4px !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1) !important;
}
.dark .note-popover .popover-content {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
.note-popover .popover-content .note-btn-group {
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
}
.dark .note-popover .popover-content .note-btn-group { border-color: #334155 !important; }
.note-popover .popover-content .note-btn {
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 6px !important;
    background-color: transparent !important;
    border: none !important;
    border-right: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    color: #374151 !important;
}
.note-popover .popover-content .note-btn-group .note-btn:last-child { border-right: none !important; }
.note-popover .popover-content .note-btn:hover {
    background-color: #eff6ff !important;
    color: #2563eb !important;
}
.dark .note-popover .popover-content .note-btn { color: #94a3b8 !important; border-right-color: #334155 !important; }
.dark .note-popover .popover-content .note-btn:hover { background-color: rgba(37,99,235,.15) !important; color: #93b4fd !important; }

/* ── Color palette ── */
.note-color-palette .note-color-btn { border-radius: 3px !important; cursor: pointer !important; }
.note-color-palette .note-color-btn:hover { transform: scale(1.15) !important; }

/* ── Hint / autocomplete popover ── */
.note-hint-popover .popover-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1) !important;
    padding: 4px !important;
}
.note-hint-popover .note-hint-item { border-radius: 4px !important; font-size: 13px !important; padding: 5px 10px !important; }
.note-hint-popover .note-hint-item.active { background-color: #eff6ff !important; color: #1d4ed8 !important; }

/* Card action buttons (image upload / remove) */
.card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
}
.card-action-btn svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }

/* Tabular nums utility */
.tnum { font-variant-numeric: tabular-nums; }

/* ── Summernote Lite Modals / Dialogs (Insert Link / Image) ── */
.note-modal {
    background-color: rgba(15, 23, 42, 0.6) !important; /* Semi-transparent backdrop */
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    box-sizing: border-box;
}
.note-modal.open {
    display: flex !important;
}
.note-modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 1.5rem !important;
    overflow: hidden !important;
    position: relative;
    box-sizing: border-box;
}
.dark .note-modal-content {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
.note-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.25rem 1.5rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-sizing: border-box;
}
.dark .note-modal-header {
    border-bottom-color: #334155 !important;
}
.note-modal-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}
.dark .note-modal-title {
    color: #f1f5f9 !important;
}
.note-modal-header .close {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.12s !important;
    float: none !important;
    opacity: 1 !important;
}
.note-modal-header .close:hover {
    color: #ef4444 !important;
}
.note-modal-body {
    padding: 1.5rem !important;
    box-sizing: border-box;
}
.note-form-group {
    margin-bottom: 1.25rem !important;
    padding-bottom: 0 !important;
}
.note-form-group:last-child {
    margin-bottom: 0 !important;
}
.note-form-label {
    display: block !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
.dark .note-form-label {
    color: #94a3b8 !important;
}
.note-input {
    width: 100% !important;
    padding: 0.625rem 0.875rem !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    font-size: 0.875rem !important;
    color: #0f172a !important;
    outline: none !important;
    transition: border-color 0.12s, background-color 0.12s !important;
    box-sizing: border-box !important;
}
.dark .note-input {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
.note-input:focus {
    border-color: #3b66f5 !important;
    background-color: #ffffff !important;
}
.dark .note-input:focus {
    border-color: #3b66f5 !important;
    background-color: #0f172a !important;
}
.note-modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.75rem !important;
    padding: 1rem 1.5rem !important;
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    box-sizing: border-box;
    height: auto !important;
}
.dark .note-modal-footer {
    background-color: rgba(30, 41, 59, 0.5) !important;
    border-top-color: #334155 !important;
}
.note-modal-footer .note-btn {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    padding: 0 1rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}
.note-modal-footer .note-btn-primary {
    background-color: #3b66f5 !important;
    color: #ffffff !important;
    border-color: #3b66f5 !important;
}
.note-modal-footer .note-btn-primary:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* ==========================================================================
   Modern Select2 Styling overrides (Tailwind CSS compatible)
   ========================================================================== */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    background-color: #f8fafc !important; /* bg-ink-50 */
    border: 1px solid #e2e8f0 !important; /* border-ink-200 */
    border-radius: 0.75rem !important; /* rounded-xl */
    min-height: 2.5rem !important;
    padding: 3px 6px !important;
    display: flex !important;
    align-items: center !important;
    outline: none !important;
    transition: all 0.2s ease-in-out;
    width: 100% !important;
    position: relative !important;
}
.select2-container--default .select2-selection--single {
    padding: 0 10px !important;
}
.dark .select2-container--default .select2-selection--multiple,
.dark .select2-container--default .select2-selection--single {
    background-color: rgba(2, 6, 23, 0.4) !important; /* dark:bg-ink-955 */
    border-color: #1e293b !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3b66f5 !important;
    box-shadow: 0 0 0 1px #3b66f5;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    padding-left: 0 !important;
    font-size: 0.875rem !important;
}
.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f1f5f9 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.5rem !important;
    right: 8px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    border-radius: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-top: 2px !important;
}
.dark .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ef4444 !important;
    margin-right: 5px !important;
    position: relative !important;
    float: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: auto !important;
    left: auto !important;
}
.dark .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ef4444 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #b91c1c !important;
    background-color: transparent !important;
}
.select2-container--default .select2-selection--multiple .select2-search--inline {
    display: flex !important;
    align-items: center !important;
    float: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 100% !important;
}
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin: 0 0 0 6px !important;
    height: 2rem !important;
    line-height: 2rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    color: #94a3b8 !important;
}
.dark .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    color: #475569 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 14px !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 14px !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Select2 Dropdown Container styling */
.select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 99999999 !important;
    padding: 6px !important;
}
.dark .select2-dropdown {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

/* Select2 search input within dropdown */
.select2-container--default .select2-search--dropdown {
    padding: 6px !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    background-color: #f8fafc !important;
    padding: 6px 10px !important;
    outline: none !important;
    font-size: 0.875rem !important;
    width: 100% !important;
}
.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: #1e293b !important;
    background-color: rgba(2, 6, 23, 0.4) !important;
    color: #f1f5f9 !important;
}

/* Options list spacing and styling */
.select2-results__options {
    padding: 4px 0 !important;
}
.select2-results__option {
    font-size: 0.875rem !important;
    padding: 8px 12px !important;
    border-radius: 0.5rem !important;
    margin-bottom: 2px !important;
    transition: all 0.15s ease-in-out !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3b66f5 !important;
    color: #ffffff !important;
}
.dark .select2-results__option[aria-selected=true] {
    background-color: #1e293b !important;
    color: #ffffff !important;
}
.select2-container {
    width: 100% !important;
}

/* ==========================================================================
   Modern Jodit Editor Styling Overrides (Tailwind CSS matching)
   ========================================================================== */
.jodit-container {
    border-radius: 0.75rem !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    font-family: inherit !important;
    position: relative !important;
}
.jodit-container .jodit-workplace {
    position: relative !important;
    overflow: hidden !important;
}
.dark .jodit-container {
    border-color: #334155 !important;
    background-color: #0f172a !important;
}
.jodit-toolbar__box {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: relative !important;
    top: auto !important;
}
.dark .jodit-toolbar__box {
    background-color: #1e293b !important;
    border-bottom-color: #334155 !important;
}
.jodit-wysiwyg {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 1.25rem 1.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.7 !important;
}
.dark .jodit-wysiwyg {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}
.jodit-toolbar-button__button {
    border-radius: 6px !important;
    transition: background-color 0.15s ease-in-out !important;
    color: #475569 !important;
}
.dark .jodit-toolbar-button__button {
    color: #94a3b8 !important;
}
.jodit-toolbar-button__button:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}
.dark .jodit-toolbar-button__button:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}
.jodit-status-bar {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 0.75rem !important;
    position: relative !important;
    flex-shrink: 0 !important;
}
.dark .jodit-status-bar {
    background-color: #1e293b !important;
    border-top-color: #334155 !important;
    color: #94a3b8 !important;
}
.jodit-dialog__box {
    border-radius: 1rem !important;
    overflow: hidden !important;
}
.jodit-dialog__header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.dark .jodit-dialog__header {
    background-color: #1e293b !important;
    border-bottom-color: #334155 !important;
}
.jodit-dialog__content {
    background-color: #ffffff !important;
}
.dark .jodit-dialog__content {
    background-color: #0f172a !important;
}
.jodit-dialog__footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}
.dark .jodit-dialog__footer {
    background-color: #1e293b !important;
    border-top-color: #334155 !important;
}

/* =========================================================
   Cache Settings – Action Rows
   ========================================================= */

.cache-action-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
@media (max-width: 640px) {
    .cache-action-row { flex-wrap: wrap; }
    .cache-action-row .cache-btn { width: 100%; justify-content: center; }
}

/* Coloured icon badge */
.cache-action-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
}
.cache-action-icon svg { width: 1.125rem; height: 1.125rem; }

.cache-action-icon--view   { background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.18); color: #6366f1; }
.cache-action-icon--route  { background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.20); color: #10b981; }
.cache-action-icon--config { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.20); color: #f59e0b; }
.cache-action-icon--cache  { background: rgba(239,68,68,0.10);  border-color: rgba(239,68,68,0.18);  color: #ef4444;  }

/* Action text */
.cache-action-body { flex: 1; min-width: 0; }
.cache-action-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.dark .cache-action-title { color: #f1f5f9; }
.cache-action-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0.15rem 0 0;
    line-height: 1.5;
}
.dark .cache-action-sub { color: #94a3b8; }

/* Clear cache button */
.cache-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    height: 2.375rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.cache-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.dark .cache-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
.dark .cache-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.cache-btn:disabled,
.cache-btn--loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Spinner animation */
@keyframes cache-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.cache-spin {
    animation: cache-spin 0.9s linear infinite;
}

/* Integrations Background Colors */
.int-bg-ga { background-color: #F9AB00; }
.int-bg-gtm { background-color: #4285f4; }
.int-bg-fbpx { background-color: #397bee; }
.int-bg-adroll { background-color: #06aeef; }
.int-bg-whatsapp { background-color: #2cb317; }
.int-bg-messenger { background-color: #A334FA; }
.int-bg-twakto { background-color: #00b447; }
.int-bg-crisp { background-color: #1a72f5; }
.int-bg-tidio { background-color: #0567ff; }
.int-bg-captcha { background-color: #F9AB00; }
.int-bg-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.int-bg-social { background-color: #6366f1; }
.int-bg-adsense { background-color: #FFB300; }

/* intl-tel-input Tailwind overrides */
.iti__country-list { z-index: 9999 !important; background-color: #ffffff !important; border: 1px solid #e2e8f0 !important; border-radius: 0.75rem !important; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -1px rgba(0,0,0,.025) !important; font-size: 0.875rem !important; color: #334155 !important; margin-top: 0.5rem !important; max-height: 300px !important; overflow-y: auto !important; }
.dark .iti__country-list { background-color: #0f172a !important; border-color: #1e293b !important; color: #cbd5e1 !important; }
.iti__country { padding: 0.5rem 1rem !important; transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important; cursor: pointer !important; }
.iti__country:hover { background-color: #f8fafc !important; }
.dark .iti__country:hover { background-color: #1e293b !important; }
.iti__country.iti__highlight { background-color: #f1f5f9 !important; color: #2563eb !important; font-weight: 600 !important; }
.dark .iti__country.iti__highlight { background-color: #1e293b !important; color: #60a5fa !important; }
.iti__divider { border-bottom: 1px solid #f1f5f9 !important; margin: 0.25rem 0 !important; padding-bottom: 0.25rem !important; }
.dark .iti__divider { border-bottom-color: #1e293b !important; }
.iti__search-input { background-color: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 0.5rem !important; padding: 0.5rem 0.75rem !important; font-size: 0.875rem !important; margin-bottom: 0.5rem !important; width: 100% !important; outline: none !important; }
.dark .iti__search-input { background-color: #020617 !important; border-color: #1e293b !important; }
.iti__search-input:focus { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5) !important; }

/* ── Widgets Builder overrides ────────────────────────────────────────────────────── */
.widget-handler {
    position: relative;
    margin-bottom: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.widget-handler:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.widget-handler .top-part {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 80px 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    cursor: grab;
}
.widget-handler:active .top-part {
    cursor: grabbing;
}
.widget-handler .expand, .widget-handler .remove-widget {
    position: absolute;
    top: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}
.widget-handler .expand {
    right: 12px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.widget-handler .expand:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}
.widget-handler .remove-widget {
    right: 48px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}
.widget-handler .remove-widget:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}
.widget-handler .content-part {
    display: none;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.02);
}
.widget-handler .content-part.show {
    display: block !important;
}
.widget-area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}
.widget-area-header .widget-area-expand {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.widget-area-header .widget-area-expand:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.widget-area-body {
    padding: 20px;
    display: none;
}
.widget-area-body.show {
    display: block !important;
}
.sortable_widget_location {
    min-height: 80px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
    transition: all 0.2s ease;
}
.sortable-placeholder {
    border: 2px dashed #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
    height: 48px;
    margin-bottom: 12px;
}
.ui-sortable-helper {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    background: #ffffff;
    border-color: #3b82f6 !important;
    opacity: 0.9;
}
.sidebar-list-wrap .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 20px;
}
.sidebar-list-wrap .card-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-list-wrap .card-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.sidebar-list-wrap .card-body {
    padding: 20px;
}
.sidebar-list-wrap .hide, .widget-area-body.hide {
    display: none !important;
}
.dark .sidebar-list-wrap .card {
    background: #1e293b;
    border-color: #334155;
}
.dark .sidebar-list-wrap .card-header {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}
.dark .sidebar-list-wrap .card-header h4 {
    color: #f8fafc;
}
.dark .dd-body input,
.dark .widget-handler input,
.dark .widget-handler textarea,
.dark .widget-handler select {
    background: #1e293b;
    border-color: #475569;
    color: white;
}
.dark .dd-body,
.dark .widget-handler .content-part {
    background: #0f172a;
    border-color: #334155;
}
.dark .widget-handler {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
.dark .widget-handler:hover {
    background: #0f172a;
    border-color: #475569;
}
.dark .widget-handler .top-part {
    color: #f8fafc;
}
.dark .widget-handler .expand {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}
.dark .widget-handler .expand:hover {
    background: #1e293b;
    color: #cbd5e1;
}
.dark .widget-handler .remove-widget {
    background: rgba(239, 68, 68, 0.1);
    border-color: transparent;
}
.dark .widget-handler .remove-widget:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}
.dark .widget-area-header {
    background: #0f172a;
    border-color: #334155;
}
.dark .widget-area-header .widget-area-expand {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
.dark .sortable_widget_location {
    border-color: #334155;
    background: #0f172a;
}

/* ── Available Widgets List Layout ─────────────────────────────────────────── */
.all-widgets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.all-widgets .widget-handler {
    margin-bottom: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    cursor: grab;
    transition: all 0.2s ease;
}
.all-widgets .widget-handler:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.all-widgets .widget-handler .top-part {
    padding: 0 16px;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    cursor: grab;
}
.dark .all-widgets .widget-handler {
    background: #1e293b;
    border-color: #334155;
}
.dark .all-widgets .widget-handler:hover {
    background: #0f172a;
    border-color: #475569;
}
.dark .all-widgets .widget-handler .top-part {
    color: #f8fafc;
}

/* ── Widget Configuration Form Elements Styling ───────────────────────────── */
.widget-handler .content-part input[type="text"],
.widget-handler .content-part input[type="email"],
.widget-handler .content-part input[type="number"],
.widget-handler .content-part input[type="date"],
.widget-handler .content-part textarea,
.widget-handler .content-part select {
    width: 100% !important;
    height: 40px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 14px !important;
    outline: none !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
    transition: border-color 0.15s ease-in-out !important;
}

.widget-handler .content-part input[type="text"]:focus,
.widget-handler .content-part input[type="email"]:focus,
.widget-handler .content-part input[type="number"]:focus,
.widget-handler .content-part input[type="date"]:focus,
.widget-handler .content-part textarea:focus,
.widget-handler .content-part select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.widget-handler .content-part textarea {
    height: auto !important;
    min-height: 100px !important;
    padding: 8px 12px !important;
    resize: vertical !important;
}

.widget-handler .content-part label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 6px !important;
    text-align: left !important;
}

.dark .widget-handler .content-part input[type="text"],
.dark .widget-handler .content-part input[type="email"],
.dark .widget-handler .content-part input[type="number"],
.dark .widget-handler .content-part input[type="date"],
.dark .widget-handler .content-part textarea,
.dark .widget-handler .content-part select {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

.dark .widget-handler .content-part label {
    color: #cbd5e1 !important;
}

/* Media Uploader button inside widget */
.widget-handler .content-part .media-upload-btn-holder {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}
.widget-handler .content-part .media_upload_form_btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.widget-handler .content-part .media_upload_form_btn:hover {
    background: #1d4ed8;
}

/* ── Iconpicker Popover Dropdown Restyling ─────────────────────────────────── */
.iconpicker-popover.popover {
    position: absolute !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05) !important;
    z-index: 999999 !important;
    padding: 12px !important;
    width: 280px !important;
    display: none;
}
.iconpicker-popover.popover.in, .iconpicker-popover.popover.show {
    display: block !important;
}
.iconpicker-popover .popover-title {
    padding: 0 0 8px 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.iconpicker-popover .popover-content {
    padding: 0 !important;
}
.iconpicker-popover.popover .arrow {
    display: none !important;
}
.iconpicker-container {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    padding: 4px !important;
}
.iconpicker-item {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    color: #475569 !important;
    transition: all 0.15s !important;
}
.iconpicker-item:hover, .iconpicker-item.iconpicker-selected {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}
.iconpicker-search {
    width: 100% !important;
    height: 36px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
    outline: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
}
.iconpicker-search:focus {
    border-color: #2563eb !important;
}
.dark .iconpicker-popover.popover {
    background: #1e293b !important;
    border-color: #334155 !important;
}
.dark .iconpicker-popover .popover-title {
    color: #f8fafc !important;
    border-bottom-color: #334155 !important;
}
.dark .iconpicker-item {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
.dark .iconpicker-search {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* ── Media Uploader Inside Widget Configuration ──────────────────────────── */
/* Empty State: Styled as a dashed card upload area similar to add-staff.blade.php */
.widget-handler .content-part .media-upload-btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.widget-handler .content-part .media-upload-btn-wrapper .img-wrap {
    display: none !important;
}

.widget-handler .content-part .media-upload-btn-wrapper .media_upload_form_btn {
    width: 100% !important;
    border: 2px dashed #e2e8f0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #475569 !important;
    height: auto !important;
    padding: 28px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.2s !important;
}

.widget-handler .content-part .media-upload-btn-wrapper .media_upload_form_btn:hover {
    border-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.02) !important;
    color: #2563eb !important;
}

/* Embed the click to upload icon placeholder */
.widget-handler .content-part .media-upload-btn-wrapper .media_upload_form_btn::before {
    content: "" !important;
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Selected State: Styled as a horizontal card matching add-staff.blade.php */
.widget-handler .content-part .media-upload-btn-wrapper:has(img) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

.widget-handler .content-part .media-upload-btn-wrapper:has(img) .img-wrap {
    display: block !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.widget-handler .content-part .media-upload-btn-wrapper:has(img) .img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.widget-handler .content-part .media-upload-btn-wrapper:has(img) .media_upload_form_btn {
    width: auto !important;
    height: 36px !important;
    padding: 0 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-size: 13px !important;
    flex-direction: row !important;
    align-self: center !important;
}

.widget-handler .content-part .media-upload-btn-wrapper:has(img) .media_upload_form_btn::before {
    display: none !important;
}

.widget-handler .content-part .media-upload-btn-wrapper:has(img) .media_upload_form_btn:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* ── Fix img-inner-wrap inside widget preview (global CSS sets min-height:120px) ── */
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .img-inner-wrap {
    width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    border-radius: 8px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .img-inner-wrap img,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview .thumbnail,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .img-inner-wrap .attachment-preview .thumbnail .centered {
    width: 48px !important;
    height: 48px !important;
    min-width: 0 !important;
    max-width: 48px !important;
    min-height: 0 !important;
    max-height: 48px !important;
    object-fit: contain !important;
    display: block !important;
    position: static !important;
    transform: none !important;
    border-radius: 8px !important;
}

/* Dark mode overrides for uploader states */
.dark .widget-handler .content-part .media-upload-btn-wrapper:has(img) {
    border-color: #334155 !important;
    background: #1e293b !important;
}
.dark .widget-handler .content-part .media-upload-btn-wrapper .media_upload_form_btn {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
.dark .widget-handler .content-part .media-upload-btn-wrapper:has(img) .media_upload_form_btn {
    background: #0f172a !important;
    border-color: #334155 !important;
}

/* ── Save Changes Action Button Restyling ─────────────────────────────────── */
.widget-handler .content-part .widget_save_change_button {
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: #3b66f5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(59,102,245,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.widget-handler .content-part .widget_save_change_button:hover {
    background: #254adb;
    box-shadow: 0 4px 6px rgba(59,102,245,0.3);
}

.widget-handler .content-part .widget_save_change_button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Language Switcher Tab Restyling ─────────────────────────────────────── */
.widget-handler .content-part nav {
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.widget-handler .content-part .nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: -1px;
}

.widget-handler .content-part .nav-tabs .nav-link {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    transition: all 0.15s;
    cursor: pointer;
}

.widget-handler .content-part .nav-tabs .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.widget-handler .content-part .nav-tabs .nav-link.active {
    color: #3b66f5;
    background: #ffffff;
    border-color: #e2e8f0;
    border-bottom: 1px solid #ffffff;
}

.dark .widget-handler .content-part nav {
    border-bottom-color: #334155;
}

.dark .widget-handler .content-part .nav-tabs .nav-link:hover {
    color: #f8fafc;
    background: #1e293b;
}

.dark .widget-handler .content-part .nav-tabs .nav-link.active {
    color: #60a5fa;
    background: #0f172a;
    border-color: #334155;
    border-bottom-color: #0f172a;
}

/* ── FontAwesome Support inside Iconpicker ─────────────────────────────── */
.iconpicker-popover.popover .iconpicker-item i,
.custom-tailwind-picker i {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-style: normal !important;
    font-weight: 900 !important;
    display: inline-block !important;
    text-align: center !important;
}

/* Hide legacy preview inside custom styled uploader to prevent overlap */
.custom-styled-uploader .img-wrap {
    display: none !important;
}

/* Force media uploader previews to display properly at 48x48px */
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .attachment-preview,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .attachment-preview .thumbnail,
.widget-handler .content-part .media-upload-btn-wrapper .img-wrap .attachment-preview .thumbnail .centered {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    transform: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: transparent !important;
}

.widget-handler .content-part .media-upload-btn-wrapper .img-wrap img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    border-radius: 8px !important;
}

/* ── Support Ticket UI Styles ────────────────────────────────────────────── */
#addModal textarea.admin-panel-jodit,
#addModal .jodit-workplace textarea,
#addModal .jodit>textarea {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
#addModal .jodit-container:focus,
#addModal .jodit-container *:focus {
    outline: none !important;
    box-shadow: none !important;
}
#addModal .jodit-add-new-line,
#addModal .jodit-resizer {
    display: none !important;
}
#addModal .jodit-container {
    border-radius: 0.5rem !important;
    overflow: clip !important;
}
#addModal > div {
    overflow: hidden !important;
}

/* ── Support Page Layout Styles ── */
.support-panels-container {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}
@media (max-width: 1024px) {
    .support-panels-container {
        flex-direction: column;
        align-items: stretch;
    }
}

.support-left-panel {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
@media (max-width: 1024px) {
    .support-left-panel {
        width: 100%;
    }
}

.support-right-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Stats Grid */
.support-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .support-stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .support-stats-container {
        grid-template-columns: 1fr;
    }
}

.support-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12);
}
.dark .support-stat-card {
    background: #0f172a;
    border-color: #1e293b;
}

#tkList {
    overflow-y: auto;
    max-height: 390px !important; /* height to show exactly 5 tickets with scrollbar */
}

#tkThread {
    overflow-y: auto;
    max-height: 420px !important;
}

.active-range {
    background: white !important;
    color: #0f172a !important;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1) !important;
    font-weight: 600;
}
.dark .active-range {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3) !important;
}

/* ── Auth pages (login / forgot password / reset password) ─────────────── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at top, rgba(37,99,235,.08), transparent 55%), #f8fafc;
}
.dark .auth-shell {
    background: radial-gradient(circle at top, rgba(37,99,235,.12), transparent 55%), #020617;
}

.premium-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -1px rgba(0,0,0,.025);
    border-radius: 16px;
}
.dark .premium-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.2), 0 2px 4px -1px rgba(0,0,0,.1);
}

.pwd-input-wrap { position: relative; }
.pwd-input-wrap input { padding-right: 2.75rem; }
.pwd-eye-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}
.pwd-eye-btn:hover { color: #64748b; }
.dark .pwd-eye-btn { color: #64748b; }
.dark .pwd-eye-btn:hover { color: #94a3b8; }

