/* =====================================================
   LuxTravely Platform — Unified Component Library
   lux-components.css  |  Load AFTER main.css
   Single source of truth for: stat cards, filter bars,
   record tables, pagination, page headers, empty states.
   ===================================================== */

/* ── Design Tokens (extend main.css variables) ─────── */
:root {
    --lux-stat-radius:     0.875rem;
    --lux-card-radius:     0.875rem;
    --lux-stripe-height:   3px;
    --lux-hover-lift:      -2px;
    --lux-hover-shadow:    0 8px 24px rgba(0,0,0,0.08);
    --lux-subtle-border:   var(--lp-line);
    --lux-surface:         var(--lp-card);
    --lux-text-primary:    var(--lp-ink);
    --lux-text-secondary:  var(--lp-muted);
    --lux-text-muted:      var(--lp-muted2);
    --lux-bg-wash:         var(--lp-card2);
}


/* ═══════════════════════════════════════════════════════
   1. PAGE HEADER
   Unified header for all management/list pages.
   ═══════════════════════════════════════════════════════ */
.lux-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--lp-line);
}
.lux-page-header .lux-page-title {
    font-family: var(--lp-font-title);
    letter-spacing: -0.02em;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--lux-text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}
.lux-page-header .lux-page-title i {
    color: var(--lp-gold-ink);
}
.lux-page-header .lux-page-subtitle {
    color: var(--lux-text-secondary);
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}
.lux-page-header .lux-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 767px) {
    .lux-page-header {
        flex-direction: column;
    }
    .lux-page-header .lux-page-title {
        font-size: 1.375rem;
    }
    .lux-page-header .lux-header-actions {
        width: 100%;
    }
    .lux-page-header .lux-header-actions > * {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════
   2. STAT CARDS — LuxPanel kit KPI strip
   ONE joined card: the grid is the card, each stat is a
   hairline-separated cell. Icon = bare colored glyph on the
   left, value 20px Montserrat + 11px label on the right.
   Usage (unchanged): <div class="lux-stats-grid">
     <div class="lux-stat-card lux-stripe-gold"> …
   Stripe classes are kept as COLOR HINTS for the icon.
   ═══════════════════════════════════════════════════════ */
.lux-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0;
    margin-bottom: 1.75rem;
    background: var(--lp-card);
    border: 1px solid var(--lp-line);
    border-radius: 14px;
    box-shadow: var(--lp-shadow, 0 4px 16px rgba(50,50,50,.05));
    overflow: hidden;
}

.lux-stat-card {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--lp-line2);
    margin-left: -1px;
    border-radius: 0;
    padding: 14px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    box-shadow: none;
}
.lux-stat-card::before { content: none; }
.lux-stat-card:hover { transform: none; box-shadow: none; background: var(--lp-card2); }

/* Any stat card OUTSIDE .lux-stats-grid falls back to a standalone card —
   the strip cells are chrome-less by design, so a custom wrapper (Tailwind
   grid, page-local tier, lone card) must not render invisible cells. */
:not(.lux-stats-grid) > .lux-stat-card {
    background: var(--lp-card);
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-r-card, 14px);
    box-shadow: var(--lp-shadow, 0 4px 16px rgba(50,50,50,.05));
    margin-left: 0;
}

/* ── Stat card inner layout ── */
.lux-stat-card .stat-row {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;   /* icon (markup-last) moves LEFT, kit-style */
    justify-content: flex-end;
    gap: 11px;
}
.lux-stat-card .stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--lp-muted);
    text-transform: none;
    letter-spacing: 0;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lux-stat-card .stat-value {
    font-family: var(--lp-font-title, 'Montserrat', 'Inter', sans-serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--lp-ink);
    margin: 0;
    line-height: 1.1;
}
/* legacy markup is <label><value>; kit shows value on top — flip visually */
.lux-stat-card .stat-row > div:not(.stat-icon) {
    display: flex;
    flex-direction: column-reverse;
    min-width: 0;
}
/* the column-reverse flip would hoist sub-text above the value — pin
   everything that follows .stat-value (stat-sub, ub-stat-sub, ad-hoc
   helper lines) last, so the cell reads value → label → sub, kit-style */
