/* ==========================================================================
   Dragons of Asia - RPG Dark Theme & Medieval Fantasy Stylesheet
   ========================================================================== */

:root {
    --rpg-font-display: 'Cinzel', Georgia, serif;
    --rpg-font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Color Palette */
    --rpg-bg-dark: #0a0d14;
    --rpg-bg-surface: #121824;
    --rpg-bg-elevated: #182030;
    --rpg-surface-hover: #1f2a3e;

    /* Gold Accents */
    --rpg-gold: #c9a050;
    --rpg-gold-bright: #f5d77f;
    --rpg-gold-burnished: #99752d;
    --rpg-gold-border: rgba(201, 160, 80, 0.32);
    --rpg-gold-glow: 0 0 12px rgba(201, 160, 80, 0.35);

    /* Text */
    --rpg-text: #f8fafc;
    --rpg-text-muted: #94a3b8;
    --rpg-text-heading: #f5d77f;

    /* Borders */
    --rpg-border-subtle: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Typography & Base Styles
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] body {
    background-color: var(--rpg-bg-dark);
    background-image: radial-gradient(ellipse at 50% 0%, #151d2b 0%, #0a0d14 70%);
    background-attachment: fixed;
    color: var(--rpg-text);
    font-family: var(--rpg-font-body);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand,
.card-title {
    font-family: var(--rpg-font-display);
    letter-spacing: 0.03em;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] .h6,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header h1,
[data-bs-theme="dark"] .card-header h2,
[data-bs-theme="dark"] .card-header h3,
[data-bs-theme="dark"] .card-header h4,
[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6 {
    color: var(--rpg-gold-bright) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Override utility text-dark classes on headers/titles in dark mode */
[data-bs-theme="dark"] h1.text-dark,
[data-bs-theme="dark"] h2.text-dark,
[data-bs-theme="dark"] h3.text-dark,
[data-bs-theme="dark"] h4.text-dark,
[data-bs-theme="dark"] h5.text-dark,
[data-bs-theme="dark"] h6.text-dark,
[data-bs-theme="dark"] .card-title.text-dark,
[data-bs-theme="dark"] .card-header .text-dark {
    color: var(--rpg-gold-bright) !important;
}

/* Override utility text-dark on content elements (excluding badges and buttons) */
[data-bs-theme="dark"] :not(.badge):not(.btn).text-dark {
    color: #f8fafc !important;
}

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .navbar {
    background: linear-gradient(180deg, #161e2c 0%, #0d121a 100%) !important;
    border-bottom: 2px solid var(--rpg-gold-burnished);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65) !important;
}

[data-bs-theme="dark"] .navbar-brand {
    color: var(--rpg-gold-bright) !important;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.25s ease;
}

[data-bs-theme="dark"] .navbar-brand:hover {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(243, 229, 171, 0.7);
}

[data-bs-theme="dark"] .navbar-brand img {
    filter: drop-shadow(0 0 5px rgba(201, 160, 80, 0.45));
}

[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    color: var(--rpg-gold-bright) !important;
    background: rgba(201, 160, 80, 0.12);
    text-shadow: 0 0 6px rgba(243, 229, 171, 0.4);
}

/* Dropdown Menus */
[data-bs-theme="dark"] .dropdown-menu {
    background: #111722;
    border: 1px solid var(--rpg-gold-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
    border-radius: 6px;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #cbd5e1;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item.active {
    background: rgba(201, 160, 80, 0.18);
    color: var(--rpg-gold-bright);
}

[data-bs-theme="dark"] .dropdown-header {
    color: var(--rpg-gold);
    font-family: var(--rpg-font-display);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: rgba(201, 160, 80, 0.2);
}

/* --------------------------------------------------------------------------
   Cards & Containers (RPG Panels)
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .card {
    background: linear-gradient(180deg, #151c27 0%, #0f141d 100%);
    border: 1px solid var(--rpg-gold-border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    border-radius: 8px;
}

[data-bs-theme="dark"] .card-header {
    background: linear-gradient(180deg, #1c2636 0%, #131a25 100%) !important;
    border-bottom: 1px solid var(--rpg-gold-border);
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display);
}

[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h4 {
    color: var(--rpg-gold-bright) !important;
    margin-bottom: 0;
}

[data-bs-theme="dark"] .card-footer {
    background: #0d121a !important;
    border-top: 1px solid var(--rpg-border-subtle) !important;
    color: var(--rpg-text-muted);
}

/* Fallbacks for templates hardcoding bg-light / bg-white */
[data-bs-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: var(--rpg-text) !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #141b27 !important;
    color: var(--rpg-text) !important;
}

[data-bs-theme="dark"] .card.bg-light {
    background: #111722 !important;
    border: 1px solid var(--rpg-gold-border) !important;
}

/* --------------------------------------------------------------------------
   Tables (RPG Character / Spell / Item Grids)
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(201, 160, 80, 0.08);
    color: var(--rpg-text);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .table thead,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] thead.table-light,
[data-bs-theme="dark"] thead.table-light th {
    background: linear-gradient(180deg, #1b2433 0%, #141b26 100%) !important;
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--rpg-gold-burnished) !important;
}

[data-bs-theme="dark"] .table-hover>tbody>tr:hover>* {
    background-color: rgba(201, 160, 80, 0.1) !important;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Buttons & Controls
   -------------------------------------------------------------------------- */
.btn-primary,
[data-bs-theme="dark"] .btn-primary {
    background: linear-gradient(180deg, #d4af37 0%, #99752d 100%);
    border: 1px solid #b8860b;
    color: #0b0e14 !important;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:hover {
    background: linear-gradient(180deg, #f0ca50 0%, #ad8633 100%);
    border-color: #d4af37;
    color: #000000 !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

[data-bs-theme="dark"] .btn-outline-primary {
    border-color: var(--rpg-gold);
    color: var(--rpg-gold-bright);
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background: var(--rpg-gold);
    color: #0b0e14 !important;
    box-shadow: 0 0 12px rgba(201, 160, 80, 0.4);
}

[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #4a5568;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: #2d3748;
    border-color: #718096;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Form Inputs & Selects
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0b1018 !important;
    border: 1px solid rgba(201, 160, 80, 0.28) !important;
    color: var(--rpg-text) !important;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0e141f !important;
    border-color: var(--rpg-gold) !important;
    box-shadow: 0 0 0 0.25rem rgba(201, 160, 80, 0.25) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

/* --------------------------------------------------------------------------
   Badges (RPG Gemstone Style)
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .badge.bg-primary {
    background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%) !important;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
}

[data-bs-theme="dark"] .badge.bg-success {
    background: linear-gradient(180deg, #059669 0%, #065f46 100%) !important;
    border: 1px solid #10b981;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.3);
}

[data-bs-theme="dark"] .badge.bg-warning {
    background: linear-gradient(180deg, #d97706 0%, #92400e 100%) !important;
    border: 1px solid #f59e0b;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
}

[data-bs-theme="dark"] .badge.bg-danger {
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%) !important;
    border: 1px solid #ef4444;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background: linear-gradient(180deg, #475569 0%, #334155 100%) !important;
    border: 1px solid #64748b;
}

/* --------------------------------------------------------------------------
   Breadcrumbs & Links
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .breadcrumb-item a {
    color: var(--rpg-gold);
    text-decoration: none;
    transition: color 0.15s ease;
}

[data-bs-theme="dark"] .breadcrumb-item a:hover {
    color: var(--rpg-gold-bright);
    text-decoration: underline;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: var(--rpg-text-muted);
}

[data-bs-theme="dark"] a {
    color: #e5c158;
}

[data-bs-theme="dark"] a:hover {
    color: #fff2b2;
}

/* --------------------------------------------------------------------------
   HTML Posts & Pages Content (Rich Text Rendering)
   -------------------------------------------------------------------------- */
[data-bs-theme="dark"] .post-content,
[data-bs-theme="dark"] .page-content {
    color: #ffffff !important;
    line-height: 1.75;
}

[data-bs-theme="dark"] .post-content p,
[data-bs-theme="dark"] .page-content p,
[data-bs-theme="dark"] .post-content li,
[data-bs-theme="dark"] .page-content li,
[data-bs-theme="dark"] .post-content td,
[data-bs-theme="dark"] .page-content td {
    color: #f8fafc !important;
}

/* Internal Headings inside post & page content */
[data-bs-theme="dark"] .post-content h1,
[data-bs-theme="dark"] .post-content h2,
[data-bs-theme="dark"] .post-content h3,
[data-bs-theme="dark"] .post-content h4,
[data-bs-theme="dark"] .post-content h5,
[data-bs-theme="dark"] .post-content h6,
[data-bs-theme="dark"] .page-content h1,
[data-bs-theme="dark"] .page-content h2,
[data-bs-theme="dark"] .page-content h3,
[data-bs-theme="dark"] .page-content h4,
[data-bs-theme="dark"] .page-content h5,
[data-bs-theme="dark"] .page-content h6 {
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Links inside post & page content */
[data-bs-theme="dark"] .post-content a,
[data-bs-theme="dark"] .page-content a {
    color: #e5c158 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

[data-bs-theme="dark"] .post-content a:hover,
[data-bs-theme="dark"] .page-content a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(229, 193, 88, 0.6);
}

/* Force override for any inline black/dark font colors copied from rich-text editors */
[data-bs-theme="dark"] .post-content [style*="color: rgb(0, 0, 0)"],
[data-bs-theme="dark"] .post-content [style*="color: #000"],
[data-bs-theme="dark"] .post-content [style*="color: #000000"],
[data-bs-theme="dark"] .post-content [style*="color: rgb(33, 37, 41)"],
[data-bs-theme="dark"] .post-content [style*="color: #212529"],
[data-bs-theme="dark"] .post-content [style*="color: black"],
[data-bs-theme="dark"] .page-content [style*="color: rgb(0, 0, 0)"],
[data-bs-theme="dark"] .page-content [style*="color: #000"],
[data-bs-theme="dark"] .page-content [style*="color: #000000"],
[data-bs-theme="dark"] .page-content [style*="color: rgb(33, 37, 41)"],
[data-bs-theme="dark"] .page-content [style*="color: #212529"],
[data-bs-theme="dark"] .page-content [style*="color: black"] {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .post-content table,
[data-bs-theme="dark"] .post-content th,
[data-bs-theme="dark"] .post-content td,
[data-bs-theme="dark"] .page-content table,
[data-bs-theme="dark"] .page-content th,
[data-bs-theme="dark"] .page-content td {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .post-content th,
[data-bs-theme="dark"] .page-content th {
    background-color: #17202e;
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display);
}

[data-bs-theme="dark"] .post-content blockquote,
[data-bs-theme="dark"] .page-content blockquote {
    border-left: 4px solid var(--rpg-gold);
    background: rgba(201, 160, 80, 0.06);
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

[data-bs-theme="dark"] .post-content pre,
[data-bs-theme="dark"] .page-content pre {
    background-color: #0b0e15;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

/* Post / Page Card Footer Author Metadata */
[data-bs-theme="dark"] .card-footer {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .card-footer strong {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .card-footer .text-secondary {
    color: #cbd5e1 !important;
}

/* --------------------------------------------------------------------------
   Custom Fantasy Scrollbars
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #090c12;
}

::-webkit-scrollbar-thumb {
    background: #1e2838;
    border-radius: 4px;
    border: 1px solid rgba(201, 160, 80, 0.25);
}

::-webkit-scrollbar-thumb:hover {
    background: #2b394f;
    border-color: var(--rpg-gold);
}

/* --------------------------------------------------------------------------
   Theme Switcher Button
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.95rem;
    border-radius: 20px;
    background: transparent;
    border: 1px solid rgba(201, 160, 80, 0.4);
    color: var(--rpg-gold-bright);
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-toggle-btn:hover {
    background: rgba(201, 160, 80, 0.15);
    border-color: var(--rpg-gold);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(201, 160, 80, 0.3);
}

/* ==========================================================================
   Summernote WYSIWYG & HTML Editor - Dark Theme Overhaul
   ========================================================================== */
.note-editor.note-frame,
[data-bs-theme="dark"] .note-editor.note-frame {
    background-color: #0b0f17 !important;
    border: 1px solid var(--rpg-gold-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55) !important;
    border-radius: 6px !important;
    overflow: visible !important;
}

/* Toolbar */
.note-editor.note-frame .note-toolbar,
[data-bs-theme="dark"] .note-editor.note-frame .note-toolbar {
    background: linear-gradient(180deg, #182230 0%, #111722 100%) !important;
    border-bottom: 1px solid var(--rpg-gold-border) !important;
    padding: 6px 8px !important;
    overflow: visible !important;
}

[data-bs-theme="dark"] .note-btn {
    background-color: #1a2332 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 5px 9px !important;
    font-size: 0.85rem !important;
    transition: all 0.15s ease !important;
}

[data-bs-theme="dark"] .note-btn:hover,
[data-bs-theme="dark"] .note-btn.active,
[data-bs-theme="dark"] .note-btn:focus {
    background-color: rgba(201, 160, 80, 0.22) !important;
    border-color: var(--rpg-gold) !important;
    color: var(--rpg-gold-bright) !important;
    box-shadow: 0 0 8px rgba(201, 160, 80, 0.35) !important;
}

[data-bs-theme="dark"] .note-btn[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Editing Canvas / Contenteditable Area */
[data-bs-theme="dark"] .note-editor .note-editing-area {
    background-color: #0b0f17 !important;
}

[data-bs-theme="dark"] .note-editor .note-editable {
    background-color: #0b0f17 !important;
    color: #ffffff !important;
    caret-color: var(--rpg-gold-bright) !important;
    padding: 1.25rem !important;
    font-family: var(--rpg-font-body) !important;
    line-height: 1.7 !important;
}

/* Gold headings inside Summernote on dark background (high contrast) */
[data-bs-theme="dark"] .note-editable h1,
[data-bs-theme="dark"] .note-editable h2,
[data-bs-theme="dark"] .note-editable h3,
[data-bs-theme="dark"] .note-editable h4,
[data-bs-theme="dark"] .note-editable h5,
[data-bs-theme="dark"] .note-editable h6 {
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .note-editable p,
[data-bs-theme="dark"] .note-editable li,
[data-bs-theme="dark"] .note-editable td,
[data-bs-theme="dark"] .note-editable div:not(.note-dimension-picker-mousecatcher):not(.note-dimension-picker-highlighted):not(.note-dimension-picker-unhighlighted) {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .note-editable a {
    color: #e5c158 !important;
    text-decoration: underline;
}

[data-bs-theme="dark"] .note-editable table {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .note-editable th {
    background-color: #17202e !important;
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .note-editable td {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .note-editable blockquote {
    border-left: 4px solid var(--rpg-gold) !important;
    background: rgba(201, 160, 80, 0.06) !important;
    color: #cbd5e1 !important;
    font-style: italic !important;
    padding: 0.75rem 1rem !important;
}

[data-bs-theme="dark"] .note-editable pre {
    background-color: #06090e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #38bdf8 !important;
    padding: 0.75rem !important;
}

/* HTML Raw Code View (< />) */
[data-bs-theme="dark"] .note-editor .note-codable {
    background-color: #06090f !important;
    color: #38bdf8 !important;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 0.95rem !important;
    border: none !important;
    padding: 1.25rem !important;
    caret-color: #38bdf8 !important;
    line-height: 1.6 !important;
}

/* Placeholder */
[data-bs-theme="dark"] .note-placeholder {
    color: #64748b !important;
    padding: 1.25rem !important;
}

/* Statusbar / Bottom Resize Bar */
[data-bs-theme="dark"] .note-editor.note-frame .note-statusbar {
    background-color: #111722 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .note-statusbar .note-resizebar .note-icon-bar {
    border-top: 1px solid rgba(201, 160, 80, 0.4) !important;
}

/* Dropdown Menus (Style, Font, Color, Table) */
.note-dropdown-menu,
.dropdown-fontname .note-dropdown-menu,
.note-dropdown-menu.note-check,
[data-bs-theme="dark"] .note-dropdown-menu {
    max-height: 280px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 1060 !important;
}

[data-bs-theme="dark"] .note-dropdown-menu {
    background-color: #111724 !important;
    border: 1px solid var(--rpg-gold-border) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    border-radius: 6px !important;
    padding: 6px 0 !important;
}

/* Custom scrollbar for Summernote dropdowns */
.note-dropdown-menu::-webkit-scrollbar {
    width: 6px !important;
}

[data-bs-theme="dark"] .note-dropdown-menu::-webkit-scrollbar-track {
    background: #0b0f17 !important;
}

[data-bs-theme="dark"] .note-dropdown-menu::-webkit-scrollbar-thumb {
    background: #233044 !important;
    border-radius: 3px !important;
    border: 1px solid rgba(201, 160, 80, 0.25) !important;
}

[data-bs-theme="dark"] .note-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #354a6b !important;
    border-color: var(--rpg-gold) !important;
}

[data-bs-theme="dark"] .note-dropdown-item,
[data-bs-theme="dark"] .note-dropdown-menu > li > a {
    color: #cbd5e1 !important;
    padding: 6px 14px !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

[data-bs-theme="dark"] .note-dropdown-menu.note-check a i {
    color: var(--rpg-gold-bright) !important;
    margin-right: 8px !important;
    font-size: 0.85rem !important;
}

[data-bs-theme="dark"] .note-dropdown-item:hover,
[data-bs-theme="dark"] .note-dropdown-menu > li > a:hover {
    background-color: rgba(201, 160, 80, 0.22) !important;
    color: var(--rpg-gold-bright) !important;
}

[data-bs-theme="dark"] .note-dropdown-menu h1,
[data-bs-theme="dark"] .note-dropdown-menu h2,
[data-bs-theme="dark"] .note-dropdown-menu h3,
[data-bs-theme="dark"] .note-dropdown-menu h4,
[data-bs-theme="dark"] .note-dropdown-menu h5,
[data-bs-theme="dark"] .note-dropdown-menu h6 {
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display) !important;
    margin: 4px 0 !important;
}

[data-bs-theme="dark"] .note-dropdown-menu p,
[data-bs-theme="dark"] .note-dropdown-menu pre,
[data-bs-theme="dark"] .note-dropdown-menu blockquote {
    color: #f8fafc !important;
    margin: 4px 0 !important;
}

/* Color Palette Picker */
[data-bs-theme="dark"] .note-palette {
    background-color: #111724 !important;
}

[data-bs-theme="dark"] .note-palette-title {
    color: var(--rpg-gold-bright) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 0.8rem !important;
    margin: 4px 8px !important;
    padding-bottom: 4px !important;
}

[data-bs-theme="dark"] .note-color-reset {
    background-color: #1a2332 !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    margin: 6px 8px !important;
    padding: 3px 6px !important;
}

[data-bs-theme="dark"] .note-color-reset:hover {
    background-color: rgba(201, 160, 80, 0.22) !important;
    color: var(--rpg-gold-bright) !important;
}

/* Table Dimension Picker */
[data-bs-theme="dark"] .note-dimension-picker {
    background-color: #111724 !important;
}

[data-bs-theme="dark"] .note-dimension-picker-unhighlighted {
    background-color: #1e2838 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .note-dimension-picker-highlighted {
    background-color: rgba(201, 160, 80, 0.5) !important;
    border: 1px solid var(--rpg-gold) !important;
}

/* Modals (Insert Link, Picture, Video, Help) */
[data-bs-theme="dark"] .note-modal .note-modal-content {
    background: linear-gradient(180deg, #17202e 0%, #101622 100%) !important;
    border: 1px solid var(--rpg-gold-border) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85) !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
}

[data-bs-theme="dark"] .note-modal .note-modal-header {
    border-bottom: 1px solid var(--rpg-gold-border) !important;
    color: var(--rpg-gold-bright) !important;
}

[data-bs-theme="dark"] .note-modal .note-modal-title {
    color: var(--rpg-gold-bright) !important;
    font-family: var(--rpg-font-display) !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .note-modal .note-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .note-modal .note-input {
    background-color: #0b1018 !important;
    border: 1px solid rgba(201, 160, 80, 0.3) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .note-modal .note-input:focus {
    border-color: var(--rpg-gold) !important;
    box-shadow: 0 0 0 0.2rem rgba(201, 160, 80, 0.25) !important;
}

[data-bs-theme="dark"] .note-modal .note-form-label {
    color: var(--rpg-gold-bright) !important;
}

[data-bs-theme="dark"] .note-modal .note-btn {
    background-color: #1e2838 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .note-modal .note-btn.note-btn-primary {
    background: linear-gradient(180deg, #d4af37 0%, #99752d 100%) !important;
    color: #0b0e14 !important;
    font-weight: 600 !important;
    border-color: #b8860b !important;
}

/* Tooltips */
[data-bs-theme="dark"] .note-tooltip .note-tooltip-content {
    background-color: #1a2332 !important;
    color: var(--rpg-gold-bright) !important;
    border: 1px solid var(--rpg-gold-border) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}


