.dashboard-page {
display: flex;
min-height: 100vh;
background-color: var(--bg);
}

.app-sidebar {
    width: 260px;
    background-color: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    padding: var(--space-4) var(--space-3);
    transition: width 0.3s ease;
}
.app-sidebar.collapsed {
    width: 70px;
}
.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-text,
.app-sidebar.collapsed .history-label {
    display: none;
}
.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-sidebar.collapsed .sidebar-header {
    flex-direction: column;
    gap: var(--space-3);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}
.sidebar-brand img {
    width: 24px;
    height: 24px;
}
.collapse-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: auto;
    transition: color var(--transition-fast);
}
.collapse-btn:hover {
    color: var(--text);
}
.app-sidebar.collapsed .collapse-btn {
    margin: 0 auto;
}
.app-sidebar.collapsed .sidebar-brand {
    padding: var(--space-2) 0;
    justify-content: center;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.app-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: var(--space-2) 0;
}
.nav-item:hover {
    background-color: var(--surface-hover);
    color: var(--text);
}
.nav-item.active, .history-item.active .history-item-content {
    background-color: var(--surface-3);
    color: var(--text);
}
.new-analysis-btn {
    border: 1px solid var(--border);
    margin-bottom: var(--space-2);
}
.new-analysis-btn:hover {
    background-color: var(--surface-2);
}
.sidebar-history-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: var(--space-4);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.sidebar-history-container::-webkit-scrollbar {
    width: 4px;
}
.sidebar-history-container::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
}
.history-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.history-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.history-item-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}
.history-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-sidebar.collapsed .history-item-content {
    justify-content: center;
    padding: var(--space-2) 0;
}
.history-item:hover .history-item-content {
    background-color: var(--surface-hover);
    color: var(--text);
}
.delete-history-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}
.delete-history-btn:hover {
    color: var(--hl-red);
    background-color: var(--surface-2);
}
.history-item:hover .delete-history-btn {
    opacity: 1;
}
.app-sidebar.collapsed .delete-history-btn {
    display: none;
}
.sidebar-nav.bottom-nav {
    flex-grow: 0;
    margin-bottom: var(--space-4);
}
.sidebar-footer {
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.nav-icon {
    width: 18px;
    height: 18px;
    color: inherit;
    flex-shrink: 0;
}

.main-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.app-sidebar.collapsed ~ .main-wrapper {
    margin-left: 70px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 90;
}
.topbar-title h1 {
font-size: 1.25rem;
font-weight: 600;
color: var(--text);
}
.topbar-title p {
font-size: 0.85rem;
color: var(--text-muted);
}
.content-container {
padding: var(--space-6);
flex-grow: 1;
max-width: 1200px;
margin: 0 auto;
width: 100%;
}
.controls-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.control-group label {
display: block;
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
margin-bottom: var(--space-2);
}
.control-group select {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-md);
font-family: inherit;
font-size: 0.9rem;
outline: none;
transition: all var(--transition-fast);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg stroke='currentColor' fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 1rem;
padding-right: 2.5rem;
}
.control-group select:focus {
border-color: var(--accent);
}
.actions-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.action-card:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.action-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-card-content {
  flex-grow: 1;
}
.action-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.action-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.action-card-chevron {
  color: var(--text-muted);
  opacity: 0.5;
}
.action-card.blue { border-bottom: 3px solid var(--accent); }
.action-card.blue .action-card-icon { background: rgba(59, 130, 246, 0.1); color: var(--accent); }
.action-card.green { border-bottom: 3px solid #10b981; }
.action-card.green .action-card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.action-card.yellow { border-bottom: 3px solid #f59e0b; }
.action-card.yellow .action-card-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.action-card.purple { border-bottom: 3px solid #8b5cf6; }
.action-card.purple .action-card-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.stat-card {
background: var(--surface);
border: 1px solid var(--border);
padding: var(--space-5);
border-radius: var(--radius-lg);
display: flex;
flex-direction: column;
}
.stat-value {
font-size: 2rem;
font-weight: 700;
line-height: 1.2;
color: var(--text);
margin-bottom: var(--space-1);
}
.stat-label {
color: var(--text-secondary);
font-size: 0.85rem;
font-weight: 500;
}
.charts-container {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: var(--space-6);
margin-bottom: var(--space-8);
}
@media (min-width: 1100px) {
.charts-container {
grid-template-columns: repeat(2, 1fr);
}
}
.chart-card {
background: var(--surface);
border: 1px solid var(--border);
padding: var(--space-5);
border-radius: var(--radius-lg);
}
.chart-title {
font-size: 1rem;
font-weight: 600;
color: var(--text);
margin-bottom: var(--space-4);
}
.chart-wrapper {
position: relative;
height: 300px;
width: 100%;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--modal-overlay, rgba(0, 0, 0, 0.65));
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
}
.modal-overlay.visible {
opacity: 1;
pointer-events: all;
}
.modal-overlay.visible .modal-content {
transform: translateY(0) scale(1);
opacity: 1;
}
.modal-content {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-8);
width: 100%;
max-width: 400px;
text-align: center;
box-shadow: var(--shadow-lg);
transform: translateY(12px) scale(0.97);
opacity: 0;
transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.18s ease;
will-change: transform, opacity;
}
.modal-content h2 {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: var(--space-2);
}
.modal-content p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.suggestion-text {
margin-top: var(--space-4);
font-style: italic;
color: var(--text-muted);
}
.mobile-topbar-actions {
display: none;
}
@media (max-width: 768px) {
    #breadcrumb-container {
        display: none !important;
    }
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper, .app-sidebar.collapsed ~ .main-wrapper {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    .mobile-topbar-actions {
        display: flex;
        align-items: center;
        gap: var(--space-3);
    }
    
    .topbar {
        padding: var(--space-3) var(--space-4);
    }
    .topbar-title h1 {
        font-size: 1.1rem;
        word-break: break-word;
    }
.controls-grid {
grid-template-columns: 1fr;
gap: var(--space-3);
margin-bottom: var(--space-4);
}
.actions-bar {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--space-2);
margin-bottom: var(--space-4);
align-items: stretch;
}
.download-btn {
width: 100%;
justify-content: center;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: var(--space-3);
margin-bottom: var(--space-4);
}
.stat-value {
font-size: 1.25rem;
word-break: break-word;
}
.stat-card {
padding: var(--space-2);
}
.chart-card {
padding: var(--space-3);
}
.chart-title {
font-size: 0.95rem;
margin-bottom: var(--space-3);
}
.charts-container {
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.global-footer {
padding: var(--space-5) var(--space-4) var(--space-4) !important;
margin-top: 2rem !important;
}
.footer-brand h3 {
font-size: 1.1rem;
}
.modal-overlay {
align-items: flex-end;
padding: 0;
}
.modal-content {
width: 95vw !important;
max-width: 95vw !important;
max-height: 90vh !important;
border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
padding: var(--space-5) var(--space-4) !important;
overflow-y: auto;
transform: translateY(20px) scale(1) !important;
}
.modal-overlay.visible .modal-content {
transform: translateY(0) scale(1) !important;
}
    .content-container {
        padding: var(--space-4);
    }
    .tool-header h1 {
        font-size: 1.35rem !important;
        line-height: 1.3;
    }
    .tool-header p {
        font-size: 0.9rem !important;
        padding: 0 0.25rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .upload-card {
        padding: 1.5rem 1.25rem !important;
        border-radius: 16px !important;
    }
    .upload-card .upload-card-header h2 {
        font-size: 1.25rem !important;
    }
    .upload-card .upload-card-header p {
        font-size: 0.9rem !important;
    }
    .upload-columns {
        gap: 1.5rem !important;
    }
    .upload-column {
        min-width: 0 !important;
        flex-basis: 100% !important;
    }
    .upload-zone {
        min-height: 200px !important;
        padding: 1.5rem 1rem !important;
    }
}

.skeleton {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    pointer-events: none;
    border-radius: 8px;
    animation: skeleton-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 20%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 80%,
        transparent 100%
    );
    animation: skeleton-shimmer 2s infinite linear;
}
.skeleton * { opacity: 0 !important; visibility: hidden !important; }
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}
.theme-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
}
.app-sidebar.collapsed .theme-setting {
    display: none !important;
}

