/* css/tenant_portal_styles.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    /* Light, neutral background */
    color: #333;
    margin: 0;
    padding: 15px;
    line-height: 1.6;
}

.page-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background-color: transparent;
    /* Container is now just for structure */
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    /* Darker blue for main title */
    font-size: 2.8em;
    font-weight: 300;
}

.logout-section {
    text-align: left;
    margin-bottom: 25px;
}

.button {
    padding: 10px 18px;
    font-size: 1em;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    /* For button-like links */
    display: inline-block;
    /* For button-like links */
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button-logout {
    background-color: #e74c3c;
    /* Red for logout */
}

.button-logout:hover {
    background-color: #c0392b;
}

.button-changepassword {
    background-color: #3880e6;
}

.button-changepassword:hover {
    background-color: #24569e;
}

.button-primary {
    background-color: #3498db;
    /* Blue for primary actions */
}

.button-primary:hover {
    background-color: #2980b9;
}

.button-secondary {
    background-color: #95a5a6;
    /* Gray for secondary actions */
}

.button-secondary:hover {
    background-color: #7f8c8d;
}

.section-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section-card:hover {
    /* transform: translateY(-5px); */
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); */
}

.section-card h1 {
    color: #2980b9;
    /* Consistent section header color */
    border-bottom: 2px solid #ecf0f1;
    /* Light underline */
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 500;
}

/* Room Information Styling */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 25px;
}

.emergency-contact-table {
    /* width: 100%; */
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 25px;
}

.info-table td,
.emergency-contact-table td {
    padding: 12px 8px;
    border: none;
    /* Remove all cell borders by default */
    /* vertical-align: top; */
}

.info-table tr:not(:last-child) td,
.emergency-contact-table tr:not(:last-child) td {
    border-bottom: 1px solid #f0f0f0;
    /* Subtle horizontal lines */
}


.info-table label {}

.emergency-contact-table label {
    font-weight: 600;
    /* Bolder labels */
    color: #555;
    display: block;
    margin-bottom: 4px;
}

/* Add styles for form inputs if needed, or use existing tenant_portal_styles.css */
.info-table input[type="text"] {
    width: 80%;
    /* Adjust as needed */
    padding: 8px;
    margin: 2px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.info-table textarea {
    width: 80%;
    /* Adjust as needed */
    padding: 8px;
    margin: 2px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.info-table textarea {
    resize: vertical;
    min-height: 60px;
}

.info-table .display-text {
    padding: 8px 0px;
    /* Match input padding for alignment */
    display: inline-block;
    /* Or block if it's on its own line */
}

.update-button-container {
    text-align: right;
    margin-top: 15px;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.emergency-contact-table {
    background-color: #f9f9f9;
    /* Slightly different background for emergency */
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.emergency-contact-table td {
    color: #333;
}

.emergency-contact-table label {
    color: #2980b9;
}


.room-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.room-details-grid strong {
    color: #34495e;
    margin-right: 8px;
}

.room-details-item {
    background-color: #fdfdfd;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}


/* Expenses (Invoices) Section */
.scrollable-list {
    max-height: 450px;
    /* Increased height */
    overflow-y: auto;
    border: 1px solid #e7e7e7;
    padding: 10px;
    background: #fcfdff;
    border-radius: 6px;
}

.invoice-wrapper {
    margin-bottom: 0;
    /* Remove margin as hr will separate */
}

.invoice-separator {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

.invoice-separator:last-child {
    display: none;
}

/* Invoice Styling (for tenant_invoice_form.php and invoice_form.php) */
.invoice {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 25px;
    border: 1px solid #dce4ec;
    font-size: 0.9em;
    box-shadow: none;
    position: relative;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.invoice.paid-invoice,
/* Admin side */
.invoice.invoice-paid {
    /* Tenant side */
    background-color: #e6f4ea;
    /* Softer green for truly paid */
    border-left: 4px solid #4CAF50;
    /* Green accent */
}

.invoice.unpaid-invoice,
/* Admin side */
.invoice.invoice-unpaid {
    /* Tenant side */
    background-color: #fdecea;
    /* Softer red for unpaid */
    border-left: 4px solid #f44336;
    /* Red accent */
}

/* New: Invoice with pending verification status */
.invoice.pending-verification-invoice,
/* Admin side */
.invoice.invoice-pending-verification {
    /* Tenant side */
    background-color: #fffde7;
    /* Light yellow for pending */
    border-left: 4px solid #FFC107;
    /* Yellow accent */
}

.invoice table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.invoice table td,
.invoice table th {
    border: 1px solid #e0e6ed;
    padding: 10px 12px;
    /* Increased padding */
    text-align: left;
}

.invoice table th {
    background-color: #f8f9fc;
    font-weight: 600;
    color: #34495e;
}

.invoice table#id0 {
    margin-bottom: 15px;
}

.invoice table#id0 td {
    border: none;
    padding: 4px 0;
}

.invoice table#id0 strong {
    font-size: 1.05em;
    color: #2c3e50;
}

.invoice table#id0 font[size="5"] {
    font-size: 1.4em;
    font-weight: bold;
}

.invoice table#id0 .room-number-highlight {
    font-size: 1.6em;
    font-weight: bold;
    color: #2980b9;
}


.invoice table#id1 .text-center {
    text-align: center !important;
}

.invoice table#id1 .text-right {
    text-align: right !important;
}

