:root {
    --tp-navy: #0B3D5C;
    --tp-navy-soft: #1A6B9A;
    --tp-secondary: #1A6B9A;
    --tp-accent: #E8A838;
    --tp-accent-ink: #1a1408;
    --tp-canvas: #eef4f8;
    --tp-ink: #0d2433;
    --tp-muted: #5a7386;
    --tp-line: rgba(11, 61, 92, 0.1);
    --tp-radius: 16px;
    --tp-shadow: 0 12px 28px rgba(8, 38, 54, 0.07);
    --tp-shadow-soft: 0 6px 16px rgba(8, 38, 54, 0.05);
    --tp-ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.tp-body {
    margin: 0;
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(26, 107, 154, 0.12), transparent 55%),
        radial-gradient(700px 360px at 100% 0%, rgba(232, 168, 56, 0.08), transparent 50%),
        var(--tp-canvas);
    color: var(--tp-ink);
    font-family: "Manrope", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.tp-body:has(.tp-shell) {
    height: 100vh;
    overflow: hidden;
}

html:has(body.tp-pos-body),
html:has(body.tp-body .tp-shell) {
    height: 100%;
    overflow: hidden;
}

@keyframes tpFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes tpPop {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes posLineIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes tpGlow {
    0%, 100% { box-shadow: 0 8px 18px rgba(31, 122, 63, .22); }
    50% { box-shadow: 0 10px 24px rgba(31, 122, 63, .38); }
}

.tp-shell {
    display: flex;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.tp-pos-body {
    height: 100vh;
    overflow: hidden;
}

body.tp-pos-body .tp-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.tp-pos-body .tp-sidebar {
    min-height: 0;
    height: 100vh;
    overflow: hidden;
}

body.tp-pos-body .tp-nav {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

body.tp-pos-body .tp-sidebar-foot { flex-shrink: 0; }

body.tp-pos-body .tp-brand-logo { max-width: 104px; }
body.tp-pos-body .tp-brand-orbit { max-width: 104px; }

body.tp-pos-body .tp-main {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.tp-pos-body .tp-topbar {
    height: 48px;
    flex-shrink: 0;
}

.tp-sidebar {
    width: 232px;
    background:
        radial-gradient(280px 180px at 20% 0%, rgba(232, 168, 56, 0.14), transparent 55%),
        linear-gradient(180deg, #0B3D5C 0%, #082636 100%);
    color: #fff;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px 6px;
    flex-shrink: 0;
}

.tp-brand-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.tp-brand-name {
    margin: 0;
    padding: 0 4px;
    font-family: var(--tp-font-display, "Fraunces", Georgia, serif);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-word;
}

.tp-brand-orbit {
    position: relative;
    width: 100%;
    max-width: 124px;
    aspect-ratio: 1 / 1;
    padding: 8px;
    border-radius: 50%;
    border: 3px solid var(--tp-orbit-dim, transparent);
    background: rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: tpBrandAmbient 3.6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.38),
        0 2px 8px rgba(0, 0, 0, 0.22);
}
.tp-brand-orbit--gold {
    --tp-orbit: #ffe7a3;
    --tp-orbit-mid: #e0b03a;
    --tp-orbit-dim: #8a6412;
    --tp-orbit-glow: rgba(212, 160, 23, 0.2);
    --tp-orbit-glow-hot: rgba(255, 214, 120, 0.72);
}
.tp-brand-orbit--silver {
    --tp-orbit: #ffffff;
    --tp-orbit-mid: #d5dee6;
    --tp-orbit-dim: #8e9aa6;
    --tp-orbit-glow: rgba(200, 212, 222, 0.18);
    --tp-orbit-glow-hot: rgba(255, 255, 255, 0.7);
}
.tp-brand-orbit--bronze {
    --tp-orbit: #ffd2ae;
    --tp-orbit-mid: #d4894a;
    --tp-orbit-dim: #7a4a22;
    --tp-orbit-glow: rgba(196, 122, 58, 0.22);
    --tp-orbit-glow-hot: rgba(255, 186, 130, 0.68);
}
.tp-brand-orbit-spin { display: none; }
@keyframes tpBrandAmbient {
    0%, 100% {
        border-color: var(--tp-orbit-dim);
        box-shadow:
            0 6px 22px rgba(0, 0, 0, 0.38),
            0 2px 8px rgba(0, 0, 0, 0.22),
            0 0 8px 0 var(--tp-orbit-glow);
    }
    50% {
        border-color: var(--tp-orbit);
        box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.42),
            0 3px 12px rgba(0, 0, 0, 0.26),
            0 0 20px 2px var(--tp-orbit-glow-hot);
    }
}
.tp-brand-logo {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 124px;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.tp-brand-orbit .tp-brand-logo {
    width: 88%;
    height: 88%;
    max-width: 88%;
    max-height: 88%;
    flex: 0 0 auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

/* Company PNG/WebP with transparent background (Settings → company logo) */
.tp-brand-orbit--emblem {
    background: transparent;
    padding: 3px;
}
.tp-brand-orbit-plate {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(165deg, #f4f7fb 0%, #dce4ee 48%, #cfd9e6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    padding: 7%;
    box-sizing: border-box;
}
.tp-brand-orbit--emblem .tp-brand-logo--emblem {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}

.tp-settings-logo-preview {
    display: flex;
    align-items: flex-start;
}
.tp-settings-logo-stack {
    max-width: none;
}
.tp-settings-logo-orbit {
    max-width: 88px;
    margin: 0;
}
.tp-settings-logo-stack .tp-brand-name {
    display: none;
}

@media (max-width: 767.98px) {
    .tp-settings-logo-orbit {
        max-width: 96px;
    }
    .tp-offcanvas .tp-sidebar--drawer .tp-brand-orbit {
        max-width: 96px;
    }
    .tp-offcanvas .tp-sidebar--drawer .tp-brand-stack {
        max-width: 100%;
    }
    .tp-offcanvas .tp-sidebar--drawer .tp-brand-name {
        font-size: 0.76rem;
        line-height: 1.3;
        padding: 0 6px;
    }
    .tp-offcanvas .tp-sidebar--drawer .tp-brand-orbit--emblem .tp-brand-logo--emblem {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .tp-topbar-logo {
        height: 36px;
        max-width: 72px;
        width: auto;
        object-fit: contain;
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tp-brand-orbit { animation: none; }
}

.tp-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--tp-accent);
    color: var(--tp-accent-ink);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.tp-brand small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.tp-nav {
    padding: 4px 10px 12px;
    overflow: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
}

.tp-nav-group {
    margin: 0 0 2px;
}

.tp-nav-label,
.tp-nav-group > summary {
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(232, 168, 56, 0.85);
    margin: 8px 8px 4px;
    list-style: none;
    font-weight: 700;
}

.tp-nav-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 7px 10px;
    margin: 4px 4px 2px;
    border-radius: 10px;
    transition: background .15s var(--tp-ease), color .15s var(--tp-ease);
}

.tp-nav-group > summary:hover { background: rgba(255,255,255,.08); color: #fff; }

.tp-nav-group > summary::-webkit-details-marker { display: none; }

.tp-nav-group > summary::after {
    font-family: "bootstrap-icons";
    content: "\F282";
    font-size: 11px;
    opacity: .75;
    transition: transform .2s var(--tp-ease);
}

.tp-nav-group[open] > summary::after { transform: rotate(180deg); }

.tp-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    padding: 8px 11px;
    border-radius: 11px;
    margin: 0 4px 2px;
    font-size: 13px;
    font-weight: 600;
    transition: background .16s var(--tp-ease), color .16s var(--tp-ease), transform .16s var(--tp-ease);
}

.tp-nav-link i { font-size: 15px; opacity: .9; flex-shrink: 0; }

.tp-nav-link > span:not(.tp-nav-ext) {
    white-space: nowrap;
    min-width: 0;
}

.tp-nav-link:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    transform: translateX(2px);
}

.tp-nav-link.active {
    background: linear-gradient(135deg, rgba(232, 168, 56, 0.95), #d49220);
    color: var(--tp-accent-ink);
    box-shadow: 0 8px 18px rgba(232, 168, 56, .28);
}

.tp-nav-link.active i { opacity: 1; }

.tp-nav-link .tp-nav-ext {
    margin-left: auto;
    font-size: 11px;
}

.tp-sidebar-foot {
    padding: 12px 16px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    font-weight: 600;
}

.tp-sidebar-foot .small {
    color: rgba(232, 168, 56, 0.85) !important;
    margin-top: 2px;
    font-weight: 700;
}

.tp-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.tp-topbar {
    height: 58px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px) saturate(1.15);
    border-bottom: 1px solid var(--tp-line);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(8, 38, 54, 0.03);
    position: relative;
    z-index: 1100;
    overflow: visible;
}

.tp-topbar .dropdown { position: relative; }
.tp-topbar .dropdown-menu {
    z-index: 1200;
    margin-top: 8px;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(8, 38, 54, 0.14);
    min-width: 200px;
}
.tp-trial-banner {
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(232, 168, 56, 0.18), rgba(11, 61, 92, 0.08));
    border-bottom: 1px solid rgba(232, 168, 56, 0.35);
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    color: var(--tp-ink, #0c1a24);
}
.tp-trial-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.tp-trial-banner-ico {
    color: #b45309;
    font-size: 1.1rem;
    animation: tpTrialPulse 2s ease-in-out infinite;
}
@keyframes tpTrialPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}
.tp-trial-banner-text strong { margin-right: 0.35rem; }
#tpTrialCountdown {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0b3d5c;
}
.tp-trial-banner-sub {
    margin-left: 0.35rem;
    color: var(--tp-muted, #5a6b7a);
    font-size: 0.78rem;
}
@media (prefers-reduced-motion: reduce) {
    .tp-trial-banner-ico { animation: none; }
}
.tp-notif-menu {
    min-width: 320px;
    max-width: 360px;
    padding: 0;
    max-height: 360px;
    overflow: auto;
}
.tp-notif-menu .tp-notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--tp-line);
    font-weight: 700;
    font-size: 13px;
}
.tp-notif-menu .tp-notif-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(8,38,54,.06);
    text-decoration: none;
    color: inherit;
}
.tp-notif-menu .tp-notif-item.unread { background: rgba(26, 107, 154, 0.06); }
.tp-notif-menu .tp-notif-item strong { display: block; font-size: 13px; }
.tp-notif-menu .tp-notif-item span { font-size: 12px; color: var(--tp-muted); }
.tp-notif-empty { padding: 18px 14px; color: var(--tp-muted); font-size: 13px; text-align: center; }

.tp-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--tp-muted);
    padding: 4px 6px;
    line-height: 1;
    z-index: 2;
}
.tp-input-wrap { position: relative; }
.tp-input-wrap .tp-pw-toggle + .form-control,
.tp-input-wrap:has(.tp-pw-toggle) .form-control { padding-right: 42px; }

