/* =============================================================
   Travels Pro SaaS - Custom Styles
   Bootstrap 5 + Bootstrap Icons
   ============================================================= */
:root {
    --tp-primary: #2563eb;
    --tp-primary-light: #eff6ff;
    --tp-primary-dark: #1d4ed8;
    --tp-sidebar-bg: #0f172a;
    --tp-sidebar-hover: #1e293b;
    --tp-sidebar-active: #2563eb;
    --tp-header-h: 64px;
    --tp-sidebar-w: 260px;
    --tp-shadow-sm: 0 1px 3px rgba(15,23,42,.06);
    --tp-shadow-md: 0 4px 12px rgba(15,23,42,.08);
    --tp-shadow-lg: 0 8px 24px rgba(15,23,42,.12);
    --tp-radius: 12px;
    --tp-radius-lg: 16px;
    --tp-transition: .2s ease;

    /* Align Bootstrap palette with the app theme blue */
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-primary-bg-subtle: #eff6ff;
    --bs-primary-border-subtle: #bfdbfe;
    --bs-link-color: #2563eb;
    --bs-link-color-rgb: 37, 99, 235;
    --bs-link-hover-color: #1d4ed8;
    --bs-link-hover-color-rgb: 29, 78, 216;
    --bs-btn-primary-bg: #2563eb;
    --bs-btn-primary-border-color: #2563eb;
    --bs-btn-primary-hover-bg: #1d4ed8;
    --bs-btn-primary-hover-border-color: #1d4ed8;
    --bs-pagination-active-bg: #2563eb;
    --bs-pagination-active-border-color: #2563eb;
    --bs-pagination-color: #2563eb;
    --bs-pagination-hover-color: #1d4ed8;
    --bs-pagination-focus-color: #2563eb;
}

* { scrollbar-width: thin; }

body {
    background: #f0f2f5;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #334155;
    overflow-x: hidden;
    line-height: 1.6;
}

/* =============================================================
   AUTH PAGES
   ============================================================= */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 50%, #3b82f6 100%);
    padding: 16px;
}
.auth-wrap { width: 100%; max-width: 430px; }
.auth-card { border-radius: var(--tp-radius-lg); overflow: hidden; border: none; }
.auth-card .card-body { padding: 32px 28px; }
.auth-logo {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
}

/* =============================================================
   ADMIN LAYOUT - SIDEBAR
   ============================================================= */