.invoice table#id1 tfoot td {
    font-weight: bold;
    font-size: 1.1em;
    background-color: #f8f9fc;
}

.invoice table#id1 .baht-text {
    font-size: 0.8em;
    color: #555;
    font-weight: normal;
    display: block;
    /* Baht text on new line */
    margin-top: 4px;
}

.invoice-notes {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-style: italic;
    color: #555;
    border-left: 3px solid #3498db;
}

/* Chat Section Styling */
.chat-messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column-reverse;
    /* To keep scroll at bottom with new messages - requires JS for auto-scroll on new message if dynamically loaded */
    /* For current setup (PHP DESC order), this shows newest first at top */
}

.chat-message {
    border: 1px solid #e7e7e7;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    /* Spacing between messages */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-message:last-child {
    margin-bottom: 0;
}


.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.message-header .sender-role {
    font-weight: bold;
    color: #2980b9;
    /* Highlight sender role */
}

.message-header .sender-role-user {
    color: #27ae60;
}

/* Different color for user */


.message-timestamp {
    font-size: 0.85em;
    color: #7f8c8d;
}

.message-content {
    margin-bottom: 10px;
    word-wrap: break-word;
    /* Prevent long messages from breaking layout */
    line-height: 1.5;
}

.message-attachment img,
.message-attachment video {
    max-width: 100%;
    max-height: 220px;
    /* Slightly smaller */
    height: auto;
    border-radius: 6px;
    border: 1px solid #ced4da;
    margin-top: 8px;
    display: block;
}

.message-attachment video {
    background-color: #f0f0f0;
}

.message-attachment a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.message-attachment a:hover {
    text-decoration: underline;
}

.attachment-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #e9f5ff;
    border-radius: 4px;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.attachment-link:hover {
    background-color: #d4eaff;
}


.chat-form-container {
    margin-top: 20px;
    padding: 20px 25px;
    background-color: #fdfdfd;
    border-radius: 8px;
    border: 1px solid #e7e7e7;
}

.chat-form-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.3em;
    font-weight: 500;
}

.chat-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-bottom: 10px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-form textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.chat-form input[type="file"] {
    display: block;
    margin-bottom: 15px;
    font-size: 0.95em;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

.chat-form-buttons {
    text-align: right;
}

.chat-form-buttons .button {
    margin-left: 10px;
}


/* General Table (if any others exist or for future) */
/* These styles are intended to apply broadly to tables and cells */
table {
    border-collapse: collapse;
    /* Ensure cells share borders */
}

th,
td {
    border: 1px solid #e0e6ed;
    /* Default cell border */
}


/* Print specific */
@media print {
    .no-print {
        display: none !important;
    }

    .pending-stamp {
        /* Adjust for print, maybe darker or full opacity */
        background-color: yellow;
        /* Solid yellow for print */
        color: darkgoldenrod;
        /* Darker text */
        opacity: 1;
        box-shadow: none;
    }
}

.button-delete-msg {
    background-color: #e74c3c;
    /* Red */
    color: white;
    border: none;
    padding: 3px 7px;
    /* Smaller button */
    font-size: 0.75em;
    /* Smaller font */
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    margin-left: 8px;
    /* Space from timestamp or sender role */
    opacity: 0.7;
    /* Slightly transparent by default */
}

.button-delete-msg:hover {
    background-color: #c0392b;
    /* Darker red */
    opacity: 1;
}

.message-header {
    /* Ensure existing style allows for button placement */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* This will vertically center the button with the text */
    margin-bottom: 8px;
    font-size: 0.9em;
}

.no-messages-indicator {
    /* Style for the "No messages" text */
    padding: 20px;
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Adjust chat messages container for standard chat flow (newest at bottom) */
.chat-messages-container {
    max-height: 400px;
    /* Or your preferred height */
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    /* Ensures messages stack top-to-bottom */
}

/* Styles for message delete animation */
.chat-message {
    /* ... existing styles for .chat-message ... */
    transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
}

#room {
    background-color: #aadbff;
}

#expense {
    background-color: #fdffc7;
}

