/* Logisauv index standard ----------------------------------------------------
 * Source visuelle : index des sessions de formation.
 * Les variables permettent à chaque index de conserver la palette du compte.
 */

.ls-index-hero,
.ls-index-table-shell {
    --ls-index-hero-start: #0f172a;
    --ls-index-hero-mid: var(--ls-index-hero-start);
    --ls-index-hero-end: #1e293b;
    --ls-index-hero-text: #f8fafc;
    --ls-index-hero-subtext: rgba(248, 250, 252, 0.85);
    --ls-index-hero-meta: rgba(248, 250, 252, 0.7);
    --ls-index-accent: #38bdf8;
    --ls-index-accent-soft: rgba(56, 189, 248, 0.16);
    --ls-index-surface: #ffffff;
    --ls-index-surface-alt: #f8fafc;
    --ls-index-background: #f1f5f9;
    --ls-index-border: #e2e8f0;
    --ls-index-text: #263548;
    --ls-index-muted: #475569;
    --ls-index-shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.25);
}

/* Hero ---------------------------------------------------------------------- */
.ls-index-hero {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 2rem;
    border-radius: 1.5rem;
    color: var(--ls-index-hero-text);
    background: linear-gradient(
        135deg,
        var(--ls-index-hero-start),
        var(--ls-index-hero-mid) 60%,
        var(--ls-index-hero-end)
    );
    box-shadow: var(--ls-index-shadow-lg);
}

/* Compact variant for guided create/edit and reading screens. */
.ls-index-hero--compact { padding: 1.25rem 1.5rem; }
.ls-index-hero--compact .ls-index-hero__title { font-size: 1.6rem; }
.ls-index-hero--compact .ls-index-hero__subtitle { margin-bottom: .5rem; }
.ls-index-hero--compact .ls-index-hero__metrics { margin-top: .75rem; }
.ls-index-hero--compact .ls-index-hero__metric { padding: .6rem .85rem; }

.ls-index-hero::after {
    content: "";
    position: absolute;
    top: -10%;
    right: -25%;
    width: 45%;
    height: 140%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(0.5px);
    transform: rotate(12deg);
    pointer-events: none;
}

.ls-index-hero--archived::after {
    background: rgba(251, 191, 36, 0.12);
}

.ls-index-hero__grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.ls-index-hero__intro {
    max-width: 640px;
}

.ls-index-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    color: var(--ls-index-hero-text);
    background: var(--ls-index-accent-soft);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ls-index-hero__title {
    margin: 0 0 0.5rem;
    color: var(--ls-index-hero-text);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.ls-index-hero__subtitle {
    max-width: 50ch;
    margin: 0 0 1rem;
    color: var(--ls-index-hero-subtext);
    font-size: 1rem;
    line-height: 1.5;
}

.ls-index-hero__notice {
    display: inline-flex;
    align-items: center;
    max-width: 56ch;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(253, 230, 138, 0.32);
    border-radius: 0.85rem;
    color: #fffbeb;
    background: rgba(251, 191, 36, 0.18);
    font-weight: 600;
    line-height: 1.35;
}

.ls-index-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--ls-index-hero-meta);
    font-size: 0.95rem;
}