.tp-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--tp-sidebar-w);
    background: var(--tp-sidebar-bg);
    color: #cbd5e1;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform var(--tp-transition);
}
.tp-brand {
    height: var(--tp-header-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    overflow: hidden;
}
.tp-brand i { font-size: 24px; color: var(--tp-primary); }
.tp-brand img { height: 36px; max-width: 140px; object-fit: contain; filter: brightness(0) invert(1); }
.tp-brand small { display: block; font-weight: 400; font-size: 11px; color: #94a3b8; }
.tp-sidebar-scroll { overflow-y: auto; flex: 1; padding: 8px 0 24px; }
.tp-nav-section {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #64748b; padding: 16px 20px 6px; font-weight: 600;
}
.tp-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px; margin: 1px 8px; border-radius: 8px;
    color: #cbd5e1; text-decoration: none; font-size: 14px;
    transition: all var(--tp-transition);
}
.tp-nav-item i { font-size: 17px; width: 20px; text-align: center; }
.tp-nav-item:hover { background: var(--tp-sidebar-hover); color: #fff; transform: translateX(2px); }
.tp-nav-item.active { background: var(--tp-sidebar-active); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.tp-nav-item.active .badge { background: #fff; color: var(--tp-sidebar-active); }
.tp-nav-item .badge { margin-left: auto; }
.tp-sidebar-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.5);
    backdrop-filter: blur(2px); z-index: 1035; display: none;
}

/* =============================================================
   HEADER
   ============================================================= */
.tp-header {
    position: fixed;
    top: 0; right: 0; left: var(--tp-sidebar-w);
    height: var(--tp-header-h);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    z-index: 1030;
    box-shadow: var(--tp-shadow-sm);
}
.tp-page-title { font-size: 17px; font-weight: 700; margin: 0; color: #0f172a; min-width: 0; flex-shrink: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-header-search { position: relative; flex: 0 1 340px; }
.tp-header-search input { padding-left: 34px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; }
.tp-header-search input:focus { background: #fff; border-color: var(--tp-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.tp-header-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.tp-header-search .dropdown-menu { position: absolute; left: 0; z-index: 2000; max-height: 320px; overflow-y: auto; border-radius: var(--tp-radius); border: 1px solid #e2e8f0; box-shadow: var(--tp-shadow-lg); }
.tp-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tp-icon-btn {
    width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: #475569; position: relative;
    transition: all var(--tp-transition);
}
.tp-icon-btn:hover { background: #f1f5f9; color: var(--tp-primary); transform: translateY(-1px); }
.tp-icon-btn .tp-badge {
    position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px;
    font-size: 10px; border-radius: 50%; background: #dc2626; color: #fff;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
    animation: tp-pulse 2s infinite;
}
@keyframes tp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.tp-user-name { font-size: 14px; font-weight: 600; line-height: 1.1; color: #0f172a; }
.tp-user-role { font-size: 12px; color: #64748b; }

/* =============================================================
   FLASH / TOAST MESSAGES
   ============================================================= */
.tp-toast-wrapper {
    position: fixed;
    top: calc(var(--tp-header-h) + 12px);
    left: var(--tp-sidebar-w);
    right: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
}
.tp-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 46px 12px 20px;
    border-radius: var(--tp-radius);
    border: none;
    pointer-events: auto;
    min-width: 300px;
    max-width: 560px;
    animation: tp-slideDown .35s ease;
}
.tp-toast-icon { font-size: 20px; flex-shrink: 0; }
.tp-toast-msg { font-size: 14px; font-weight: 500; }
@keyframes tp-slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tp-flash { display: none; }

/* =============================================================
   CONTENT AREA
   ============================================================= */
.tp-content {
    margin-left: var(--tp-sidebar-w);
    padding: calc(var(--tp-header-h) + 24px) 24px 48px;
    min-height: 100vh;
}

/* Sidebar toggling */
body.sidebar-collapsed .tp-sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .tp-content { margin-left: 0; }
body.sidebar-collapsed .tp-header { left: 0; }
body.sidebar-collapsed .tp-toast-wrapper { left: 0; }
body.sidebar-open .tp-sidebar { transform: translateX(0); }
body.sidebar-open .tp-sidebar-overlay { display: block; }

/* =============================================================
   CARDS
   ============================================================= */
.tp-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-sm);
    transition: box-shadow var(--tp-transition);
}
.tp-card:hover { box-shadow: var(--tp-shadow-md); }
.tp-card .card-header {
    background: #f9fafb;
    border-bottom: 1px solid #eef1f6;
    font-weight: 700; color: #0f172a;
    padding: 14px 20px;
    border-radius: var(--tp-radius-lg) var(--tp-radius-lg) 0 0;
}
.tp-card .card-body { padding: 22px; }

/* =============================================================
   STAT CARDS (Dashboard + Module Stats)
   ============================================================= */
.tp-stat { display: flex; align-items: center; gap: 14px; }
.tp-stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.tp-stat-value { font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.tp-stat-label { font-size: 13px; color: #64748b; margin-top: 2px; }
.tp-stat-card {
    border-radius: var(--tp-radius-lg);
    padding: 18px 20px;
    box-shadow: var(--tp-shadow-sm);
    display: flex; flex-direction: column; gap: 4px;
    transition: transform var(--tp-transition), box-shadow var(--tp-transition);
}
.tp-stat-card:hover { transform: translateY(-2px); box-shadow: var(--tp-shadow-md); }

/* =============================================================
   FORM STYLING
   ============================================================= */

/* Form cards — generous padding */
.tp-card form .mb-3,
.tp-card form .mb-2,
.tp-card form .mb-1,
.tp-card form .row {
    margin-bottom: 0;
}
.tp-card .card-body form { display: flex; flex-direction: column; gap: 0; }

/* Labels */
.tp-card .form-label,
.tp-card label.form-label,
.tp-card label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    font-size: 13px;
}

/* Inputs, selects, textareas */
.tp-card .form-control,
.tp-card .form-select,
.tp-card .form-control-sm,
.tp-card .form-select-sm {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all var(--tp-transition);
    background: #f9fafb;
}
.tp-card .form-control:focus,
.tp-card .form-select:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    background: #fff;
}
.tp-card .form-control-sm,
.tp-card .form-select-sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
}

/* Input groups */
.tp-card .input-group {
    border-radius: 10px;
    overflow: hidden;
}
.tp-card .input-group .input-group-text {
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    color: #64748b;
    font-size: 14px;
}
.tp-card .input-group .form-control {
    border-left: none;
}
.tp-card .input-group .form-control:focus + .input-group-text,
.tp-card .input-group .form-control:focus ~ .input-group-text {
    border-color: var(--tp-primary);
}

/* Select with form */
.tp-card select.form-select,
.tp-card select.form-select-sm {
    appearance: auto;
}

/* Form row spacing inside cards */
.tp-card .row > .col-md-6,
.tp-card .row > .col-md-4,
.tp-card .row > .col-md-3,
.tp-card .row > .col-6,
.tp-card .row > .col-12,
.tp-card .row > .col-lg-6,
.tp-card .row > .col-lg-4 {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Horizontal form layouts */
.tp-card .row.g-2,
.tp-card .row.g-3 {
    row-gap: 12px !important;
}

/* =============================================================
   MODULE TABS
   ============================================================= */
.tp-tabs {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
    background: #fff; border: 1px solid #e8ecf1; border-radius: var(--tp-radius-lg);
    padding: 6px;
}
.tp-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px;
    color: #475569; text-decoration: none;
    font-size: 13.5px; font-weight: 600; white-space: nowrap;
    transition: all var(--tp-transition);
}
.tp-tab:hover { background: #f1f5f9; color: #0f172a; }
.tp-tab.active { background: var(--tp-primary); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25); }

/* =============================================================
   TABLES
   ============================================================= */
.table thead th {
    background: #f8fafc; color: #475569; font-size: 12px; text-transform: uppercase;
    letter-spacing: .05em; border-bottom-width: 1px; white-space: nowrap;
    font-weight: 700; padding: 12px 14px;
}
.table tbody td { vertical-align: middle; font-size: 14px; padding: 12px 14px; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-sm thead th { padding: 8px 12px; }
.table-sm tbody td { padding: 8px 12px; }

/* Tables -> cards on small screens */
@media (max-width: 767.98px) {
    .table-cards { width: 100%; }
    .table-cards thead { display: none; }
    .table-cards tbody { display: block; width: 100%; }
    .table-cards tbody tr {
        display: block; background: #fff;
        border: 1px solid #e8ecf1; border-radius: var(--tp-radius-lg);
        box-shadow: var(--tp-shadow-sm);
        padding: 6px 14px; margin-bottom: 14px;
    }
    .table-cards tbody tr:last-child { margin-bottom: 0; }
    .table-cards tbody td {
        display: flex; align-items: center; justify-content: space-between;
        gap: 12px; padding: 9px 0; border: 0; border-bottom: 1px dashed #f1f5f9;
        font-size: 14px; text-align: right; white-space: normal;
    }
    .table-cards tbody td::before {
        content: attr(data-label);
        font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
        color: #94a3b8; flex: 0 0 auto; max-width: 46%; text-align: left;
    }
    .table-cards tbody td:first-child::before { color: var(--tp-primary); }
    .table-cards tbody td:last-child { border-bottom: 0; }
    .table-cards tbody td[colspan] {
        display: block; text-align: center; padding: 14px; color: #64748b;
    }
    .table-cards tbody td[colspan]::before { display: none; }
    .table-cards tbody td:has(.btn) {
        display: block; text-align: left; padding-top: 10px;
        border-top: 1px solid #f1f5f9; border-bottom: 0;
    }
    .table-cards tbody td:has(.btn)::before { display: none; }
    .table-cards tbody td .btn { margin: 2px 4px 2px 0; }
    .table-cards tbody td .badge { white-space: normal; }
    .table-cards tbody td img { max-width: 100%; height: auto; }
}

/* =============================================================
   TIMELINE
   ============================================================= */
.tp-timeline { position: relative; padding-left: 22px; }
.tp-timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: #e2e8f0; }
.tp-timeline-item { position: relative; margin-bottom: 18px; }
.tp-timeline-item::before {
    content: ""; position: absolute; left: -22px; top: 4px; width: 14px; height: 14px;
    border-radius: 50%; background: #fff; border: 3px solid var(--tp-primary); box-sizing: border-box;
}
.tp-timeline-item.success::before { border-color: #22c55e; }
.tp-timeline-item.warning::before { border-color: #f59e0b; }
.tp-timeline-item.danger::before { border-color: #ef4444; }

/* =============================================================
   SEARCH / FILTER BAR
   ============================================================= */
.tp-search-filter-bar {
    background: #fff; border: 1px solid #e8ecf1;
    border-radius: var(--tp-radius-lg); padding: 16px 18px;
    box-shadow: var(--tp-shadow-sm);
}
.tp-search-filter-bar .form-control,
.tp-search-filter-bar .form-select {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
}
.tp-search-filter-bar .form-control:focus,
.tp-search-filter-bar .form-select:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    background: #fff;
}

/* =============================================================
   NOTE BLOCK
   ============================================================= */
.tp-note {
    background: #f8fafc; border: 1px solid #e8ecf1;
    border-left: 4px solid var(--tp-primary);
    border-radius: 8px; padding: 12px 14px; font-size: 14px;
}

/* =============================================================
   BUTTONS — Enhanced
   ============================================================= */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
    transition: all var(--tp-transition);
}
.btn-sm {
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
}
.btn-primary {
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
    transform: translateY(-1px);
}
.btn-outline-primary:hover { transform: translateY(-1px); }
.btn-outline-secondary:hover { transform: translateY(-1px); }
.btn-success { box-shadow: 0 2px 8px rgba(22,163,74,.25); }
.btn-danger { box-shadow: 0 2px 8px rgba(220,38,38,.25); }
.btn-warning { box-shadow: 0 2px 8px rgba(245,158,11,.25); }
.btn.is-blocked { opacity: .55; cursor: not-allowed; }
.btn.is-blocked:hover { opacity: .55; }

/* =============================================================
   BADGES
   ============================================================= */
.badge {
    font-weight: 600;
    letter-spacing: .02em;
    padding: 4px 10px;
    border-radius: 6px;
}

/* =============================================================
   CALENDAR
   ============================================================= */
.calendar-grid td { vertical-align: top; }
.calendar-today { background: #eff6ff; border-radius: 8px; }

/* =============================================================
   PIPELINE (Sales) — Kanban board
   ============================================================= */
.tp-pipeline {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: flex-start;
    padding: 4px 0 12px;
    width: 100%;
}

.tp-pipe-col {
    flex: 1 1 0;
    min-width: 0;
    background: #f1f5f9;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    display: flex;
    flex-direction: column;
}
.tp-pipe-head {
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    border-top: 3px solid var(--col-accent, var(--tp-primary));
    padding: 10px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}
.tp-pipe-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: #0f172a; min-width: 0; }
.tp-pipe-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--col-accent, var(--tp-primary)); flex-shrink: 0; }
.tp-pipe-title .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-pipe-meta { text-align: right; flex-shrink: 0; }
.tp-pipe-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    background: var(--col-accent, var(--tp-primary)); color: #fff; font-size: 11px; font-weight: 700;
}
.tp-pipe-total { display: block; font-size: 11px; color: #64748b; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tp-pipe-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; flex: 1; }
.tp-pipe-empty {
    text-align: center; color: #94a3b8; font-size: 12.5px;
    padding: 22px 10px; border: 1.5px dashed #cbd5e1; border-radius: 12px;
}

/* Deal card */
.tp-deal {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 13px;
    padding: 11px 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
    transition: transform var(--tp-transition), box-shadow var(--tp-transition), border-color var(--tp-transition);
}
.tp-deal:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(15,23,42,.30); border-color: #dbe3ec; }
.tp-deal-top { display: flex; align-items: center; gap: 10px; }
.tp-deal-avatar {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700; color: #fff; letter-spacing: .3px;
}
.tp-deal-main { min-width: 0; flex: 1; }
.tp-deal-name { font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-deal-amount { font-size: 12.5px; font-weight: 700; color: var(--tp-primary); font-variant-numeric: tabular-nums; margin-top: 1px; }
.tp-deal-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 9px; font-size: 11.5px; color: #64748b; }
.tp-deal-meta > span { display: inline-flex; align-items: center; white-space: nowrap; }
.tp-deal-meta i { color: #94a3b8; margin-right: 4px; font-size: 11px; }
.tp-deal-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #eef1f6; }
.tp-deal-actions form { display: inline-flex; margin: 0; }
.tp-deal-actions .btn { --bs-btn-padding-y: 2px; --bs-btn-padding-x: 8px; line-height: 1.4; }

/* KPI cards (sales & dashboards) */
.tp-kpi {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: var(--tp-radius-lg);
    padding: 16px 18px;
    box-shadow: var(--tp-shadow-sm);
    overflow: hidden;
    transition: transform var(--tp-transition), box-shadow var(--tp-transition);
}
.tp-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kpi-accent, var(--tp-primary)); }
.tp-kpi:hover { transform: translateY(-2px); box-shadow: var(--tp-shadow-md); }
.tp-kpi-icon {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    background: var(--kpi-accent, var(--tp-primary));
    box-shadow: 0 8px 16px -8px var(--kpi-accent, var(--tp-primary));
}
.tp-kpi-body { min-width: 0; }
.tp-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #94a3b8; }
.tp-kpi-value { font-size: 20px; font-weight: 800; color: #0f172a; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-kpi-sub { font-size: 11.5px; color: #64748b; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 991.98px) {
    .tp-pipeline { flex-direction: column; gap: 12px; }
    .tp-pipe-col { width: 100%; max-width: 100%; flex: none; }
    .tp-pipeline.tp-pipe-filtered .tp-pipe-col { display: none; }
    .tp-pipeline.tp-pipe-filtered .tp-pipe-col.is-active { display: flex; }
}
@media (max-width: 575.98px) {
    .tp-kpi { padding: 13px 14px; gap: 11px; }
    .tp-kpi-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }
    .tp-kpi-value { font-size: 16px; }
    .tp-kpi-label { font-size: 10px; }
    .tp-kpi-sub { font-size: 11px; }
}

/* =============================================================
   NOTIFICATION DROPDOWN
   ============================================================= */
.notif-menu { width: 340px; max-width: 92vw; max-height: 430px; overflow-y: auto; border-radius: var(--tp-radius); }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #f1f5f9; transition: background var(--tp-transition); }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; }
.notif-dot { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }

/* =============================================================
   PRINT
   ============================================================= */
@media print {
    .tp-sidebar, .tp-header, .tp-toast-wrapper, .no-print { display: none !important; }
    .tp-content > .alert, .tp-content > .tp-banner { display: none !important; }
    .tp-content { margin: 0; padding: 16px; }
    .tp-card { box-shadow: none; border: 1px solid #ddd; }
    .tp-card img[alt="Logo"] { max-height: 60px !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 991.98px) {
    .tp-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .tp-content { margin-left: 0; }
    .tp-header { left: 0; }
    .tp-toast-wrapper { left: 0; }
    .tp-header-search { display: none; }
    .tp-user-name, .tp-user-role { display: none; }
}
@media (min-width: 992px) {
    .tp-sidebar-overlay { display: none !important; }
}

/* 15-inch laptop: 1366x768 — tighten spacing */
@media (min-width: 992px) and (max-width: 1400px) {
    .tp-content { padding: calc(var(--tp-header-h) + 16px) 20px 40px; }
    .tp-stat-card { padding: 16px 18px; }
    .tp-stat-value { font-size: 22px; }
    .tp-header-search { flex: 0 1 260px; }
    .tp-page-title { font-size: 15px; }
    .tp-card .card-body { padding: 18px; }
}

/* Full HD 1920+ — constrain content width, center it */
@media (min-width: 1401px) {
    .tp-content {
        max-width: 1400px;
        margin-left: var(--tp-sidebar-w);
        margin-right: auto;
        padding: calc(var(--tp-header-h) + 28px) 32px 48px;
    }
    body.sidebar-collapsed .tp-content { margin-left: auto; margin-right: auto; }
}

@media (max-width: 575.98px) {
    .tp-content { padding: calc(var(--tp-header-h) + 16px) 12px 40px; }
    .tp-header { padding: 0 12px; gap: 8px; }
    .tp-toast-wrapper { padding: 0 12px; }
    .tp-stat-value { font-size: 19px; }
    .tp-stat-card { padding: 14px 16px; }
    .tp-tabs { flex-wrap: wrap; }
    .tp-tab { padding: 7px 10px; font-size: 13px; }
    .tp-page-title { font-size: 15px; }
    .d-flex .btn-group .btn { font-size: 12px; }
    .tp-card .card-body { padding: 16px; }
}

/* Table readability on all laptop screens */
@media (min-width: 992px) {
    .table { font-size: 14px; }
    .table th { font-size: 13px; white-space: nowrap; }
    .table td { vertical-align: middle; }
    .tp-inline-status .tp-status-trigger { font-size: 11px; padding: 3px 8px; }
}

/* =============================================================
   SUPER ADMIN LAYOUT
   ============================================================= */
.tp-layout { min-height: 100vh; }
.tp-sidebar-brand {
    height: var(--tp-header-h);
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; color: #fff; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap; overflow: hidden; flex-shrink: 0;
}
.tp-sidebar-brand i { font-size: 24px; }
.tp-sidebar-brand em { font-style: normal; font-size: 11px; font-weight: 400; }
.tp-nav { list-style: none; margin: 0; padding: 8px; }
.tp-nav li a {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px; margin: 1px 0; border-radius: 8px;
    color: #cbd5e1; text-decoration: none; font-size: 14px;
    transition: all var(--tp-transition);
}
.tp-nav li a:hover { background: var(--tp-sidebar-hover); color: #fff; }
.tp-nav li a.active { background: var(--tp-sidebar-active); color: #fff; }
.tp-main { min-height: 100vh; }
.tp-topbar {
    position: fixed; top: 0; right: 0; left: var(--tp-sidebar-w);
    height: var(--tp-header-h); background: #fff;
    border-bottom: 1px solid #e2e8f0; z-index: 1030;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
}
.tp-content-heading h5 { font-weight: 700; color: #0f172a; }
@media (max-width: 991.98px) {
    .tp-topbar { left: 0; }
}

/* =============================================================
   PUBLIC STOREFRONT
   ============================================================= */
.sf-navbar {
    position: sticky; top: 0; z-index: 1020;
    background: var(--tp-sidebar-bg); color: #fff;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    box-shadow: var(--tp-shadow-md);
}
.sf-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; text-decoration: none; font-size: 16px; }
.sf-brand i { color: var(--tp-primary); font-size: 20px; }
.sf-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 50%, #3b82f6 100%);
    color: #fff; padding: 64px 20px; text-align: center;
}
.sf-hero h1 { font-weight: 800; margin-bottom: 6px; }
.sf-hero p { opacity: .9; margin-bottom: 18px; font-size: 17px; }
.sf-cover {
    height: 190px; display: flex; align-items: center; justify-content: center;
    font-size: 44px; color: #fff;
    background: linear-gradient(135deg, #2563eb, #6f42c1);
    border-radius: var(--tp-radius-lg) var(--tp-radius-lg) 0 0;
}
.sf-card {
    height: 100%; transition: transform .2s, box-shadow .2s;
    border: none; border-radius: var(--tp-radius-lg);
    box-shadow: var(--tp-shadow-sm);
}
.sf-card:hover { transform: translateY(-4px); box-shadow: var(--tp-shadow-lg); }
.sf-price { font-size: 20px; font-weight: 800; color: var(--tp-primary); }
.sf-muted { color: #64748b; }
.sf-off { text-align: center; padding: 80px 20px; }
.sf-navlink { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: 14px; padding: 4px 8px; border-radius: 8px; }
.sf-navlink:hover, .sf-navlink.active { color: #fff; background: rgba(255,255,255,.12); }
.sf-navbar .dropdown-menu { font-size: 14px; }
.sf-type-card { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; transition: transform .2s, box-shadow .2s; height: 100%; color: inherit; }
.sf-type-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.sf-type-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.sf-airline-logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg,#2563eb,#6f42c1); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* =============================================================
   UTILITY CLASSES
   ============================================================= */
.tp-fs-13 { font-size: 13px; }
.tp-text-muted { color: #64748b; }
.cursor-pointer { cursor: pointer; }

/* =============================================================
   CUSTOM STATUS DROPDOWN
   ============================================================= */
.tp-status-dropdown {
    position: relative;
    display: inline-block;
}
.tp-status-dropdown .tp-status-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 20px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
    user-select: none;
    min-width: 80px;
    justify-content: center;
}
.tp-status-dropdown .tp-status-trigger:hover {
    filter: brightness(.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.tp-status-dropdown .tp-status-trigger .tp-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tp-status-dropdown .tp-status-trigger .bi {
    font-size: 10px;
    margin-left: 2px;
    opacity: .6;
}
.tp-status-dropdown .tp-status-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1050;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    padding: 6px;
    animation: tp-dropIn .15s ease;
}
.tp-status-dropdown.open .tp-status-menu {
    display: block;
}
@keyframes tp-dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.tp-status-dropdown .tp-status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: background .1s;
    color: #1e293b;
    white-space: nowrap;
}
.tp-status-dropdown .tp-status-option:hover {
    background: #f1f5f9;
}
.tp-status-dropdown .tp-status-option.active {
    background: #eff6ff;
    font-weight: 700;
}
.tp-status-dropdown .tp-status-option .tp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status colors — trigger + dot */
.tp-sd-draft .tp-status-trigger { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tp-sd-draft .tp-status-dot { background: #94a3b8; }

.tp-sd-sent .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-sent .tp-status-dot { background: #3b82f6; }

.tp-sd-accepted .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-accepted .tp-status-dot { background: #22c55e; }

.tp-sd-pending .tp-status-trigger { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.tp-sd-pending .tp-status-dot { background: #eab308; }

.tp-sd-submitted .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-submitted .tp-status-dot { background: #3b82f6; }

.tp-sd-processing .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-processing .tp-status-dot { background: #3b82f6; }

.tp-sd-new .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-new .tp-status-dot { background: #3b82f6; }

.tp-sd-contacted .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-contacted .tp-status-dot { background: #3b82f6; }

.tp-sd-qualified .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-qualified .tp-status-dot { background: #3b82f6; }

.tp-sd-proposal-sent .tp-status-trigger { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.tp-sd-proposal-sent .tp-status-dot { background: #eab308; }

.tp-sd-approved .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-approved .tp-status-dot { background: #22c55e; }

.tp-sd-stamped .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-stamped .tp-status-dot { background: #22c55e; }

.tp-sd-completed .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-completed .tp-status-dot { background: #22c55e; }

.tp-sd-won .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-won .tp-status-dot { background: #22c55e; }

.tp-sd-issued .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-issued .tp-status-dot { background: #22c55e; }

.tp-sd-active .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-active .tp-status-dot { background: #22c55e; }

.tp-sd-confirmed .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-confirmed .tp-status-dot { background: #3b82f6; }

.tp-sd-checked-in .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-checked-in .tp-status-dot { background: #3b82f6; }

.tp-sd-checked-out .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-checked-out .tp-status-dot { background: #22c55e; }

.tp-sd-in-progress .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-in-progress .tp-status-dot { background: #3b82f6; }

.tp-sd-rejected .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-rejected .tp-status-dot { background: #ef4444; }

.tp-sd-cancelled .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-cancelled .tp-status-dot { background: #ef4444; }

.tp-sd-lost .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-lost .tp-status-dot { background: #ef4444; }

.tp-sd-expired .tp-status-trigger { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tp-sd-expired .tp-status-dot { background: #94a3b8; }

.tp-sd-inactive .tp-status-trigger { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tp-sd-inactive .tp-status-dot { background: #94a3b8; }

.tp-sd-out-of-stock .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-out-of-stock .tp-status-dot { background: #ef4444; }

.tp-sd-resolved .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-resolved .tp-status-dot { background: #22c55e; }

.tp-sd-closed .tp-status-trigger { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tp-sd-closed .tp-status-dot { background: #94a3b8; }

/* Payment-specific colors */
.tp-sd-paid .tp-status-trigger { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-sd-paid .tp-status-dot { background: #22c55e; }

.tp-sd-partial .tp-status-trigger { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.tp-sd-partial .tp-status-dot { background: #eab308; }

.tp-sd-unpaid .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-unpaid .tp-status-dot { background: #ef4444; }

.tp-sd-refunded .tp-status-trigger { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tp-sd-refunded .tp-status-dot { background: #94a3b8; }

/* Priority-specific colors */
.tp-sd-low .tp-status-trigger { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tp-sd-low .tp-status-dot { background: #3b82f6; }

.tp-sd-medium .tp-status-trigger { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.tp-sd-medium .tp-status-dot { background: #eab308; }

.tp-sd-high .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-high .tp-status-dot { background: #ef4444; }

.tp-sd-urgent .tp-status-trigger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tp-sd-urgent .tp-status-dot { background: #ef4444; }

/* Feedback flash on AJAX save */
.tp-status-dropdown .tp-status-trigger.is-saving {
    opacity: .6;
    pointer-events: none;
}
.tp-status-dropdown .tp-status-trigger.is-saved {
    box-shadow: 0 0 0 2px rgba(34,197,94,.4);
}

/* Order/invoice payment summary */
.tp-pay-summary { font-size: 14px; line-height: 1.5; }
.tp-pay-summary .tp-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-pay-summary > .d-flex { padding-top: 6px; padding-bottom: 6px; }
.tp-pay-summary > .border-top { margin-top: 10px; padding-top: 10px; }
.tp-pay-summary .border-top { border-color: #e2e8f0 !important; }
.tp-pay-summary .fs-5 { letter-spacing: .2px; }
.tp-pay-summary .text-muted { font-size: 13.5px; }

/* Installment table + payment progress (umrah pilgrim view) */
.tp-installments thead th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: #64748b; font-weight: 700; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px; white-space: nowrap;
}
.tp-installments tbody td { padding: 13px 18px; vertical-align: middle; border-color: #eef2f7; }
.tp-installments tbody tr:hover { background: #f8fafc; }
.tp-chip {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tp-pay-progress {
    height: 9px; border-radius: 999px; background: #eef2f7; overflow: hidden;
}
.tp-pay-progress > span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .45s ease;
}

/* =============================================================
   THEMED CONFIRM DIALOG (replaces native confirm())
   ============================================================= */
.tp-confirm-modal .modal-dialog { max-width: 430px; }
.tp-confirm-modal .modal-content {
    border: 0; border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.tp-confirm-modal .modal-body { padding: 30px 26px 24px; }
.tp-confirm-icon {
    width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 27px; margin: 0 auto 16px;
    animation: tp-confirm-pop .25s ease-out;
}
@keyframes tp-confirm-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.tp-ci-danger  { background: #fee2e2; color: #dc2626; }
.tp-ci-warning { background: #fef3c7; color: #d97706; }
.tp-ci-primary { background: #dbeafe; color: #2563eb; }
.tp-ci-success { background: #dcfce7; color: #16a34a; }
.tp-ci-info    { background: #e0e7ff; color: #4f46e5; }
.tp-confirm-title { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.tp-confirm-text { font-size: 14px; line-height: 1.55; color: #64748b; }
.tp-confirm-modal .tp-confirm-actions { margin-top: 24px; }
.tp-confirm-modal .tp-confirm-actions .btn {
    border-radius: 10px; font-weight: 600; padding: 9px 14px;
}
.tp-confirm-modal .tp-confirm-btn-cancel { background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; }
.tp-confirm-modal .tp-confirm-btn-cancel:hover { background: #e2e8f0; color: #334155; }

/* =============================================================
   DEAL OUTCOME DIALOG (Mark Won / Mark Lost)
   ============================================================= */
.tp-outcome-modal .modal-dialog { max-width: 460px; }
.tp-outcome-modal .modal-content {
    border: 0; border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.tp-outcome-modal .modal-header {
    border: 0; padding: 20px 22px 0; align-items: flex-start;
}
.tp-outcome-icon {
    width: 46px; height: 46px; border-radius: 14px; flex: 0 0 46px;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.tp-oi-success { background: #dcfce7; color: #16a34a; }
.tp-oi-danger  { background: #fee2e2; color: #dc2626; }
.tp-outcome-modal .modal-title { font-size: 17px; font-weight: 800; color: #0f172a; }
.tp-outcome-sub { font-size: 12.5px; color: #64748b; margin-top: 2px; word-break: break-word; }
.tp-outcome-modal .modal-body { padding: 18px 22px 6px; }
.tp-outcome-modal .form-label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.tp-outcome-modal select.form-select {
    appearance: auto; -webkit-appearance: auto;
    border: 1px solid #d1d5db; border-radius: 10px;
    padding: 10px 14px; font-size: 14px; background-color: #f9fafb;
}
.tp-outcome-modal select.form-select:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff;
}
.tp-outcome-hint {
    margin-top: 12px; font-size: 12.5px; line-height: 1.5;
    color: #64748b; display: flex; gap: 8px; align-items: flex-start;
}
.tp-outcome-hint i { color: #94a3b8; margin-top: 1px; }
.tp-outcome-modal .modal-footer { border: 0; padding: 16px 22px 20px; gap: 10px; }
.tp-outcome-modal .modal-footer .btn { border-radius: 10px; font-weight: 600; padding: 9px 16px; }
.tp-outcome-modal .modal-footer .btn-light { background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; }
.tp-outcome-modal .modal-footer .btn-light:hover { background: #e2e8f0; color: #334155; }

@media (max-width: 575.98px) {
    .tp-outcome-modal .modal-dialog { margin: .6rem; max-width: none; }
    .tp-outcome-modal .modal-header { padding: 18px 18px 0; }
    .tp-outcome-modal .modal-body { padding: 16px 18px 4px; }
    .tp-outcome-modal .modal-footer { flex-direction: column-reverse; padding: 14px 18px 18px; }
    .tp-outcome-modal .modal-footer .btn { width: 100%; }
}

/* =============================================================
   SEARCHABLE DROPDOWN (combobox) — e.g. Airline picker
   ============================================================= */
.tp-combobox { position: relative; }
.tp-combobox-input { padding-right: 36px !important; cursor: text; }
.tp-combobox-arrow {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    color: #94a3b8; cursor: pointer; border-radius: 6px; transition: color .15s ease, transform .15s ease;
}
.tp-combobox.open .tp-combobox-arrow { color: var(--tp-primary); transform: translateY(-50%) rotate(180deg); }
.tp-combobox-menu {
    position: absolute; z-index: 1085; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
}
.tp-combobox-list { max-height: 262px; overflow-y: auto; padding: 6px; }
.tp-combobox-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; color: #1e293b; transition: background .12s ease;
}
.tp-combobox-item .tp-cb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-combobox-item .tp-cb-code {
    color: #64748b; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
    background: #f1f5f9; border-radius: 6px; padding: 1px 8px; flex-shrink: 0;
}
.tp-combobox-item:hover { background: #f1f5f9; }
.tp-combobox-item.active { background: #eef2ff; box-shadow: inset 0 0 0 1px #c7d2fe; }
.tp-combobox-empty { padding: 16px 12px; text-align: center; color: #94a3b8; font-size: 13px; }
.tp-combobox-empty i { display: block; font-size: 20px; margin-bottom: 6px; opacity: .7; }

/* =============================================================
   PAGINATION (centered, themed)
   ============================================================= */
.tp-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
    width: 100%;
}
.tp-pagination .pagination {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}
.tp-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px !important;
    background: #fff;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform var(--tp-transition), background var(--tp-transition),
        color var(--tp-transition), border-color var(--tp-transition), box-shadow var(--tp-transition);
}
.tp-pagination .page-link i { font-size: 13px; }
.tp-pagination .page-link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--tp-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, .12);
}
.tp-pagination .page-link:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
    outline: none;
}
.tp-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .38);
}
.tp-pagination .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: #eef1f6;
    color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}
.tp-pagination .page-ellipsis .page-link {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #94a3b8;
    min-width: 20px;
    padding: 0 4px;
}
.tp-pagination .tp-page-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: .2px;
}
@media (max-width: 576px) {
    .tp-pagination .page-link { min-width: 34px; height: 34px; font-size: 12px; }
    .tp-pagination .pagination { gap: 4px; }
}

/* ==========================================================================
   ON / OFF toggle switch (super admin settings)
   ========================================================================== */
.tp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.tp-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.tp-toggle-track {
    position: relative;
    width: 54px;
    height: 28px;
    flex: 0 0 auto;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .25s ease, box-shadow .25s ease;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .15);
}
.tp-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .35);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.tp-toggle input:focus-visible + .tp-toggle-track {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .35);
}
.tp-toggle input:checked + .tp-toggle-track {
    background: linear-gradient(135deg, #10b981, #059669);
}
.tp-toggle input:checked + .tp-toggle-track .tp-toggle-thumb {
    transform: translateX(24px);
}
.tp-toggle-state {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    min-width: 32px;
    color: #94a3b8;
    transition: color .25s;
}
.tp-toggle-state::after { content: 'OFF'; }
.tp-toggle input:checked ~ .tp-toggle-state { color: #059669; }
.tp-toggle input:checked ~ .tp-toggle-state::after { content: 'ON'; }

.tp-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.tp-status-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.tp-status-pill.on { background: #d1fae5; color: #065f46; }
.tp-status-pill.off { background: #f1f5f9; color: #64748b; }

.tp-toggle-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .2s, border-color .2s;
}
.tp-toggle-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .07); }
.tp-toggle-card .card-header { padding: 16px 22px; border-bottom: 1px solid #f1f5f9; background: #fff; }
.tp-toggle-card .card-body { padding: 22px; }
.tp-toggle-card.is-on { border-color: #a7f3d0; }
.tp-toggle-card .card-header .tp-toggle { flex-shrink: 0; }

/* ==========================================================================
   RESPONSIVE — Super Admin topbar & Payment Gateways settings page
   ========================================================================== */
.tp-topbar { padding: 0 20px; }
.tp-topbar > div:first-child { min-width: 0; }

/* Payment Gateways hero scales down gracefully */
@media (max-width: 991.98px) {
    .gw-hero { padding: 30px 26px; border-radius: 14px; }
    .gw-hero h4 { font-size: 22px; }
}
@media (max-width: 767.98px) {
    .gw-hero { padding: 24px 20px; }
    .gw-hero h4 { font-size: 20px; }
    .gw-hero p { font-size: 14px; }
}
@media (max-width: 575.98px) {
    .tp-topbar { padding: 0 12px; }
    .tp-topbar .btn { padding-left: 8px; padding-right: 8px; }
    .tp-content-heading h5 { font-size: 16px; }
    .gw-hero { padding: 20px 16px; margin-bottom: 18px; }
    .gw-hero h4 { font-size: 18px; }
    .gw-hero .gw-summary { gap: 6px; margin-top: 14px; }
    .gw-hero .gw-chip { font-size: 11px; padding: 5px 11px; }
    .gw-logo { width: 36px; height: 36px; font-size: 18px; }
    .tp-toggle { gap: 8px; }
    .tp-toggle-state { min-width: 28px; }
    .tp-toggle-card .card-header { padding: 14px 16px; }
    .tp-toggle-card .card-body { padding: 16px; }
}