#chat {
    background-color: #b4ffbf;
}

.footer {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 40px 0 20px;
    /* margin-top: auto; */
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

.footer-bottom a {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: white;
}

/* Password Change Modal */
#passwordModal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.password-modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 25px 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.password-modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.password-modal-content label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #34495e;
}

.password-modal-content input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
}

.password-modal-content .button {
    width: auto;
    padding: 10px 20px;
    margin-right: 10px;
}

.password-modal-content .button-save {
    background-color: #2ecc71;
}

.password-modal-content .button-save:hover {
    background-color: #27ae60;
}

.password-modal-content .button-cancel {
    background-color: #95a5a6;
}

.password-modal-content .button-cancel:hover {
    background-color: #7f8c8d;
}

.password-modal-content .alert {
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.95em;
}

.password-modal-content .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.password-modal-content .alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Styles for the modal and drag & drop for Payment */
#paymentModal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.7);
    /* Black w/ opacity */
    padding-top: 50px;
}

.payment-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    max-height: 90vh;
    /* Set a max height for the modal content */
    overflow-y: auto;
    /* Add scroll to modal content if it overflows */
}

.payment-modal-content .close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    /* Adjust to prevent extra space */
    position: absolute;
    /* Position relative to modal-content */
    top: 10px;
    right: 20px;
}

.payment-modal-content .close-button:hover,
.payment-modal-content .close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.qr-code-area {
    margin: 20px 0;
    text-align: center;
}

.qr-code-area img {
    max-width: 250px;
    /* Adjust size as needed */
    height: auto;
    border: 1px solid #eee;
    padding: 5px;
    background-color: white;
}

.qr-code-details {
    font-size: 1.0em;
    margin-top: 15px;
    color: #555;
}

.qr-code-details strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.qr-code-details small {
    display: block;
    margin-top: 10px;
    color: #777;
    font-size: 0.85em;
}


.drop-zone {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-size: 1.1em;
    color: #555;
    background-color: #f8faff;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s, border-color 0.3s;
}

.drop-zone.highlight {
    background-color: #e0f0ff;
    border-color: #0056b3;
}

.file-input {
    display: none;
    /* Hide the default file input */
}

.file-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 0 0 0 5px;
    padding: 2px 5px;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1;
    /* Remove extra height */
}

.file-preview-text {
    font-size: 0.9em;
    color: #666;
    word-break: break-all;
    padding: 5px;
    text-align: left;
}

.modal-buttons {
    margin-top: 25px;
    text-align: center;
}

.modal-buttons button {
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
}

.modal-buttons .submit-button {
    background-color: #28a745;
    /* Green */
    color: white;
    border: none;
}

.modal-buttons .submit-button:hover {
    background-color: #218838;
}

.modal-buttons .cancel-button {
    background-color: #6c757d;
    /* Gray */
    color: white;
    border: none;
}

.modal-buttons .cancel-button:hover {
    background-color: #5a6268;
}

/* --- Admin Panel Specific Styles (moved from invoice.css and room.css) --- */
/* These styles should primarily affect admin dashboard/invoice views */
.invoice-controls {
    margin-bottom: 10px;
    /* Space between controls and invoice */
}

.invoice-controls table#id3 {
    width: auto;
    /* Allow table to shrink to content */
    border-collapse: collapse;
    margin-left: 0;
    /* Align left */
}