.tp-search {
    position: relative;
    flex: 1;
    max-width: 440px;
}

.tp-search > i.bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    pointer-events: none;
}

.tp-search .form-control {
    padding-left: 38px;
    background: rgba(11, 61, 92, 0.04);
    border: 1px solid transparent;
    border-radius: 999px;
    height: 38px;
    font-weight: 500;
}

.tp-search .form-control:focus {
    background: #fff;
    border-color: rgba(26, 107, 154, 0.35);
    box-shadow: 0 0 0 4px rgba(26, 107, 154, 0.1);
}

.tp-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1080;
    max-height: min(360px, 50vh);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(8, 38, 54, 0.14);
    padding: 6px;
}

.tp-search-results[hidden] {
    display: none !important;
}

.tp-search-hit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    text-decoration: none;
    color: var(--tp-ink);
    font-size: 13px;
    line-height: 1.35;
}

.tp-search-hit:hover,
.tp-search-hit.is-active {
    background: rgba(11, 61, 92, 0.06);
    color: var(--tp-ink);
}

.tp-search-hit-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    font-size: 14px;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy);
}

.tp-search-hit--invoice .tp-search-hit-ico { background: rgba(232, 168, 56, 0.2); color: #8a6414; }
.tp-search-hit--customer .tp-search-hit-ico { background: rgba(26, 107, 154, 0.14); color: #1A6B9A; }

.tp-search-hit-body {
    flex: 1;
    min-width: 0;
}

.tp-search-hit-title {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: var(--tp-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-search-hit-meta {
    display: block;
    font-size: 11px;
    color: var(--tp-muted);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-search-empty,
.tp-search-loading {
    padding: 12px 10px;
    font-size: 12px;
    color: var(--tp-muted);
    font-weight: 600;
}

/* Top bar icon controls only — not buttons inside dropdown panels */
.tp-topbar .ms-auto > a.text-muted,
.tp-topbar .ms-auto > .dropdown > .btn-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(11, 61, 92, 0.04);
    color: var(--tp-navy) !important;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}

.tp-topbar .ms-auto > a.text-muted:hover,
.tp-topbar .ms-auto > .dropdown > .btn-link:hover {
    background: rgba(11, 61, 92, 0.1);
    transform: translateY(-1px);
}

/* Panels / dropdowns: text buttons keep natural size (no icon-box squeeze) */
.dropdown-menu .btn,
.dropdown-menu .btn-link,
.tp-notif-menu .btn,
.tp-notif-menu .btn-link {
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1.25;
    text-align: center;
}

.tp-notif-menu .tp-notif-head .btn {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(11, 61, 92, 0.07);
    color: var(--tp-navy) !important;
    text-decoration: none;
    border: 1px solid rgba(11, 61, 92, 0.12);
}

.tp-notif-menu .tp-notif-head .btn:hover {
    background: rgba(11, 61, 92, 0.12);
    transform: none;
}

.tp-user {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 6px 4px 4px;
    color: var(--tp-ink);
    transition: background .15s, box-shadow .15s;
}

.tp-user:hover {
    background: rgba(11, 61, 92, 0.06);
    box-shadow: none;
    transform: none;
}

.tp-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}

.tp-user-avatar--ph {
    display: grid;
    place-items: center;
    background: rgba(11, 61, 92, 0.1);
    color: var(--tp-navy);
    font-size: 13px;
    font-weight: 800;
}

.tp-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    text-align: left;
}

.tp-user-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--tp-navy);
}

.tp-user-role {
    font-size: 12px;
    font-weight: 600;
    color: var(--tp-muted);
}

.tp-user-chevron {
    font-size: 12px;
    color: var(--tp-muted);
    margin-left: 2px;
}

.tp-content {
    padding: 18px 20px 22px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(11, 61, 92, 0.25) transparent;
}

.tp-content > * {
    animation: tpFadeUp .35s var(--tp-ease) both;
}

.tp-content > *:nth-child(2) { animation-delay: .04s; }
.tp-content > *:nth-child(3) { animation-delay: .07s; }
.tp-content > *:nth-child(4) { animation-delay: .1s; }

/* Single full-height scroll table (e.g. one list card). Multiple scroll cards keep natural height. */
.tp-content:has(> .tp-card.overflow-auto:only-of-type) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tp-content:has(> .tp-card.overflow-auto:only-of-type) > :not(.overflow-auto) {
    flex-shrink: 0;
}

.tp-content:has(> .tp-card.overflow-auto:only-of-type) > .tp-card.overflow-auto {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
}

.tp-content-pos {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: none;
}

.tp-content-pos > * { animation: none; }

.tp-page-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0;
    color: var(--tp-navy);
}

.tp-page-sub {
    color: var(--tp-muted);
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 500;
}

.tp-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--tp-shadow-soft);
    backdrop-filter: blur(6px);
}

.tp-card-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--tp-navy);
    letter-spacing: -.01em;
}

.tp-stat {
    position: relative;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    padding: 14px 16px;
    box-shadow: var(--tp-shadow-soft);
    overflow: hidden;
    transition: transform .22s var(--tp-ease), box-shadow .22s var(--tp-ease), border-color .2s ease;
}

.tp-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--tp-secondary, #1A6B9A), var(--tp-accent));
    opacity: 0.85;
}

.tp-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--tp-shadow);
    border-color: rgba(26, 107, 154, 0.22);
}

.tp-stat .tp-stat-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(11, 61, 92, 0.06);
    color: var(--tp-navy-soft);
    font-size: 14px;
}

.tp-stat span,
.tp-stat small {
    display: block;
    color: var(--tp-muted);
    font-size: 12px;
    font-weight: 600;
}

.tp-stat strong {
    display: block;
    font-size: 1.25rem;
    margin-top: 6px;
    letter-spacing: -.02em;
    font-weight: 800;
    color: var(--tp-ink);
}

.tp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.tp-dash-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, .9fr);
    gap: 12px;
    margin-top: 14px;
    min-height: 0;
    flex: 1;
}

