﻿
.arpco-table-container {
    --arpco-primary: #1e3a5f;
    --arpco-primary-light: #eef3f8;
    --arpco-border: #dce3ec;
    --arpco-text: #1f2937;
    --arpco-muted: #6b7280;
    --arpco-bg: #ffffff;
    --arpco-stripe: #f9fbfd;
    max-width: 1100px;
    margin: 24px auto;
    padding: 16px;
    color: var(--arpco-text);
    box-sizing: border-box;
}

.arpco-table-container *,
.arpco-table-container *::before,
.arpco-table-container *::after {
    box-sizing: inherit;
}

.arpco-table-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--arpco-primary);
    text-align: right;
}

.arpco-table-subtitle {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: var(--arpco-muted);
    text-align: right;
}

.arpco-table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    background: var(--arpco-bg);
}

.arpco-responsive-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    text-align: right;
}

    .arpco-responsive-table thead {
        background-color: var(--arpco-primary);
        color: #ffffff;
    }

    .arpco-responsive-table th,
    .arpco-responsive-table td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--arpco-border);
        font-size: 0.92rem;
        line-height: 1.5;
        vertical-align: middle;
    }

    .arpco-responsive-table th {
        font-weight: 700;
        white-space: nowrap;
    }

    .arpco-responsive-table tbody tr:nth-child(even) {
        background-color: var(--arpco-stripe);
    }

    .arpco-responsive-table tbody tr:hover {
        background-color: var(--arpco-primary-light);
        transition: background-color 0.2s ease;
    }

    .arpco-responsive-table tbody tr:last-child td {
        border-bottom: none;
    }

.arpco-code {
    font-weight: 700;
    color: var(--arpco-primary);
    white-space: nowrap;
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
    .arpco-responsive-table th,
    .arpco-responsive-table td {
        padding: 10px 10px;
        font-size: 0.86rem;
    }
}

/* Mobile card layout */
@media (max-width: 768px) {
    .arpco-table-container {
        padding: 10px;
        margin: 12px auto;
    }

    .arpco-table-scroll {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .arpco-responsive-table {
        min-width: 0;
    }

        .arpco-responsive-table thead {
            display: none;
        }

        .arpco-responsive-table tbody tr {
            display: block;
            background: var(--arpco-bg) !important;
            border: 1px solid var(--arpco-border);
            border-radius: 10px;
            margin-bottom: 14px;
            padding: 8px 14px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

            .arpco-responsive-table tbody tr:hover {
                background: var(--arpco-bg) !important;
            }

        .arpco-responsive-table td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 10px 4px;
            border-bottom: 1px solid #eef2f6;
            text-align: left;
            white-space: normal;
        }

            .arpco-responsive-table td::before {
                content: attr(data-label);
                font-weight: 700;
                color: var(--arpco-primary);
                text-align: right;
                flex: 0 0 38%;
            }

            .arpco-responsive-table td:last-child {
                border-bottom: none;
            }
}