.lux-stat-card .stat-row .stat-value ~ * { order: -1; }
.lux-stat-card .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
    background: transparent !important;
}

/* ── Stripe classes → icon color hints (stripes themselves removed) ── */
.lux-stripe-gold .stat-icon,   .lux-stripe-amber .stat-icon  { color: var(--lp-gold-ink) !important; }
.lux-stripe-green .stat-icon,  .lux-stripe-teal .stat-icon   { color: var(--lp-ok) !important; }
.lux-stripe-red .stat-icon    { color: var(--lp-err) !important; }
.lux-stripe-blue .stat-icon   { color: var(--lp-info) !important; }
.lux-stripe-purple .stat-icon { color: var(--lp-gold-dark) !important; }
.lux-stripe-orange .stat-icon { color: var(--lp-warn-ink) !important; }

/* ── Icon color variants (backgrounds removed per kit) ── */
.stat-icon.icon-gold   { color: var(--lp-gold-ink); }
.stat-icon.icon-green  { color: var(--lp-ok); }
.stat-icon.icon-amber  { color: var(--lp-gold-ink); }
.stat-icon.icon-red    { color: var(--lp-err); }
.stat-icon.icon-blue   { color: var(--lp-info); }
.stat-icon.icon-purple { color: var(--lp-gold-dark); }
.stat-icon.icon-orange { color: var(--lp-warn-ink); }
.stat-icon.icon-teal   { color: var(--lp-ok); }

/* ── Colored value variants (optional) ── */
.stat-value-green  { color: var(--lp-ok) !important; }
.stat-value-red    { color: var(--lp-err) !important; }
.stat-value-amber  { color: var(--lp-warn) !important; }
.stat-value-blue   { color: var(--lp-info) !important; }

@media (max-width: 639px) {
    .lux-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .lux-stat-card {
        padding: 12px;
    }
    .lux-stat-card .stat-value {
        font-size: 18px;
    }
    .lux-stat-card .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}


/* ═══════════════════════════════════════════════════════
   3. FILTER BAR
   Unified container for search + filter dropdowns.
   Usage: <div class="lux-filter-bar">
   ═══════════════════════════════════════════════════════ */
.lux-filter-bar {
    background: var(--lux-surface);
    border-radius: var(--lux-card-radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--lux-subtle-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}
.lux-filter-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}
.lux-filter-bar .filter-field {
    flex: 1;
    min-width: 160px;
}
.lux-filter-bar .filter-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lux-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}
.lux-filter-bar .filter-field .input-lux,
.lux-filter-bar .filter-field input,
.lux-filter-bar .filter-field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--lux-subtle-border);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--lux-text-primary);
    background: var(--lux-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.lux-filter-bar .filter-field input:focus,
.lux-filter-bar .filter-field select:focus {
    outline: none;
    border-color: var(--lp-gold-ink);
    box-shadow: 0 0 0 3px rgba(179,166,134,.25);
}
.lux-filter-bar .filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: flex-end;
}
/* Filter bar buttons */
.lux-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.lux-filter-btn.primary {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
}
.lux-filter-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(179,166,134,.35);
    transform: translateY(-1px);
}
.lux-filter-btn.ghost {
    background: var(--lux-surface);
    color: var(--lux-text-secondary);
    border: 1px solid var(--lux-subtle-border);
}
.lux-filter-btn.ghost:hover {
    background: var(--lux-bg-wash);
}

@media (max-width: 767px) {
    .lux-filter-bar {
        padding: 1rem;
    }
    .lux-filter-bar .filter-field {
        min-width: 100%;
    }
    .lux-filter-bar .filter-actions {
        width: 100%;
    }
    .lux-filter-btn {
        flex: 1;
        justify-content: center;
    }
}