.tp-content:has(> .tp-stat-grid):not(:has(.tp-analytics-nav)) {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.tp-content:has(> .tp-stat-grid):not(:has(.tp-analytics-nav)) .tp-dash-charts {
    flex: none;
    min-height: 0;
}

.tp-content:has(.tp-analytics-nav) {
    overflow: auto;
}

.tp-content:has(.tp-analytics-nav) .tp-dash-charts {
    flex: none;
}

.tp-content:has(.tp-analytics-nav) .tp-chart-box {
    flex: none;
    height: 280px;
    min-height: 280px;
}

.tp-content:has(> .tp-stat-grid) > :first-child,
.tp-content:has(> .tp-stat-grid) > .tp-stat-grid {
    flex-shrink: 0;
}

.tp-industry-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
    flex-shrink: 0;
}

.tp-content:has(> .tp-industry-widgets) {
    overflow: auto;
}

.tp-content:has(> .tp-industry-widgets) .tp-dash-charts {
    flex: none;
    min-height: 300px;
}

.tp-dash-charts .tp-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tp-chart-box {
    position: relative;
    flex: 1;
    min-height: 160px;
}

.tp-chart-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin: 2px 0 10px;
}
.tp-chart-kpis div span {
    display: block;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tp-muted, #5c6b7a);
}
.tp-chart-kpis strong {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}
.tp-mix {
    margin-bottom: 12px;
}
.tp-mix-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 4px;
}
.tp-mix-bar {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(11, 61, 92, .08);
}
.tp-mix-bar i {
    display: block;
    height: 100%;
}
.tp-chart-box canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.tp-table {
    font-size: 13px;
}

.tp-table thead th {
    color: var(--tp-navy-soft);
    font-weight: 800;
    background: #eef3f7;
    border-bottom: 1px solid var(--tp-line);
    white-space: nowrap;
    padding: 11px 12px;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Sticky headers only inside scroll regions (avoids broken stickies on the main page scroll). */
.tp-card.overflow-auto .tp-table thead th,
.tp-table-scroll .tp-table thead th,
.table-responsive .tp-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--tp-line);
}

.tp-table.tp-report-table thead th,
.tp-report-table thead th {
    background: var(--tp-navy) !important;
    color: #fff !important;
    border-bottom: none !important;
    border-color: transparent;
    padding: 12px 14px;
    font-size: 11px;
    letter-spacing: .05em;
    box-shadow: none;
}

.tp-table.tp-report-table thead th:first-child {
    border-top-left-radius: 10px;
}

.tp-table.tp-report-table thead th:last-child {
    border-top-right-radius: 10px;
}

.tp-table.tp-report-table tfoot td {
    background: rgba(11, 61, 92, 0.06);
    border-top: 2px solid var(--tp-navy);
    font-weight: 700;
    color: var(--tp-ink);
    padding: 12px 14px;
    white-space: nowrap;
}

.tp-report-exports .btn {
    font-weight: 600;
}

.tp-table td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.tp-table tbody tr {
    transition: background .12s ease;
}

.tp-table tbody tr:hover { background: rgba(26, 107, 154, 0.05); }

/* Scrollable list tables inside cards */
.tp-card.overflow-auto {
    padding: 0;
    overflow: auto;
    max-height: min(72vh, 560px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(11, 61, 92, 0.28) transparent;
}

.tp-card.overflow-auto > .table,
.tp-card.overflow-auto > table {
    margin-bottom: 0;
}

.tp-card.overflow-auto > :not(.table):not(table) {
    padding: 1.15rem 1.25rem;
}

.tp-card:has(> .table.tp-table):not(.overflow-auto) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0.35rem;
}

.table-responsive {
    border: 1px solid rgba(11, 61, 92, 0.1);
    border-radius: 12px;
    overflow: auto;
    max-height: min(75vh, 600px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(11, 61, 92, 0.28) transparent;
}

.table-responsive > .table {
    margin-bottom: 0;
}

.tp-content > .overflow-auto:not(.tp-card) {
    overflow: auto;
    max-height: min(70vh, 520px);
    border: 1px solid rgba(11, 61, 92, 0.1);
    border-radius: var(--tp-radius);
    background: rgba(255, 255, 255, 0.94);
    -webkit-overflow-scrolling: touch;
}

/* Profile / detail key–value blocks */
.tp-card dl.row dt {
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--tp-muted);
    margin-bottom: 0.2rem;
}

.tp-card dl.row dd {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tp-ink);
    margin-bottom: 0.65rem;
}

.tp-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
}

.tp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(11, 61, 92, 0.12);
    background: rgba(11, 61, 92, 0.04);
    color: var(--tp-primary, #0B3D5C);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.tp-icon-btn:hover {
    background: rgba(26, 107, 154, 0.12);
    border-color: rgba(26, 107, 154, 0.28);
    color: var(--tp-primary, #0B3D5C);
    transform: translateY(-1px);
}

.tp-icon-btn-danger {
    color: #b42318;
    background: rgba(180, 35, 24, 0.06);
    border-color: rgba(180, 35, 24, 0.16);
}

.tp-icon-btn-danger:hover {
    background: rgba(180, 35, 24, 0.12);
    border-color: rgba(180, 35, 24, 0.3);
    color: #912018;
}

button.tp-icon-btn {
    cursor: pointer;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    transition: transform .15s var(--tp-ease), box-shadow .15s var(--tp-ease), background .15s ease, border-color .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    line-height: 1.25;
    vertical-align: middle;
    align-self: center;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
}

.btn-sm {
    min-height: 36px;
    height: 36px;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.btn-icon {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.tp-card-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tp-card-footer-actions .tp-card-action,
.tp-card-footer-actions form .tp-card-action {
    align-self: center;
    min-height: 34px;
    min-width: 6.75rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    line-height: 1.25;
}

.tp-card-footer-actions form.tp-card-action-form {
    margin: 0 0 0 auto;
}

a.btn.tp-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #f0b84a, var(--tp-accent));
    border-color: transparent;
    color: var(--tp-accent-ink);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(232, 168, 56, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #f3c05a, #e09a28);
    border-color: transparent;
    color: var(--tp-accent-ink);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(232, 168, 56, .32);
}

.btn-outline-primary {
    color: var(--tp-navy);
    border-color: rgba(11, 61, 92, 0.25);
}

.btn-outline-primary:hover {
    background: rgba(11, 61, 92, 0.06);
    border-color: var(--tp-navy);
    color: var(--tp-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 61, 92, 0.08);
}

.btn-secondary {
    background: linear-gradient(180deg, #fff, #eef4f8);
    border: 1.5px solid var(--tp-line);
    color: var(--tp-navy);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(8, 38, 54, 0.05);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: linear-gradient(180deg, #fff, #e4edf4);
    border-color: rgba(11, 61, 92, 0.22);
    color: var(--tp-navy);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border: 1.5px solid rgba(11, 61, 92, 0.2);
    color: var(--tp-muted);
    font-weight: 700;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(11, 61, 92, 0.06);
    border-color: rgba(11, 61, 92, 0.35);
    color: var(--tp-navy);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    border: 0;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #5eead4, #15803d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.34);
}

.btn-outline-success {
    border: 1.5px solid rgba(22, 163, 74, 0.45);
    color: #15803d;
    font-weight: 700;
}

.btn-outline-success:hover {
    background: rgba(22, 163, 74, 0.08);
    border-color: #15803d;
    color: #14532d;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #fb7185, #dc2626);
    border: 0;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #f87171, #b91c1c);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.34);
}

.btn-outline-danger {
    border: 1.5px solid rgba(220, 38, 38, 0.35);
    color: #b91c1c;
    font-weight: 700;
}

.btn-outline-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: #dc2626;
    color: #991b1b;
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #fde68a, var(--tp-accent));
    border: 0;
    color: var(--tp-accent-ink);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(232, 168, 56, 0.3);
}

.btn-warning:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    color: var(--tp-accent-ink);
}

.btn:active {
    transform: translateY(0) !important;
}

/* ——— Form system (admin + shared) ——— */
.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--tp-muted);
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1.5px solid var(--tp-line);
    min-height: 44px;
    padding: 0.62rem 0.95rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--tp-ink);
    line-height: 1.35;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .15s var(--tp-ease);
}

.form-control {
    background: #fff;
}

/* Keep selects visually distinct from text fields (Bootstrap caret was removed by flat background). */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-color: rgba(11, 61, 92, 0.035);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230B3D5C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px 10px;
    padding-right: 2.4rem;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(26, 107, 154, 0.3);
}

.form-control:focus {
    border-color: rgba(26, 107, 154, 0.5);
    box-shadow: 0 0 0 4px rgba(26, 107, 154, .12);
    background: #fff;
    outline: 0;
}

