/* Orders Module Styles */

/* Container */
.orders-container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

/* Redesigned Import Section */
.import-section-new {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.import-tabs-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f4f9;
    margin-bottom: 24px;
    padding-bottom: 2px;
}

.import-tabs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 32px;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-item:hover {
    color: #1e293b;
}

.tab-item svg {
    transition: transform 0.3s ease;
}

.tab-item:hover svg {
    transform: translateY(-1px);
}

.tab-item.active {
    color: #c91d2b;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #c91d2b;
    border-radius: 3px 3px 0 0;
}

.import-help-action {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.btn-sample-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-sample-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-1px);
}

.import-form-main {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.upload-zone {
    flex: 1;
    position: relative;
}

.file-input-hidden {
    position: absolute !important;
    width: 0.1px !important;
    height: 0.1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

.upload-label-new {
    display: block;
    border: 2px dashed #e2e8f0;
    background: #fdfdfd;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label-new:hover {
    border-color: #c91d2b;
    background: #fffcfc;
}

.upload-prompt {
    display: flex;
    align-items: center;
    gap: 16px;
}

.upload-prompt svg {
    color: #94a3b8;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 8px;
}

.upload-label-new:hover .upload-prompt svg {
    color: #c91d2b;
    background: #fff1f2;
}

.text-group {
    display: flex;
    flex-direction: column;
}

.primary-text {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.secondary-text {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.import-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(201, 29, 43, 0.15);
}

.import-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 29, 43, 0.25);
}

.import-submit-btn:active {
    transform: translateY(0);
}

.payment-summary {
    display: flex;
    gap: 24px;
    align-items: center;
    /* margin-top: 15px;*/
}

.summary-item {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    background: #F5F5F5;
    border-radius: 8px;
}

.summary-item span {
    font-size: 12px;
    color: #78909C;
    margin-bottom: 4px;
}

.summary-item strong {
    font-size: 20px;
    color: #31566D;
    font-weight: 600;
}

.summary-item.pending {
    background: #FFF8E1;
}

.summary-item.pending strong {
    color: #F57C00;
}

.summary-item.amount {
    background: #E3F2FD;
}

.summary-item.amount strong {
    color: #1976D2;
}

/* Filters */
.orders-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #E0E0E0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #424242;
}

.filter-btn:hover {
    background: #F5F5F5;
    border-color: #BDBDBD;
}

.filter-btn.active {
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    color: white;
    border-color: #c91d2b;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #78909C;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 44px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #c91d2b;
    box-shadow: 0 0 0 3px rgba(201, 29, 43, 0.1);
}

/* Export Button */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    color: white;
    text-decoration: none;
}

.btn-export svg {
    flex-shrink: 0;
}

/* Orders Table */
.orders-table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    background: #F5F5F5;
}

.orders-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: #31566D;
    font-size: 13px;
    border-bottom: 2px solid #E0E0E0;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.sortable-header:hover {
    background: #eef2f7 !important;
}

.sort-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    opacity: 0.5;
}

.sortable-header.active {
    color: #c91d2b !important;
}

.sortable-header.active .sort-icon {
    opacity: 1;
    color: #c91d2b;
}

.orders-table tbody tr {
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.2s ease;
}

.orders-table tbody tr:hover {
    background: #F9F9F9;
}

.orders-table tbody tr.order-row[data-payment-status="pending"] {
    background: #FFF8E1;
}

.orders-table tbody tr.order-row[data-payment-status="pending"]:hover {
    background: #FFF3E0;
}

.orders-table td {
    padding: 13px;
    vertical-align: middle;
    font-size: 12px;
    color: #424242;
}

/* Order Number */
.order-number {
    font-weight: 600;
    color: #c91d2b;
    font-size: 12px;
}

/* Amounts */
.amount {
    font-weight: 600;
}

.amount.paid {
    color: #2E7D32;
}

