/* CONFIRM MODAL, TOAST MODAL, DATA HANDLING, LANG MODALS */
/* Notifications Modal

/* ===========================================
   ChatGPT-Style Confirm Modal
   Clean, calm, premium dialog experience
   =========================================== */

/* Backdrop */
#confirmModal {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

#confirmModal.show {
    opacity: 1;
    pointer-events: auto;
}

#confirmModal.hidden {
    display: none;
}

/* Dialog card */
.confirm-dialog {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.14);
    transform: translateY(12px) scale(0.95);
    transition: transform 0.22s ease;
}

#confirmModal.show .confirm-dialog {
    transform: translateY(0) scale(1);
}

/* Title */
.confirm-title {
    font-size: 20px;
    font-weight: 700; /* Stronger */
    color: #111;      /* Darker */
    margin: 0 0 10px 0;
    line-height: 1.35;
}

/* Main message */
.confirm-message {
    font-size: 15px;
    color: #444; /* Darker & clearer */
    margin: 0;
    line-height: 1.55;
}

/* Secondary description */
.confirm-description {
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.45;
}

/* Footer actions */
.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid #f1f1f1; /* subtle separator like ChatGPT */
}

/* Buttons: clean text style, no tints */
.confirm-actions .btn {
    font-size: 15px;
    font-weight: 700;  /* Action words stronger */
    border: none;
    padding: 10px 6px;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.15s ease;
    color: #000; /* default darker */
}

/* Cancel */
.confirm-actions .btn.secondary {
    color: #555;
}

/* Confirm PRIMARY (no background, no highlight) */
.confirm-actions .btn.primary {
    color: #111; /* Not faint */
}

/* Danger action (delete) */
.confirm-actions .btn.danger {
    color: #b91c1c; /* stronger, not washed */
}

/* Hover - subtle like ChatGPT */
.confirm-actions .btn:hover {
    opacity: 0.55;
}

/* Focus ring */
.confirm-actions .btn:focus {
    outline: none;
    text-decoration: underline;
}

/* Active */
.confirm-actions .btn:active {
    opacity: 0.3;
}

/* Mobile */
@media (max-width: 480px) {
    .confirm-dialog {
        padding: 22px;
        max-width: 350px;
        border-radius: 22px;
    }
    .confirm-title {
        font-size: 18px;
    }
    .confirm-actions {
        gap: 12px;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .confirm-dialog {
        background: #1c1c1d;
        color: #fafafa;
    }
    .confirm-title {
        color: #fff;
    }
    .confirm-message {
        color: #e5e7eb;
    }
    .confirm-description {
        color: #9ca3af;
    }
    .confirm-actions {
        border-top: 1px solid #2f2f31;
    }
    .btn.secondary { color: #cfcfcf; }
    .btn.primary { color: #fff; }
    .btn.danger { color: #ff4b4b; }
}

/* ===========================================
   TOAST NOTIFICATION SYSTEM
   Clean, elegant, modern notifications
   =========================================== */

.toast-container {
    position: fixed;
    bottom: 90px;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    min-width: 280px;
    max-width: 400px;
    width: calc(100% - 32px);
    pointer-events: auto;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53),
                opacity 0.2s ease;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    color: #1f2937;
    word-wrap: break-word;
}

.toast-dismiss {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.toast-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6b7280;
}

.toast-dismiss:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

/* Success Toast */
.toast-success {
    border-left: 3px solid #10b981;
}

/* Error Toast */
.toast-error {
    border-left: 3px solid #ef4444;
}

/* Warning Toast */
.toast-warning {
    border-left: 3px solid #f59e0b;
}

/* Info Toast */
.toast-info {
    border-left: 3px solid #3b82f6;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .toast-notification {
        background: rgba(31, 41, 55, 0.98);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .toast-message {
        color: #f9fafb;
    }

    .toast-dismiss {
        color: #9ca3af;
    }

    .toast-dismiss:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #d1d5db;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        bottom: 85px;
        padding: 0 12px;
    }

    .toast-notification {
        min-width: auto;
        padding: 14px 16px;
        border-radius: 12px;
    }

    .toast-message {
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .toast-notification {
        transition: opacity 0.2s ease;
    }

    .toast-notification.show {
        animation: none;
    }
}

.toast-dismiss:focus {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ===========================================
   DATA POLICY MODAL - FULL SCREEN VERSION
   Modern, elegant data consent interface
   =========================================== */

/* Modal Backdrop - NOW FULL SCREEN WHITE */
#dataPolicyModal {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#dataPolicyModal.show {
    display: block !important;
    opacity: 1;
}

#dataPolicyModal.hidden {
    display: none !important;
}

/* Modal Container - FULL SCREEN */
.data-policy-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
}

/* Modal Header - WITH CLOSE BUTTON */
.data-policy-header {
    position: relative;
    padding: 20px 60px 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #ffffff;
}

.data-policy-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #101828;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.data-policy-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Close Button - TOP RIGHT */
.data-policy-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.data-policy-close:hover {
    background: #e5e7eb;
    transform: scale(1.08);
}

.data-policy-close:active {
    transform: scale(0.95);
}

/* Modal Body - Scrollable */
.data-policy-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    padding-bottom: 100px;
}