.form-select:focus {
    border-color: rgba(26, 107, 154, 0.5);
    box-shadow: 0 0 0 4px rgba(26, 107, 154, .12);
    background-color: #fff;
    outline: 0;
}

.form-control:disabled,
.form-select:disabled {
    background: rgba(11, 61, 92, 0.04);
    color: var(--tp-muted);
    opacity: 1;
}

textarea.form-control {
    min-height: 112px;
    resize: vertical;
    padding-top: 0.75rem;
    line-height: 1.5;
}

.form-control-sm,
.form-select-sm {
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

.form-select-sm {
    padding-right: 2rem;
    background-position: right 0.55rem center;
    background-size: 12px 9px;
}

.form-control-lg {
    min-height: 52px;
    font-size: 1.05rem;
    border-radius: 14px;
}

.form-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--tp-muted);
    font-weight: 500;
    line-height: 1.4;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: auto;
    padding-left: 0;
    margin-bottom: 0.55rem;
}

/* Keep Bootstrap column gutters when .form-check is on the same col-* element */
.row > [class*="col"].form-check {
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

.form-check .form-check-input,
.form-check-input {
    float: none;
    margin: 0;
    margin-left: 0;
    margin-top: 0;
    position: static;
    width: 1.15rem;
    height: 1.15rem;
    border: 1.5px solid var(--tp-line);
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--tp-navy);
    border-color: var(--tp-navy);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(26, 107, 154, .12);
    border-color: rgba(26, 107, 154, 0.45);
}

.form-check-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tp-ink);
    cursor: pointer;
    margin: 0;
}

.input-group {
    flex-wrap: nowrap;
}

.input-group .form-control,
.input-group .form-select {
    border-radius: 0;
}

.input-group > :first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.input-group > :last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

.input-group-text {
    border: 1.5px solid var(--tp-line);
    background: rgba(11, 61, 92, 0.04);
    color: var(--tp-muted);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 12px;
}

form.tp-card,
.tp-card form,
.tp-card.tp-form {
    padding: 1.35rem 1.4rem 1.5rem;
}

.tp-card > .row.g-3,
form.tp-card .row.g-3,
.tp-card form .row.g-3 {
    --bs-gutter-x: 1.05rem;
    --bs-gutter-y: 1.1rem;
}

.tp-form-section {
    margin: 1.15rem 0 0;
    padding: 1.15rem 0 0;
    border-top: 1px solid var(--tp-line);
}

.tp-form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.tp-form-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tp-navy-soft);
    margin: 0 0 0.85rem;
}

.tp-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--tp-line);
}

.tp-form-actions .btn {
    min-height: 42px;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.mb-3:has(> .form-label) {
    margin-bottom: 1rem !important;
}

.tp-offcanvas {
    background: linear-gradient(180deg, #0B3D5C, #082636);
    max-width: min(300px, 88vw);
}
.tp-offcanvas-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tp-offcanvas-header .offcanvas-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.5rem;
}
.tp-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.tp-offcanvas .tp-sidebar {
    width: 100%;
    min-height: 0;
    height: 100%;
    flex: 1;
    overflow: hidden;
}
.tp-offcanvas .tp-sidebar--drawer .tp-brand {
    padding: 10px 14px 6px;
}
.tp-offcanvas .tp-sidebar--drawer .tp-brand-orbit {
    max-width: 104px;
    margin: 0 auto;
}
.tp-offcanvas .tp-sidebar--drawer .tp-brand-name {
    font-size: 0.82rem;
}
.tp-offcanvas .tp-sidebar--drawer .tp-brand-logo {
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
}

.tp-login {
    font-family: "Manrope", system-ui, sans-serif;
    background: var(--tp-canvas);
    margin: 0;
    min-height: 100vh;
    color: var(--tp-ink);
    -webkit-font-smoothing: antialiased;
}

.tp-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.tp-login-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(8, 38, 54, 0.55), rgba(11, 61, 92, 0.35)),
        linear-gradient(160deg, #082636 0%, #0B3D5C 48%, #1A6B9A 130%);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.tp-login-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 5vw, 3.5rem);
    width: 100%;
}

.tp-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 1;
}

.tp-login-orb-a {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -80px;
    background: radial-gradient(circle, rgba(232, 168, 56, 0.35), transparent 68%);
    animation: tpLoginFloat 9s ease-in-out infinite;
}

.tp-login-orb-b {
    width: 320px;
    height: 320px;
    left: -90px;
    bottom: 8%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
    animation: tpLoginFloat 11s ease-in-out infinite reverse;
}

.tp-login-orb-c {
    width: 180px;
    height: 180px;
    right: 18%;
    bottom: 18%;
    background: radial-gradient(circle, rgba(26, 107, 154, 0.45), transparent 70%);
    animation: tpLoginFloat 7s ease-in-out infinite 1s;
}

.tp-login-logo {
    width: min(220px, 58vw);
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    animation: tpLoginRise 0.7s var(--tp-ease) both;
}

.tp-login-logo-sm,
.tp-nav-logo,
.tp-topbar-logo,
.tp-offcanvas-logo {
    height: auto;
    display: block;
    border-radius: 10px;
    background: #000;
}

.tp-login-logo-sm {
    width: 132px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(8, 38, 54, 0.12);
    animation: tpLoginRise 0.55s var(--tp-ease) both;
}
.tp-login-mobile-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
    animation: tpLoginRise 0.55s var(--tp-ease) both;
}
.tp-login-brand-stack {
    max-width: 112px;
    margin: 0;
}
.tp-login-brand-stack .tp-brand-orbit {
    max-width: 112px;
    margin: 0 auto;
}
.tp-nav-logo { width: 120px; }
.tp-topbar-logo { width: 84px; max-height: 40px; object-fit: contain; }
.tp-offcanvas-logo { width: 84px; max-height: 48px; object-fit: contain; }

.tp-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(232, 168, 56, 0.95);
    animation: tpLoginRise 0.7s var(--tp-ease) 0.08s both;
}

.tp-login-hero-copy h1,
.tp-login-hero h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    max-width: 12ch;
    line-height: 1.08;
    letter-spacing: -.03em;
    margin: 0 0 1rem;
    animation: tpLoginRise 0.75s var(--tp-ease) 0.14s both;
}

.tp-login-hero-copy p,
.tp-login-hero p {
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
    animation: tpLoginRise 0.75s var(--tp-ease) 0.22s both;
}

.tp-login-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    animation: tpLoginRise 0.75s var(--tp-ease) 0.28s both;
}

.tp-login-pills span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.82rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.tp-login-demo {
    font-size: 12px;
    font-weight: 600;
    color: rgba(232, 168, 56, 0.92);
    margin: 0;
    animation: tpLoginRise 0.75s var(--tp-ease) 0.34s both;
}

.tp-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background:
        radial-gradient(600px 320px at 90% 10%, rgba(26, 107, 154, 0.1), transparent 55%),
        radial-gradient(480px 280px at 10% 100%, rgba(232, 168, 56, 0.1), transparent 50%),
        linear-gradient(180deg, #eef4f8 0%, #f7fafc 100%);
}

.tp-login-card {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    padding: clamp(1.6rem, 3vw, 2.1rem);
    animation: tpLoginRise 0.65s var(--tp-ease) 0.12s both;
    border-radius: 22px;
    border: 1px solid var(--tp-line);
    box-shadow: 0 22px 48px rgba(8, 38, 54, 0.1);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.tp-login-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--tp-navy);
    margin: 0.25rem 0 0.35rem;
}

.tp-login-sub {
    color: var(--tp-muted);
    font-size: 0.92rem;
    margin: 0 0 1.25rem;
    font-weight: 500;
}

.tp-login-form { margin-top: 0.25rem; }

.tp-login-card .alert {
    max-width: 100%;
    overflow-wrap: break-word;
}
.tp-reset-link-wrap {
    max-width: 100%;
    margin-bottom: 0.5rem;
}
.tp-reset-link-wrap a {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.45;
}

.tp-field { margin-bottom: 1rem; }

.tp-login .form-label {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--tp-ink);
    margin-bottom: 0.35rem;
}

.tp-input-wrap {
    position: relative;
}

.tp-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.tp-input-wrap .form-control {
    padding-left: 2.55rem;
    padding-right: 2.75rem;
    height: 48px;
    border-radius: 14px;
    font-weight: 600;
    background: rgba(11, 61, 92, 0.03);
    border: 1px solid var(--tp-line);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s var(--tp-ease);
}

