/* ============================================
   RIBBON COMPONENT - Core Styles
   ============================================ */

/* Design System Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* Design System Tokens */
:root {
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-data: 'Space Mono', monospace;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    padding: 0;
    margin: 0;
    background-color: #f3f2f1;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.ribbon-container {
    display: grid;
    grid-template-columns: 68px 200px 1fr 200px 20px 250px;
    grid-template-rows: 45px 30px 80px 0px 30px 30px 1fr 24px 30px;
    gap: 0;
    font-family: var(--font-body);
    background-color: #fff;
    border: 1px solid #e5e7eb;
    width: 100vw;
    height: 100vh;
}

.ribbon-container.area-19-closed {
    grid-template-columns: 68px 200px 1fr 200px 20px;
}

.ribbon-container.no-borders {
    border: none;
}

.ribbon-area {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    display: flex;
    font-family: inherit;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    color: #111827;
    position: relative;
}

/* Force all interactive elements in ribbon to inherit font */
.ribbon-container button,
.ribbon-container input,
.ribbon-container select,
.ribbon-container textarea {
    font-family: inherit;
}

.ribbon-area.no-borders {
    border: none;
}

/* Debug Labels */
.ribbon-area.show-labels::before {
    content: attr(data-area-label);
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 9px;
    color: #fff;
    font-weight: 300;
    background-color: red;
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 10;
}

/* ============================================
   BUTTONS - Generic
   ============================================ */

.ribbon-button {
    padding: 8px 16px;
    margin: 5px;
    background-color: #f0f0f0;
    border: 1px solid #999;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.ribbon-button:hover {
    background-color: #e0e0e0;
}

.ribbon-button:active {
    background-color: #d0d0d0;
}

.icon-button {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.icon-button:active {
    background-color: #d1d5db;
}

.icon-text-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background-color: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    color: #4b5563;
    transition: all 0.2s ease;
}

.icon-text-button i {
    font-size: 14px;
    color: #4b5563;
}

.icon-text-button:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.icon-text-button:hover i {
    color: #111827;
}

.icon-text-button:active {
    background-color: #d1d5db;
}

/* ============================================
   MENU
   ============================================ */

.ribbon-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    height: 100%;
    padding: 0;
}

.ribbon-menu-item {
    padding: 6px 14px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    height: 100%;
    display: flex;
    align-items: center;
}

.ribbon-menu-item:hover {
    background-color: #e5e7eb;
}

.ribbon-menu-item:active,
.ribbon-menu-item.active {
    background-color: #fff;
    border-bottom: 2px solid #217346;
    font-weight: 500;
}

