/* Letter History Page Styles */

/* Map legacy variables to theme variables */
:root {
    --Maktoub-Dark: var(--bg-primary);
    --Maktoub-Darker: var(--bg-secondary);
    --white: var(--text-primary);
    --Maktoub-Light: var(--text-secondary);
    --Maktoub-Main: var(--color-primary);
    --border-color: var(--border-primary);
    --hover-bg: var(--bg-hover);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Janna LT', -apple-system, Roboto, Helvetica, sans-serif;
    background: var(--bg-primary);
    color: var(--white);
    min-height: 100vh;
    direction: rtl;
}

.letter-history-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 64px;
}

/* Page Title */
.page-title {
    color: var(--white);
    font-size: 48px;
    font-weight: 700;
    line-height: 60px;
    text-align: right;
    margin-bottom: 40px;
}

/* Statistics Cards */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    display: flex;
    padding: 24px;
    align-items: center;
    gap: 20px;
    align-self: stretch;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.stat-number {
    color: var(--white);
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
}

.stat-label {
    color: var(--Maktoub-Light);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 168, 150, 0.15);
    border-radius: 8px;
    align-self: flex-start;
}

.stat-icon img {
    width: 28px;
    height: 28px;
}

/* Filters and Actions - Single Horizontal Row */
.filters-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.filter-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-right {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 14px;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--Maktoub-Light);
    border-radius: 6px;
    color: var(--Maktoub-Light);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(160, 236, 220, 0.1);
}

.export-btn:focus {
    outline: none;
    border-color: var(--Maktoub-Main);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.export-btn svg {
    width: 16px;
    height: 16px;
}

.filter-dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 14px;
    justify-content: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--Maktoub-Light);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.dropdown-btn:hover {
    background: rgba(160, 236, 220, 0.05);
}

.dropdown-btn:focus {
    outline: none;
    border-color: var(--Maktoub-Main);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.dropdown-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filter-dropdown.active .dropdown-btn svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.filter-dropdown.active .dropdown-menu {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}

.dropdown-menu-item {
    display: flex;
    padding: 8px 16px;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    color: var(--white);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(160, 236, 220, 0.1);
}

.dropdown-menu-item:last-child {
    border-bottom: none;
}

.dropdown-menu-item:hover {
    background: rgba(160, 236, 220, 0.1);
}

.dropdown-menu-item.active {
    background: rgba(30, 168, 150, 0.2);
    color: var(--white);
}

.dropdown-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    padding: 12px 14px;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    align-self: stretch;
    background: var(--Maktoub-teal-950);
    border: 1px solid var(--Maktoub-teal-800);
    border-radius: 6px;
    min-width: 300px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--Maktoub-Main);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--white);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--Maktoub-Light);
    opacity: 0.6;
}

.search-box svg {
    width: 20px;
    height: 20px;
    color: var(--Maktoub-Light);
}

/* Table Container */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letters-table {
    width: 100%;
    border-collapse: collapse;
}