.tp-input-wrap .form-control:focus {
    background: #fff;
    border-color: rgba(26, 107, 154, 0.45);
    box-shadow: 0 0 0 4px rgba(26, 107, 154, 0.12);
    transform: translateY(-1px);
}

.tp-input-wrap:focus-within > i { color: var(--tp-navy-soft); }

.tp-login-submit {
    margin-top: 0.35rem;
    height: 48px;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.tp-login-submit i {
    transition: transform 0.25s var(--tp-ease);
}

.tp-login-submit:hover i { transform: translateX(3px); }

.tp-login-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.15rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.tp-login-footer a {
    color: var(--tp-navy-soft);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s ease;
}

.tp-login-footer a:hover { color: var(--tp-navy); }

.tp-login-alert {
    border: 0;
    border-radius: 12px;
    animation: tpLoginRise 0.35s var(--tp-ease) both;
}

.tp-login-solo {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(700px 360px at 15% 0%, rgba(26, 107, 154, 0.16), transparent 55%),
        radial-gradient(560px 300px at 100% 100%, rgba(232, 168, 56, 0.14), transparent 50%),
        linear-gradient(180deg, #0B3D5C 0%, #082636 55%, #0a3048 100%);
}

.tp-login-solo .tp-login-orb { z-index: 0; }
.tp-login-solo .tp-login-card { position: relative; z-index: 1; }

.tp-eyebrow {
    color: var(--tp-navy-soft);
    font-weight: 800;
    font-size: 0.75rem;
    margin-bottom: 0;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@keyframes tpLoginRise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes tpLoginFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-22px) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .tp-login-orb,
    .tp-login-logo,
    .tp-login-card,
    .tp-login-kicker,
    .tp-login-hero-copy h1,
    .tp-login-hero-copy p,
    .tp-login-pills,
    .tp-login-demo {
        animation: none !important;
    }
}

@media (max-width: 991px) {
    .tp-login-shell {
        grid-template-columns: 1fr;
    }
    .tp-login-hero {
        min-height: auto;
        padding: 0;
    }
    .tp-login-hero-inner {
        padding: 1.75rem 1.35rem 1.5rem;
        gap: 1.25rem;
    }
    .tp-login-hero-copy h1 {
        max-width: none;
        font-size: clamp(1.8rem, 7vw, 2.3rem);
    }
    .tp-login-pills { display: none; }
    .tp-login-demo { display: none; }
    .tp-login-logo-3d { max-width: min(200px, 70vw); margin: 0 auto; }
    .tp-login-scene { opacity: 0.35; max-height: 220px; }
    .tp-dash-charts {
        grid-template-columns: 1fr;
        flex: none;
    }
    .tp-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    body.tp-login {
        overflow-x: hidden;
    }
    .tp-login-shell {
        min-height: 100dvh;
    }
    .tp-login-hero {
        display: none;
    }
    .tp-login-panel {
        min-height: 100dvh;
        padding:
            max(0.75rem, env(safe-area-inset-top))
            max(0.75rem, env(safe-area-inset-right))
            max(0.75rem, env(safe-area-inset-bottom))
            max(0.75rem, env(safe-area-inset-left));
        align-items: stretch;
        justify-content: stretch;
    }
    .tp-login-card {
        max-width: none;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: calc(100dvh - max(1.5rem, env(safe-area-inset-top)) - max(1.5rem, env(safe-area-inset-bottom)));
        padding: clamp(1.75rem, 5vh, 2.35rem) clamp(1.35rem, 4vw, 1.65rem);
        border-radius: 18px;
        box-shadow: 0 12px 32px rgba(8, 38, 54, 0.08);
    }
    .tp-login-brand-stack {
        max-width: 104px;
    }
    .tp-login-brand-stack .tp-brand-orbit {
        max-width: 104px;
    }
    .tp-login-mobile-brand {
        margin-bottom: 1rem;
    }
    .tp-login-form {
        flex: 0 0 auto;
    }
    .tp-login-footer {
        margin-top: auto;
        padding-top: 0.5rem;
    }
    .tp-login-glyphs,
    .tp-login-glyphs--panel {
        display: none;
    }
    .tp-login-footer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        text-align: center;
    }
    .tp-login-footer a {
        padding: 0.35rem 0;
    }
    .tp-login .form-control {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .tp-content {
        padding-left: max(0.85rem, env(safe-area-inset-left));
        padding-right: max(0.85rem, env(safe-area-inset-right));
        -webkit-overflow-scrolling: touch;
    }
    .tp-topbar {
        padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
        gap: 8px;
        min-height: 52px;
        height: auto;
        flex-wrap: nowrap;
    }
    .tp-topbar .ms-auto {
        gap: 0.35rem !important;
        flex-shrink: 1;
        min-width: 0;
    }
    .tp-topbar .ms-auto > .dropdown > .btn-outline-secondary span.d-sm-inline {
        display: none !important;
    }
    .tp-user-name {
        max-width: 5.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .tp-user {
        padding: 4px;
        font-size: 12px;
        max-width: 100%;
    }
    .tp-topbar-logo {
        width: auto;
        height: 32px;
        max-width: 48px;
        object-fit: contain;
        flex-shrink: 0;
    }
    .tp-page-title {
        font-size: clamp(1.25rem, 5vw, 1.65rem);
    }
    .tp-card.overflow-auto,
    .tp-card:has(.table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tp-card .table {
        min-width: 520px;
    }
    .tp-report-exports {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
    .tp-report-exports .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .tp-stat-grid {
        grid-template-columns: 1fr;
    }
    .tp-user-meta {
        display: none;
    }
    .tp-user-chevron {
        margin-left: 0;
    }
    .tp-industry-widgets {
        grid-template-columns: 1fr;
    }
    .tp-industry-widget .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }
}

.pos-app {
    display: flex;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 20% -10%, rgba(26, 107, 154, .08), transparent 50%),
        #f1f5f9;
}

/* Legacy vertical category rail — disabled; POS screen uses public/assets/css/pos.css */
body.pos-screen .pos-app {
    display: grid;
    background: transparent;
}
body.pos-screen .pos-cats {
    width: auto !important;
    max-width: none !important;
    flex-direction: row !important;
    border-right: 0 !important;
}

.pos-cats {
    width: 168px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--tp-line);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pos-cat-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
}

.pos-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tp-muted);
}

.pos-cat {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 3px;
    font-size: 13px;
    transition: background .15s var(--tp-ease), color .15s var(--tp-ease), transform .15s var(--tp-ease);
}

.pos-cat:hover {
    background: #eef2ff;
    transform: translateX(2px);
}

.pos-cat.active {
    background: var(--tp-navy);
    color: #fff;
    box-shadow: 0 6px 14px rgba(30, 27, 75, .18);
}

.pos-catalog {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px;
    position: relative;
}

.pos-catalog-head {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.pos-grid {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px;
    align-content: start;
    scrollbar-width: thin;
}

.pos-empty-msg {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 54px;
    color: var(--tp-muted);
    font-size: 13px;
    margin: 0;
    pointer-events: none;
}

.pos-tile {
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    padding: 10px;
    text-align: left;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    transition: transform .16s var(--tp-ease), box-shadow .16s var(--tp-ease), border-color .16s ease;
    animation: tpPop .28s var(--tp-ease) both;
}

.pos-tile:hover {
    border-color: var(--tp-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(11, 61, 92, .12);
}

.pos-tile:active { transform: scale(.97); }

.pos-tile small { color: var(--tp-muted); }

.pos-cart {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid var(--tp-line);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pos-cart-head,
.pos-cart-foot {
    flex-shrink: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tp-line);
}

.pos-cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-foot { border-bottom: 0; border-top: 1px solid var(--tp-line); }

.pos-customer {
    flex-shrink: 0;
    padding: 8px 14px;
    border-bottom: 1px solid var(--tp-line);
    position: relative;
}

.pos-customer-wrap { position: relative; }

.pos-customer-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 180px;
    overflow: auto;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    animation: tpFadeUp .16s var(--tp-ease);
}

.pos-customer-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
    transition: background .12s ease;
}

.pos-customer-item:hover,
.pos-customer-item.active { background: #eef2ff; }

.pos-customer-item small {
    display: block;
    color: var(--tp-muted);
}

.pos-customer-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--tp-muted);
}

.pos-customer-meta strong { color: var(--tp-ink); }

.pos-customer-meta.has-balance strong { color: #b45309; }

.pos-cart-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
}

