/**
 * Leptir app shell — shared dark UI for Tailwind + table pages (history, workouts).
 * Pairs with includes/typography_head.html.
 */
:root {
    --lf-shell-bg: #000000;
    --lf-shell-border: rgba(255, 255, 255, 0.1);
    --lf-shell-surface: rgba(255, 255, 255, 0.05);
}

.lf-app-body {
    background-color: var(--lf-shell-bg);
    color: rgba(255, 255, 255, 0.7);
    -webkit-font-smoothing: antialiased;
}

.lf-page-main {
    margin-left: auto;
    margin-right: auto;
    max-width: 64rem; /* max-w-5xl */
    padding: 4rem 1rem 5rem;
}

@media (min-width: 768px) {
    .lf-page-main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Card surface (tables, empty states) */
.lf-card-surface {
    border-radius: 0.75rem;
    border: 1px solid var(--lf-shell-border);
    background: var(--lf-shell-surface);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lf-card-surface--interactive:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lf-card-surface--padded {
    padding: 1.5rem;
}

.lf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lf-data-table {
    width: 100%;
    min-width: 28rem;
    font-size: 0.875rem;
    line-height: 1.625;
    border-collapse: collapse;
}

.lf-data-table th {
    text-align: left;
    padding: 0.625rem 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--lf-shell-border);
}

.lf-data-table td {
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--lf-shell-border);
    vertical-align: top;
    color: rgba(255, 255, 255, 0.7);
}

.lf-data-table tr:last-child td {
    border-bottom: none;
}

.lf-data-table tbody tr {
    transition: background-color 0.15s ease;
}

.lf-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.lf-link-subtle {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.lf-link-subtle:hover {
    color: #fff;
}

.lf-type-meal {
    color: #a78bfa;
}

.lf-type-workout {
    color: #34d399;
}

.lf-macros-muted {
    font-size: 0.75rem;
    line-height: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Pagination & period nav — secondary pill pattern */
.lf-pill-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lf-pill-row--start {
    justify-content: flex-start;
}

.lf-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--lf-shell-border);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lf-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.lf-pill--active {
    background: #fff;
    color: #000;
    border-color: transparent;
}

.lf-pill--active:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

.lf-pill--disabled {
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.06);
    background: transparent;
}

/* Period tabs (workouts) */
.lf-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lf-tab {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--lf-shell-border);
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lf-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.lf-tab--active {
    background: #fff;
    color: #000;
    border-color: transparent;
}

.lf-tab--active:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

.lf-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: rgba(255, 255, 255, 0.5);
}

.lf-empty-state strong {
    display: block;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}
