/* ═══════════════════════════════════════════════════════════════════
   Unified Table Design — site-wide consistent look for every Bootstrap
   `.table` element. Override-only stylesheet: no structural changes,
   just visual polish. Specific custom tables (.ao-tbl, .at-tbl, etc.)
   retain their own styles because they have higher specificity.

   Loaded globally via Admin/layouts/header.blade.php so every admin
   page table picks it up automatically.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Base table shell ───────────────────────────────────────────── */
.table {
    margin: 0;
    border-collapse: separate !important;
    border-spacing: 0;
    background: #fff;
    font-size: 13px;
    color: #1e293b;
}

/* Header — soft lavender gradient + uppercase compact labels */
.table > thead > tr,
.table thead tr {
    background: linear-gradient(180deg, #f5f7ff 0%, #eef2ff 100%);
}
.table > thead > tr > th,
.table thead th {
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #475569;
    border-top: 0;
    border-bottom: 2px solid #c7d2fe !important;
    border-left: 0;
    border-right: 0;
    white-space: nowrap;
    vertical-align: middle;
    background: transparent;
}

/* Body cells — bottom-border-only, clean padding */
.table > tbody > tr > td,
.table tbody td {
    padding: 12px 14px;
    font-size: 13px;
    color: #1e293b;
    vertical-align: middle;
    border-top: 0 !important;
    border-bottom: 1px solid #eef1fb;
    border-left: 0;
    border-right: 0;
    background: #fff;
}
.table > tbody > tr:last-child > td,
.table tbody tr:last-child td {
    border-bottom: 0;
}

/* Hover — subtle lavender tint */
.table.table-hover > tbody > tr:hover > td,
.table.table-hover tbody tr:hover td {
    background: #fbfcff;
}

/* Borderless look — kill vertical lines from .table-bordered */
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td {
    border-left: 0 !important;
    border-right: 0 !important;
}
.table-bordered {
    border: 0 !important;
}
.table-bordered > thead > tr > th {
    border-bottom: 2px solid #c7d2fe !important;
    border-top: 0 !important;
}
.table-bordered > tbody > tr > td {
    border-bottom: 1px solid #eef1fb !important;
    border-top: 0 !important;
}

/* Striped — subtle */
.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped tbody tr:nth-of-type(odd) td {
    background: #fbfcff;
}

/* Table wrapper — soft rounding + scrollbar tidy */
.table-responsive {
    border-radius: 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

/* ── Utility helpers for inline badges/refs ─────────────────────── */
/* Thin badge styling for references, PNRs, and similar short codes
   inside tables (opt-in via class). Doesn't affect anything unless
   a view author adds these classes. */
.tbl-ref {
    display: inline-block;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 11.5px; font-weight: 700; color: #04107C;
    background: rgba(4,16,124,.08);
    padding: 4px 9px; border-radius: 5px;
    letter-spacing: .3px; white-space: nowrap;
}
.tbl-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
    padding: 4px 11px; border-radius: 5px;
    text-transform: uppercase; white-space: nowrap;
}

/* ── DataTables — keep its own layout but soften borders ────────── */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
table.dataTable thead th {
    border-bottom: 2px solid #c7d2fe !important;
    background: linear-gradient(180deg, #f5f7ff 0%, #eef2ff 100%);
    color: #475569;
}
table.dataTable tbody td {
    border-top: 0 !important;
    border-bottom: 1px solid #eef1fb;
}

/* Small action buttons inside tables — consistent 5px corners */
.table .btn,
.table .btn-sm {
    border-radius: 5px;
}

/* Responsive — slightly tighter padding on narrow screens */
@media (max-width: 576px) {
    .table > thead > tr > th,
    .table thead th {
        padding: 10px 10px;
        font-size: 10.5px;
    }
    .table > tbody > tr > td,
    .table tbody td {
        padding: 10px 10px;
        font-size: 12.5px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Site-wide 5px corner radius — all buttons + all cards.
   Applied with !important to override Bootstrap / Adminty defaults.
   Fully-round utility badges opt out by setting their own
   `border-radius: 999px` (rare — most of our pills are already 5px).
   ═══════════════════════════════════════════════════════════════════ */
.btn,
.btn-sm,
.btn-lg,
.btn-xs,
button.btn,
input[type="button"].btn,
input[type="submit"].btn,
input[type="reset"].btn {
    border-radius: 5px !important;
}

.card,
.card-header,
.card-footer,
.card-body,
.panel,
.panel-heading,
.panel-body,
.panel-footer {
    border-radius: 5px;
}

/* Bootstrap badges (success / info / warning / danger / primary) — 5px */
.badge,
.badge-pill,
.badge-success,
.badge-info,
.badge-warning,
.badge-danger,
.badge-primary,
.badge-secondary,
.badge-light,
.badge-dark {
    border-radius: 5px !important;
}
.card > .card-header:first-child { border-top-left-radius: 5px; border-top-right-radius: 5px; }
.card > .card-footer:last-child   { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }

/* ═══════════════════════════════════════════════════════════════════
   Owner 2026-10-28 ('sokol table e same vabe border dao' / 'sokol table e
   identical border dao'): EVERY list table on the admin pages -- any table
   with a header row, Bootstrap or custom -- gets one identical ruled grid:
   a light frame with rounded corners, a line under every row and between
   columns; rows stay white. Invoice / ticket / print layouts (summary,
   info, signature, itinerary, amount strips ...), the e-mail reader and
   editor content keep their own look; add class "no-grid" to opt out.
   ═══════════════════════════════════════════════════════════════════ */
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) {
    border: 1px solid #dbe2f1 !important;
    border-radius: 6px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > thead > tr > th, :is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > thead > tr > td {
    border-top: 0 !important; border-left: 0 !important;
    border-bottom: 1px solid #c7d2fe !important;
    border-right: 1px solid #dbe2f1 !important;
}
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tbody > tr > td, :is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tbody > tr > th, :is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tfoot > tr > td, :is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tfoot > tr > th {
    border-top: 0 !important; border-left: 0 !important;
    border-bottom: 1px solid #e3e8f4 !important;
    border-right: 1px solid #e3e8f4 !important;
}
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > * > tr > *:last-child { border-right: 0 !important; }
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tbody:last-child > tr:last-child > *, :is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > tfoot > tr:last-child > * { border-bottom: 0 !important; }
/* rounded header corners (no overflow:hidden -- row action menus must not clip) */
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > thead > tr:first-child > *:first-child { border-top-left-radius: 6px; }
:is(.pcoded-content, .modal) table:has(> thead):not(:is(.summary-table,.info-table,.top-bar-table,.detail-table,.sig-table,.amount-strip-table,.itin-table,.mi-topbar-table,.mi-strip-table,.mi-items,.mi-sig-table,.strip-table,.net-strip-table,.sign-table,.two-table,.fdp-fare-table,.ie-fare-tbl,.ri-quot-tbl,.svc-price-table,.ac-variation-table,.pax-table,.info-tbl,.info-grid,.gap-grid,.no-grid)):not(:is(.ml-card, .ck-content, .no-grid) table) > thead > tr:first-child > *:last-child  { border-top-right-radius: 6px; }
/* Owner 2026-10-29 ('table er ekhane 2 ta border hoye gese / 1 ta koro'): the
   table frame is the one line above the pager; the footer adds no second rule. */
.pcoded-content .card-footer:has(.td-pgn) { border-top: 0 !important; }
/* table-grid.js marks: .tg-last = last visible row (hidden rows after it), .tg-hugged = table edge-to-edge in a bordered box */
:is(.pcoded-content, .modal) table:is(table, #tg, #tg) > * > tr.tg-last > * { border-bottom: 0 !important; }
:is(.pcoded-content, .modal) table.tg-hugged:is(table, #tg, #tg) { border: 0 !important; border-radius: 0 !important; }
:is(.pcoded-content, .modal) table.tg-hugged:is(table, #tg, #tg) > thead > tr:first-child > * { border-radius: 0 !important; }