.pos-empty { color: var(--tp-muted); padding: 16px 8px; }

.pos-line {
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pos-line-in { animation: posLineIn .2s var(--tp-ease); }

.pos-qty {
    width: 30px;
    height: 30px;
    border: 1px solid var(--tp-line);
    border-radius: 8px;
    background: #fff;
    transition: background .12s ease, transform .12s ease;
}

.pos-qty:hover {
    background: #eef2ff;
    transform: scale(1.05);
}

#posPay:not(:disabled) {
    animation: tpGlow 2.4s ease-in-out infinite;
}

.tp-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--tp-navy);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    z-index: 1080;
    animation: tpFadeUp .22s var(--tp-ease);
}

.tp-supplier-modal,
.tp-stack-modal {
    --bs-modal-zindex: 1310;
}

.tp-toast.error { background: #b91c1c; }

.tp-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #eef2ff;
}

.tp-thumb-empty { display: block; }

.tp-product-photo {
    width: 100%;
    max-width: 180px;
    height: 140px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    display: block;
    background: #f8fafc;
    padding: 8px;
    box-sizing: border-box;
}

.tp-gallery-slot {
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.tp-gallery-slot img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    box-sizing: border-box;
}

.pos-tile-img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 6px;
    display: block;
    background: #eef2ff;
}

.pos-tile-img-empty { height: 0; margin: 0; }

@media (max-width: 1199px) {
    .tp-dash-charts { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    body.tp-pos-body { overflow: hidden; }
    .pos-app { flex-direction: column; }
    .pos-cats, .pos-cart { width: 100%; }
    .pos-cats { max-height: 48px; padding: 6px 8px; }
    .pos-cat-list { display: flex; gap: 6px; overflow: auto; }
    .pos-cat { width: auto; white-space: nowrap; margin: 0; }
    .pos-catalog { flex: 1; }
    .pos-cart { border-left: 0; border-top: 1px solid var(--tp-line); max-height: 42%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

.tp-industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.tp-industry-card input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.tp-industry-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--tp-line, #dbe3ee);
    border-radius: 14px;
    padding: 14px 14px 12px;
    background: #fff;
    cursor: pointer;
    min-height: 118px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.tp-industry-card i {
    font-size: 22px;
    color: var(--tp-navy-soft);
}

.tp-industry-card strong { font-size: 14px; }

.tp-industry-card span {
    font-size: 12px;
    color: var(--tp-muted);
    line-height: 1.35;
}

.tp-industry-card:hover {
    border-color: rgba(26, 107, 154, 0.35);
    transform: translateY(-1px);
    box-shadow: var(--tp-shadow-soft);
}

.tp-industry-card.is-on,
.tp-industry-card:has(input:checked) {
    border-color: var(--tp-navy);
    box-shadow: 0 0 0 3px rgba(11, 61, 92, .12);
    background: rgba(26, 107, 154, 0.06);
}

.tp-analytics-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tp-analytics-tab {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tp-muted);
    text-decoration: none;
    border: 1px solid var(--tp-border);
    background: #fff;
}

.tp-analytics-tab.is-on {
    color: #fff;
    background: var(--tp-navy);
    border-color: var(--tp-navy);
}

.tp-analytics-tab:hover {
    color: var(--tp-navy);
    border-color: rgba(26, 107, 154, 0.45);
}

/* SweetAlert2 — TEMPRIO toasts & confirm modals */
.tp-swal-toast.swal2-popup {
    font-family: "Manrope", system-ui, sans-serif;
    border-radius: 14px;
    border: 1px solid var(--tp-line);
    box-shadow: 0 16px 40px rgba(8, 38, 54, 0.14);
    padding: 0.65rem 0.85rem;
}

.tp-swal-toast .swal2-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--tp-ink);
    margin: 0;
}

.tp-swal-modal.swal2-popup {
    font-family: "Manrope", system-ui, sans-serif;
    border-radius: 18px;
    padding: 1.35rem 1.25rem 1.1rem;
    border: 1px solid var(--tp-line);
}

.tp-swal-modal .swal2-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.25rem;
    color: var(--tp-navy);
}

.tp-swal-modal .swal2-html-container,
.tp-swal-modal .swal2-content {
    font-size: 0.92rem;
    color: var(--tp-muted);
}

.tp-swal-modal .swal2-actions {
    gap: 0.5rem;
    margin-top: 1rem;
}

.tp-swal-confirm,
.tp-swal-cancel {
    min-height: 40px;
    padding: 0.4rem 1.1rem;
    font-weight: 700;
    border-radius: 999px;
}

/* Product list + shared table pagination */
.product-list-card {
    position: relative;
    transition: opacity 0.2s ease;
}

.product-list-card.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.product-list-card.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: tp-list-shimmer 1.1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tp-list-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tp-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
    margin-top: 0;
    border-top: 1px solid var(--tp-line);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.tp-pagination-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--tp-muted);
}

.tp-pagination-range strong {
    color: var(--tp-ink);
    font-weight: 800;
}

.tp-pagination-status {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy);
    font-weight: 700;
    font-size: 11px;
}

.tp-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--tp-line);
    background: #fff;
    color: var(--tp-navy);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.tp-page-btn:hover:not(.is-disabled):not(.is-active) {
    background: #fff;
    border-color: var(--tp-navy-soft);
    color: var(--tp-navy);
    transform: translateY(-1px);
}