/* ── Filter Tabs (pill navigation) ───────────────── */
.lux-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.lux-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--lux-surface);
    border: 1px solid var(--lux-subtle-border);
    color: var(--lp-ink2);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.lux-filter-tab:hover {
    background: var(--lux-bg-wash);
    text-decoration: none;
    color: var(--lp-ink2);
}
.lux-filter-tab.active {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
    border-color: var(--lp-gold-ink);
}
.lux-filter-tab .count {
    font-size: 0.7rem;
    background: rgba(0,0,0,0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}
.lux-filter-tab.active .count {
    background: rgba(255,255,255,0.2);
}


/* ═══════════════════════════════════════════════════════
   4. RECORD TABLE
   Unified look for all admin list tables.
   Usage: <div class="lux-table-card">
   ═══════════════════════════════════════════════════════ */
.lux-table-card {
    background: var(--lux-surface);
    border-radius: var(--lux-card-radius);
    border: 1px solid var(--lux-subtle-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.lux-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lux-table {
    width: 100%;
    border-collapse: collapse;
}
.lux-table thead {
    background: var(--lux-bg-wash);
}
.lux-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lux-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    border-bottom: 1px solid var(--lux-subtle-border);
    white-space: nowrap;
}
.lux-table th.text-right { text-align: right; }
.lux-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--lp-ink2);
    border-bottom: 1px solid var(--lp-card2);
    vertical-align: middle;
}
.lux-table td.text-right { text-align: right; }
.lux-table tbody tr {
    transition: background 0.15s;
}
.lux-table tbody tr:hover {
    background: var(--lp-gold-tint);
}
.lux-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Clickable row ── */
.lux-table tbody tr.clickable-row {
    cursor: pointer;
}

/* ── Table action links ── */
.lux-table .table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--lux-text-secondary);
}
.lux-table .table-action:hover {
    background: var(--lp-gold-tint);
    color: var(--lp-gold-ink);
}
.lux-table .table-action.danger:hover {
    background: var(--lp-err-bg);
    color: var(--lp-err);
}

/* ── Column hide helpers ── */
@media (max-width: 767px) {
    .col-hide-sm { display: none !important; }
}
@media (max-width: 1023px) {
    .col-hide-md { display: none !important; }
}
@media (max-width: 1279px) {
    .col-hide-lg { display: none !important; }
}


/* ═══════════════════════════════════════════════════════
   5. MOBILE CARDS (alternative to table on small screens)
   Usage: <div class="lux-mobile-cards">
   ═══════════════════════════════════════════════════════ */
.lux-mobile-cards {
    display: none;
    padding: 1rem;
}
.lux-mobile-card {
    background: var(--lux-surface);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--lux-subtle-border);
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.lux-mobile-card:hover {
    border-color: var(--lp-gold-ink);
}
.lux-mobile-card .card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}
.lux-mobile-card .card-label {
    font-size: 0.75rem;
    color: var(--lux-text-muted);
    font-weight: 500;
}
.lux-mobile-card .card-value {
    font-size: 0.85rem;
    color: var(--lux-text-primary);
    font-weight: 500;
}

@media (max-width: 767px) {
    .lux-desktop-table { display: none !important; }
    .lux-mobile-cards  { display: block !important; }
}


/* ═══════════════════════════════════════════════════════
   6. PAGINATION
   Unified numbered pagination with gold active state.
   Usage: <div class="lux-pagination">
   ═══════════════════════════════════════════════════════ */
.lux-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
}
.lux-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--lux-subtle-border);
    background: var(--lux-surface);
    color: var(--lp-ink2);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.lux-page-btn:hover {
    border-color: var(--lp-gold-ink);
    color: var(--lp-gold-ink);
    text-decoration: none;
    background: var(--lp-gold-tint);
}
.lux-page-btn.active {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
    border-color: var(--lp-gold-ink);
}
.lux-page-btn.disabled {
    color: var(--lp-line);
    pointer-events: none;
    cursor: default;
}
.lux-page-info {
    font-size: 0.85rem;
    color: var(--lux-text-secondary);
    padding: 0 0.75rem;
}