/* Afi AI Section - Hero */
.afi-hero-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.afi-logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.afi-logo {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(11, 125, 98, 0.15);
    flex-shrink: 0;
}

.afi-logo svg {
    color: #0b7d62;
}

.afi-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 2px 0;
}

.afi-tagline {
    font-size: 0.9rem;
    color: #047857;
    margin: 0;
    font-weight: 500;
}

.afi-description {
    font-size: 0.95rem;
    color: #064e3b;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.afi-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.afi-benefits li {
    font-size: 0.9rem;
    color: #065f46;
    line-height: 1.5;
    padding-left: 24px;
    margin-bottom: 10px;
    position: relative;
}

.afi-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: 700;
    font-size: 16px;
}

.afi-benefits li:last-child {
    margin-bottom: 0;
}

/* AI Consent Toggle Section */
.ai-consent-section {
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.consent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.consent-text {
    flex: 1;
}

.consent-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #713f12;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.consent-description {
    font-size: 0.9rem;
    color: #854d0e;
    margin: 0;
    line-height: 1.5;
}

/* Toggle Switch - Modern Design */
.data-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.data-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.data-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e5e7eb;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .data-toggle-slider {
    background: linear-gradient(135deg, #0b7d62, #20a58a);
    box-shadow: inset 0 2px 4px rgba(11, 125, 98, 0.3);
}

input:checked + .data-toggle-slider:before {
    transform: translateX(22px);
}

input:focus + .data-toggle-slider {
    outline: 2px solid rgba(11, 125, 98, 0.3);
    outline-offset: 2px;
}

/* Consent Details */
.consent-details {
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
    margin: 0;
}

.consent-date {
    font-size: 0.8rem;
    color: #a16207;
    margin-top: 8px;
}

/* Data Policy Sections */
.policy-section {
    margin-bottom: 20px;
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #101828;
    margin: 0 0 12px 0;
}

.policy-section-content {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Info Cards */
.info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.info-card:last-child {
    margin-bottom: 0;
}

.info-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px 0;
}

.info-card-text {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.policy-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #101828;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    color: #0b7d62;
    flex-shrink: 0;
}

/* Modal Footer - FIXED AT BOTTOM */
.data-policy-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.data-policy-footer .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-policy-footer .btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.data-policy-footer .btn.secondary:hover {
    background: #e5e7eb;
}

.data-policy-footer .btn.primary {
    background: linear-gradient(135deg, #0b7d62, #20a58a);
    color: white;
}

.data-policy-footer .btn.primary:hover {
    background: linear-gradient(135deg, #096c54, #1a8f77);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 125, 98, 0.3);
}

.data-policy-footer .btn:active {
    transform: scale(0.98);
}

/* ========================= */
/* Data Policy - Danger Zone */
/* ========================= */

.danger-zone {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 12px !important;
    padding: 18px !important;
    margin-top: 24px !important;
}

.danger-zone-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.danger-zone-link {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.2s ease;
}

.danger-zone-link:hover {
    color: #991b1b;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .data-policy-header {
        padding: 18px 56px 18px 20px;
    }

    .data-policy-title {
        font-size: 1.25rem;
    }

    .data-policy-subtitle {
        font-size: 0.9rem;
    }

    .data-policy-close {
        top: 14px;
        right: 16px;
        width: 34px;
        height: 34px;
        font-size: 24px;
    }

    .data-policy-body {
        padding: 20px;
        padding-bottom: 100px;
    }

    .afi-hero-section {
        padding: 20px;
    }

    .ai-consent-section {
        padding: 16px;
    }

    .consent-header {
        flex-direction: column;
        align-items: stretch;
    }

    .data-toggle-switch {
        align-self: flex-start;
    }

    .data-policy-footer {
        flex-direction: column;
        padding: 14px 20px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .data-policy-footer .btn {
        width: 100%;
    }
}

/* Prevent body scroll when modal is open */
body:has(#dataPolicyModal.show) {
    overflow: hidden;
}

/* Fallback for browsers that don't support :has() */
body.data-policy-open {
    overflow: hidden;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #dataPolicyModal {
        background: #1c1c1d;
    }

    .data-policy-dialog {
        background: #1c1c1d;
    }

    .data-policy-header {
        background: #1c1c1d;
        border-bottom-color: #2f2f31;
    }

    .data-policy-close {
        background: #2a2a2c;
        color: #f9fafb;
    }

    .data-policy-close:hover {
        background: #3a3a3c;
    }

    .data-policy-title {
        color: #ffffff;
    }

    .data-policy-subtitle {
        color: #9ca3af;
    }

    .afi-hero-section {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        border-color: #047857;
    }

    .afi-logo {
        background: #047857;
    }

    .afi-title {
        color: #d1fae5;
    }

    .afi-tagline {
        color: #a7f3d0;
    }

    .afi-description {
        color: #d1fae5;
    }

    .afi-benefits li {
        color: #d1fae5;
    }

    .ai-consent-section {
        background: #422006;
        border-color: #78350f;
    }

    .consent-label {
        color: #fde68a;
    }

    .consent-description {
        color: #fde047;
    }

    .consent-details {
        color: #fef3c7;
    }

    .policy-section-title {
        color: #ffffff;
    }

    .policy-section-content {
        color: #d1d5db;
    }

    .info-card {
        background: #2a2a2c;
        border-color: #3a3a3c;
    }

    .info-card-title {
        color: #f9fafb;
    }

    .info-card-text {
        color: #9ca3af;
    }

    .data-policy-footer {
        background: #1c1c1d;
        border-top-color: #2f2f31;
    }

    .data-policy-footer .btn.secondary {
        background: #2a2a2c;
        color: #f9fafb;
    }

    .data-policy-footer .btn.secondary:hover {
        background: #3a3a3c;
    }

    .danger-zone {
        background: #3f1515 !important;
        border-color: #7f1d1d !important;
    }

    .danger-zone-text {
        color: #d1d5db;
    }

    .danger-zone-link {
        color: #ff4b4b;
    }

    .danger-zone-link:hover {
        color: #ff6b6b;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #dataPolicyModal,
    .data-policy-dialog,
    .data-toggle-slider,
    .data-toggle-slider:before {
        transition: none;
    }
}

/* ===========================================
   LANGUAGE SELECTION MODAL
   Matches confirm modal style exactly
   =========================================== */

/* Backdrop */
.language-modal {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.language-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.language-modal.hidden {
    display: none;
}

/* Dialog card */
.language-dialog {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.14);
    transform: translateY(12px) scale(0.95);
    transition: transform 0.22s ease;
}

.language-modal.show .language-dialog {
    transform: translateY(0) scale(1);
}

/* Title */
.language-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px 0;
    line-height: 1.35;
}

/* Language Options */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    width: 100%;
    text-align: left;
}

/* Radio Button */
.language-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.language-option.selected .language-radio {
    border-color: #0b7d62;
    background: #0b7d62;
}

.language-radio-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.language-option.selected .language-radio-inner {
    opacity: 1;
    transform: scale(1);
}

/* Language Name */
.language-name {
    font-size: 15px;
    font-weight: 500;
    color: #111;
}

/* Footer actions */
.language-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 24px;
    margin-top: 0;
    border-top: 1px solid #f1f1f1;
}