.amount.pending {
    color: #F57C00;
    font-weight: 700;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-warning {
    background: #FFF8E1;
    color: #F57C00;
}

.badge-info {
    background: #E3F2FD;
    color: #1976D2;
}

.badge-primary {
    background: #E8EAF6;
    color: #3F51B5;
}

.badge-secondary {
    background: #F5F5F5;
    color: #616161;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 130px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 11px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    white-space: nowrap;
}

.btn-pay {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-view {
    background: #E3F2FD;
    color: #1976D2;
}

.btn-view:hover {
    background: #BBDEFB;
}

.btn-download {
    background: #E8F5E9;
    color: #2E7D32;
    text-decoration: none;
}

.btn-download:hover {
    background: #C8E6C9;
    color: #1B5E20;
    text-decoration: none;
}

.btn-invoice {
    background: #FFF3E0;
    color: #E65100;
    text-decoration: none;
}

.btn-invoice:hover {
    background: #FFE0B2;
    color: #BF360C;
    text-decoration: none;
}

.invoice-details-card {
    background: #F5F5F5;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mt-3 {
    margin-top: 1rem;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    color: #9E9E9E;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #31566D;
    font-size: 24px;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #78909C;
    margin: 0;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-large .modal-content {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E0E0E0;
}

.modal-header h3 {
    color: #31566D;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: #F5F5F5;
    border: none;
    color: #c91d2b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #FFEBEE;
    color: #A01621;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.payment-details {
    background: #F5F5F5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row span {
    color: #78909C;
    font-size: 14px;
}

.detail-row strong {
    color: #31566D;
    font-size: 16px;
}

.amount-highlight {
    color: #4CAF50 !important;
    font-size: 20px !important;
}

.confirm-text {
    margin: 16px 0 8px 0;
    color: #424242;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #E0E0E0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #F5F5F5;
    color: #424242;
}

.btn-secondary:hover {
    background: #E0E0E0;
}

/* Text Utilities */
.text-muted {
    color: #78909C;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .orders-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .header-left,
    .header-right {
        width: 100%;
    }

    .payment-summary {
        flex-wrap: wrap;
        width: 100%;
        gap: 12px;
    }

    .summary-item {
        flex: 1;
        min-width: 130px;
        padding: 10px 14px;
    }
}

@media (max-width: 768px) {
    .orders-header {
        padding-bottom: 15px;
    }

    .import-section-new {
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .import-tabs-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 0;
        margin-bottom: 16px;
        border-bottom: none;
    }

    .import-tabs-list {
        width: 100%;
        gap: 24px;
        justify-content: flex-start;
        border-bottom: 2px solid #f1f4f9;
        padding-bottom: 2px;
    }

    .tab-item {
        padding: 8px 0;
        font-size: 14px;
    }

    .import-help-action {
        width: auto;
        margin-left: 0 !important;
        margin-top: 4px;
    }

    .btn-sample-link {
        width: fit-content;
        justify-content: flex-start;
        padding: 6px 12px;
        font-size: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        color: #475569;
    }

    .import-form-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .upload-zone {
        width: 100%;
    }

    .upload-label-new {
        padding: 8px 12px;
        border-width: 1.5px;
    }

    .upload-prompt {
        gap: 10px;
    }

    .upload-prompt svg {
        width: 18px;
        height: 18px;
        padding: 4px;
    }

    .primary-text {
        font-size: 12px;
    }

    .secondary-text {
        display: none;
        /* Hide secondary text on mobile to save space */
    }

    .import-submit-btn {
        height: 40px;
        width: fit-content;
        min-width: 120px;
        font-size: 13px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border-radius: 6px;
    }

    .import-submit-btn span {
        display: inline;
    }

    .file-input-hidden {
        display: none !important;
        /* Force hide to prevent ghost space */
    }
}

.orders-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
}

.filter-group {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 13px;
}

.filter-actions {
    flex-direction: column;
    width: 100%;
}

.search-box {
    min-width: 100%;
}

.btn-export {
    width: 100%;
    justify-content: center;
}

.orders-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orders-table {
    min-width: 1000px;
    /* Force scroll */
}

.action-dropdown-menu {
    z-index: 1001;
    /* Increase z-index to be above sidebar */
}

/* Style for better visibility on mobile */
.order-row[data-payment-status="pending"] {
    background-color: #fff9e6;
}

.order-details-header {
    flex-direction: column;
    gap: 15px;
}

.order-status-badges {
    width: 100%;
    display: flex;
    gap: 10px;
}

.order-summary-grid {
    grid-template-columns: 1fr 1fr;
}

.details-grid {
    grid-template-columns: 1fr;
}
}

/* Hide rows based on filter */
.orders-table tbody tr.order-row {
    display: table-row;
}

.orders-table tbody tr.order-row.hidden {
    display: none;
}

/* Order Details Modal Specific Styles */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #F0F0F0;
    border-top-color: #c91d2b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #F5F5F5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-info-main h4 {
    color: #c91d2b;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.order-status-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-section {
    margin-bottom: 24px;
}

.section-title {
    color: #31566D;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #F0F0F0;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.summary-card {
    background: #F5F5F5;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-card.success {
    background: #E8F5E9;
}

.summary-card.warning {
    background: #FFF8E1;
}

.summary-card.info {
    background: #E3F2FD;
}

.summary-label {
    font-size: 13px;
    color: #78909C;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #31566D;
}