@media (max-width: 479px) {
    .lux-pagination {
        gap: 0.125rem;
    }
    .lux-page-btn {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }
}


/* ═══════════════════════════════════════════════════════
   7. EMPTY STATE
   Consistent empty state for all list pages.
   Usage: <div class="lux-empty-state">
   ═══════════════════════════════════════════════════════ */
.lux-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}
.lux-empty-state .empty-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--lp-gold-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.lux-empty-state .empty-icon i {
    font-size: 1.75rem;
    color: var(--lp-gold-dark);
}
.lux-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--lux-text-primary);
    margin: 0 0 0.5rem;
}
.lux-empty-state p {
    color: var(--lux-text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}


/* ═══════════════════════════════════════════════════════
   8. STATUS BADGES
   Unified badge styles across all modules.
   Usage: <span class="lux-badge lux-badge-green">
   ═══════════════════════════════════════════════════════ */
.lux-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.lux-badge-green  { background: var(--lp-ok-bg); color: var(--lp-ok-ink); }
.lux-badge-red    { background: var(--lp-err-bg); color: var(--lp-err-ink); }
.lux-badge-amber  { background: var(--lp-gold-tint); color: var(--lp-warn-ink); }
.lux-badge-blue   { background: var(--lp-info-bg); color: var(--lp-info-ink); }
.lux-badge-gray   { background: var(--lp-card2); color: var(--lp-muted); }
.lux-badge-purple { background: var(--lp-gold-tint); color: var(--lp-gold-ink); }
.lux-badge-orange { background: var(--lp-warn-bg); color: var(--lp-warn-ink); }
.lux-badge-teal   { background: var(--lp-ok-bg); color: var(--lp-ok-ink); }


/* ═══════════════════════════════════════════════════════
   9. ACTION BUTTONS (for filter bars and headers)
   Unified button styles for consistency.
   ═══════════════════════════════════════════════════════ */
.lux-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}
/* Compact size modifier — combine: "lux-btn lux-btn-outline lux-btn-sm" */
.lux-btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    gap: 0.25rem;
    border-radius: 0.4rem;
}
.lux-btn-gold {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
}
.lux-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(179,166,134,.35);
    color: var(--lp-on-gold);
    text-decoration: none;
}
.lux-btn-outline {
    background: var(--lux-surface);
    color: var(--lp-ink2);
    border: 1px solid var(--lp-line);
}
.lux-btn-outline:hover {
    background: var(--lux-bg-wash);
    color: var(--lp-ink2);
    text-decoration: none;
}
.lux-btn-danger {
    background: var(--lp-err-bg);
    color: var(--lp-err-ink);
    border: 1px solid var(--lp-err-bg);
}
.lux-btn-danger:hover {
    background: var(--lp-err-bg);
    color: var(--lp-err-ink);
    text-decoration: none;
}
.lux-btn-primary {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
    border: 1px solid var(--lp-gold);
}
.lux-btn-primary:hover {
    background: var(--lp-gold-dark);
    color: var(--lp-on-gold);
    text-decoration: none;
}
.lux-btn-warning {
    background: var(--lp-gold-tint);
    color: var(--lp-warn-ink);
    border: 1px solid var(--lp-gold-line);
}
.lux-btn-warning:hover {
    background: var(--lp-gold-line);
    color: var(--lp-warn-ink);
    text-decoration: none;
}


/* ═══════════════════════════════════════════════════════
   10. SEARCH BOX (inline with filter tabs)
   ═══════════════════════════════════════════════════════ */
.lux-search-box {
    position: relative;
}
.lux-search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lux-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.lux-search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--lux-subtle-border);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lux-search-box input:focus {
    outline: none;
    border-color: var(--lp-gold-ink);
    box-shadow: 0 0 0 3px rgba(179,166,134,.25);
}


/* ═══════════════════════════════════════════════════════
   11. COMBINED FILTER + SEARCH TOOLBAR
   (filter tabs on left, search on right)
   ═══════════════════════════════════════════════════════ */