.app-sidebar.collapsed #theme-setting-container {
    justify-content: center !important;
}

.app-sidebar.collapsed #theme-setting-container .theme-label {
    display: none !important;
}

.app-sidebar.collapsed .profile-text {
    display: none !important;
}

#analyze-btn {
    background: #177de2;
    color: white;
    border: none;
    padding: 0.8rem 4rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#analyze-btn:disabled {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: not-allowed;
    opacity: 1;
}

#analyze-btn:not(:disabled):hover {
    background: #177de2;
    transform: translateY(-1px);
}

.clear-all-history-btn:hover {
    color: var(--hl-red) !important;
}

.danger-btn:hover {
    background: #c53030 !important;
}

.processing-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes btn-spin { 
    to { transform: rotate(360deg); } 
}

.processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #fff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: btn-spin 1s linear infinite;
}

.processing-text {
    color: #fff;
    margin-top: 20px;
    font-family: Inter, sans-serif;
    font-weight: 600;
}
.sidebar-report-btn {
    width: 100%;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
}
.sidebar-report-btn:hover {
    color: var(--hl-red) !important;
}
.report-modal-content {
    max-width: 620px;
    text-align: left;
    padding: var(--space-6);
    position: relative;
}
.report-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.report-modal-close:hover { color: var(--text); background: var(--surface-2); }

