﻿
/* Main card */
.cs-table-card {
    background: #ffffff;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.045);
}

/* Header */
.cs-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #ffffff, #f8faff);
    border-bottom: 1px solid #e9edf4;
}

.cs-table-title {
    margin: 0 0 5px;
    color: #172b4d;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

    .cs-table-title i {
        color: #4467d5;
    }

.cs-table-subtitle {
    color: #7b8798;
    font-size: 12px;
}

.cs-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    background: #edf2ff;
    color: #3556b8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Table */
.cs-professional-table {
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

    .cs-professional-table thead th {
        padding: 14px 15px;
        background: #f5f7fb;
        color: #64748b;
        border-bottom: 1px solid #e5eaf1;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.55px;
        white-space: nowrap;
    }

    .cs-professional-table tbody td {
        padding: 15px;
        color: #334155;
        border-bottom: 1px solid #eef1f6;
        white-space: nowrap;
    }

    .cs-professional-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .cs-professional-table tbody tr:hover {
            background: #f8faff;
        }

        .cs-professional-table tbody tr:last-child td {
            border-bottom: none;
        }

/* Row number */
.cs-row-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f0f3f9;
    color: #52627a;
    font-size: 11px;
    font-weight: 700;
}

/* Issue type */
.cs-issue-type {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #243b63;
    font-weight: 600;
}

.cs-issue-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #edf2ff;
    color: #4467d5;
    flex-shrink: 0;
}

/* Values */
.cs-date {
    color: #64748b;
    font-size: 12px;
}

.cs-number {
    color: #334155;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cs-currency {
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.cs-total-amount {
    color: #243f8c;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Status */
.cs-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.cs-status-completed {
    background: #e8f7ef;
    color: #16804a;
}

.cs-status-draft {
    background: #fff5df;
    color: #a66a08;
}

/* Actions */
.cs-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.cs-action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-edit-btn {
    background: #edf2ff;
    color: #3559c7;
    border-color: #e0e8ff;
}

    .cs-edit-btn:hover {
        background: #3559c7;
        color: #ffffff;
    }

.cs-delete-btn {
    background: #fff0f0;
    color: #d64545;
    border-color: #ffe0e0;
}

    .cs-delete-btn:hover {
        background: #d64545;
        color: #ffffff;
    }

/* Footer totals */
.cs-professional-table tfoot td {
    padding: 16px 15px;
    background: #f5f7fc;
    border-top: 1px solid #e0e7f2;
    border-bottom: none;
}

.cs-footer-label {
    color: #52627a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cs-footer-number {
    color: #243b63;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.cs-footer-total {
    color: #2448a6;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Bottom information bar */
.cs-table-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    background: #fbfcfe;
    border-top: 1px solid #edf0f5;
    color: #8792a3;
    font-size: 11px;
}

    .cs-table-bottom strong {
        color: #344563;
    }

/* Empty state */
.cs-empty-state {
    padding: 38px 20px;
    text-align: center;
    background: #fbfcff;
    border: 1px dashed #d6deeb;
    border-radius: 14px;
}

.cs-empty-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 15px;
    background: #edf2ff;
    color: #4467d5;
    font-size: 21px;
}

.cs-empty-state h6 {
    color: #243b63;
    font-weight: 700;
}

.cs-empty-state p {
    color: #8792a3;
    font-size: 12px;
}

/* Responsive */
@@media (max-width: 768px) {
    .cs-table-header {
        align-items: flex-start;
        padding: 16px;
    }

    .cs-table-bottom {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }
}

.csw-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .58);
}

.csw-modal {
    display: flex;
    flex-direction: column;
    width: min(100%, 1200px);
    max-height: 94vh;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px #0003;
}

.csw-header, .csw-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

    .csw-header h5 {
        margin: 0 0 5px;
        font-size: 16px;
        font-weight: 700;
    }

    .csw-header small, .csw-description {
        color: #778296;
        font-size: 12px;
    }

.csw-close {
    border: 0;
    background: transparent;
    font-size: 18px;
}

.csw-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 0 20px 14px;
}

.csw-step {
    padding: 9px 4px;
    border: 0;
    border-radius: 6px;
    background: #f0f2f5;
    color: #68758a;
    font-size: 11px;
    white-space: nowrap;
}

.csw-done {
    background: #16a34a;
    color: white;
}

.csw-active, .csw-btn-primary {
    background: #2864f0;
    color: white;
}

.csw-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

    .csw-body h6 {
        font-size: 14px;
        font-weight: 700;
    }

.csw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 18px 0;
}

    .csw-form-grid label {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        font-weight: 600;
    }

    .csw-form-grid .form-control,
    .csw-form-grid .form-select {
        font-size: 12px;
    }

.csw-entry-card {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #dfe4eb;
    border-radius: 8px;
    font-size: 12px;
}

.csw-btn {
    padding: 9px 13px;
    border: 1px solid #dfe4eb;
    border-radius: 7px;
    font-size: 12px;
    cursor: pointer;
}

.csw-btn-secondary {
    background: white;
    color: #334155;
}

.csw-btn-primary {
    border-color: #2864f0;
}

.csw-footer {
    border-top: 1px solid #e5e7eb;
}

@@media (max-width: 600px) {
    .csw-backdrop {
        padding: 0;
    }

    .csw-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .csw-form-grid {
        grid-template-columns: 1fr;
    }

    .csw-progress {
        padding-right: 10px;
        padding-left: 10px;
    }

    .csw-step {
        white-space: normal;
        font-size: 10px;
    }

    .csw-body {
        padding: 14px;
    }
}
/* Shareholder dropdown container */
.sub-shareholder-dropdown {
    position: relative;
    width: 100%;
}

/* Dropdown header */
.sub-shareholder-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #495057;
    font-size: 14px;
    text-align: left;
    box-shadow: none;
}

    .sub-shareholder-toggle:hover {
        border-color: #86b7fe;
    }

    .sub-shareholder-toggle:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
    }

.sub-shareholder-placeholder {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sub-shareholder-arrow {
    margin-left: 10px;
    font-size: 12px;
    transition: transform 0.2s ease;
}

    .sub-shareholder-arrow.expanded {
        transform: rotate(180deg);
    }

/* Dropdown panel */
.sub-shareholder-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    min-width: 260px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
    z-index: 1050;
    overflow: hidden;
}

/* Scrollable list */
.sub-shareholder-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}

/* Individual shareholder */
.sub-shareholder-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: background-color 0.15s ease;
}

    .sub-shareholder-option:hover {
        background-color: #f1f6ff;
    }

    .sub-shareholder-option .form-check-input {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        margin: 0;
        cursor: pointer;
    }

.sub-shareholder-name {
    overflow-wrap: anywhere;
    line-height: 1.4;
}

/* Footer */
.sub-shareholder-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    font-size: 12px;
    color: #6c757d;
}