.lux-toolbar {
    background: var(--lux-surface);
    border-radius: var(--lux-card-radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--lux-subtle-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.lux-toolbar .lux-search-box {
    width: 100%;
    max-width: 280px;
}

@media (max-width: 767px) {
    .lux-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    .lux-toolbar .lux-search-box {
        max-width: none;
    }
}


/* ═══════════════════════════════════════════════════════
   12. STAT SUB-TEXT
   Small helper text beneath stat-value.
   ═══════════════════════════════════════════════════════ */
.lux-stat-card .stat-sub {
    font-size: 0.7rem;
    color: var(--lux-text-muted);
    margin: 0.125rem 0 0;
}

/* ── Extra stripe ── */
.lux-stripe-emerald::before { background: linear-gradient(90deg, var(--lp-ok), var(--lp-dot-green)); }


/* ═══════════════════════════════════════════════════════
   13. EXTRA BUTTON VARIANTS
   ═══════════════════════════════════════════════════════ */
.lux-btn-dark {
    background: var(--lp-sb);
    color: white;
}
.lux-btn-dark:hover {
    background: #3A362E;
    color: white;
    text-decoration: none;
}
.lux-btn-success {
    background: var(--lp-ok-bg);
    color: var(--lp-ok-ink);
    border: 1px solid var(--lp-ok-bg);
}
.lux-btn-success:hover {
    background: var(--lp-ok-bg);
    text-decoration: none;
}

/* ── Back link ── */
.lux-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--lux-bg-wash);
    color: var(--lux-text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    border: 1px solid var(--lux-subtle-border);
}
.lux-back-link:hover {
    background: var(--lp-gold-tint);
    color: var(--lp-gold-ink);
    text-decoration: none;
}


/* ═══════════════════════════════════════════════════════
   14. TABLE HEADER
   Consistent section header above table content.
   ═══════════════════════════════════════════════════════ */
.lux-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--lp-card2);
}
.lux-table-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lux-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Standalone table-action (outside .lux-table) ── */
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--lux-text-secondary);
}
.table-action:hover {
    background: var(--lp-gold-tint);
    color: var(--lp-gold-ink);
}
.table-action.danger:hover {
    background: var(--lp-err-bg);
    color: var(--lp-err);
}


/* ═══════════════════════════════════════════════════════
   15. FILTER BAR
   Horizontal filter form with labeled fields.
   ═══════════════════════════════════════════════════════ */
.lux-filter-bar {
    background: var(--lux-surface);
    border-radius: var(--lux-card-radius);
    border: 1px solid var(--lux-subtle-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.lux-filter-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.lux-filter-bar .filter-field {
    flex: 1;
    min-width: 0;
}
.lux-filter-bar .filter-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lux-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}
.lux-filter-bar .filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* ── Filter buttons ── */
.lux-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}
.lux-filter-btn.primary {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
}
.lux-filter-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(179,166,134,.35);
    color: var(--lp-on-gold);
    text-decoration: none;
}
.lux-filter-btn.ghost {
    background: var(--lp-card2);
    color: var(--lp-muted);
}
.lux-filter-btn.ghost:hover {
    background: var(--lp-line);
    color: var(--lp-ink2);
    text-decoration: none;
}

/* ── Pagination aliases (for simpler markup) ── */
.lux-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--lux-subtle-border);
    background: var(--lux-surface);
    color: var(--lp-ink2);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.lux-pagination .page-btn:hover {
    border-color: var(--lp-gold-ink);
    color: var(--lp-gold-ink);
    background: var(--lp-gold-tint);
}
.lux-pagination .page-btn.active {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
    border-color: var(--lp-gold-ink);
}
.lux-pagination .page-info {
    font-size: 0.85rem;
    color: var(--lux-text-secondary);
    padding: 0 0.75rem;
}

