/**
 * Settings Modal & User Menu Styles
 */

/* User Menu Container */
.user-menu-container {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius, 10px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-trigger.active {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

.user-menu-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    transition: transform 0.2s ease;
}

.user-menu-trigger.active .user-menu-chevron {
    transform: rotate(180deg);
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text, #1a2332);
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-menu-item:first-child {
    border-radius: var(--radius, 10px) var(--radius, 10px) 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 var(--radius, 10px) var(--radius, 10px);
}

.user-menu-item:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

.user-menu-logout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.user-menu-divider {
    height: 1px;
    background: var(--border-light, #eef1f5);
    margin: 4px 12px;
}

/* User Avatar Menu Styles */
.user-avatar-menu {
    position: relative;
}

.user-avatar-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    padding-right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--pill-radius, 999px);
    transition: all 0.2s ease;
}

.user-avatar-trigger:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

.user-avatar-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
    border: 2px solid var(--border, #e1e5eb);
    transition: all 0.2s ease;
}

.user-avatar-trigger:hover .user-avatar-wrapper {
    border-color: var(--accent-2, #1e3a5f);
}

.user-avatar-svg {
    width: 100%;
    height: 100%;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-menu .user-menu-dropdown {
    min-width: 240px;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--accent-softer, rgba(21, 39, 66, 0.03));
    border-radius: var(--radius, 10px) var(--radius, 10px) 0 0;
}

.user-menu-avatar-small {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-menu-avatar-small .user-avatar-svg,
.user-menu-avatar-small .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu-info .user-menu-name {
    font-weight: 600;
    color: var(--text, #1a2332);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.user-menu-email {
    font-size: 0.8rem;
    color: var(--muted, #5a6578);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Menu Credits Display */
.user-menu-credits {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--accent-softer, rgba(21, 39, 66, 0.03));
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.user-menu-credits svg {
    color: var(--accent, #152742);
    flex-shrink: 0;
}

.user-menu-credits .credits-label {
    color: var(--muted, #5a6578);
    font-size: 0.85rem;
}

.user-menu-credits .credits-amount {
    font-weight: 700;
    color: var(--accent, #152742);
    font-size: 0.95rem;
}

/* Purchase Credits Button (Primary Style) */
.user-menu-item-primary {
    background: var(--accent-soft, rgba(21, 39, 66, 0.08)) !important;
    color: var(--accent, #152742) !important;
    font-weight: 600;
}

.user-menu-item-primary:hover {
    background: var(--accent, #152742) !important;
    color: white !important;
}

.user-menu-item-primary svg {
    color: inherit;
}

/* Customer Status Indicator */
.user-menu-customer-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    margin: 0;
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.user-menu-customer-status svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.user-menu-customer-linked {
    background: rgba(22, 163, 74, 0.06);
}

.user-menu-customer-linked svg {
    color: #16a34a;
}

.user-menu-customer-warning {
    background: rgba(245, 158, 11, 0.08);
}

.user-menu-customer-warning svg {
    color: #d97706;
}

.customer-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.customer-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted, #5a6578);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.customer-status-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #1a2332);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-status-hint {
    font-size: 0.8rem;
    color: #d97706;
    font-weight: 500;
}

/* Dark Mode for Customer Status */
.dark-mode .user-menu-customer-linked {
    background: rgba(22, 163, 74, 0.12);
}

.dark-mode .user-menu-customer-warning {
    background: rgba(245, 158, 11, 0.12);
}

.dark-mode .customer-status-name {
    color: var(--text, #eef1f5);
}

/* Settings Modal Overlay */
.settings-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21, 39, 66, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.settings-modal-overlay.active {
    display: flex;
}

/* Settings Modal */
.settings-modal {
    background: var(--surface, #fff);
    border-radius: var(--radius-xl, 18px);
    width: min(720px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: settingsSlideIn 0.25s ease-out;
    overflow: hidden;
}

@keyframes settingsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.settings-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent, #152742);
}

.settings-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--muted, #5a6578);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.settings-modal-close:hover {
    background: var(--accent, #152742);
    color: #fff;
}

/* Settings Tabs */
.settings-modal-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    background: var(--accent-soft, rgba(21, 39, 66, 0.03));
}

.settings-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-tab:hover {
    color: var(--text, #1a2332);
    background: rgba(255, 255, 255, 0.5);
}

.settings-tab.active {
    background: var(--surface, #fff);
    color: var(--accent, #152742);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Settings Body */
.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent, #152742);
    margin: 0 0 12px;
}

.settings-description {
    color: var(--muted, #5a6578);
    font-size: 0.875rem;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Theme Mode Toggle */
.theme-mode-toggle {
    display: flex;
    gap: 12px;
}

.theme-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: 2px solid var(--border, #e1e5eb);
    background: var(--surface, #fff);
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text, #1a2332);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-mode-btn:hover {
    border-color: var(--accent, #152742);
}

.theme-mode-btn.active {
    border-color: var(--accent, #152742);
    background: var(--accent, #152742);
    color: #fff;
}

/* Color Palette Grid */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.color-palette-option {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--border, #e1e5eb);
    background: var(--surface, #fff);
    border-radius: var(--radius, 10px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.color-palette-option:hover {
    border-color: var(--accent, #152742);
}

.color-palette-option.active {
    border-color: var(--accent, #152742);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(21, 39, 66, 0.08));
}

.palette-preview {
    display: flex;
    gap: 4px;
    height: 24px;
}

.palette-swatch {
    flex: 1;
    border-radius: 4px;
}

.palette-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text, #1a2332);
}

/* Logo Grid */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.logo-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--border, #e1e5eb);
    background: var(--surface, #fff);
    border-radius: var(--radius, 10px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.logo-option:hover {
    border-color: var(--accent, #152742);
}

.logo-option.active {
    border-color: var(--accent, #152742);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(21, 39, 66, 0.08));
}

.logo-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted, #5a6578);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Preview Container */
.preview-container {
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    overflow: hidden;
}

.preview-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    background: var(--accent-soft, rgba(21, 39, 66, 0.03));
}

.preview-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
}

.preview-tab:hover {
    color: var(--text, #1a2332);
}

.preview-tab.active {
    background: var(--surface, #fff);
    color: var(--accent, #152742);
}

.preview-frame {
    padding: 20px;
    background: var(--accent-soft, rgba(21, 39, 66, 0.03));
    min-height: 200px;
}

.preview-content {
    max-width: 400px;
    margin: 0 auto;
}

/* Data Retention Form */
.settings-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text, #1a2332);
    background: var(--surface, #fff);
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-select:focus {
    outline: none;
    border-color: var(--accent, #152742);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(21, 39, 66, 0.08));
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent, #152742);
}

.checkbox-text {
    font-weight: 500;
    color: var(--text, #1a2332);
}

.settings-hint {
    margin: 8px 0 0 28px;
    font-size: 0.8rem;
    color: var(--muted, #5a6578);
    line-height: 1.5;
}

.settings-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Settings Modal Footer */
.settings-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light, #eef1f5);
    background: var(--accent-soft, rgba(21, 39, 66, 0.03));
}

/* Toast Notification */
.settings-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent, #152742);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius, 10px);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
}

.settings-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group > label:not(.checkbox-label) {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text, #1a2332);
}

/* Responsive */
@media (max-width: 640px) {
    .settings-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .settings-modal-body {
        padding: 16px;
    }

    .color-palette-grid {
        grid-template-columns: 1fr;
    }

    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .theme-mode-toggle {
        flex-direction: column;
    }
}

/* Dark Mode Support */
.dark-mode .settings-modal,
.dark-mode .user-menu-dropdown {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .user-menu-credits {
    background: rgba(47, 69, 111, 0.3);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .user-menu-credits .credits-amount {
    color: var(--accent-light, #6b8bc4);
}

.dark-mode .user-menu-item-primary {
    background: rgba(47, 69, 111, 0.4) !important;
    color: var(--accent-light, #6b8bc4) !important;
}

.dark-mode .user-menu-item-primary:hover {
    background: var(--accent, #2f456f) !important;
    color: white !important;
}

.dark-mode .settings-modal-close:hover {
    background: var(--accent, #2f456f);
}

.dark-mode .settings-tab.active {
    background: var(--surface, #16213e);
}

.dark-mode .theme-mode-btn,
.dark-mode .color-palette-option,
.dark-mode .logo-option {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .settings-select {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
    color: var(--text, #eef1f5);
}

/* ============================================================================
   Notification Dropdown Styles
   ============================================================================ */

.notification-container {
    position: relative;
}

.notification-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: var(--radius, 10px);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-trigger:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

.notification-trigger.active {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-badge.hidden {
    display: none;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.notification-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent, #152742);
}

.notification-mark-read {
    padding: 6px 12px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue, #2563eb);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: var(--radius, 10px);
}

.notification-mark-read:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    cursor: pointer;
    transition: all 0.15s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.03));
}

.notification-item.unread {
    background: rgba(37, 99, 235, 0.04);
}

.notification-item.unread:hover {
    background: rgba(37, 99, 235, 0.08);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
    color: var(--accent, #152742);
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.notification-icon.info {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #1a2332);
    margin: 0 0 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 0.8rem;
    color: var(--muted, #5a6578);
    margin: 0 0 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--muted, #5a6578);
    opacity: 0.7;
}

.notification-unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    margin-top: 4px;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.notification-empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--muted, #5a6578);
    opacity: 0.5;
}

.notification-empty h4 {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #1a2332);
}

.notification-empty p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted, #5a6578);
}

/* Notification Footer */
.notification-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light, #eef1f5);
    text-align: center;
}

.notification-view-all {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue, #2563eb);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: var(--radius, 10px);
}

.notification-view-all:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
}

/* Dark Mode Support for Notifications */
.dark-mode .notification-dropdown {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .notification-item.unread {
    background: rgba(37, 99, 235, 0.08);
}

.dark-mode .notification-item.unread:hover {
    background: rgba(37, 99, 235, 0.12);
}

/* Responsive */
@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 32px);
        right: -60px;
    }
}

/* Header Actions */
.notification-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-view-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border-light, #eef1f5);
    border-radius: 6px;
    background: transparent;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
}

.notification-view-toggle:hover {
    background: var(--accent-soft, rgba(21, 39, 66, 0.06));
    color: var(--text, #1a2332);
}

/* Grouped View Styles */
.notification-list.grouped-view {
    padding: 8px;
}

.notification-group {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-hover, rgba(21, 39, 66, 0.03));
}

.notification-group:last-child {
    margin-bottom: 0;
}

.notification-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-hover, rgba(21, 39, 66, 0.05));
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.notification-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.notification-group-icon.success { color: var(--success-color, #16a34a); }
.notification-group-icon.warning { color: var(--warning-color, #ea580c); }
.notification-group-icon.error { color: var(--error-color, #dc2626); }
.notification-group-icon.info { color: var(--accent-blue, #2563eb); }

.notification-group-label {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #1a2332);
}

.notification-group-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: var(--accent-blue, #2563eb);
    border-radius: 10px;
}

.notification-group-items {
    padding: 4px 0;
}

.notification-group-items .notification-item {
    padding: 8px 12px;
    border-bottom: none;
}

.notification-group-items .notification-item:last-child {
    border-bottom: none;
}

.notification-group-more {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--accent-blue, #2563eb);
    text-align: center;
    cursor: pointer;
}

.notification-group-more:hover {
    text-decoration: underline;
}

/* Dark Mode for Grouped View */
.dark-mode .notification-group {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mode .notification-group-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .notification-view-toggle {
    border-color: var(--border, #2a3f5f);
}

.dark-mode .notification-view-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Wide Settings Modal (Restructured Layout)
   ============================================================================ */

.settings-modal.settings-modal-wide {
    width: min(1100px, 95vw);
    max-height: 90vh;
}

.settings-modal-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    flex: 1;
    overflow: hidden;
}

/* Left Navigation */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 12px;
    background: var(--accent-softer, rgba(21, 39, 66, 0.03));
    border-right: 1px solid var(--border-light, #eef1f5);
    overflow-y: auto;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text, #1a2332);
}

.settings-nav-item.active {
    background: var(--surface, #fff);
    color: var(--accent, #152742);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.settings-nav-item svg {
    flex-shrink: 0;
}

/* Settings Content Area */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-height: calc(90vh - 140px);
}

.settings-section-content {
    display: none;
}

.settings-section-content.active {
    display: block;
}

.settings-section-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent, #152742);
    margin: 0 0 8px;
}

.settings-section-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent, #152742);
    margin: 20px 0 8px;
}

.settings-section-content h4:first-child {
    margin-top: 0;
}

.settings-divider {
    height: 1px;
    background: var(--border-light, #eef1f5);
    margin: 24px 0;
}

/* Profile Section */
.profile-section {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border, #e1e5eb);
}

.profile-avatar-large .user-avatar-svg {
    width: 100%;
    height: 100%;
}

.profile-avatar-large .profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* Avatar buttons - WCAG 2.1 AA touch target compliance (44x44px minimum) */
.avatar-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.avatar-buttons .ghost-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 18px;
}

/* Mobile touch targets need to be more prominent */
@media (max-width: 768px) {
    .avatar-buttons {
        flex-direction: column;
        width: 100%;
    }

    .avatar-buttons .ghost-btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
}

.profile-form {
    flex: 1;
}

.profile-form .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text, #1a2332);
    background: var(--surface, #fff);
    transition: all 0.15s ease;
}

.profile-form .form-group input:focus {
    outline: none;
    border-color: var(--accent, #152742);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(21, 39, 66, 0.08));
}

/* Display Section Layout */
.display-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

.display-controls {
    overflow-y: auto;
}

/* Display Tabs */
.display-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--accent-softer, rgba(21, 39, 66, 0.03));
    border-radius: var(--radius, 10px);
    margin-bottom: 20px;
}

.display-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm, 6px);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
}

.display-tab:hover {
    color: var(--text, #1a2332);
}

.display-tab.active {
    background: var(--surface, #fff);
    color: var(--accent, #152742);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.display-tab-content {
    display: none;
}

.display-tab-content.active {
    display: block;
}

/* Display Preview Panel */
.display-preview {
    background: var(--accent-softer, rgba(21, 39, 66, 0.03));
    border-radius: var(--radius-lg, 14px);
    border: 1px solid var(--border, #e1e5eb);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.preview-header-bar > span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text, #1a2332);
}

.preview-header-bar .preview-tabs {
    display: flex;
    gap: 4px;
    background: var(--accent-softer, rgba(21, 39, 66, 0.05));
    padding: 3px;
    border-radius: var(--radius-sm, 6px);
}

.preview-header-bar .preview-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted, #5a6578);
    cursor: pointer;
    transition: all 0.15s ease;
}

.preview-header-bar .preview-tab:hover {
    color: var(--text, #1a2332);
}

.preview-header-bar .preview-tab.active {
    background: var(--surface, #fff);
    color: var(--accent, #152742);
}

.preview-frame-large {
    flex: 1;
    padding: 16px;
    min-height: 350px;
}

.preview-frame-large .preview-content {
    height: 100%;
    max-width: none;
}

/* Color Palette Grid - Wide */
.color-palette-grid-wide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Logo Grid - Wide */
.logo-grid-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* Security Section */
.security-section {
    margin-bottom: 16px;
}

.security-section .form-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px 14px;
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text, #1a2332);
    background: var(--surface, #fff);
}

.mfa-status {
    margin-bottom: 12px;
}

.mfa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8rem;
    font-weight: 600;
}

.mfa-badge.mfa-disabled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.mfa-badge.mfa-enabled {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Responsive for Wide Modal */
@media (max-width: 900px) {
    .settings-modal.settings-modal-wide {
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .settings-modal-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid var(--border-light, #eef1f5);
    }

    .settings-nav-item {
        white-space: nowrap;
        padding: 10px 14px;
    }

    .display-layout {
        grid-template-columns: 1fr;
    }

    .display-preview {
        order: -1;
        max-height: 250px;
    }

    .preview-frame-large {
        min-height: 200px;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
    }

    .profile-form {
        width: 100%;
    }

    .color-palette-grid-wide {
        grid-template-columns: 1fr;
    }

    .logo-grid-wide {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode for Wide Modal */
.dark-mode .settings-nav {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .settings-nav-item.active {
    background: var(--surface, #16213e);
}

.dark-mode .display-preview {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .preview-header-bar {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .display-tabs {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode .display-tab.active {
    background: var(--surface, #16213e);
}

.dark-mode .profile-avatar-large {
    border-color: var(--border, #2a3f5f);
}

.dark-mode .profile-form .form-group input,
.dark-mode .security-section .form-group input {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
    color: var(--text, #eef1f5);
}

/* Integration Styles */
.integration-category {
    margin-bottom: 24px;
}

.integration-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent, #152742);
    margin-bottom: 12px;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.integration-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    transition: all 0.15s ease;
}

.integration-card:hover {
    border-color: var(--accent-2, #b8956d);
    box-shadow: var(--shadow-sm);
}

.integration-card.connected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.integration-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.integration-info {
    flex: 1;
    min-width: 0;
}

.integration-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text, #1a2332);
}

.integration-status {
    display: block;
    font-size: 0.8rem;
    color: var(--muted, #5a6578);
}

.integration-status.connected {
    color: #28a745;
}

.integration-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Font Settings Styles */
.font-settings-section {
    margin-bottom: 20px;
}

.font-settings-section h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent, #152742);
    margin-bottom: 8px;
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.font-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--surface, #fff);
    border: 2px solid var(--border, #e1e5eb);
    border-radius: var(--radius, 10px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.font-option:hover {
    border-color: var(--accent-2, #b8956d);
}

.font-option.active {
    border-color: var(--accent, #152742);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(21, 39, 66, 0.08));
}

.font-sample {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text, #1a2332);
}

.font-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted, #5a6578);
    text-align: center;
}

/* Dark mode for integrations and fonts */
.dark-mode .integration-card {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .integration-name {
    color: var(--text, #eef1f5);
}

.dark-mode .font-option {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .font-sample {
    color: var(--text, #eef1f5);
}

/* ========================================
   Settings Page Layout (Dedicated Page)
   ======================================== */

.settings-page {
    background: var(--bg, #f8f9fb);
    min-height: 100vh;
}

.settings-layout {
    padding: 24px;
}

.settings-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    max-width: 1200px;
    min-height: 600px;
    height: calc(100vh - 200px);
    max-height: 800px;
    margin: 0 auto;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e1e5eb);
    border-radius: var(--radius-xl, 16px);
    padding: 24px;
    box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.settings-page .settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--border-light, #e8eaed);
    padding-right: 24px;
}

.settings-page .settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: none;
    border-radius: var(--radius, 10px);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #1a2233);
    transition: all 0.15s ease;
    text-align: left;
}

.settings-page .settings-nav-item:hover {
    background: var(--accent-softer, rgba(21, 39, 66, 0.04));
}

.settings-page .settings-nav-item.active {
    background: var(--accent-soft, rgba(21, 39, 66, 0.08));
    color: var(--accent, #152742);
    font-weight: 600;
}

.settings-page .settings-nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.settings-page .settings-nav-item.active svg {
    opacity: 1;
}

.settings-page .settings-content {
    padding: 0 16px;
    overflow-y: auto;
    height: 100%;
}

/* For settings page, display controls should take full width (no preview panel) */
.settings-page .display-layout {
    display: block;
}

.settings-page .display-controls {
    width: 100%;
}

/* Logo grid should fill available width on settings page */
.settings-page .logo-grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    max-height: none;
    height: auto;
}

.settings-page .settings-content h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent, #152742);
}

.settings-page .settings-description {
    color: var(--muted, #6b7280);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.settings-page .settings-form {
    max-width: 500px;
}

.settings-page .settings-form .form-group {
    margin-bottom: 20px;
}

.settings-page .security-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light, #e8eaed);
}

.settings-page .security-option:last-child {
    border-bottom: none;
}

.settings-page .security-option-info h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 600;
}

.settings-page .security-option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted, #6b7280);
}

.settings-page .integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.settings-footer {
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-container {
        grid-template-columns: 1fr;
        padding: 16px;
        min-height: auto;
        height: auto;
        max-height: none;
    }

    .settings-page .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light, #e8eaed);
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .settings-page .settings-nav-item {
        white-space: nowrap;
    }

    .settings-page .logo-grid-wide {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   Settings Save Indicator Styles
   ============================================================================ */

.settings-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius, 10px);
    transition: all 0.2s ease;
    min-height: 28px;
}

.settings-save-indicator.saving {
    color: var(--accent, #152742);
    background: var(--accent-soft, rgba(21, 39, 66, 0.08));
}

.settings-save-indicator.saving::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent-2, #1e3a5f);
    border-top-color: transparent;
    border-radius: 50%;
    animation: saveSpinner 0.8s linear infinite;
}

@keyframes saveSpinner {
    to { transform: rotate(360deg); }
}

.settings-save-indicator.saved {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.settings-save-indicator.saved::before {
    content: '\2713';
    font-weight: 700;
}

.settings-save-indicator.error {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.settings-save-indicator.error::before {
    content: '\2717';
    font-weight: 700;
}

/* Dark mode support for save indicator */
.dark-mode .settings-save-indicator.saving {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text, #eef1f5);
}

.dark-mode .settings-save-indicator.saving::before {
    border-color: var(--text, #eef1f5);
    border-top-color: transparent;
}

.dark-mode .settings-save-indicator.saved {
    background: rgba(22, 163, 74, 0.2);
}

.dark-mode .settings-save-indicator.error {
    background: rgba(220, 38, 38, 0.2);
}

/* ============================================================================
   Notifications History Page
   ============================================================================ */

.notifications-page {
    background: var(--bg, #f8fafc);
    min-height: 100vh;
}

.notifications-layout {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.notifications-container {
    background: var(--surface, white);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border-light, #eef1f5);
    overflow: hidden;
}

.notifications-filters {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light, #eef1f5);
    border-radius: var(--radius, 10px);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg, #f8fafc);
}

.filter-search:focus {
    outline: none;
    border-color: var(--accent-blue, #2563eb);
}

.filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light, #eef1f5);
    border-radius: var(--radius, 10px);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--surface, white);
    cursor: pointer;
}

.notifications-list {
    min-height: 300px;
}

.notifications-loading,
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--muted, #5a6578);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light, #eef1f5);
    border-top-color: var(--accent-blue, #2563eb);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.notification-history-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-history-item:hover {
    background: var(--surface-hover, rgba(21, 39, 66, 0.03));
}

.notification-history-item.unread {
    background: rgba(37, 99, 235, 0.04);
}

.notification-history-item.unread:hover {
    background: rgba(37, 99, 235, 0.08);
}

.notification-history-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-hover, rgba(21, 39, 66, 0.06));
}

.notification-history-icon.success { color: var(--success-color, #16a34a); background: rgba(22, 163, 74, 0.1); }
.notification-history-icon.warning { color: var(--warning-color, #ea580c); background: rgba(234, 88, 12, 0.1); }
.notification-history-icon.error { color: var(--error-color, #dc2626); background: rgba(220, 38, 38, 0.1); }
.notification-history-icon.info { color: var(--accent-blue, #2563eb); background: rgba(37, 99, 235, 0.1); }

.notification-history-content {
    flex: 1;
    min-width: 0;
}

.notification-history-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text, #1a2332);
    margin-bottom: 4px;
}

.notification-history-message {
    font-size: 0.85rem;
    color: var(--muted, #5a6578);
    margin-bottom: 8px;
    line-height: 1.4;
}

.notification-history-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--muted, #5a6578);
}

.notification-history-type {
    text-transform: capitalize;
    padding: 2px 8px;
    background: var(--surface-hover, rgba(21, 39, 66, 0.06));
    border-radius: 4px;
}

.notification-history-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.mark-read-btn,
.view-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mark-read-btn {
    border: 1px solid var(--border-light, #eef1f5);
    background: var(--surface, white);
    color: var(--text, #1a2332);
}

.mark-read-btn:hover {
    background: var(--surface-hover, rgba(21, 39, 66, 0.06));
}

.view-btn {
    border: none;
    background: var(--accent-blue, #2563eb);
    color: white;
    text-decoration: none;
}

.view-btn:hover {
    background: var(--accent-blue-hover, #1d4ed8);
}

.notifications-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--border-light, #eef1f5);
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-light, #eef1f5);
    border-radius: var(--radius, 10px);
    background: var(--surface, white);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--surface-hover, rgba(21, 39, 66, 0.06));
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--muted, #5a6578);
}

/* Dark Mode for Notifications History */
.dark-mode .notifications-page {
    background: var(--bg, #0a1628);
}

.dark-mode .notifications-container {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
}

.dark-mode .filter-search,
.dark-mode .filter-select {
    background: var(--bg, #0a1628);
    border-color: var(--border, #2a3f5f);
    color: var(--text, #eef1f5);
}

.dark-mode .notification-history-item.unread {
    background: rgba(37, 99, 235, 0.08);
}

.dark-mode .mark-read-btn {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
    color: var(--text, #eef1f5);
}

.dark-mode .pagination-btn {
    background: var(--surface, #16213e);
    border-color: var(--border, #2a3f5f);
    color: var(--text, #eef1f5);
}