.ls-index-hero__meta-label {
    color: var(--ls-index-hero-text);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ls-index-hero__meta-value {
    color: var(--ls-index-hero-text);
    font-size: 1.05rem;
    font-weight: 600;
}

.ls-index-hero__meta-hint {
    color: var(--ls-index-hero-subtext);
    font-size: 0.9rem;
}

.ls-index-hero__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.ls-index-hero__actions .btn-light {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.ls-index-hero__actions .btn-outline-light {
    border-width: 2px;
}

.ls-index-hero__metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.ls-index-hero__metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

.ls-index-hero__metric-label {
    color: var(--ls-index-hero-meta);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ls-index-hero__metric-value {
    color: var(--ls-index-hero-text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
}

.ls-index-hero__metric-hint {
    color: var(--ls-index-hero-subtext);
    font-size: 0.78rem;
    line-height: 1.25;
}

/* Cartes d'action du hero --------------------------------------------------- */
.ls-index-hero__quick-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: minmax(88px, auto);
    gap: 0.7rem;
    margin-top: 1rem;
}

.ls-index-quick-action {
    --ls-index-action-accent: var(--quick-action-accent, #2563eb);
    --ls-index-action-background: var(--quick-action-background, #ffffff);
    --ls-index-action-border: var(--quick-action-border, #dbeafe);
    --ls-index-action-icon-background: var(--quick-action-icon-background, #eff6ff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--ls-index-action-border);
    border-left: 4px solid var(--ls-index-action-accent);
    border-radius: 0.75rem;
    color: #0f172a;
    background: var(--ls-index-action-background);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
    text-align: left;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ls-index-quick-action:hover,
.ls-index-quick-action:focus {
    color: #0f172a;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.ls-index-quick-action:focus-visible {
    outline: 3px solid var(--ls-index-accent-soft);
    outline-offset: 2px;
}

.ls-index-quick-action--active {
    box-shadow: 0 0 0 2px var(--ls-index-accent), 0 8px 18px rgba(15, 23, 42, 0.14);
}

.ls-index-quick-action__icon {
    display: inline-flex;
    flex: 0 0 2.25rem;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    color: var(--ls-index-action-accent);
    background: var(--ls-index-action-icon-background);
    font-size: 1rem;
}

.ls-index-quick-action__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ls-index-quick-action__label {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

.ls-index-quick-action__description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.15rem;
    color: #475569;
    font-size: 0.75rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ls-index-quick-action__meta {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 2.25rem;
}

.ls-index-quick-action__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    max-width: 4.5rem;
    margin: 0 !important;
    padding: 0.2rem 0.42rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: none;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.1;
}

.ls-index-quick-action__chevron {
    color: var(--ls-index-action-accent);
    font-size: 0.85rem;
}

/* Structure du tableau ------------------------------------------------------ */
.ls-index-table-shell {
    overflow: hidden;
    border: 0;
    border-radius: 1.5rem;
    background: var(--ls-index-surface);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ls-index-table-shell--archived {
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.ls-index-table-shell__toolbar {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--ls-index-border);
    background: var(--ls-index-surface-alt);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.ls-index-table-shell__pagination {
    padding: 0.85rem 1rem 0.35rem;
}

/* Choix de vue et grille de cartes ----------------------------------------- */
.ls-index-view-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    min-height: 42px;
    padding: 0.24rem;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ls-index-view-switcher__label {
    padding: 0 0.42rem 0 0.5rem;
    color: var(--ls-index-muted, #64748b);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ls-index-view-switcher__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 34px;
    padding: 0.42rem 0.68rem;
    border: 0;
    border-radius: 0.68rem;
    color: #475569;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ls-index-view-switcher__button:hover,
.ls-index-view-switcher__button:focus {
    color: #0f172a;
    background: #f1f5f9;
    outline: 0;
}

.ls-index-view-switcher__button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--ls-index-accent, #2563eb), #1d4ed8);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--ls-index-accent, #2563eb) 28%, transparent);
    transform: translateY(-1px);
}

.ls-index-view-switcher__saved {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0 0.18rem 0 0.08rem;
    border-radius: 999px;
    color: #94a3b8;
    background: #f1f5f9;
    font-size: 0.55rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ls-index-view-switcher.is-saved .ls-index-view-switcher__saved {
    color: #ffffff;
    background: #16a34a;
    transform: scale(1.08);
}

[data-index-view-panel][hidden] {
    display: none !important;
}

.ls-index-view-root--booting [data-index-view-panel] {
    visibility: hidden;
}

.ls-index-view-root--booting[data-index-view-adaptive-table] .ls-index-table-container {
    visibility: hidden;
}

.ls-index-pagination-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-height: 78px;
    padding: 0.85rem 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.96);
}

.ls-index-pagination-toolbar__side {
    display: flex;
    min-width: 0;
    align-items: center;
}

.ls-index-pagination-toolbar__side--start { justify-content: flex-start; }
.ls-index-pagination-toolbar__side--end { justify-content: flex-end; }

.ls-index-pagination-toolbar__view {
    display: flex;
    justify-content: center;
}

.ls-index-pagination-toolbar .pagination { margin-bottom: 0; }

.ls-index-pagination-toolbar__per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    color: #475569;
    font-weight: 700;
}

.ls-index-pagination-toolbar__per-page select {
    width: auto;
    min-width: 74px;
}

.ls-index-alphabet {
    display: flex;
    overflow-x: auto;
    align-items: center;
    gap: 0.28rem;
    padding: 0.72rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(90deg, #f8fafc, #fff, #f8fafc);
    scrollbar-width: thin;
}

.ls-index-alphabet__label {
    flex: 0 0 auto;
    margin-right: 0.35rem;
    color: #64748b;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ls-index-alphabet__item {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 1.85rem;
    height: 1.85rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.42rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: #475569;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.ls-index-alphabet__item:first-of-type {
    min-width: 3.35rem;
}

.ls-index-alphabet__item:hover,
.ls-index-alphabet__item:focus {
    border-color: color-mix(in srgb, var(--ls-index-accent, #2563eb) 28%, #e2e8f0);
    color: var(--ls-index-accent, #2563eb);
    background: color-mix(in srgb, var(--ls-index-accent, #2563eb) 7%, #fff);
    text-decoration: none;
    transform: translateY(-1px);
}

.ls-index-alphabet__item.is-active {
    border-color: var(--ls-index-accent, #2563eb);
    color: #fff;
    background: var(--ls-index-accent, #2563eb);
    box-shadow: 0 5px 12px color-mix(in srgb, var(--ls-index-accent, #2563eb) 25%, transparent);
}

.ls-index-grid-panel {
    width: 100%;
    padding: 1rem;
}

.ls-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
    width: 100%;
}

.ls-index-card {
    --ls-index-card-accent: var(--ls-index-accent, #2563eb);
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 1.2rem;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ls-index-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--ls-index-card-accent);
}

.ls-index-card:hover {
    border-color: color-mix(in srgb, var(--ls-index-card-accent) 34%, #e2e8f0);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
    transform: translateY(-2px);
}

.ls-index-card--success { --ls-index-card-accent: #16a34a; }
.ls-index-card--warning { --ls-index-card-accent: #d97706; }
.ls-index-card--danger { --ls-index-card-accent: #e11d48; }
.ls-index-card--archived { --ls-index-card-accent: #64748b; }

.ls-index-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.15rem 0.95rem 1.3rem;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.ls-index-card__eyebrow {
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ls-index-card__title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.ls-index-card__state {
    flex: 0 0 auto;
    padding: 0.3rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--ls-index-card-accent) 28%, transparent);
    border-radius: 999px;
    color: var(--ls-index-card-accent);
    background: color-mix(in srgb, var(--ls-index-card-accent) 10%, #ffffff);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.ls-index-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1.15rem 1.05rem 1.3rem;
}

.ls-index-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.ls-index-card__meta {
    min-width: 0;
    padding: 0.62rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    background: #f8fafc;
}

.ls-index-card__meta-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.ls-index-card__meta-value {
    overflow-wrap: anywhere;
    color: #263548;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
}

.ls-index-card__section {
    min-width: 0;
}

.ls-index-card__section-label {
    margin-bottom: 0.38rem;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ls-index-card__section-content {
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.45;
}

.ls-index-card__status {
    margin-top: auto;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
}

.ls-index-card__footer {
    padding: 0.78rem 1.15rem 0.9rem 1.3rem;
    border-top: 1px solid #edf2f7;
    background: #ffffff;
}

.ls-index-grid-empty {
    grid-column: 1 / -1;
    padding: 3rem 1.25rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1.2rem;
    color: #64748b;
    background: #ffffff;
    text-align: center;
}

/* La ligne reste le DOM source en mode cartes afin de conserver toutes ses actions. */
.ls-index-view-mode--grid[data-index-view-adaptive-table] .ls-index-table-container {
    overflow: visible;
    padding: 1rem;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] .dataTables_wrapper,
.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table thead { display: none; }

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
    width: 100%;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr {
    --ls-index-grid-accent: var(--ls-index-row-accent, var(--ls-index-accent, #2563eb));
    position: relative;
    display: grid;
    overflow: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--ls-index-grid-accent);
    border-radius: 1.15rem;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr:hover {
    border-color: color-mix(in srgb, var(--ls-index-grid-accent) 35%, #e2e8f0);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
    transform: translateY(-2px);
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] tr.ls-index-row--success { --ls-index-grid-accent: #16a34a; }
.ls-index-view-mode--grid[data-index-view-adaptive-table] tr.ls-index-row--warning { --ls-index-grid-accent: #d97706; }
.ls-index-view-mode--grid[data-index-view-adaptive-table] tr.ls-index-row--danger { --ls-index-grid-accent: #e11d48; }
.ls-index-view-mode--grid[data-index-view-adaptive-table] tr.ls-index-row--archived { --ls-index-grid-accent: #64748b; }

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td {
    display: block !important;
    min-width: 0;
    padding: 0.78rem 0.9rem !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow-wrap: anywhere;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td::before {
    content: attr(data-index-grid-label);
    display: block;
    margin-bottom: 0.28rem;
    color: #64748b;
    font-size: 0.63rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td.ls-index-grid-cell--title {
    grid-column: 1 / -1;
    padding: 1.05rem 1rem 0.9rem !important;
    color: #0f172a;
    background: linear-gradient(145deg, #fff, #f8fafc) !important;
    font-size: 1rem;
    font-weight: 800;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td.ls-index-grid-cell--title::before {
    content: attr(data-index-grid-eyebrow) " · " attr(data-index-grid-label);
    color: var(--ls-index-grid-accent);
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td.ls-index-grid-cell--state {
    grid-column: 1 / -1;
    background: color-mix(in srgb, var(--ls-index-grid-accent) 6%, #fff) !important;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td.ls-index-grid-cell--actions {
    grid-column: 1 / -1;
    align-self: end;
    padding: 0.85rem 1rem !important;
    border-bottom: 0 !important;
    background: #f8fafc !important;
    text-align: right !important;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td.ls-index-grid-cell--actions::before {
    content: "Actions";
    text-align: left;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr.ls-index-grid-empty-row {
    display: block !important;
    grid-column: 1 / -1;
    min-height: 180px;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr.ls-index-grid-empty-row td {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    border: 0 !important;
}

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr.ls-index-grid-empty-row td::before { display: none; }

.ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr.ls-index-grid-responsive-row {
    display: none !important;
}

.ls-index-table-container {
    position: relative;
    overflow-x: auto;
    width: 100%;
    padding: 0.45rem 0.65rem 0.7rem;
    background: var(--ls-index-background);
}

.ls-index-table-container.is-sticky thead th,
.ls-index-table-container.sessions-table--sticky thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--ls-index-background);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.1);
}

.ls-index-table {
    width: 100%;
    min-width: var(--ls-index-table-min-width, 960px);
    margin: 0;
    border-collapse: separate;
    border-spacing: 0 0.48rem;
    background: transparent;
}

.ls-index-table thead th {
    padding: 0.55rem 0.72rem;
    border: 0;
    color: var(--ls-index-muted) !important;
    background: var(--ls-index-background);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-transform: uppercase;
    vertical-align: bottom;
    white-space: normal;
}

.ls-index-table thead th > a {
    color: var(--ls-index-muted) !important;
    text-decoration: none;
}

.ls-index-table thead th > a:hover,
.ls-index-table thead th > a:focus {
    color: #1d4ed8 !important;
}

.ls-index-table tbody tr {
    background: transparent !important;
}

.ls-index-table tbody td {
    padding: 0.78rem 0.72rem !important;
    border-top: 1px solid var(--ls-index-border);
    border-bottom: 1px solid var(--ls-index-border);
    color: var(--ls-index-text);
    background: var(--ls-index-surface);
    font-size: 0.86rem;
    line-height: 1.35;
    vertical-align: top;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ls-index-table tbody td:first-child {
    border-left: 1px solid var(--ls-index-border);
    border-radius: 0.78rem 0 0 0.78rem;
    box-shadow: inset 3px 0 0 var(--ls-index-row-accent, #93c5fd);
}

.ls-index-table tbody td:last-child {
    border-right: 1px solid var(--ls-index-border);
    border-radius: 0 0.78rem 0.78rem 0;
}

.ls-index-table tbody tr:hover td {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.ls-index-table.table-striped-modern tbody tr:nth-of-type(even) td {
    background: var(--ls-index-surface-alt);
}

.ls-index-table.table-compact thead th,
.ls-index-table.table-compact tbody td {
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    font-size: 0.82rem;
}

.ls-index-table.table-wrap tbody td,
.ls-index-table.table-wrap tbody th {
    white-space: normal;
}

.ls-index-table tbody tr.ls-index-row--danger {
    --ls-index-row-accent: #e11d48;
}

.ls-index-table tbody tr.ls-index-row--danger td {
    border-color: #fecdd3;
    background: #fff1f2;
}

.ls-index-table tbody tr.ls-index-row--danger:hover td {
    background: #ffe4e6;
}

.ls-index-table tbody tr.ls-index-row--warning {
    --ls-index-row-accent: #d97706;
}

.ls-index-table tbody tr.ls-index-row--success {
    --ls-index-row-accent: #16a34a;
}

.ls-index-table tbody tr.ls-index-row--archived {
    --ls-index-row-accent: #64748b;
}

.ls-index-table tbody tr.ls-index-row--archived td {
    border-color: #cbd5e1;
    color: #64748b;
    background: #f8fafc;
}

.ls-index-table tbody tr.ls-index-row--archived:hover td {
    background: #f1f5f9;
}

@media (min-width: 1200px) and (max-width: 1599.98px) {
    .ls-index-hero__quick-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .ls-index-hero__quick-actions {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ls-index-hero {
        padding: 1.5rem 1.1rem;
    }

    .ls-index-hero__title {
        font-size: 1.75rem;
    }

    .ls-index-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ls-index-hero__quick-actions {
        grid-template-columns: 1fr;
    }

    .ls-index-table-shell__toolbar {
        padding: 1.25rem 1rem;
    }

    .ls-index-pagination-toolbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .ls-index-pagination-toolbar__side,
    .ls-index-pagination-toolbar__view {
        justify-content: center;
    }

    .ls-index-view-switcher__label {
        display: none;
    }

    .ls-index-grid-panel {
        padding: 0.75rem;
    }

    .ls-index-grid {
        grid-template-columns: 1fr;
    }

    .ls-index-card__meta-grid {
        grid-template-columns: 1fr;
    }

    .ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody,
    .ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody tr {
        grid-template-columns: 1fr;
    }

    .ls-index-view-mode--grid[data-index-view-adaptive-table] table.ls-index-table tbody td {
        grid-column: 1 / -1;
    }
}
