:root {
    --tl-card: #ffffff;
    --tl-bg: #fbf6f8;
    --tl-line: #f0d7dd;
    --tl-shadow: 0 18px 40px rgba(60, 20, 35, .08);

    --tl-text: #2a1b22;
    --tl-muted: #7a5a66;

    --tl-pink: #f2b8c7;
    --tl-pink-2: #f7c6d3;

    --tl-gold: #d6b06a;

    --tl-ok: #2f8a57;
    --tl-ok-bg: rgba(47, 138, 87, .10);
    --tl-ok-br: rgba(47, 138, 87, .28);

    --tl-warn: #b2681a;
    --tl-warn-bg: rgba(178, 104, 26, .10);
    --tl-warn-br: rgba(178, 104, 26, .28);
}

/* CONTENEDOR */
.table-card {
    background: var(--tl-card);
    border: 1px solid var(--tl-line);
    border-radius: 22px;
    box-shadow: var(--tl-shadow);
    overflow: hidden;
}

/* HEADER */
.table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(247, 198, 211, .35), rgba(255, 255, 255, 0));
    border-bottom: 1px solid var(--tl-line);
}

.table-head h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: .2px;
    color: var(--tl-text);
}

/* BOTONES */
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--tl-line);
    background: #fff;
    color: var(--tl-text);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease;
    user-select: none;
    white-space: nowrap;
}

.btn-sm:hover {
    border-color: rgba(214, 176, 106, .65);
    box-shadow: 0 10px 22px rgba(60, 20, 35, .08);
    transform: translateY(-1px);
}

.btn-sm.primary {
    border-color: rgba(242, 184, 199, .95);
    background: linear-gradient(180deg, rgba(242, 184, 199, .85), rgba(247, 198, 211, .55));
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.actions form {
    margin: 0;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--tl-line);
    background: rgba(247, 198, 211, .18);
    color: var(--tl-text);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .25px;
}

.badge.ok {
    border-color: var(--tl-ok-br);
    background: var(--tl-ok-bg);
    color: var(--tl-ok);
}

.badge.warn {
    border-color: var(--tl-warn-br);
    background: var(--tl-warn-bg);
    color: var(--tl-warn);
}

/* TABLE */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    text-align: left;
    font-size: 12px;
    color: var(--tl-muted);
    font-weight: 900;
    letter-spacing: .35px;
    text-transform: uppercase;
    padding: 12px 16px;
    background: rgba(251, 246, 248, .75);
    border-bottom: 1px solid var(--tl-line);
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--tl-line);
    color: var(--tl-text);
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr:hover {
    background: rgba(242, 184, 199, .08);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

/* ID un poquito más fuerte */
.table tbody td:first-child {
    font-weight: 900;
    letter-spacing: .2px;
}

/* PAGINACIÓN (Tailwind default de Laravel) */
.table-card nav[role="navigation"] {
    padding: 14px 16px 18px;
    border-top: 1px solid var(--tl-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(251, 246, 248, .85));
}

.table-card nav[role="navigation"] .hidden {
    display: none !important;
}

/* Links botones de paginación (general) */
.table-card nav[role="navigation"] a,
.table-card nav[role="navigation"] span {
    border-radius: 999px !important;
    font-weight: 800;
}

/* RESPONSIVE */
@media (max-width: 920px) {
    .table-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {

    /* Para móviles: permite scroll horizontal sin romper layout */
    .table-card {
        border-radius: 18px;
    }

    .table-wrap {
        width: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 680px;
        /* fuerza el scroll cuando es necesario */
    }

    .table thead th,
    .table tbody td {
        padding: 12px 12px;
    }

    .btn-sm {
        height: 32px;
        font-size: 12.5px;
        padding: 0 11px;
    }
}