@media (max-width: 767px) {
    .lux-filter-bar form {
        flex-direction: column;
        align-items: stretch;
    }
    .lux-filter-bar .filter-field {
        width: 100%;
    }
    .lux-filter-bar .filter-actions {
        width: 100%;
    }
    .lux-filter-bar .filter-actions > * {
        flex: 1;
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════
   16. FORM CARDS
   Standard admin create/edit form layout.
   Usage:
     <div class="lux-form-card">
       <h2 class="lux-section-title"><i>…</i> Section</h2>
       <div class="lux-form-grid">
         <div class="lux-form-group [full-width]">
           <label class="lux-form-label">…<span class="required">*</span></label>
           <input class="input-lux">
           <div class="lux-form-help">…</div>
         </div>
       </div>
     </div>
     <div class="lux-form-actions">…</div>
   ═══════════════════════════════════════════════════════ */
.lux-form-card {
    background: var(--lux-surface);
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.lux-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--lux-text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lux-section-title i {
    color: var(--lp-gold-ink);
}
.lux-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.lux-form-group {
    margin-bottom: 1.5rem;
}
.lux-form-group.full-width {
    grid-column: 1 / -1;
}
.lux-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lp-ink2);
    margin-bottom: 0.5rem;
}
.lux-form-label .required {
    color: var(--lp-err);
    margin-left: 0.25rem;
}
.lux-form-help {
    font-size: 0.75rem;
    color: var(--lp-muted);
    margin-top: 0.25rem;
}
.lux-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--lp-line);
}

/* ── Property toggle card ── */
.lux-property-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--lp-line);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--lux-surface);
}
.lux-property-card:hover {
    border-color: var(--lp-gold-ink);
    background-color: var(--lp-card2);
}
.lux-property-card.selected {
    border-color: var(--lp-gold-ink);
    background-color: var(--lp-gold-tint);
    box-shadow: 0 0 0 2px rgba(179,166,134,.22);
}
.lux-property-card .property-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.lux-property-card .property-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: white;
    flex-shrink: 0;
}
.lux-property-card .property-info {
    flex: 1;
}
.lux-property-card .property-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lp-ink);
    margin-bottom: 0.125rem;
}
.lux-property-card .property-desc {
    font-size: 0.75rem;
    color: var(--lp-muted);
}
.lux-property-card .checkmark {
    width: 1rem;
    height: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    color: var(--lp-gold-ink);
}
.lux-property-card.selected .checkmark {
    opacity: 1;
}

@media (max-width: 768px) {
    .lux-form-grid {
        grid-template-columns: 1fr;
    }
    .lux-form-card {
        padding: 1.25rem;
    }
    .lux-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .lux-form-actions > * {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Shared confirm dialog (window.luxConfirm — static/js/lux-ui.js)
   Brand gold/amber, matches DESIGN_RULES. One place to restyle every confirm.
   ───────────────────────────────────────────────────────────────────────── */
.lux-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,18,14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 1rem;
    animation: luxConfirmFade 0.15s ease-out;
}
@keyframes luxConfirmFade { from { opacity: 0; } to { opacity: 1; } }
.lux-confirm-box {
    background: var(--lp-card, #fff);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(179,166,134, 0.25);
    max-width: 26rem;
    width: 100%;
    padding: 1.5rem;
}
.lux-confirm-title {
    font-weight: 600;
    color: var(--lp-ink);
    margin: 0 0 0.5rem;
}
.lux-confirm-message {
    color: var(--lp-ink2);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.lux-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
}
.lux-confirm-btn {
    border: none;
    border-radius: 0.625rem;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
}
.lux-confirm-btn-cancel {
    background: var(--lp-bg2);
    color: var(--lp-ink2);
}
.lux-confirm-btn-cancel:hover { background: var(--lp-line); }
.lux-confirm-btn-primary {
    background: var(--lp-gold);
    color: var(--lp-on-gold);
}
.lux-confirm-btn-primary:hover { filter: brightness(1.05); }
.lux-confirm-btn-danger {
    background: var(--lp-err);
    color: #ffffff;
}
.lux-confirm-btn-danger:hover { filter: brightness(1.05); }