.letters-table thead {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.letters-table th {
    padding: 18px 16px;
    text-align: right;
    color: var(--Maktoub-Light);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: none;
}

.letters-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.letters-table tbody tr:hover {
    background: rgba(30, 168, 150, 0.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letters-table tbody tr:last-child {
    border-bottom: none;
}

.letters-table td {
    padding: 20px 16px;
    color: var(--Maktoub-Light);
    font-size: 14px;
    vertical-align: middle;
}

/* Status Badges */
.status-badge {
    display: flex;
    padding: 2px 10px;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-family: "Janna LT";
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    white-space: nowrap;
}

/* Dark mode colors (default) */
.status-badge.ready {
    background: rgba(34, 197, 94, 0.2);
    color: #4ADE80;
}

.status-badge.pending {
    background: rgba(234, 179, 8, 0.2);
    color: #FDE047;
}

.status-badge.approved {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.status-badge.improvements {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

/* Light mode colors */
[data-theme="light"] .status-badge.ready {
    background: #E2F5EC;
    color: #008B53;
}

[data-theme="light"] .status-badge.rejected {
    background: #FEEAEA;
    color: #D92D20;
}

[data-theme="light"] .status-badge.improvements {
    background: #FDF2FA;
    color: #C11574;
}

[data-theme="light"] .status-badge.pending {
    background: #FEF7E6;
    color: #B54708;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(160, 236, 220, 0.1);
}

.action-btn:focus {
    outline: none;
    background: rgba(160, 236, 220, 0.15);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn.view svg {
    color: var(--Maktoub-Light);
}

.action-btn.download svg {
    color: #4ADE80;
}

.action-btn.delete svg {
    color: #F87171;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    height: 38px;
    width: 100%;
    margin-bottom: 32px;
}

.pagination-info {
    color: var(--Maktoub-Light);
    font-size: 14px;
    font-weight: 400;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    display: flex;
    padding: 9px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    border: 1px solid var(--Maktoub-teal-800);
    background: var(--Maktoub-teal-950);
    color: var(--Maktoub-Light);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.page-btn:hover:not(:disabled) {
    background: rgba(160, 236, 220, 0.1);
    border-color: var(--Maktoub-Main);
}

.page-btn:focus {
    outline: none;
    border-color: var(--Maktoub-Main);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.items-per-page select {
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--Maktoub-Light);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.items-per-page select:hover {
    border-color: var(--Maktoub-Main);
    background: rgba(30, 168, 150, 0.1);
}

.items-per-page select:focus {
    border-color: var(--Maktoub-Main);
    box-shadow: 0 0 0 2px rgba(30, 168, 150, 0.2);
}

.items-per-page label {
    color: var(--Maktoub-Light);
    font-size: 14px;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 24px 32px;
    }

    .page-title {
        font-size: 36px;
    }

    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px 24px;
    }

    .page-title {
        font-size: 28px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-left,
    .filter-right {
        width: 100%;
        flex-direction: column;
        margin-right: 0;
    }

    .search-box {
        min-width: 100%;
    }

    .pagination-container {
        flex-direction: column;
        gap: 16px;
    }
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 24px 0;
}

.footer-container {
    text-align: center;
}

.copyright {
    color: rgba(160, 236, 220, 0.6);
    font-size: 14px;
    font-weight: 400;
}

/* ==================== Delete Confirmation Modal ==================== */

/* Modal Overlay */
.delete-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.delete-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.delete-modal {
    display: flex;
    width: 512px;
    max-width: calc(100vw - 32px);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    border-radius: 8px;
    background: var(--Maktoub-teal-950, #072C2A);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalFadeIn 0.3s ease;
}

/* Light mode modal */
[data-theme="light"] .delete-modal {
    background: var(--white, #FFF);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .delete-modal-title {
    color: var(--gray-900, #111827);
    text-align: right;
    font-family: "Janna LT";
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    align-self: stretch;
}

[data-theme="light"] .delete-modal-message {
    color: var(--gray-500, #6B7280);
    text-align: right;
    font-family: "Janna LT";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    align-self: stretch;
}

[data-theme="light"] .delete-modal-btn-confirm {
    background: #F33043;
    color: var(--white, #FFF);
    font-family: "Janna LT";
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
}

[data-theme="light"] .delete-modal-btn-cancel {
    display: flex;
    padding: 9px 17px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 6px;
    border: 1px solid var(--red-600, #F33043);
    background: transparent;
    color: var(--gray-700, #374151);
    font-family: "Janna LT";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .delete-modal-btn-cancel:hover {
    background: rgba(243, 48, 67, 0.05);
}

/* Modal fade in animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Icon Container */
.delete-modal-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 48, 67, 0.1);
    border-radius: 50%;
    align-self: center;
}

.delete-modal-icon img {
    width: 32px;
    height: 32px;
}

/* Modal Content */
.delete-modal-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

/* Modal Title */
.delete-modal-title {
    color: var(--text-primary);
    font-family: 'Janna LT', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    width: 100%;
}

/* Modal Message */
.delete-modal-message {
    color: var(--text-secondary);
    font-family: 'Janna LT', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    width: 100%;
}

/* Modal Actions */
.delete-modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    flex-direction: row-reverse;
}

/* Modal Buttons */
.delete-modal-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Janna LT', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

/* Delete Button (Red) */
.delete-modal-btn-confirm {
    background: #F33043;
    color: #FFFFFF;
}

.delete-modal-btn-confirm:hover {
    background: #D12038;
}

.delete-modal-btn-confirm:active {
    transform: scale(0.98);
}

/* Cancel Button (Outlined) */
.delete-modal-btn-cancel {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.delete-modal-btn-cancel:hover {
    background: var(--bg-hover);
}

.delete-modal-btn-cancel:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .delete-modal {
        width: calc(100vw - 32px);
        padding: 20px;
    }

    .delete-modal-actions {
        flex-direction: column-reverse;
    }

    .delete-modal-btn {
        width: 100%;
    }
}

/* Download Button Dropdown Styles */
.download-btn-container {
    position: relative;
    display: inline-block;
}

.download-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.download-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: right;
    white-space: nowrap;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item:active {
    transform: scale(0.98);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-item span {
    flex: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .download-dropdown {
        right: 0;
        left: auto;
    }
}

/* ==================== Export Notification Modal (Theme-Aware) ==================== */

/* Overlay */
.export-notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.export-notification-overlay.show {
    opacity: 1;
}

/* Modal */
.export-notification-modal {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.export-notification-overlay.show .export-notification-modal {
    transform: scale(1);
    opacity: 1;
}

/* Dark mode modal styling */
[data-theme="dark"] .export-notification-modal {
    background-color: var(--bg-card);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Content */
.export-notification-content {
    padding: 32px;
    text-align: center;
}

/* Icon */
.export-notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 166, 81, 0.1);
    margin-bottom: 24px;
}

.export-notification-icon svg {
    color: var(--color-primary);
}

[data-theme="dark"] .export-notification-icon {
    background-color: rgba(0, 166, 81, 0.2);
}

/* Title */
.export-notification-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Message */
.export-notification-message {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Buttons */
.export-notification-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.export-notification-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

/* Cancel button */
.export-notification-btn-cancel {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.export-notification-btn-cancel:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .export-notification-btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Confirm button */
.export-notification-btn-confirm {
    background-color: var(--color-primary);
    color: white;
}

.export-notification-btn-confirm:hover {
    background-color: #008840;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 166, 81, 0.3);
}

.export-notification-btn-confirm svg {
    width: 16px;
    height: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .export-notification-modal {
        width: 95%;
        margin: 0 10px;
    }

    .export-notification-content {
        padding: 24px;
    }

    .export-notification-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .export-notification-icon svg {
        width: 32px;
        height: 32px;
    }

    .export-notification-title {
        font-size: 20px;
    }

    .export-notification-message {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .export-notification-buttons {
        flex-direction: column-reverse;
    }

    .export-notification-btn {
        width: 100%;
        min-width: unset;
    }
}

/* ==================== Review Notes Cell & Modal ==================== */

/* Review notes cell styling */
.review-notes-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.review-notes-preview {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 20px;
    word-break: break-word;
}

.read-more-btn {
    background: var(--color-primary);
    color: var(--text-primary);
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.read-more-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* Review notes modal overlay */
.review-notes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.review-notes-modal-overlay.show {
    opacity: 1;
}

/* Review notes modal */
.review-notes-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.review-notes-modal-overlay.show .review-notes-modal {
    transform: scale(1);
}

/* Modal header */
.review-notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-primary);
}

.review-notes-modal-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.review-notes-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-notes-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.review-notes-modal-close svg {
    width: 24px;
    height: 24px;
}

/* Modal content */
.review-notes-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.review-notes-letter-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.review-notes-letter-info p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 24px;
    margin: 4px 0;
}

.review-notes-letter-info strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.review-notes-text {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 28px;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 20px;
}

/* Modal footer */
.review-notes-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    display: flex;
    justify-content: flex-end;
}

.review-notes-modal-btn {
    background: var(--color-primary);
    color: var(--text-primary);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-notes-modal-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* Responsive modal */
@media (max-width: 768px) {
    .review-notes-modal {
        max-width: 95%;
        max-height: 85vh;
    }

    .review-notes-modal-header {
        padding: 20px;
    }

    .review-notes-modal-title {
        font-size: 20px;
    }

    .review-notes-modal-content {
        padding: 20px;
    }

    .review-notes-text {
        font-size: 14px;
        line-height: 24px;
        padding: 16px;
    }

    .review-notes-modal-footer {
        padding: 16px 20px;
    }

    .review-notes-modal-btn {
        width: 100%;
    }
}