.summary-card.success .summary-value {
    color: #2E7D32;
}

.summary-card.warning .summary-value {
    color: #F57C00;
}

.summary-card.info .summary-value {
    color: #1976D2;
}

.order-items-table-wrapper {
    overflow-x: auto;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.order-items-table thead {
    background: #F5F5F5;
}

.order-items-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #31566D;
    border-bottom: 2px solid #E0E0E0;
}

.order-items-table td {
    padding: 12px;
    border-bottom: 1px solid #F0F0F0;
    color: #424242;
}

.order-items-table tbody tr:last-child td {
    border-bottom: none;
}

.product-name-cell {
    font-weight: 500;
    color: #31566D;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 13px;
    color: #78909C;
    font-weight: 500;
}

.detail-value {
    font-size: 15px;
    color: #424242;
    font-weight: 500;
}

.address-card {
    background: #F5F5F5;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    color: #424242;
}

.address-card strong {
    display: block;
    color: #31566D;
    margin-bottom: 8px;
}

.notes-content {
    background: #FFF8E1;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #F57C00;
    color: #424242;
    line-height: 1.6;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 24px;
}

.modal-large .modal-body {
    max-height: calc(90vh - 140px);
}

/* Responsive for Order Details Modal */
@media (max-width: 768px) {
    .order-details-header {
        flex-direction: column;
        gap: 16px;
    }

    .order-summary-grid {
        grid-template-columns: 1fr;
    }

    .order-items-table {
        font-size: 12px;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 8px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-top: 1px solid #E0E0E0;
}

.pagination-info {
    font-size: 14px;
    color: #78909C;
}

.pagination-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    color: #424242;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover:not(.disabled) {
    background: #F5F5F5;
    border-color: #BDBDBD;
    text-decoration: none;
    color: #c91d2b;
}

.page-link.active {
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    color: white;
    border-color: #c91d2b;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F5F5F5;
    color: #9E9E9E;
}

.page-link svg {
    width: 18px;
    height: 18px;
}

.pageSize-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #78909C;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pageSize-selector select {
    padding: 6px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* File Card (Proof File) */
.file-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.file-card:hover {
    border-color: #c91d2b;
    box-shadow: 0 4px 12px rgba(201, 29, 43, 0.1);
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #fdf2f2;
    color: #c91d2b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #31566D;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-card .file-name {
    font-size: 11px;
    color: #6c757d;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 8px;
    margin-left: 8px;
}

.btn-file-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f3f5;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-view-file:hover {
    background: #0288d1;
    color: white;
}

.btn-download-file:hover {
    background: #2E7D32;
    color: white;
}

/* ── Action Dropdown ─────────────────────────── */
.action-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Three-dot trigger button */
.btn-action-dots {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    padding: 0;
}

.btn-action-dots span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #546E7A;
    transition: background 0.2s;
}

.btn-action-dots:hover {
    background: #f5f5f5;
    border-color: #c91d2b;
    box-shadow: 0 2px 8px rgba(201, 29, 43, 0.12);
}

.btn-action-dots:hover span {
    background: #c91d2b;
}

/* Dropdown panel */
.action-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1100;
    max-width: 90vw;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease;
}

.action-dropdown-menu.open {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown items */
.action-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #424242;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    text-decoration: none;
}

.action-dropdown-item svg {
    flex-shrink: 0;
    color: #78909C;
    transition: color 0.15s;
}

.action-dropdown-item:hover {
    background: #F5F5F5;
    color: #1976D2;
}

.action-dropdown-item:hover svg {
    color: #1976D2;
}

.action-item-approve:hover {
    background: #E8F5E9;
    color: #2E7D32;
}

.action-item-approve:hover svg {
    color: #2E7D32;
}

.action-item-reject:hover {
    background: #FFEBEE;
    color: #C62828;
}

.action-item-reject:hover svg {
    color: #C62828;
}

.action-item-pay:hover {
    background: #E8F5E9;
    color: #2E7D32;
}

.action-item-pay:hover svg {
    color: #2E7D32;
}

/* Divider between item groups */
.action-dropdown-item+.action-item-approve {
    border-top: 1px solid #F0F0F0;
    margin-top: 2px;
}

/* Rejection Details */
.rejection-card {
    background: #FFEBEE;
    border-left: 4px solid #C62828;
    padding: 16px;
    border-radius: 4px;
    margin-top: 10px;
}

.rejection-reason-text {
    margin: 0;
    color: #C62828;
    font-weight: 500;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.5;
}

.text-danger {
    color: #dc3545 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

textarea.form-control.is-invalid {
    border-color: #dc3545 !important;
}

textarea.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}