.ribbon-toggle-btn {
    margin-left: auto;
    padding: 6px 12px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.ribbon-toggle-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.ribbon-toggle-btn i {
    transition: transform 0.2s ease;
}

.ribbon-toggle-btn.collapsed i {
    transform: rotate(180deg);
}

/* ============================================
   TITLE & BREADCRUMBS
   ============================================ */

.area-title {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    line-height: 1.2;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.area-breadcrumbs {
    font-size: 11px;
    font-weight: normal;
    line-height: 1.2;
    color: #6b7280;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.area-breadcrumbs a {
    color: #374151;
    text-decoration: none;
}

.area-breadcrumbs a:hover {
    text-decoration: underline;
    color: #111827;
}

.area-breadcrumbs span {
    margin: 0 3px;
    color: #9ca3af;
}

.breadcrumb-more {
    position: relative;
    display: inline-block;
}

.breadcrumb-more-btn {
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.breadcrumb-more-btn:hover {
    opacity: 0.8;
}

.breadcrumb-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    max-width: 300px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.breadcrumb-dropdown.show {
    display: block;
}

.breadcrumb-dropdown-item {
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    display: block;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.breadcrumb-dropdown-item:hover {
    background-color: #f3f4f6;
}

/* ============================================
   SEARCH
   ============================================ */

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    background-color: #f3f2f1;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 24px;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 8px;
    gap: 6px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: #217346;
    box-shadow: 0 0 0 2px rgba(33, 115, 70, 0.1);
}

.search-box i {
    font-size: 16px;
    color: #94a3b8;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 12px;
    color: #333;
    background: transparent;
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* ============================================
   TABS
   ============================================ */

.tabs-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #f3f2f1;
    position: relative;
}

.tabs-scroll-area {
    display: flex;
    align-items: center;
    overflow-x: hidden;
    flex: 1;
    height: 100%;
}

.tabs-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 4px;
    padding: 0 8px 0 4px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    user-select: none;
    height: 22px;
    max-width: 200px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.tab .tab-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.tab:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #374151;
}

.tab.active {
    background-color: #fff;
    color: #111827;
    font-weight: 500;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.tab-close {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #9ca3af;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.tab:hover .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background-color: #ef4444;
    color: #fff;
}

.tab-scroll-btn {
    width: 28px;
    height: 28px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tab-scroll-btn:hover {
    background-color: rgba(255, 255, 255, 0.7);
    color: #111827;
}

.tab-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tab-add-btn {
    width: 28px;
    height: 28px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 18px;
    margin: 0 6px 0 4px;
    transition: all 0.2s ease;
}

.tab-add-btn:hover {
    background-color: rgba(255, 255, 255, 0.7);
    color: #111827;
}

.tab-context-menu {
    position: fixed;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.tab-context-menu.show {
    display: block;
}

.tab-context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tab-context-menu-item:hover {
    background-color: #f3f4f6;
}

.tab-context-menu-item.active {
    background-color: #f0fdf4;
    font-weight: 600;
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */

.announcement-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.announcement-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-icon {
    font-size: 16px;
    color: #f59e0b;
}

.announcement-text {
    font-size: 12px;
    color: #92400e;
    font-weight: 500;
}

.announcement-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #92400e;
    transition: all 0.15s ease;
}

.announcement-close:hover {
    background-color: #fbbf24;
    color: #fff;
}

/* ============================================
   FORMULA BAR
   ============================================ */

.formula-bar-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    gap: 8px;
    background-color: #f3f2f1;
}

.formula-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    padding: 4px 8px;
    background-color: #f3f2f1;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    min-width: 60px;
    text-align: center;
}

.formula-bar-input {
    flex: 1;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    padding: 0 8px;
    font-size: 12px;
    font-family: var(--font-body);
    color: #111827;
    outline: none;
    transition: all 0.15s ease;
}

.formula-bar-input:focus {
    border-color: #217346;
    box-shadow: 0 0 0 2px rgba(33, 115, 70, 0.1);
}

/* ============================================
   RIBBON TOOLBAR
   ============================================ */

.ribbon-toolbar-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.ribbon-toolbar {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    padding: 3px 6px;
    gap: 3px;
    background-color: #f9f9f9;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.ribbon-toolbar::-webkit-scrollbar { display: none; }
.ribbon-scroll-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    border: none;
    padding: 0;
}
.ribbon-scroll-arrow:hover { color: #fff; }
.ribbon-scroll-arrow.scroll-left {
    left: 0;
    background: linear-gradient(to right, #f9f9f9 70%, transparent);
}
.ribbon-scroll-arrow.scroll-left:hover {
    background: linear-gradient(to right, #217346 60%, transparent);
}
.ribbon-scroll-arrow.scroll-right {
    right: 0;
    background: linear-gradient(to left, #f9f9f9 70%, transparent);
}
.ribbon-scroll-arrow.scroll-right:hover {
    background: linear-gradient(to left, #217346 60%, transparent);
}
.ribbon-scroll-arrow.visible { display: flex; }
/* Dark mode */
.ribbon-container.dark-mode .ribbon-scroll-arrow { color: #d1d5db; }
.ribbon-container.dark-mode .ribbon-scroll-arrow.scroll-left { background: linear-gradient(to right, #1e1e1e 70%, transparent); }
.ribbon-container.dark-mode .ribbon-scroll-arrow.scroll-right { background: linear-gradient(to left, #1e1e1e 70%, transparent); }
.ribbon-container.dark-mode .ribbon-scroll-arrow:hover { color: #fff; }
.ribbon-container.dark-mode .ribbon-scroll-arrow.scroll-left:hover { background: linear-gradient(to right, #217346 60%, transparent); }
.ribbon-container.dark-mode .ribbon-scroll-arrow.scroll-right:hover { background: linear-gradient(to left, #217346 60%, transparent); }

.ribbon-group {
    display: flex;
    flex-direction: column;
    min-width: fit-content;
    border-right: 1px solid #e5e7eb;
    padding: 0 6px;
}

.ribbon-group:last-child {
    border-right: none;
}

.ribbon-group-content {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 3px 0;
}

.ribbon-group-header {
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-body);
    color: #9ca3af;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 3px 1px 3px;
    margin-top: 0px;
    border-top: 1px solid #e5e7eb;
}

.ribbon-button-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    min-width: 58px;
    transition: all 0.15s ease;
}

.ribbon-button-large:hover {
    background-color: #e5e7eb;
    border-color: transparent;
}

.ribbon-button-large:active {
    background-color: #d1d5db;
    border-color: transparent;
}

.ribbon-button-large i {
    font-size: 22px;
    color: #217346;
    margin-bottom: 3px;
}

.ribbon-button-large span {
    font-size: 12px;
    color: #374151;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

/* Pulse attention animation for ribbon buttons */
@keyframes ribbonButtonPulse {
    0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5); }
    50%  { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}
.ribbon-button-large.pulse {
    animation: ribbonButtonPulse 1.5s ease-in-out infinite;
    border: 1px solid #A855F7;
    border-radius: 6px;
}

/* Compact variant for multi-word labels — smaller icon so total height matches single-line buttons */
.ribbon-button-compact {
    padding: 3px 8px;
}
.ribbon-button-compact i {
    font-size: 16px;
    margin-bottom: 2px;
}
.ribbon-button-compact span {
    white-space: normal;
    line-height: 1.1;
    font-size: 11px;
    max-width: 52px;
}

.ribbon-button-small {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ribbon-button-small:hover {
    background-color: #e5e7eb;
    border-color: transparent;
}

.ribbon-button-small:active {
    background-color: #d1d5db;
    border-color: transparent;
}

.ribbon-button-small i {
    font-size: 16px;
    color: #217346;
}

.ribbon-button-small span {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
    font-weight: 500;
}

.ribbon-button-column {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ── Dropdown menu button (icon type: menu) ── */
.ribbon-button-has-menu {
    position: relative;
}
.ribbon-button-has-menu .ribbon-dd-arrow {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: #6b7280;
    line-height: 1;
    display: flex;
    align-items: center;
}
/* Large dropdown button — extra right padding for arrow */
.ribbon-button-large.ribbon-button-has-menu {
    padding-right: 16px;
}
/* Small dropdown button — extra right padding for arrow */
.ribbon-button-small.ribbon-button-has-menu {
    padding-right: 18px;
}
.ribbon-button-has-menu:hover .ribbon-dd-arrow {
    color: #374151;
}
.ribbon-button-has-menu.menu-open {
    background: #e5e7eb;
}
.ribbon-button-has-menu.menu-open .ribbon-dd-arrow {
    color: #374151;
}

/* Main dropdown menu panel */
.ribbon-button-menu {
    position: fixed;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 4px 0;
    min-width: 200px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

/* Menu items */
.rbm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 10px;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
    user-select: none;
}
.rbm-item:hover {
    background: #f3f4f6;
}
.rbm-item i {
    width: 18px;
    text-align: center;
    color: #217346;
    font-size: 14px;
    flex-shrink: 0;
}
.rbm-item .rbm-no-icon {
    width: 18px;
    flex-shrink: 0;
}
.rbm-has-children::after {
    content: '\203A';
    margin-left: auto;
    padding-left: 12px;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
}
.rbm-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* Flyout submenu */
.ribbon-button-flyout {
    position: fixed;
    z-index: 10000;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 4px 0;
    min-width: 180px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

/* Ribbon checkbox group - grid of labeled checkboxes */
.ribbon-check-group {
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px 10px;
    font-size: 11px;
    color: #374151;
    font-family: var(--font-body);
}
.ribbon-check-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.ribbon-check-group input[type="checkbox"]:checked {
    background: #217346;
    border-color: #217346;
}
.ribbon-check-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3.5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ribbon-check-group input[type="checkbox"]:hover {
    border-color: #9ca3af;
}
.ribbon-check-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 450;
}
.ribbon-check-group label:hover {
    background: #f3f2f1;
}

/* Ribbon dropdown button */
.ribbon-dd-btn {
    padding: 3px 20px 3px 6px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    color: #4b5563;
    white-space: nowrap;
    min-width: 80px;
    text-align: left;
    position: relative;
    transition: all 0.15s ease;
}
.ribbon-dd-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Ribbon dropdown panel */
.ribbon-dd-panel {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    padding: 4px 0;
    min-width: 130px;
}
.ribbon-dd-panel label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 11px;
    color: #374151;
}
.ribbon-dd-panel label:hover {
    background: #f3f4f6;
}
.ribbon-dd-panel .dd-actions {
    display: flex;
    gap: 8px;
    padding: 3px 10px 4px;
    border-bottom: 1px solid #eee;
    margin-bottom: 2px;
}
.ribbon-dd-panel .dd-actions a {
    font-size: 10px;
    text-decoration: none;
    cursor: pointer;
}
.ribbon-dd-panel .dd-actions a.dd-select-all { color: #217346; }
.ribbon-dd-panel .dd-actions a.dd-clear { color: #dc3545; }

/* ============================================
   STATUS BAR
   ============================================ */

.status-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    gap: 10px;
    font-size: 9px;
    color: #374151;
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 2px;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.status-bar-item:hover {
    background-color: #e5e7eb;
}

.status-bar-item i {
    font-size: 10px;
    color: #6b7280;
}

.status-bar-separator {
    width: 1px;
    height: 10px;
    background-color: #d1d5db;
}

/* ============================================
   TASK PANE
   ============================================ */

.task-pane {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.task-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background-color: #e5e7eb;
    border-bottom: 1px solid #d1d5db;
    min-height: 25px;
}

.task-pane-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.task-pane-close {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    transition: all 0.15s ease;
}

.task-pane-close:hover {
    background-color: #d1d5db;
    color: #111827;
}

.task-pane-content {
    flex: 1;
    padding: 12px;
    overflow: auto;
}

/* ============================================
   SCROLLBAR
   ============================================ */

.scrollbar-container {
    width: 100%;
    height: 100%;
    background-color: #f3f2f1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scrollbar-track {
    position: relative;
    background-color: #f3f2f1;
}

.scrollbar-track.horizontal {
    width: 100%;
    height: 12px;
}

.scrollbar-track.vertical {
    width: 12px;
    height: 100%;
}

.scrollbar-thumb {
    position: absolute;
    background-color: #9ca3af;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.scrollbar-thumb:hover {
    background-color: #6b7280;
}

.scrollbar-thumb:active {
    background-color: #4b5563;
}

.scrollbar-thumb.horizontal {
    height: 100%;
    min-width: 15px;
}

.scrollbar-thumb.vertical {
    width: 100%;
    min-height: 15px;
}

/* ============================================
   EXCEL TABLE
   ============================================ */

.excel-table-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.excel-table {
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 11px;
    background-color: #fff;
    table-layout: fixed;
    width: auto;
}

.excel-table th {
    background-color: #f9f9f9;
    border: 1px solid #e5e7eb;
    padding: 2px 4px;
    font-weight: 600;
    text-align: center;
    color: #374151;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.03em;
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    height: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table th.row-header {
    background-color: #f9f9f9;
    min-width: 40px;
    max-width: 40px;
    width: 40px;
    position: sticky;
    left: 0;
    z-index: 11;
}

.excel-table th.column-header {
    min-width: 150px;
    max-width: 150px;
    width: 150px;
}

.excel-table td {
    border: 1px solid #e5e7eb;
    padding: 2px 4px;
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    height: 20px;
    background-color: #fff;
    cursor: cell;
    white-space: nowrap;
    overflow: hidden;
}

.excel-table td.row-header {
    background-color: #f9f9f9;
    font-weight: 600;
    text-align: center;
    color: #374151;
    min-width: 40px;
    max-width: 40px;
    width: 40px;
    position: sticky;
    left: 0;
    z-index: 5;
    cursor: default;
}

.excel-table td:not(.row-header):hover {
    background-color: #f9fafb;
}

.excel-table td:not(.row-header):focus {
    outline: 2px solid #107c41;
    outline-offset: -2px;
    background-color: #fff;
}

.excel-table td.selected {
    background-color: #f3e8ff;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 10px 0;
    gap: 2px;
    width: 100%;
}

.nav-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #217346;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 5px;
    background-color: transparent;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #4b5563;
    border-radius: 0;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.nav-item:active,
.nav-item.active {
    background-color: #ffffff;
    border-left-color: #217346;
    color: #217346;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item.active i {
    color: #217346;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

/* ============================================
   SIDE PANEL (Area 19/20)
   ============================================ */

.area-19-title {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.area-19-title i {
    font-size: 16px;
    color: #374151;
}

.area-19-close {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.15s ease;
}

.area-19-close:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* ============================================
   DEFAULT AREA LAYOUT
   Grid positioning for the 20-area ribbon
   ============================================ */

#area-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 10;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    background: #f3f2f1;
    border-right: 1px solid #e5e7eb;
}

#area-2 {
    grid-column: 2 / 6;
    grid-row: 1 / 2;
    width: 40%;
    justify-self: start;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding: 3px 8px;
    background: #f3f2f1;
    border-bottom: 1px solid #e5e7eb;
}

#area-3 {
    grid-column: 2 / 6;
    grid-row: 1 / 2;
    width: 60%;
    justify-self: end;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    background: #f3f2f1;
    border-bottom: 1px solid #e5e7eb;
}

#area-4 { grid-column: 2 / 6; grid-row: 2 / 3; width: 45%; justify-self: start; justify-content: flex-start; background-color: #f3f2f1; }
#area-5 { grid-column: 2 / 6; grid-row: 2 / 3; width: 55%; justify-self: end; justify-content: flex-end; gap: 6px; padding: 0 8px; background-color: #f3f2f1; }
#area-6 { grid-column: 2 / 6; grid-row: 3 / 4; justify-content: flex-start; }
#area-7 { grid-column: 2 / 6; grid-row: 4 / 5; background: #fff; }
#area-8 { grid-column: 2 / 6; grid-row: 5 / 6; width: calc(100% - 200px); justify-self: start; background-color: #f3f2f1; align-items: center; border-bottom: 1px solid #e5e7eb; }
#area-9 { grid-column: 2 / 6; grid-row: 5 / 6; width: 200px; justify-self: end; background-color: #f3f2f1; align-items: center; border-bottom: 1px solid #e5e7eb; }
#area-10 { grid-column: 2 / 6; grid-row: 6 / 7; }
#area-11 { grid-column: 2 / 3; grid-row: 7 / 8; background-color: #f3f2f1; }
#area-12 { grid-column: 3 / 4; grid-row: 7 / 8; justify-content: flex-start; align-items: flex-start; padding: 0; overflow: auto; -ms-overflow-style: none; scrollbar-width: none; }
#area-12::-webkit-scrollbar { display: none; }
#area-12.show-labels::before { z-index: 1000; }
#area-13 { grid-column: 4 / 5; grid-row: 7 / 8; background-color: #f3f2f1; }
#area-14 { grid-column: 5 / 6; grid-row: 7 / 8; background-color: #f3f2f1; }
#area-16 { grid-column: 2 / 6; grid-row: 8 / 9; width: 65%; justify-self: start; background-color: #f3f2f1; }
#area-17 { grid-column: 2 / 6; grid-row: 8 / 9; width: 35%; justify-self: end; background-color: #f3f2f1; }
#area-18 { grid-column: 2 / 6; grid-row: 9 / 10; background-color: #f3f2f1; justify-content: flex-start; align-items: center; border-top: 1px solid #e5e7eb; }

#area-19 {
    grid-column: 6 / 7;
    grid-row: 1 / 2;
    background-color: #f3f2f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-left: 1px solid #e5e7eb;
}

#area-20 {
    grid-column: 6 / 7;
    grid-row: 2 / 10;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: auto;
    border-left: 1px solid #e5e7eb;
}

/* ============================================
   SETTINGS PANEL
   ============================================ */

.settings-panel {
    display: none;
    position: absolute;
    z-index: 9999;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 0;
    overflow: hidden;
}

.settings-panel.show {
    display: block;
}

.settings-panel-header {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #111827;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    transition: background-color 0.15s ease;
}

.settings-panel-row:hover {
    background-color: #f3f4f6;
}

.settings-panel-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

.settings-panel-label i {
    font-size: 14px;
    color: #6b7280;
}

/* Toggle switch */
.settings-toggle-switch {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 20px;
    background-color: #d1d5db;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    outline: none;
    border: none;
    flex-shrink: 0;
}

.settings-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.settings-toggle-switch:checked {
    background-color: #217346;
}

.settings-toggle-switch:checked::after {
    transform: translateX(16px);
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode {
    background-color: #1e1e1e;
}

.ribbon-container.dark-mode {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
}

.ribbon-container.dark-mode .ribbon-area {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #e5e7eb;
}

/* Chrome areas */
.ribbon-container.dark-mode #area-1 { background: #1e1e1e; border-right-color: #3d3d3d; }
.ribbon-container.dark-mode #area-2 { background: #1e1e1e; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode #area-3 { background: #1e1e1e; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode #area-4 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-5 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-7 { background: #2d2d2d; }
.ribbon-container.dark-mode #area-8 { background-color: #1e1e1e; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode #area-9 { background-color: #1e1e1e; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode #area-11 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-12 { background-color: #2d2d2d; }
.ribbon-container.dark-mode #area-13 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-14 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-16 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-17 { background-color: #1e1e1e; }
.ribbon-container.dark-mode #area-18 { background-color: #1e1e1e; border-top-color: #3d3d3d; }
.ribbon-container.dark-mode #area-19 { background-color: #1e1e1e; border-left-color: #3d3d3d; }
.ribbon-container.dark-mode #area-20 { background-color: #2d2d2d; border-left-color: #3d3d3d; }

/* Title & Breadcrumbs */
.ribbon-container.dark-mode .area-title { color: #e5e7eb; }
.ribbon-container.dark-mode .area-breadcrumbs { color: #6b7280; }
.ribbon-container.dark-mode .area-breadcrumbs a { color: #9ca3af; }
.ribbon-container.dark-mode .area-breadcrumbs a:hover { color: #e5e7eb; }
.ribbon-container.dark-mode .area-breadcrumbs span { color: #4b5563; }
.ribbon-container.dark-mode .breadcrumb-more-btn { color: #9ca3af; }
.ribbon-container.dark-mode .breadcrumb-dropdown { background-color: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.ribbon-container.dark-mode .breadcrumb-dropdown-item { color: #9ca3af; }
.ribbon-container.dark-mode .breadcrumb-dropdown-item:hover { background-color: #3d3d3d; }

/* Icon buttons */
.ribbon-container.dark-mode .icon-button { color: #9ca3af; }
.ribbon-container.dark-mode .icon-button:hover { background-color: #3d3d3d; color: #e5e7eb; }
.ribbon-container.dark-mode .icon-button:active { background-color: #4b4b4b; }

.ribbon-container.dark-mode .icon-text-button { color: #9ca3af; }
.ribbon-container.dark-mode .icon-text-button i { color: #9ca3af; }
.ribbon-container.dark-mode .icon-text-button:hover { background-color: #3d3d3d; color: #e5e7eb; }
.ribbon-container.dark-mode .icon-text-button:hover i { color: #e5e7eb; }
.ribbon-container.dark-mode .icon-text-button:active { background-color: #4b4b4b; }

/* Menu tabs */
.ribbon-container.dark-mode .ribbon-menu-item { color: #9ca3af; }
.ribbon-container.dark-mode .ribbon-menu-item:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-menu-item:active,
.ribbon-container.dark-mode .ribbon-menu-item.active { background-color: #252525; border-bottom-color: #2ea05a; color: #e5e7eb; }
.ribbon-container.dark-mode .ribbon-toggle-btn { color: #6b7280; }
.ribbon-container.dark-mode .ribbon-toggle-btn:hover { background-color: #3d3d3d; color: #e5e7eb; }

/* Ribbon Toolbar */
.ribbon-container.dark-mode .ribbon-toolbar { background-color: #252525; }
.ribbon-container.dark-mode .ribbon-group { border-right-color: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-group-header { color: #6b7280; border-top-color: #3d3d3d; }

.ribbon-container.dark-mode .ribbon-button-large:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-button-large:active { background-color: #4b4b4b; }
.ribbon-container.dark-mode .ribbon-button-large i { color: #2ea05a; }
.ribbon-container.dark-mode .ribbon-button-large span { color: #9ca3af; }

.ribbon-container.dark-mode .ribbon-button-small:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-button-small:active { background-color: #4b4b4b; }
.ribbon-container.dark-mode .ribbon-button-small i { color: #2ea05a; }
.ribbon-container.dark-mode .ribbon-button-small span { color: #9ca3af; }

/* Ribbon check group */
.ribbon-container.dark-mode .ribbon-check-group { color: #9ca3af; }
.ribbon-container.dark-mode .ribbon-check-group label:hover { background: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-check-group input[type="checkbox"] { background: #2d2d2d; border-color: #4b4b4b; }
.ribbon-container.dark-mode .ribbon-check-group input[type="checkbox"]:checked { background: #2ea05a; border-color: #2ea05a; }
.ribbon-container.dark-mode .ribbon-check-group input[type="checkbox"]:hover { border-color: #6b7280; }

/* Ribbon dropdown button */
.ribbon-container.dark-mode .ribbon-dd-btn { background: #2d2d2d; border-color: #3d3d3d; color: #9ca3af; }
.ribbon-container.dark-mode .ribbon-dd-btn:hover { border-color: #6b7280; background: #3d3d3d; }

/* Ribbon dropdown panel (inside container) */
.ribbon-container.dark-mode .ribbon-dd-panel { background: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.ribbon-container.dark-mode .ribbon-dd-panel label { color: #9ca3af; }
.ribbon-container.dark-mode .ribbon-dd-panel label:hover { background: #3d3d3d; }
.ribbon-container.dark-mode .ribbon-dd-panel .dd-actions { border-bottom-color: #3d3d3d; }

/* Dropdown panels appended to body (outside container) */
body.dark-mode .ribbon-dd-panel { background: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
body.dark-mode .ribbon-dd-panel label { color: #9ca3af; }
body.dark-mode .ribbon-dd-panel label:hover { background: #3d3d3d; }
body.dark-mode .ribbon-dd-panel .dd-actions { border-bottom-color: #3d3d3d; }
body.dark-mode .ribbon-multicheck-panel { background: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
body.dark-mode .ribbon-multicheck-panel label { color: #9ca3af; }
body.dark-mode .ribbon-multicheck-panel label:hover { background: #3d3d3d; }

/* Search */
.ribbon-container.dark-mode .search-container { background-color: #1e1e1e; }
.ribbon-container.dark-mode .search-box { background-color: #2d2d2d; border-color: #3d3d3d; }
.ribbon-container.dark-mode .search-box:focus-within { border-color: #2ea05a; box-shadow: 0 0 0 2px rgba(46,160,90,0.15); }
.ribbon-container.dark-mode .search-box i { color: #6b7280; }
.ribbon-container.dark-mode .search-box input { color: #e5e7eb; }
.ribbon-container.dark-mode .search-box input::placeholder { color: #4b5563; }

/* Navigation */
.ribbon-container.dark-mode .nav-logo { color: #2ea05a; }
.ribbon-container.dark-mode .nav-item { color: #9ca3af; }
.ribbon-container.dark-mode .nav-item:hover { background-color: #252525; color: #e5e7eb; }
.ribbon-container.dark-mode .nav-item:active,
.ribbon-container.dark-mode .nav-item.active { background-color: #2d2d2d; border-left-color: #2ea05a; color: #2ea05a; }
.ribbon-container.dark-mode .nav-item.active i { color: #2ea05a; }

/* Tabs */
.ribbon-container.dark-mode .tabs-container { background-color: #1e1e1e; }
.ribbon-container.dark-mode .tab { color: #6b7280; }
.ribbon-container.dark-mode .tab:hover { background-color: rgba(45,45,45,0.7); color: #9ca3af; }
.ribbon-container.dark-mode .tab.active { background-color: #2d2d2d; color: #e5e7eb; }
.ribbon-container.dark-mode .tab-scroll-btn { color: #6b7280; }
.ribbon-container.dark-mode .tab-scroll-btn:hover { background-color: rgba(45,45,45,0.7); color: #e5e7eb; }
.ribbon-container.dark-mode .tab-add-btn { color: #6b7280; }
.ribbon-container.dark-mode .tab-add-btn:hover { background-color: rgba(45,45,45,0.7); color: #e5e7eb; }
.ribbon-container.dark-mode .tab-context-menu { background-color: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.ribbon-container.dark-mode .tab-context-menu-item { color: #9ca3af; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode .tab-context-menu-item:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .tab-context-menu-item.active { background-color: #1a3a2a; }

/* Formula bar */
.ribbon-container.dark-mode .formula-bar-container { background-color: #1e1e1e; }
.ribbon-container.dark-mode .formula-bar-label { color: #9ca3af; background-color: #1e1e1e; border-color: #3d3d3d; }
.ribbon-container.dark-mode .formula-bar-input { color: #e5e7eb; border-color: #3d3d3d; background-color: #2d2d2d; }
.ribbon-container.dark-mode .formula-bar-input:focus { border-color: #2ea05a; box-shadow: 0 0 0 2px rgba(46,160,90,0.15); }

/* Announcement bar */
.ribbon-container.dark-mode .announcement-container { background-color: #3d3520; border-left-color: #f59e0b; }
.ribbon-container.dark-mode .announcement-text { color: #fbbf24; }
.ribbon-container.dark-mode .announcement-icon { color: #fbbf24; }
.ribbon-container.dark-mode .announcement-close { color: #fbbf24; }
.ribbon-container.dark-mode .announcement-close:hover { background-color: #f59e0b; color: #1e1e1e; }

/* Status bar */
.ribbon-container.dark-mode .status-bar { color: #9ca3af; }
.ribbon-container.dark-mode .status-bar-item:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .status-bar-item i { color: #6b7280; }
.ribbon-container.dark-mode .status-bar-separator { background-color: #3d3d3d; }

/* Task pane */
.ribbon-container.dark-mode .task-pane-header { background-color: #252525; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode .task-pane-title { color: #9ca3af; }
.ribbon-container.dark-mode .task-pane-close { color: #6b7280; }
.ribbon-container.dark-mode .task-pane-close:hover { background-color: #3d3d3d; color: #e5e7eb; }

/* Scrollbar */
.ribbon-container.dark-mode .scrollbar-container { background-color: #1e1e1e; }
.ribbon-container.dark-mode .scrollbar-track { background-color: #1e1e1e; }
.ribbon-container.dark-mode .scrollbar-thumb { background-color: #4b5563; }
.ribbon-container.dark-mode .scrollbar-thumb:hover { background-color: #6b7280; }
.ribbon-container.dark-mode .scrollbar-thumb:active { background-color: #9ca3af; }

/* Side panel */
.ribbon-container.dark-mode .area-19-title { color: #e5e7eb; }
.ribbon-container.dark-mode .area-19-title i { color: #9ca3af; }
.ribbon-container.dark-mode .area-19-close { color: #6b7280; }
.ribbon-container.dark-mode .area-19-close:hover { background-color: #3d3d3d; color: #e5e7eb; }

/* Excel table */
.ribbon-container.dark-mode .excel-table { background-color: #2d2d2d; }
.ribbon-container.dark-mode .excel-table th { background-color: #252525; border-color: #3d3d3d; color: #9ca3af; }
.ribbon-container.dark-mode .excel-table th.row-header { background-color: #252525; }
.ribbon-container.dark-mode .excel-table td { border-color: #3d3d3d; background-color: #2d2d2d; color: #e5e7eb; }
.ribbon-container.dark-mode .excel-table td.row-header { background-color: #252525; color: #9ca3af; }
.ribbon-container.dark-mode .excel-table td:not(.row-header):hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .excel-table td:not(.row-header):focus { outline-color: #2ea05a; }
.ribbon-container.dark-mode .excel-table td.selected { background-color: #1a3a2a; }

/* Settings panel in dark mode */
.ribbon-container.dark-mode .settings-panel { background-color: #2d2d2d; border-color: #3d3d3d; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.ribbon-container.dark-mode .settings-panel-header { color: #e5e7eb; border-bottom-color: #3d3d3d; }
.ribbon-container.dark-mode .settings-panel-row:hover { background-color: #3d3d3d; }
.ribbon-container.dark-mode .settings-panel-label { color: #9ca3af; }
.ribbon-container.dark-mode .settings-panel-label i { color: #6b7280; }
.ribbon-container.dark-mode .settings-toggle-switch { background-color: #4b5563; }
.ribbon-container.dark-mode .settings-toggle-switch:checked { background-color: #2ea05a; }