.report-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}
.report-modal-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
    flex-shrink: 0;
}
.report-field-group { margin-bottom: var(--space-4); }
.report-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}
.report-select-wrapper { position: relative; }
.report-select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 2.25rem 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    appearance: none;
    transition: border-color 0.15s;
    cursor: pointer;
}
.report-select:focus { border-color: var(--accent); }
.report-select-arrow {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}
.report-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    min-height: 110px;
    line-height: 1.5;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.report-textarea:focus { border-color: var(--accent); }
.report-char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.report-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.report-input:focus { border-color: var(--accent); }
.report-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.4;
}
.report-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    margin-bottom: var(--space-1);
}
.report-checkbox { display: none; }
.report-checkbox-custom {
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.report-checkbox:checked + .report-checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}
.report-checkbox:checked + .report-checkbox-custom::after {
    content: '';
    width: 9px; height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
    display: block;
}
.report-checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 400;
}
.report-submit-btn {
    width: 100%;
    margin-top: var(--space-4);
    padding: 0.7rem;
    background: var(--hl-red);
    color: white;
    background-color: #177de2;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.report-submit-btn:hover:not(:disabled) { opacity: 0.88; }
.report-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.report-btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    display: inline-block;
}
.report-success {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4) 0;
    gap: var(--space-3);
}
.report-success-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(39, 201, 63, 0.12);
    border: 1px solid rgba(39, 201, 63, 0.3);
    display: flex; align-items: center; justify-content: center;
    color: #27c93f;
}
.report-success-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.report-success-sub { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.report-limits-notice {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-4);
    line-height: 1.4;
}
.report-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.report-fields-row .report-field-group {
    margin-bottom: 0;
}
.help-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    border: 1px solid var(--border);
    vertical-align: middle;
}
.help-tooltip:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.help-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--text-main);
    color: var(--bg);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    pointer-events: none;
}
.help-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-main) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}
.help-tooltip:hover::after,
.help-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
@media (max-width: 768px) {
    .help-tooltip::after {
        white-space: normal;
        width: max-content;
        max-width: 200px;
        text-align: center;
    }
}


.clear-all-history-btn { opacity: 0.35; transition: all 0.2s; }
.history-label:hover .clear-all-history-btn { opacity: 1; }