.invoice-controls table#id3 td {
    border: none;
    /* No borders for control table cells */
    padding: 5px 8px;
    /* Compact padding */
    white-space: nowrap;
    /* Keep content on one line */
}

.invoice-controls input[type="checkbox"] {
    transform: scale(1.3);
    /* Make checkbox larger */
    margin-right: 5px;
    vertical-align: middle;
    /* Align with label */
}

.invoice-controls label {
    vertical-align: middle;
    /* Align with checkbox */
}

/* --- Admin specific button styles --- */
.btn-primary {
    /* For the new receipt button logic */
    background-color: #007bff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-danger {
    /* For the delete button */
    background-color: #dc3545;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

.btn-sm {
    /* Small button class */
    padding: 5px 10px;
    font-size: 0.875em;
    border-radius: 0.2rem;
}

/* --- Accept Zone / Payment Verification Area Styles (for Admin) --- */
.payment-verification-area {
    border: 2px dashed #007bff;
    /* This matches your "Accept Zone" box color */
    padding: 15px;
    margin: 20px 0;
    background-color: #f8faff;
    /* Light blue background */
    border-radius: 8px;
    text-align: center;
}

.payment-verification-area h3 {
    color: #1a5a92;
    /* Darker blue */
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.payment-verification-area p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.proof-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center images */
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.proof-thumbnail {
    position: relative;
    width: 150px;
    /* Larger thumbnail size */
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Hide overflow for object-fit */
}

.proof-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the area */
    border-radius: 3px;
}

.proof-thumbnail a {
    display: block;
    /* Make the whole area clickable */
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.proof-thumbnail .proof-timestamp {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75em;
    padding: 3px 5px;
    box-sizing: border-box;
    text-align: center;
}

.verification-actions button {
    padding: 10px 20px;
    font-size: 1em;
    margin: 0 10px;
}

.verification-actions .verify-button {
    background-color: #28a745;
    /* Green */
    color: white;
    border: none;
}

.verification-actions .verify-button:hover {
    background-color: #218838;
}

.verification-actions .reject-button {
    background-color: #dc3545;
    /* Red */
    color: white;
    border: none;
}

.verification-actions .reject-button:hover {
    background-color: #c82333;
}


/* --- Invoice Attachments Section (from invoice_form.php and tenant_invoice_form.php) --- */
.invoice-attachments-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #999;
}

.attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* ระยะห่างระหว่างรูป */
    margin-top: 10px;
}

.attachment-thumbnail {
    /* Re-used from proof-thumbnail for consistency */
    width: 120px;
    height: 120px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.attachment-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ทำให้รูปเต็มกรอบสวยงาม */
    border-radius: 3px;
}


.all-proofs-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.attachment-thumbnail {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px;
    background-color: #f9f9f9;
    width: 150px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.attachment-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.proof-details {
    padding: 5px;
    font-size: 0.8em;
    text-align: center;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.proof-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
}

/* --- Status Colors --- */
.proof-status-pending {
    border-color: #f0ad4e;
}

.proof-status-pending .proof-status-badge {
    background-color: #f0ad4e;
}

.proof-status-approved {
    border-color: #5cb85c;
}

.proof-status-approved .proof-status-badge {
    background-color: #5cb85c;
}

.proof-status-rejected {
    border-color: #d9534f;
}

.proof-status-rejected .proof-status-badge {
    background-color: #d9534f;
}

/* .partially-paid-stamp {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: rotate(-15deg);
    border: 3px double #007bff;
    color: #007bff;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    opacity: 0.8;
    z-index: 99;
    border-radius: 8px;
} */

/* 1. Base class for ALL stamps (Positioning and Layout) */
.stamp {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    background-color: rgba(255, 255, 255, 0.85);
    padding: 10px 20px;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    opacity: 0.8;
    z-index: 99;
    border-radius: 8px;
    white-space: nowrap;
}

/* 2. Modifier classes for COLORS ONLY */
.stamp.paid-stamp {
    border: 3px double #f44336;
    color: #f44336;
}

.stamp.pending-stamp {
    border: 3px double #DAA520;
    color: #DAA520;
}

.stamp.partially-paid-stamp {
    border: 3px double #007bff;
    color: #007bff;
}