.tp-page-btn.is-active {
    background: var(--tp-navy);
    border-color: var(--tp-navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(11, 61, 92, 0.25);
}

.tp-page-btn--nav {
    min-width: 36px;
    padding: 0;
}

.tp-page-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

.tp-page-ellipsis {
    padding: 0 4px;
    color: var(--tp-muted);
    font-weight: 700;
    user-select: none;
}

.tp-card tfoot td {
    background: rgba(11, 61, 92, 0.06);
    border-top: 2px solid var(--tp-navy);
}

/* Home dashboard layout — existing navy / gold only */
.tp-dash-hero .tp-dash-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    margin-top: 0.85rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.tp-dash-hero .tp-dash-pills a { color: #f4c86a; text-decoration: none; }
.tp-dash-hero .tp-dash-pills a:hover { color: #fff; }
.tp-dash-sale {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    border-radius: 12px;
    background: var(--tp-navy-soft);
    color: #fff !important;
    font-weight: 800;
    border: 0;
    box-shadow: 0 10px 22px rgba(8, 38, 54, 0.28);
}
.tp-dash-sale:hover { color: #fff !important; background: #155a82; }
.tp-dash-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tp-dash-kpis .tp-stat { padding-right: 52px; }
.tp-dash-mid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 12px;
    margin-top: 14px;
    align-items: stretch;
}
.tp-dash-side { display: flex; flex-direction: column; gap: 12px; }
.tp-dash-chart-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-width: 0;
}
.tp-dash-chart-card .tp-dash-card-head {
    flex-shrink: 0;
}
.tp-dash-chart-card .tp-chart-box.tp-dash-chart {
    flex: 1 1 auto;
    min-height: 300px;
    height: auto;
    width: 100%;
}
.tp-dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 10px;
}
.tp-dash-card-head .tp-link-more { margin-top: 0; }

/* Premium text CTAs (cards, widgets, subtitles) */
.tp-link-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--tp-navy);
    text-decoration: none;
    background: linear-gradient(135deg, rgba(11, 61, 92, 0.07), rgba(26, 107, 154, 0.05));
    border: 1px solid rgba(11, 61, 92, 0.12);
    box-shadow: 0 2px 8px rgba(11, 61, 92, 0.06);
    transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tp-link-more:hover {
    color: #fff;
    background: linear-gradient(135deg, #1A6B9A, #0B3D5C);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(11, 61, 92, 0.22);
    transform: translateY(-1px);
}

.tp-link-more i {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.tp-link-more:hover i {
    transform: translateX(3px);
}

.tp-link-more--compact {
    padding: 0.35rem 0.75rem;
    font-size: 11px;
    margin-top: 0;
}

.tp-link-inline {
    font-weight: 700;
    color: var(--tp-navy-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 107, 154, 0.35);
    transition: color 0.15s, border-color 0.15s;
}

.tp-link-inline:hover {
    color: var(--tp-navy);
    border-bottom-color: var(--tp-accent);
}

.tp-link-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    font-size: 13px;
    color: var(--tp-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.tp-link-back:hover {
    color: var(--tp-navy);
}

.tp-content .tp-page-sub a:not([class]),
.tp-content .tp-page-sub a.tp-link-inline,
.tp-content p.small.text-muted a:not([class]) {
    font-weight: 700;
    color: var(--tp-navy-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 107, 154, 0.35);
    transition: color 0.15s, border-color 0.15s;
}

.tp-content .tp-page-sub a:not([class]):hover,
.tp-content p.small.text-muted a:not([class]):hover {
    color: var(--tp-navy);
    border-bottom-color: var(--tp-accent);
}

.tp-content .tp-table a:not(.btn):not(.tp-doc-link) {
    font-weight: 700;
    color: var(--tp-navy-soft);
    text-decoration: none;
}

.tp-content .tp-table a:not(.btn):not(.tp-doc-link):hover {
    color: var(--tp-navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tp-content .tp-dash-table a:not(.tp-doc-link) {
    font-weight: 700;
    color: var(--tp-navy-soft);
    text-decoration: none;
}

.tp-doc-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.55rem;
    border-radius: 8px;
    font-family: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--tp-navy) !important;
    text-decoration: none !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(11, 61, 92, 0.06));
    border: 1px solid rgba(11, 61, 92, 0.14);
    box-shadow: 0 1px 2px rgba(11, 61, 92, 0.06);
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    white-space: nowrap;
}

.tp-doc-link:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #1A6B9A, #0B3D5C);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(11, 61, 92, 0.22);
    transform: translateY(-1px);
}

button.tp-doc-link {
    cursor: pointer;
}

.tp-sale-detail-actions {
    align-items: center !important;
}
.tp-sale-detail-actions .btn {
    margin: 0;
    vertical-align: middle;
}
.tp-sale-detail-actions__form {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0;
    flex: 0 0 auto;
}
.tp-dash-tabs { display: flex; gap: 4px; }
.tp-dash-tabs button {
    border: 0;
    background: transparent;
    color: var(--tp-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
}
.tp-dash-tabs button.is-on { background: rgba(11, 61, 92, 0.08); color: var(--tp-navy); }
.tp-dash-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.tp-dash-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 78px;
    padding: 8px 4px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tp-navy);
    background: rgba(11, 61, 92, 0.06);
}
.tp-dash-action i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--tp-navy);
    color: #fff;
    font-size: 14px;
}
.tp-dash-action--blue { background: rgba(11, 61, 92, 0.08); }
.tp-dash-action--blue i { background: #0B3D5C; }
.tp-dash-action--green { background: rgba(26, 107, 154, 0.1); }
.tp-dash-action--green i { background: #1A6B9A; }
.tp-dash-action--orange { background: rgba(232, 168, 56, 0.16); }
.tp-dash-action--orange i { background: #E8A838; color: var(--tp-accent-ink); }
.tp-dash-action--purple { background: rgba(11, 61, 92, 0.06); }
.tp-dash-action--purple i { background: #155a82; }
.tp-dash-action--sea { background: rgba(26, 107, 154, 0.12); }
.tp-dash-action--sea i { background: #1A6B9A; }
.tp-dash-action--pink { background: rgba(232, 168, 56, 0.12); }
.tp-dash-action--pink i { background: #c9922f; color: #fff; }
.tp-dash-action--gold { background: rgba(232, 168, 56, 0.18); }
.tp-dash-action--gold i { background: var(--tp-accent); color: var(--tp-accent-ink); }
.tp-dash-action--slate { background: rgba(11, 61, 92, 0.05); }
.tp-dash-action--slate i { background: #3d5a6e; }
.tp-dash-action:hover { color: var(--tp-navy); transform: translateY(-2px); }
.tp-dash-stock { list-style: none; margin: 0; padding: 0; }
.tp-dash-stock li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--tp-line);
    font-size: 13px;
    font-weight: 600;
}
.tp-dash-stock li:last-child { border-bottom: 0; }
.tp-dash-stock i { color: var(--tp-navy-soft); margin-right: 6px; }
.tp-dash-ok { color: #1A6B9A; }
.tp-dash-warn { color: #c9922f; }
.tp-dash-bad { color: #b42318; }
.tp-dash-foot { margin: 0.35rem 0 0; font-size: 12px; color: var(--tp-muted); }
.tp-dash-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(220px, 0.8fr);
    gap: 12px;
    margin-top: 12px;
}
.tp-dash-table { font-size: 12.5px; }
.tp-dash-table th { color: var(--tp-muted); font-weight: 700; font-size: 11px; white-space: nowrap; }
.tp-dash-pay {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy);
    font-size: 11px;
    font-weight: 700;
}
.tp-dash-pay--cash { background: rgba(26, 107, 154, 0.14); color: #0d5c3a; }
.tp-dash-pay--card { background: rgba(11, 61, 92, 0.12); color: var(--tp-navy); }
.tp-dash-pay--bank { background: rgba(26, 107, 154, 0.18); color: #155a82; }
.tp-dash-low { color: #b42318; }
.tp-dash-prod {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
}
.tp-dash-prod img,
.tp-dash-prod-ph {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
}
.tp-dash-prod-ph {
    display: grid;
    place-items: center;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy-soft);
}
.tp-dash-top { list-style: none; margin: 0; padding: 0; }
.tp-dash-top li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--tp-line);
    font-size: 13px;
}
.tp-dash-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy);
    font-size: 11px;
    font-weight: 800;
    flex: 0 0 auto;
}
.tp-dash-top-thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 32px;
}
.tp-dash-top li .tp-dash-top-thumb.tp-dash-prod-ph {
    display: grid;
    place-items: center;
    font-size: 14px;
}
.tp-dash-top-name { flex: 1; min-width: 0; }
.tp-dash-top strong { margin-left: auto; flex: 0 0 auto; }
.tp-dash-top-select { width: auto; max-width: 130px; font-size: 12px; font-weight: 700; }
@media (max-width: 1199.98px) {
    .tp-dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tp-dash-mid, .tp-dash-bottom { grid-template-columns: 1fr; }
    .tp-dash-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .tp-dash-kpis, .tp-dash-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sales list page */
.tp-sales-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}
.tp-sales-head { margin-bottom: 0; }
.tp-sales-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
}
.tp-sales-kpi {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 14px 16px 12px;
    overflow: visible;
}
.tp-sales-kpi::before { display: none; }
.tp-stat.tp-sales-kpi > .tp-dash-kpi-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    flex: 0 0 40px;
    background: rgba(11, 61, 92, 0.08);
    color: var(--tp-navy);
}
.tp-stat.tp-sales-kpi > .tp-dash-kpi-ico .tp-stat-icon {
    position: static;
    right: auto;
    top: auto;
    width: auto;
    height: auto;
    display: block;
    font-size: 18px;
    line-height: 1;
    background: transparent;
    box-shadow: none;
    color: inherit;
}
.tp-sales-kpi:nth-child(even) > .tp-dash-kpi-ico {
    background: rgba(232, 168, 56, 0.18);
    color: #8a6414;
}
.tp-sales-kpi strong { font-size: 1.1rem; margin-top: 2px; }
.tp-sales-kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--tp-muted); font-weight: 600; }
.tp-sales-filters { padding: 16px 18px; min-width: 0; }
.tp-sales-filter-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.tp-sales-filter-field {
    min-width: 0;
}
.tp-sales-filter-form .form-control,
.tp-sales-filter-form .form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.tp-sales-search-in { min-width: 0; }
.tp-sales-filter-form .form-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tp-muted);
    margin-bottom: 4px;
}
.tp-sales-filter-search { grid-column: span 1; }
.tp-sales-search-in { position: relative; }
.tp-sales-search-in > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    pointer-events: none;
}
.tp-sales-search-in .form-control { padding-left: 34px; }
.tp-sales-filter-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
}
.tp-sales-filter-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    font-weight: 800;
    white-space: nowrap;
}
.tp-sales-list-card { padding: 0; display: flex; flex-direction: column; }
.tp-sales-table-wrap { flex: 0 1 auto; max-height: min(62vh, 640px); overflow: auto; }
.tp-sales-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tp-line);
}
.tp-sales-empty { padding: 2.5rem 1.5rem; color: var(--tp-muted); text-align: center; font-weight: 600; }
.tp-sales-table thead th {
    background: rgba(11, 61, 92, 0.06);
    color: var(--tp-navy);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 0;
    white-space: nowrap;
}
.tp-sales-table tbody td { vertical-align: middle; }
.tp-sales-invoice-no {
    font-family: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-navy);
    white-space: nowrap;
}
.tp-sales-dt span {
    display: block;
    font-size: 11px;
    color: var(--tp-muted);
    font-weight: 600;
}
.tp-sales-channel {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.tp-sales-channel--pos { background: rgba(11, 61, 92, 0.1); color: var(--tp-navy); }
.tp-sales-channel--online { background: rgba(26, 107, 154, 0.14); color: #155a82; }
.tp-sales-channel--other { background: rgba(11, 61, 92, 0.06); color: var(--tp-muted); }
.tp-sales-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.tp-sales-status--ok { background: rgba(26, 107, 154, 0.14); color: #0d5c3a; }
.tp-sales-status--pending { background: rgba(232, 168, 56, 0.2); color: #8a6414; }
.tp-sales-status--muted { background: rgba(11, 61, 92, 0.08); color: var(--tp-muted); }
.tp-sales-status--default { background: rgba(11, 61, 92, 0.06); color: var(--tp-navy); }
.tp-sales-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.tp-sales-actions .btn {
    font-size: 11px;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
}
.tp-sales-list-card .tp-pagination {
    padding: 12px 18px;
    border-top: 1px solid var(--tp-line);
    margin-top: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.tp-sales-list-card .tp-pagination-meta {
    margin-right: auto;
}
@media (max-width: 1199.98px) {
    .tp-sales-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-sales-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tp-sales-filter-search { grid-column: span 2; }
}
@media (max-width: 767.98px) {
    .tp-sales-kpis { grid-template-columns: 1fr; }
    .tp-sales-filters { padding: 14px 12px; }
    .tp-sales-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-sales-filter-search,
    .tp-sales-filter-actions { grid-column: 1 / -1; }
    .tp-sales-filter-actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    .tp-sales-filter-actions .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }
    .tp-sales-actions .btn span { display: none; }
}
@media (max-width: 575.98px) {
    .tp-sales-filter-form { grid-template-columns: minmax(0, 1fr); }
}

/* Warranties list (mockup-style) */
.tp-warranties-page { display: flex; flex-direction: column; gap: 14px; }
.tp-warranties-head .tp-page-sub { margin-top: 4px; }
.tp-warranties-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tp-warranties-kpi strong { font-size: 1.1rem; margin-top: 2px; }
.tp-warranties-kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--tp-muted); font-weight: 600; }
.tp-warranties-kpi--total .tp-stat-icon { color: #1a7a4a; }
.tp-warranties-kpi--active .tp-stat-icon { color: #1A6B9A; }
.tp-warranties-kpi--expiring .tp-stat-icon { color: #c47a12; }
.tp-warranties-kpi--expired .tp-stat-icon { color: #b42318; }
.tp-warranties-filters { padding: 16px 18px; }
.tp-warranties-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px 12px;
    align-items: end;
}
.tp-warranties-filter-form .form-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tp-muted);
    margin-bottom: 4px;
}
.tp-warranties-search-in { position: relative; }
.tp-warranties-search-in > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    pointer-events: none;
}
.tp-warranties-search-in .form-control { padding-left: 34px; }
.tp-warranties-filter-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
}
.tp-warranties-filter-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    font-weight: 800;
    white-space: nowrap;
}
.tp-warranties-list-card { padding: 0; display: flex; flex-direction: column; }
.tp-warranties-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--tp-line);
}
.tp-warranties-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tp-warranties-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--tp-navy);
    text-decoration: none !important;
    border: 1px solid rgba(11, 61, 92, 0.14);
    background: #fff;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tp-warranties-tab:hover {
    border-color: rgba(11, 61, 92, 0.28);
    color: var(--tp-navy);
}
.tp-warranties-tab.is-active {
    background: linear-gradient(135deg, #1A6B9A, #0B3D5C);
    border-color: transparent;
    color: #fff !important;
}
button.tp-warranties-tab {
    cursor: pointer;
    font: inherit;
}
.tp-warranties-table-wrap { max-height: min(62vh, 640px); overflow: auto; }
.tp-warranties-table thead th {
    background: rgba(11, 61, 92, 0.06);
    color: var(--tp-navy);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 0;
    white-space: nowrap;
}
.tp-warranties-table tbody td { vertical-align: middle; }
.tp-warranties-empty { padding: 2.5rem 1.5rem; color: var(--tp-muted); text-align: center; font-weight: 600; }
.tp-warranties-no {
    font-family: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-navy);
    white-space: nowrap;
}
.tp-warranties-bill {
    font-family: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-navy);
}
.tp-warranties-phone { font-size: 11px; color: var(--tp-muted); font-weight: 600; }
.tp-warranties-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-warranties-product-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--tp-line);
    flex-shrink: 0;
}
.tp-warranties-product-ph {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(11, 61, 92, 0.06);
    color: var(--tp-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tp-warranties-product-name { font-weight: 800; font-size: 13px; color: var(--tp-navy); }
.tp-warranties-product-meta { font-size: 11px; color: var(--tp-muted); font-weight: 600; }
.tp-warranties-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.tp-warranties-status .bi-circle-fill { font-size: 7px; }
.tp-warranties-status--active { background: rgba(26, 122, 74, 0.12); color: #0d5c3a; }
.tp-warranties-status--expiring { background: rgba(232, 168, 56, 0.22); color: #8a6414; }
.tp-warranties-status--expired { background: rgba(180, 35, 24, 0.12); color: #9b1c12; }
.tp-warranties-status--void { background: rgba(11, 61, 92, 0.08); color: var(--tp-muted); }
.tp-warranties-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
.tp-warranties-actions .btn { padding: 0.25rem 0.45rem; font-size: 12px; }
.tp-warranties-list-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--tp-line);
    padding: 0 18px 12px;
}
.tp-warranties-list-foot .tp-pagination {
    flex: 1 1 auto;
    margin: 0;
    padding: 12px 0 0;
    border-top: 0;
}
.tp-warranties-per-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
}
.tp-warranties-per-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--tp-muted);
    margin: 0;
    white-space: nowrap;
}
.tp-warranties-per-form .form-select { width: auto; min-width: 4.5rem; }
@media (max-width: 1199.98px) {
    .tp-warranties-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-warranties-filter-form { grid-template-columns: 1fr 1fr; }
    .tp-warranties-filter-lookup { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .tp-warranties-kpis { grid-template-columns: 1fr; }
    .tp-warranties-filter-form { grid-template-columns: 1fr; }
    .tp-warranties-filter-actions { grid-column: 1 / -1; }
}

/* Catalog category POS icon picker (/categories) */
.tp-cat-icon-picker {
    max-width: 100%;
}
.tp-cat-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tp-cat-icon-opt {
    width: 38px;
    height: 38px;
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    background: #fff;
    color: var(--tp-navy);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tp-cat-icon-opt:hover {
    border-color: var(--tp-accent);
    transform: translateY(-1px);
}
.tp-cat-icon-opt.is-selected {
    border-color: var(--tp-navy);
    background: rgba(11, 61, 92, .08);
    box-shadow: 0 0 0 2px rgba(11, 61, 92, .12);
}
.tp-cat-icon-picker--compact .tp-cat-icon-opt {
    width: 32px;
    height: 32px;
    font-size: .95rem;
    border-radius: 8px;
}
.tp-cat-icon-picker--compact .tp-cat-icon-grid {
    gap: 4px;
    max-width: 280px;
}

.tp-cat-icon-field {
    display: inline-flex;
    justify-content: center;
}
.tp-cat-icon-trigger {
    width: 42px;
    height: 42px;
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    background: #fff;
    color: var(--tp-navy);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tp-cat-icon-trigger:hover {
    border-color: var(--tp-navy);
    box-shadow: 0 4px 12px rgba(11, 61, 92, .12);
    transform: translateY(-1px);
}
.tp-cat-icon-modal {
    z-index: 1065;
}
.tp-cat-icon-modal .modal-dialog {
    max-width: min(420px, 92vw);
}
.tp-cat-icon-modal .modal-content {
    border-radius: 14px;
    border: 1px solid var(--tp-line);
    box-shadow: 0 24px 48px rgba(11, 61, 92, 0.22);
}
#catIconModal .tp-cat-icon-grid {
    justify-content: center;
}

@media print {
    .tp-sidebar,
    .tp-topbar,
    .offcanvas,
    .tp-offcanvas,
    .tp-report-exports,
    .tp-splash {
        display: none !important;
    }
    .tp-shell,
    .tp-main {
        display: block !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }
    .tp-content {
        padding: 0 !important;
    }
    body.tp-body {
        background: #fff !important;
    }
    .tp-content form {
        display: none !important;
    }
    .tp-card {
        box-shadow: none !important;
        break-inside: avoid;
    }
}