/* Buttons - matching confirm modal */
.language-actions .btn {
    font-size: 15px;
    font-weight: 700;
    border: none;
    padding: 10px 6px;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.15s ease;
    color: #000;
}

.language-actions .btn.secondary {
    color: #555;
}

.language-actions .btn.primary {
    color: #111;
}

.language-actions .btn:hover {
    opacity: 0.55;
}

.language-actions .btn:focus {
    outline: none;
    text-decoration: underline;
}

.language-actions .btn:active {
    opacity: 0.3;
}

/* Mobile */
@media (max-width: 480px) {
    .language-dialog {
        padding: 22px;
        max-width: 350px;
        border-radius: 22px;
    }
    .language-title {
        font-size: 18px;
    }
    .language-actions {
        gap: 12px;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .language-dialog {
        background: #1c1c1d;
        color: #fafafa;
    }
    .language-title {
        color: #fff;
    }
    
    .language-radio {
        border-color: #6b7280;
    }
    .language-option.selected .language-radio {
        border-color: #20a58a;
        background: #20a58a;
    }
    .language-name {
        color: #fafafa;
    }
    .language-actions {
        border-top: 1px solid #2f2f31;
    }
    .language-actions .btn.secondary { 
        color: #cfcfcf; 
    }
    .language-actions .btn.primary { 
        color: #fff; 
    }
}

/* ===========================================
   NOTIFICATIONS MODAL
   Matches existing modal style
   =========================================== */

.notifications-modal {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.notifications-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.notifications-dialog {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.14);
    transform: translateY(12px) scale(0.95);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
}

.notifications-modal.show .notifications-dialog {
    transform: translateY(0) scale(1);
}

.notifications-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.notifications-close {
    position: absolute;
    top: 14px;
    right: 14px;

    background: none;
    border: none;
    padding: 4px;

    font-size: 22px;
    line-height: 1;
    font-weight: 400;

    color: #6b7280;
    cursor: pointer;

    z-index: 20;
    transition: color 0.15s ease, transform 0.15s ease;
}

.notifications-close:hover {
    color: #111827;
    transform: scale(1.08);
}

.notifications-close:active {
    transform: scale(0.95);
}

@media (prefers-color-scheme: dark) {
    .notifications-close {
        color: #9ca3af;
    }

    .notifications-close:hover {
        color: #f9fafb;
    }
}

.notifications-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Notification Item */
.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item.unread {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
}

.notification-item.read {
    background: #f9fafb;
    opacity: 0.7;
}

.notification-item:hover {
    background: #f3f4f6;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon svg {
    color: #10b981;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-details {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
}

.notification-actions {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.notification-action-btn {
    padding: 6px 12px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: #e5e7eb;
}

.notification-action-btn.delete {
    padding: 6px 10px;
    color: #dc2626;
}

/* Empty/Loading States */
.empty-notifications,
.loading-notifications,
.error-notifications {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-notifications svg {
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-notifications p {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 8px;
}

.empty-notifications small {
    font-size: 14px;
    color: #9ca3af;
}

@media (prefers-color-scheme: dark) {
    .notifications-dialog { background: #1c1c1d; }
    .notifications-header { border-bottom-color: #2f2f31; }
    .notifications-title { color: #fff; }
    .notification-item.read { background: #2a2a2c; }
    .notification-item.unread { background: #064e3b; }
}

/* Notification Settings Specific Styles */
.settings-section {
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 8px;
}

.alert-icon {
    font-size: 24px;
}

.alert-content {
    flex: 1;
}

.alert-route {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.alert-cargo {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.alert-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.alert-delete:hover {
    background: #fecaca;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 32px 16px;
}

.settings-hint {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    color: #1e40af;
    margin-top: 16px;
}

@media (prefers-color-scheme: dark) {
    .settings-section-title { color: #fff; }
    .alert-item { background: #2a2a2c; }
    .alert-route { color: #fff; }
    .settings-hint { background: #1e3a5f; border-color: #1e40af; color: #93c5fd; }
}

/* ===========================
   Notification Alerts Empty State
   =========================== */

.alerts-empty-state {
    padding: 48px 28px 40px;
    text-align: center;
}

.alerts-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.alerts-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.alerts-description {
    font-size: 14.5px;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 22px 0;
}

.alerts-cta {
    background: linear-gradient(135deg, #0b7d62, #20a58a);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alerts-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 125, 98, 0.35);
}

.alerts-cta:active {
    transform: scale(0.97);
}

.alerts-example {
    margin-top: 22px;
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.6;
}

.alerts-example span {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: #111;
}

@media (prefers-color-scheme: dark) {
    .alerts-title {
        color: #ffffff;
    }

    .alerts-description,
    .alerts-example {
        color: #9ca3af;
    }

    .alerts-example span {
        color: #f9fafb;
    }
}

.alerts-icon,
.alerts-example svg {
    color: #0b7d62; /* or your brand primary */
}

@media (prefers-color-scheme: dark) {
    .alerts-icon,
    .alerts-example svg {
        color: #20a58a;
    }
}