:root {
    --tln-app-bg: #edf2f7;
    --tln-surface: rgba(255, 255, 255, 0.94);
    --tln-surface-strong: #ffffff;
    --tln-ink: #0d172b;
    --tln-ink-soft: #1c2942;
    --tln-muted: #697586;
    --tln-line: rgba(13, 23, 43, 0.08);
    --tln-line-strong: rgba(13, 23, 43, 0.14);
    --tln-mint: #61f0bc;
    --tln-mint-deep: #1e8866;
    --tln-sky: #67c0f5;
    --tln-danger: #c9485b;
    --tln-warning: #d89b1f;
    --tln-shadow: 0 18px 42px rgba(13, 23, 43, 0.08);
    --tln-shadow-strong: 0 24px 60px rgba(13, 23, 43, 0.14);
}

/* Consolidated interface system — shared visual hierarchy and accessibility. */
:root {
    --tln-space-1: 0.5rem;
    --tln-space-2: 0.75rem;
    --tln-space-3: 1rem;
    --tln-space-4: 1.5rem;
    --tln-space-5: 2rem;
    --tln-focus: #f26a14;
    --tln-whatsapp-size: 3.75rem;
    --tln-floating-gap: 1rem;
}

html { scroll-behavior: smooth; }
body { line-height: 1.55; }

.dashboard-content { gap: var(--tln-space-4); }
.page-head { align-items: center; margin-bottom: 0; }
.page-head-copy h1,
.page-head-copy .h3 { max-width: 22ch; margin-bottom: var(--tln-space-1); }
.page-head-copy p { color: #526174; }
.page-head-actions { align-items: center; }

.dashboard-menu-toggle { display: none; }
.dashboard-nav { min-height: 0; }
.dashboard-nav-link { position: relative; flex-shrink: 0; }
.dashboard-nav-link:hover { transform: none; }

.panel-card,
.table-panel,
.filter-panel,
.info-panel,
.dashboard-stat-card,
.dashboard-highlight,
.dashboard-content .card {
    overflow: hidden;
}

.row.g-4 > [class*="col-"] > :is(.card, .panel-card, .info-panel, .dashboard-highlight),
.dashboard-stats-grid > * { height: 100%; }

.dashboard-stat-card { display: flex; flex-direction: column; justify-content: space-between; }
.dashboard-stat-label { color: #526174; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    border-radius: 8px !important;
    line-height: 1.2;
}
.btn-sm { min-height: 38px; }
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.dashboard-nav-link:focus-visible,
.dashboard-menu-toggle:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--tln-focus) 72%, white);
    outline-offset: 3px;
    box-shadow: none !important;
}

.form-control,
.form-select { border-color: rgba(16, 64, 112, 0.24); }
.form-control::placeholder { color: #788697; opacity: 1; }
.form-text,
.text-muted { color: #5d6b7b !important; }
.form-check { min-height: 44px; display: inline-flex; align-items: center; gap: 0.55rem; }
.form-check-input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; }

.form-section-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.65rem;
    padding: 0.85rem 0 0.75rem;
    border-bottom: 1px solid var(--tln-line);
}
.form-section-heading > span {
    display: inline-flex;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--tln-brand-blue);
    color: #fff;
    font-weight: 800;
}
.form-section-heading strong,
.form-section-heading small { display: block; }
.form-section-heading small { margin-top: 0.1rem; color: #5d6b7b; }
.form-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; }
.form-option-grid .form-check { margin: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--tln-line); border-radius: 8px; background: #f8fafc; }

.table-responsive {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    border: 1px solid var(--tln-line);
}
.table-responsive table { margin-bottom: 0; }
.table-responsive thead th { position: sticky; top: 0; z-index: 2; background: #f5f7fa !important; color: #405065 !important; }
.table-responsive tbody tr:nth-child(even) { background: rgba(16, 64, 112, 0.025); }
.table-responsive :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--tln-line); }
.table-responsive thead th:first-child { z-index: 3; background: #f5f7fa !important; }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid transparent;
    font-weight: 750;
}
.badge.text-bg-secondary { background: #526174 !important; color: #fff !important; }
.badge.text-bg-danger { background: #a5283d !important; color: #fff !important; }
.badge.text-bg-info { background: #d9edf8 !important; color: #123e59 !important; border-color: #b7d7e8; }

.empty-state,
.dashboard-content .text-center.py-5 {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 2rem !important;
    border: 1px dashed rgba(16, 64, 112, 0.25);
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}
.empty-state > *,
.dashboard-content .text-center.py-5 > * { max-width: 36rem; }

.tln-whatsapp-float {
    position: fixed;
    right: max(var(--tln-floating-gap), env(safe-area-inset-right));
    bottom: max(var(--tln-floating-gap), env(safe-area-inset-bottom));
    z-index: 1060;
    display: inline-flex;
    width: var(--tln-whatsapp-size);
    height: var(--tln-whatsapp-size);
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #147a46;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(6, 43, 80, 0.24);
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.tln-whatsapp-float:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(6, 43, 80, 0.3); }

.tln-notification-region {
    position: fixed;
    right: max(var(--tln-floating-gap), env(safe-area-inset-right));
    bottom: calc(var(--tln-whatsapp-size) + var(--tln-floating-gap) * 2);
    z-index: 1080;
    display: grid;
    width: min(390px, calc(100vw - 2rem));
    max-height: min(70vh, 620px);
    gap: 0.65rem;
    overflow-y: auto;
    padding: 0.25rem;
}
.tln-notification-toast { width: 100%; margin: 0; border: 1px solid var(--tln-line) !important; border-left: 4px solid var(--tln-brand-gold) !important; border-radius: 8px; background: #fff; color: var(--tln-ink); cursor: pointer; }

@media (max-width: 767.98px) {
    .dashboard-sidebar > div:first-child { width: 100%; }
    .dashboard-menu-toggle {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem 0.85rem;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-weight: 800;
    }
    .dashboard-status-note { display: none; }
    .dashboard-nav { display: none; width: 100%; max-height: min(62vh, 480px); overflow: auto; padding: 0.35rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
    .dashboard-nav.is-open { display: grid; }
    .dashboard-nav-link { width: 100%; white-space: normal; }
    .dashboard-nav-link.active { box-shadow: inset 3px 0 0 var(--tln-brand-gold); }
    .dashboard-topbar-search { display: none; }
    .dashboard-topbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-topbar-actions > * { width: 100%; }
    .dashboard-topbar-actions form .btn { width: 100%; }
    .dashboard-user-pill { grid-column: 1 / -1; }
    .page-head-copy h1,
    .page-head-copy .h3 { font-size: clamp(1.65rem, 8vw, 2.1rem); }
    .page-head-actions,
    .page-head-actions .btn { width: 100%; }
    .form-option-grid { grid-template-columns: 1fr; }
    .table-responsive { margin-inline: -0.75rem; width: calc(100% + 1.5rem); border-radius: 0; }
    .table-responsive :is(th, td) { padding: 0.72rem !important; font-size: 0.88rem; }
    .tln-notification-region { left: 1rem; right: 1rem; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

body {
    font-family: "Plus Jakarta Sans", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(97, 240, 188, 0.12), transparent 24%),
        linear-gradient(180deg, #f6f8fb 0%, var(--tln-app-bg) 100%);
    color: var(--tln-ink);
}

.bg-light,
.bg-auth {
    background: transparent !important;
}

.bg-auth {
    min-height: 100vh;
    padding-block: 2rem;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 2rem;
    align-items: stretch;
    width: min(1380px, calc(100% - 2rem));
    margin: 0 auto;
}

.auth-brand-panel,
.auth-container {
    border-radius: 32px;
    border: 1px solid var(--tln-line);
    background: var(--tln-surface);
    box-shadow: var(--tln-shadow);
    backdrop-filter: blur(14px);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 2.4rem;
    background:
        radial-gradient(circle at top right, rgba(103, 192, 245, 0.22), transparent 28%),
        linear-gradient(135deg, #0d172b 0%, #16233c 52%, #1a3056 100%);
    color: #fff;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(97, 240, 188, 0.12);
    filter: blur(8px);
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--tln-mint);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-brand-panel h1 {
    max-width: 520px;
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 3vw, 3.5rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.auth-brand-panel p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.auth-form-panel {
    display: flex;
    align-items: center;
}

.auth-brand-points {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.8rem;
}

.auth-brand-point,
.auth-brand-points div {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
}

.auth-brand-point strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #fff;
}

.auth-brand-point span {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.65;
}

.auth-brand-points i {
    color: var(--tln-mint);
}

.auth-container {
    width: min(680px, 100%);
    margin: 0 auto;
}

.auth-panel-card,
.panel-card,
.dashboard-stat-card,
.dashboard-highlight,
.table-panel,
.filter-panel,
.info-panel {
    border: 1px solid var(--tln-line) !important;
    border-radius: 28px !important;
    background: var(--tln-surface) !important;
    box-shadow: var(--tln-shadow) !important;
}

.auth-panel-card .card-body,
.panel-card .card-body,
.table-panel .card-body,
.filter-panel .card-body,
.info-panel .card-body {
    padding: 1.75rem;
}

.auth-heading {
    margin-bottom: 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-subtext {
    color: var(--tln-muted);
    line-height: 1.8;
}

.auth-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.auth-type-card {
    display: block;
    padding: 1.2rem 1.25rem;
    border-radius: 22px;
    border: 1px solid var(--tln-line);
    background: #fff;
    color: var(--tln-ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-type-card:hover,
.auth-type-card.active {
    transform: translateY(-2px);
    border-color: rgba(97, 240, 188, 0.5);
    box-shadow: 0 16px 32px rgba(13, 23, 43, 0.08);
}

.auth-type-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.auth-type-card span {
    color: var(--tln-muted);
    font-size: 0.92rem;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.6rem;
    background:
        radial-gradient(circle at top right, rgba(97, 240, 188, 0.12), transparent 28%),
        linear-gradient(180deg, #0d172b 0%, #18284a 100%);
    color: #fff;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    color: #fff;
    text-decoration: none;
}

.dashboard-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--tln-mint);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dashboard-brand-copy small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
}

.dashboard-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.8rem;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-status-note {
    margin-top: -0.35rem;
}

.dashboard-sidebar hr {
    margin: 1.5rem 0;
    border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-nav {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.dashboard-aside-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.dashboard-side-card {
    margin-top: auto;
    padding: 1.05rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-side-card-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.dashboard-side-card strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1rem;
}

.dashboard-side-card p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    line-height: 1.6;
}

.dashboard-aside-footer p {
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
}

.dashboard-main {
    min-width: 0;
    padding: 1.4rem;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
    padding: 1rem 1.1rem;
    border-radius: 24px;
    border: 1px solid var(--tln-line);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 24px rgba(13, 23, 43, 0.05);
}

.dashboard-topbar-search {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: rgba(13, 23, 43, 0.04);
    color: var(--tln-muted);
    font-weight: 600;
}

.dashboard-user-block {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.dashboard-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tln-mint), #a1f8db);
    color: var(--tln-ink);
    font-weight: 800;
}

.dashboard-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0.4rem 0.3rem 0.3rem;
    border-radius: 999px;
    background: rgba(13, 23, 43, 0.04);
}

.dashboard-user-pill strong,
.dashboard-user-pill small {
    display: block;
}

.dashboard-user-pill small {
    color: var(--tln-muted);
}

.dashboard-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-user-meta small {
    color: var(--tln-muted);
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.dashboard-search {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 280px;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(13, 23, 43, 0.04);
    color: var(--tln-muted);
}

.dashboard-content {
    display: grid;
    gap: 1.5rem;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-kicker {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: var(--tln-mint-deep);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.page-head-copy h1,
.page-head-copy .h3 {
    margin-bottom: 0.45rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.page-head-copy p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--tln-muted);
    line-height: 1.8;
}

.page-head-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-stat-card {
    padding: 1.4rem 1.45rem;
}

.dashboard-stat-label {
    margin-bottom: 0.8rem;
    color: var(--tln-muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dashboard-stat-value {
    font-size: clamp(2rem, 2.2vw, 2.9rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--tln-ink);
}

.dashboard-highlight {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(97, 240, 188, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f7fafc 100%) !important;
}

.dashboard-highlight.dark {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(97, 240, 188, 0.12), transparent 28%),
        linear-gradient(135deg, #0d172b 0%, #18284a 100%) !important;
}

.dashboard-highlight.dark p,
.dashboard-highlight.dark .meta-note,
.dashboard-highlight.dark .dashboard-stat-label {
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-highlight h4 {
    margin-bottom: 0.9rem;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.dashboard-highlight h3 {
    margin-bottom: 0.8rem;
    font-size: clamp(1.5rem, 2vw, 2.15rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-highlight p {
    color: var(--tln-muted);
    line-height: 1.85;
}

.highlight-inline {
    margin-top: 1rem;
    color: var(--tln-muted);
    font-size: 0.98rem;
}

.dashboard-highlight.dark .highlight-inline {
    color: rgba(255, 255, 255, 0.74);
}

.highlight-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.highlight-metrics strong,
.highlight-metrics span {
    display: block;
}

.highlight-metrics strong {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.highlight-metrics span {
    color: var(--tln-muted);
    line-height: 1.6;
}

.dashboard-highlight.dark .highlight-metrics span {
    color: rgba(255, 255, 255, 0.68);
}

.meta-note {
    color: var(--tln-muted);
    font-size: 0.95rem;
}

.status-pill-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(97, 240, 188, 0.14);
    color: var(--tln-mint-deep);
    font-weight: 700;
}

.filter-panel form .row,
.table-panel .table-responsive {
    margin-top: 0;
}

.filter-panel-body,
.table-panel-body {
    padding: 1.75rem;
}

.table-panel table {
    margin-bottom: 0;
}

.table-panel .table > :not(caption) > * > * {
    padding: 1rem 0.85rem;
    border-bottom-color: rgba(13, 23, 43, 0.06);
    background: transparent;
}

.table-panel thead th {
    color: var(--tln-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    border-bottom-width: 1px;
}

.table-panel tbody tr:hover {
    background: rgba(13, 23, 43, 0.02);
}

.dashboard-content .card:not(.auth-panel-card):not(.dashboard-stat-card):not(.dashboard-highlight):not(.table-panel):not(.filter-panel):not(.info-panel) {
    border: 1px solid var(--tln-line);
    border-radius: 28px;
    background: var(--tln-surface);
    box-shadow: var(--tln-shadow);
}

.dashboard-content .card:not(.auth-panel-card) .card-body {
    padding: 1.6rem;
}

.form-control,
.form-select {
    min-height: 54px;
    border-radius: 18px;
    border-color: rgba(13, 23, 43, 0.1);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none !important;
}

textarea.form-control {
    min-height: 150px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(97, 240, 188, 0.55);
}

.btn {
    min-height: 48px;
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tln-mint), #95f9d8);
    border-color: transparent;
    color: var(--tln-ink);
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--tln-ink);
    background: linear-gradient(135deg, #7af5cc, #b2fbe3);
}

.btn-outline-primary {
    border-color: rgba(13, 23, 43, 0.12);
    color: var(--tln-ink);
}

.btn-outline-primary:hover {
    border-color: rgba(97, 240, 188, 0.45);
    background: rgba(97, 240, 188, 0.12);
    color: var(--tln-ink);
}

.btn-outline-secondary,
.btn-outline-light {
    border-color: rgba(13, 23, 43, 0.1);
    color: var(--tln-muted);
    background: rgba(255, 255, 255, 0.88);
}

.btn-outline-secondary:hover,
.btn-outline-light:hover {
    color: var(--tln-ink);
    border-color: rgba(13, 23, 43, 0.22);
    background: #fff;
}

.btn-danger,
.btn-outline-danger:hover {
    background: var(--tln-danger);
    border-color: var(--tln-danger);
}

.alert {
    border: 0;
    border-radius: 22px;
    box-shadow: var(--tln-shadow);
}

.badge {
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
}

.printable-document {
    border: 1px solid rgba(13, 23, 43, 0.08);
    background: #fff;
}

/* UI/UX polish pass: tighter enterprise spacing, stable responsive behavior. */
:root {
    --tln-app-bg: #f4f6f3;
    --tln-surface: rgba(255, 255, 255, 0.96);
    --tln-surface-strong: #ffffff;
    --tln-ink: #151a18;
    --tln-ink-soft: #2f3a35;
    --tln-muted: #66736d;
    --tln-line: rgba(21, 26, 24, 0.1);
    --tln-line-strong: rgba(21, 26, 24, 0.16);
    --tln-mint: #57e2a6;
    --tln-mint-deep: #0e7c57;
    --tln-sky: #4f9ed8;
    --tln-warning: #b7791f;
    --tln-shadow: 0 10px 26px rgba(21, 26, 24, 0.08);
    --tln-shadow-strong: 0 18px 40px rgba(21, 26, 24, 0.12);
    --tln-radius: 8px;
}

* {
    letter-spacing: 0;
}

body {
    background:
        linear-gradient(180deg, #fbfcfa 0%, #f4f6f3 44%, #edf2ef 100%);
    color: var(--tln-ink);
}

.auth-brand-panel,
.auth-container,
.auth-panel-card,
.panel-card,
.dashboard-stat-card,
.dashboard-highlight,
.table-panel,
.filter-panel,
.info-panel,
.dashboard-content .card:not(.auth-panel-card):not(.dashboard-stat-card):not(.dashboard-highlight):not(.table-panel):not(.filter-panel):not(.info-panel),
.alert,
.printable-document {
    border-radius: var(--tln-radius) !important;
}

.auth-brand-panel {
    background:
        linear-gradient(135deg, #16211c 0%, #21352b 55%, #31513f 100%);
}

.auth-brand-panel::after {
    display: none;
}

.auth-brand-mark,
.dashboard-brand-mark,
.dashboard-role-chip,
.dashboard-side-card,
.dashboard-nav-link,
.dashboard-topbar,
.dashboard-topbar-search,
.dashboard-search,
.dashboard-user-pill,
.auth-type-card,
.form-control,
.form-select,
.btn,
.badge,
.status-pill-inline {
    border-radius: var(--tln-radius) !important;
}

.auth-brand-panel h1 {
    font-size: 3rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-heading {
    font-size: 2rem;
    letter-spacing: 0;
}

.dashboard-sidebar {
    background:
        linear-gradient(180deg, #18221d 0%, #24372d 100%);
}

.dashboard-brand-copy strong {
    max-width: 165px;
    line-height: 1.25;
}

.dashboard-nav-link {
    min-height: 44px;
}

.dashboard-nav-link i {
    width: 18px;
    text-align: center;
    color: var(--tln-mint);
}

.dashboard-nav-link.active {
    background: rgba(87, 226, 166, 0.15);
    box-shadow: inset 3px 0 0 var(--tln-mint);
}

.dashboard-topbar {
    padding: 0.85rem;
}

.dashboard-topbar-search,
.dashboard-search {
    min-height: 44px;
    padding-block: 0.65rem;
}

.dashboard-user-avatar {
    width: 38px;
    height: 38px;
}

.dashboard-user-pill {
    max-width: 310px;
}

.dashboard-user-pill strong,
.dashboard-user-pill small {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-content {
    gap: 1.15rem;
}

.dashboard-content > .d-flex.justify-content-between,
.page-head {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--tln-line);
}

.dashboard-content > .d-flex.justify-content-between h1,
.page-head-copy h1,
.page-head-copy .h3 {
    font-size: 2.2rem;
    line-height: 1.14;
    letter-spacing: 0;
}

.dashboard-content > .d-flex.justify-content-between p,
.page-head-copy p {
    max-width: 760px;
    line-height: 1.65;
}

.dashboard-stat-card {
    min-height: 120px;
    padding: 1.2rem;
}

.dashboard-stat-label,
.page-kicker,
.dashboard-side-card-kicker,
.auth-kicker,
.table-panel thead th {
    letter-spacing: 0;
}

.dashboard-stat-value,
.dashboard-content .display-6,
.dashboard-content .h4,
.dashboard-highlight h3,
.dashboard-highlight h4 {
    letter-spacing: 0;
}

.dashboard-stat-value,
.dashboard-content .display-6 {
    font-size: 2.15rem;
}

.dashboard-highlight {
    padding: 1.4rem;
    background: #ffffff !important;
}

.dashboard-highlight.dark {
    background:
        linear-gradient(135deg, #18221d 0%, #263a30 100%) !important;
}

.dashboard-highlight h3 {
    font-size: 1.75rem;
}

.highlight-metrics {
    gap: 0.75rem;
}

.highlight-metrics > div {
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tln-radius);
}

.dashboard-highlight:not(.dark) .highlight-metrics > div {
    border-color: var(--tln-line);
    background: #f8faf8;
}

.filter-panel-body,
.table-panel-body,
.auth-panel-card .card-body,
.panel-card .card-body,
.dashboard-content .card:not(.auth-panel-card) .card-body {
    padding: 1.25rem;
}

.table-responsive {
    border-radius: var(--tln-radius);
}

.table-panel table,
.dashboard-content .table {
    min-width: 760px;
}

.table-panel .table > :not(caption) > * > *,
.dashboard-content .table > :not(caption) > * > * {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.dashboard-content .table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-content .border.rounded-3,
.dashboard-content form.border.rounded-3 {
    border-radius: var(--tln-radius) !important;
    border-color: var(--tln-line) !important;
    background: #fbfcfb;
}

.form-label {
    margin-bottom: 0.45rem;
    color: var(--tln-ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 46px;
}

textarea.form-control {
    min-height: 118px;
}

.form-text,
.text-muted.small {
    line-height: 1.55;
}

.btn {
    min-height: 42px;
    padding-inline: 1rem;
}

.btn-sm {
    min-height: 36px;
    padding-inline: 0.85rem;
}

.btn-success {
    background: var(--tln-mint-deep);
    border-color: var(--tln-mint-deep);
}

.btn-outline-success {
    color: var(--tln-mint-deep);
    border-color: rgba(14, 124, 87, 0.28);
}

.btn-outline-success:hover {
    background: rgba(14, 124, 87, 0.1);
    color: var(--tln-mint-deep);
}

.badge {
    line-height: 1;
    white-space: normal;
}

.list-unstyled.d-grid li {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--tln-line);
}

.list-unstyled.d-grid li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

@media (max-width: 1399.98px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .auth-shell,
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
        height: auto;
        padding: 1rem;
        gap: 0.9rem;
    }

    .dashboard-sidebar > div:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .dashboard-brand {
        margin-bottom: 0;
    }

    .dashboard-role-chip {
        margin-top: 0;
    }

    .dashboard-status-note {
        margin-top: 0;
    }

    .dashboard-nav {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
    }

    .dashboard-nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 40px;
        padding: 0.65rem 0.85rem;
    }

    .dashboard-nav-link.active {
        box-shadow: inset 0 -3px 0 var(--tln-mint);
    }

    .dashboard-side-card {
        display: none;
    }

    .dashboard-main {
        padding: 1rem;
    }
}

@media (max-width: 991.98px) {
    .dashboard-topbar,
    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-search,
    .dashboard-topbar-search {
        min-width: 0;
        width: 100%;
    }

    .dashboard-topbar-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .dashboard-user-pill {
        max-width: 100%;
    }

    .dashboard-content > .d-flex.justify-content-between,
    .page-head {
        gap: 0.75rem;
    }

    .dashboard-content > .d-flex.justify-content-between h1,
    .page-head-copy h1,
    .page-head-copy .h3 {
        font-size: 1.85rem;
    }

    .auth-shell {
        width: min(720px, calc(100% - 1.5rem));
    }

    .auth-brand-panel {
        min-height: auto;
    }

    .auth-brand-panel h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 767.98px) {
    .auth-type-grid,
    .dashboard-stats-grid,
    .highlight-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-main {
        padding: 0.75rem;
    }

    .dashboard-topbar,
    .auth-brand-panel,
    .auth-container {
        border-radius: 24px;
    }

    .dashboard-topbar {
        padding: 0.75rem;
    }

    .dashboard-topbar-actions {
        gap: 0.45rem;
    }

    .dashboard-topbar-actions > .btn,
    .dashboard-topbar-actions > form {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .dashboard-topbar-actions > form .btn {
        width: 100%;
    }

    .dashboard-user-pill {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .dashboard-user-pill small {
        display: none;
    }

    .dashboard-brand-copy small,
    .dashboard-topbar-search span {
        display: none;
    }

    .dashboard-content > .d-flex.justify-content-between,
    .page-head {
        padding-bottom: 0.75rem;
    }

    .dashboard-content > .d-flex.justify-content-between h1,
    .page-head-copy h1,
    .page-head-copy .h3 {
        font-size: 1.55rem;
    }

    .dashboard-content > .d-flex.justify-content-between > .d-flex,
    .page-head-actions {
        width: 100%;
    }

    .dashboard-content > .d-flex.justify-content-between > .d-flex .btn,
    .page-head-actions .btn {
        flex: 1 1 100%;
    }

    .dashboard-content .card-body,
    .filter-panel-body,
    .table-panel-body,
    .auth-panel-card .card-body,
    .panel-card .card-body {
        padding: 1rem !important;
    }

    .dashboard-highlight {
        padding: 1rem;
    }

    .dashboard-stat-card {
        min-height: auto;
    }

    .dashboard-stat-value,
    .dashboard-content .display-6 {
        font-size: 1.8rem;
    }

    .table-panel table,
    .dashboard-content .table {
        min-width: 680px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    .btn:not(.btn-sm) {
        width: 100%;
    }

    .auth-brand-points {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        width: min(100% - 1rem, 520px);
        gap: 0.75rem;
    }

    .auth-brand-panel {
        padding: 1.2rem;
    }

    .auth-brand-panel h1 {
        font-size: 1.75rem;
    }

    .auth-heading {
        font-size: 1.55rem;
    }

    .dashboard-sidebar {
        padding: 0.75rem;
    }

    .dashboard-brand-mark {
        width: 44px;
        height: 44px;
    }

    .dashboard-brand-copy strong {
        max-width: 135px;
        font-size: 0.95rem;
    }

    .dashboard-role-chip {
        padding: 0.55rem 0.7rem;
        font-size: 0.72rem;
    }

    .dashboard-nav-link {
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
    }

    .row.g-3,
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

@media print {
    .no-print,
    .dashboard-sidebar,
    header,
    .alert,
    .dashboard-topbar {
        display: none !important;
    }

    body,
    .bg-light {
        background: #fff !important;
    }

    main {
        padding: 0 !important;
    }

    .printable-document {
        box-shadow: none !important;
        border: 0 !important;
    }
}

/* Full dashboard design pass: shared polish for every authenticated page. */
:root {
    --tln-radius: 8px;
    --tln-focus: 0 0 0 0.22rem rgba(14, 124, 87, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

p,
li,
.meta-note,
.text-muted {
    text-wrap: pretty;
}

.dashboard-shell {
    background: linear-gradient(180deg, #fbfcfa 0%, #f4f6f3 48%, #edf2ef 100%);
}

.dashboard-sidebar,
.dashboard-topbar,
.dashboard-content .card,
.dashboard-stat-card,
.dashboard-highlight,
.table-panel,
.filter-panel,
.info-panel,
.auth-brand-panel,
.auth-container,
.auth-panel-card,
.panel-card,
.alert {
    border-radius: var(--tln-radius) !important;
}

.dashboard-brand,
.dashboard-nav-link,
.dashboard-topbar-actions,
.page-head-actions,
.dashboard-toolbar {
    min-width: 0;
}

.dashboard-nav-link span,
.dashboard-brand-copy strong,
.dashboard-brand-copy small,
.dashboard-topbar-search span,
.dashboard-user-pill strong,
.dashboard-user-pill small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-nav-link {
    line-height: 1.25;
}

.dashboard-topbar {
    position: sticky;
    top: 1rem;
    z-index: 5;
}

.dashboard-content {
    max-width: 1280px;
    margin-inline: auto;
}

.dashboard-content > * {
    min-width: 0;
}

.dashboard-content .card,
.dashboard-stat-card,
.dashboard-highlight,
.table-panel,
.filter-panel,
.info-panel,
.auth-panel-card,
.panel-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-stat-card:hover,
.dashboard-content .card:hover,
.table-panel:hover,
.filter-panel:hover,
.info-panel:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 124, 87, 0.22) !important;
}

.page-head {
    margin-bottom: 0.25rem;
}

.page-head-actions .btn,
.dashboard-topbar-actions .btn,
.dashboard-topbar-actions form {
    min-width: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    line-height: 1.2;
    white-space: normal;
}

.btn:focus,
.form-control:focus,
.form-select:focus,
.dashboard-nav-link:focus {
    box-shadow: var(--tln-focus) !important;
    outline: none;
}

.form-control::placeholder {
    color: rgba(102, 115, 109, 0.72);
}

.table-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    white-space: nowrap;
}

.table-responsive td,
.table-responsive th {
    max-width: 280px;
}

.table-responsive td {
    text-overflow: ellipsis;
    overflow: hidden;
}

.badge {
    max-width: 100%;
}

.auth-shell {
    min-height: calc(100vh - 4rem);
}

.auth-form-panel {
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .dashboard-shell {
        display: block;
    }

    .dashboard-sidebar {
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 0 !important;
    }

    .dashboard-nav {
        margin-inline: -0.25rem;
        padding-inline: 0.25rem;
    }

    .dashboard-topbar {
        position: static;
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        min-height: auto;
    }

    .auth-brand-panel {
        display: block;
    }

    .dashboard-content > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .dashboard-content > .d-flex.justify-content-between > .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 767.98px) {
    .dashboard-main {
        padding: 0.75rem;
    }

    .dashboard-sidebar {
        padding: 0.75rem;
    }

    .dashboard-sidebar > div:first-child {
        align-items: flex-start;
    }

    .dashboard-brand {
        max-width: 100%;
    }

    .dashboard-brand-copy strong {
        max-width: 190px;
    }

    .dashboard-role-chip,
    .dashboard-status-note {
        width: auto;
    }

    .dashboard-nav {
        gap: 0.4rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .dashboard-nav-link {
        max-width: 220px;
    }

    .dashboard-topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .dashboard-topbar-actions > .btn,
    .dashboard-topbar-actions > form,
    .dashboard-topbar-actions > form .btn,
    .page-head-actions,
    .page-head-actions .btn {
        width: 100%;
    }

    .dashboard-user-pill {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .dashboard-user-pill strong {
        max-width: 180px;
    }

    .page-head-copy h1,
    .dashboard-content > .d-flex.justify-content-between h1 {
        font-size: 1.55rem;
    }

    .dashboard-highlight h3,
    .dashboard-highlight h4 {
        font-size: 1.35rem;
    }

    .dashboard-stats-grid,
    .highlight-metrics,
    .auth-type-grid {
        grid-template-columns: 1fr !important;
    }

    .row.g-4,
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .table-responsive table {
        min-width: 680px;
    }

    .auth-shell {
        width: min(100% - 1rem, 540px);
        padding-block: 0.75rem;
    }

    .auth-brand-panel,
    .auth-panel-card .card-body,
    .panel-card .card-body,
    .table-panel-body,
    .filter-panel-body,
    .dashboard-content .card:not(.auth-panel-card) .card-body {
        padding: 1rem !important;
    }

    .auth-brand-panel p,
    .auth-brand-panel .auth-brand-points {
        display: none;
    }

    .btn:not(.btn-sm) {
        width: 100%;
    }
}

@media (max-width: 419.98px) {
    .dashboard-topbar-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-brand-copy strong {
        max-width: 150px;
    }
}

/* Standalone error pages also use this stylesheet. */
body.bg-light.d-flex.align-items-center.min-vh-100 {
    padding: 1rem;
    background: linear-gradient(180deg, #fbfcfa 0%, #f4f6f3 48%, #edf2ef 100%) !important;
}

body.bg-light.d-flex.align-items-center.min-vh-100 > .container {
    width: min(100%, 620px);
    padding: 2rem;
    border: 1px solid var(--tln-line);
    border-radius: var(--tln-radius);
    background: var(--tln-surface);
    box-shadow: var(--tln-shadow);
}

body.bg-light.d-flex.align-items-center.min-vh-100 .display-4 {
    margin-bottom: 0.75rem;
    color: var(--tln-ink);
    font-size: clamp(3rem, 12vw, 5.5rem);
    line-height: 1;
    letter-spacing: 0;
}

body.bg-light.d-flex.align-items-center.min-vh-100 .lead {
    max-width: 42rem;
    margin-inline: auto;
    color: var(--tln-muted);
    line-height: 1.7;
}

body.bg-light.d-flex.align-items-center.min-vh-100 .btn {
    min-width: 140px;
    margin-top: 0.75rem;
}

/* Final dashboard layout fixes. */
.dashboard-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: 100vh;
    scrollbar-width: thin;
}

.dashboard-nav {
    min-height: 0;
}

.dashboard-side-card {
    flex: 0 0 auto;
}

.dashboard-topbar {
    top: 0.75rem;
}

@media (min-width: 1200px) {
    .dashboard-sidebar {
        align-self: start;
    }
}

/* Production brand pass for authenticated UI. */
:root {
    --tln-app-bg: #f7f8f5;
    --tln-surface: rgba(255, 255, 255, 0.97);
    --tln-surface-strong: #ffffff;
    --tln-ink: #111814;
    --tln-ink-soft: #26332c;
    --tln-muted: #647067;
    --tln-line: rgba(17, 24, 20, 0.11);
    --tln-mint: #55d98f;
    --tln-mint-deep: #0b6f45;
    --tln-sky: #3d8fbd;
    --tln-shadow: 0 12px 28px rgba(17, 24, 20, 0.08);
    --tln-radius: 8px;
}

body,
.dashboard-shell {
    background: linear-gradient(180deg, #fbfcfa 0%, #f7f8f5 48%, #eef3ed 100%);
}

.dashboard-sidebar,
.auth-brand-panel,
.dashboard-highlight.dark {
    background: linear-gradient(180deg, #111814 0%, #24362b 100%) !important;
}

.auth-brand-mark,
.dashboard-brand-mark,
.dashboard-user-avatar {
    background: linear-gradient(135deg, #111814 0%, #24362b 100%) !important;
    color: var(--tln-mint) !important;
    border: 1px solid rgba(85, 217, 143, 0.18);
    letter-spacing: 0;
}

.auth-brand-logo img {
    display: none;
}

.dashboard-nav-link.active {
    background: rgba(85, 217, 143, 0.16);
    box-shadow: inset 3px 0 0 var(--tln-mint);
}

.dashboard-nav-link i,
.page-kicker,
.auth-brand-points i {
    color: var(--tln-mint);
}

.btn-primary,
.btn-success {
    background: var(--tln-mint-deep);
    border-color: var(--tln-mint-deep);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: #108554;
    border-color: #108554;
    color: #fff;
}

.btn-outline-primary {
    border-color: rgba(11, 111, 69, 0.28);
    color: var(--tln-mint-deep);
}

.btn-outline-primary:hover {
    background: rgba(85, 217, 143, 0.12);
    border-color: rgba(11, 111, 69, 0.36);
    color: var(--tln-mint-deep);
}

.auth-brand-panel,
.auth-container,
.auth-panel-card,
.panel-card,
.dashboard-stat-card,
.dashboard-highlight,
.table-panel,
.filter-panel,
.info-panel,
.dashboard-content .card,
.dashboard-topbar,
.dashboard-side-card,
.dashboard-nav-link,
.btn,
.form-control,
.form-select,
.badge {
    border-radius: var(--tln-radius) !important;
}

@media (max-width: 767.98px) {
    .dashboard-nav-link.active {
        box-shadow: inset 0 -3px 0 var(--tln-mint);
    }
}

/* Official Tihove Trading Lda brand colors from supplied logo. */
:root {
    --tln-brand-blue: #104070;
    --tln-brand-blue-dark: #062b50;
    --tln-brand-gold: #d09220;
    --tln-brand-red: #b33018;
    --tln-brand-silver: #c6d0dd;
    --tln-app-bg: #f7f9fb;
    --tln-ink: #102033;
    --tln-ink-soft: #26384d;
    --tln-muted: #667587;
    --tln-line: rgba(16, 64, 112, 0.14);
    --tln-mint: var(--tln-brand-gold);
    --tln-mint-deep: var(--tln-brand-blue);
}

.dashboard-sidebar,
.auth-brand-panel,
.dashboard-highlight.dark {
    background: linear-gradient(180deg, var(--tln-brand-blue-dark) 0%, var(--tln-brand-blue) 100%) !important;
}

.auth-brand-logo {
    width: 112px;
    height: 78px;
    padding: 0.5rem;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid rgba(16, 64, 112, 0.12);
}

.auth-brand-logo img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dashboard-brand-mark {
    background: #fff !important;
    color: var(--tln-brand-blue) !important;
}

.dashboard-nav-link i,
.auth-brand-points i {
    color: var(--tln-brand-gold);
}

.dashboard-nav-link.active {
    background: rgba(208, 146, 32, 0.16);
    box-shadow: inset 3px 0 0 var(--tln-brand-gold);
}

.page-kicker,
.dashboard-stat-value {
    color: var(--tln-brand-blue);
}

.btn-primary,
.btn-success {
    background: var(--tln-brand-gold);
    border-color: var(--tln-brand-gold);
    color: #081b2f;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: #e1a73e;
    border-color: #e1a73e;
    color: #081b2f;
}

.btn-outline-primary {
    border-color: rgba(16, 64, 112, 0.28);
    color: var(--tln-brand-blue);
}

.btn-outline-primary:hover {
    background: rgba(208, 146, 32, 0.12);
    border-color: rgba(16, 64, 112, 0.36);
    color: var(--tln-brand-blue);
}

.badge.text-bg-success {
    background: var(--tln-brand-blue) !important;
}

.badge.text-bg-warning {
    background: var(--tln-brand-gold) !important;
    color: #081b2f !important;
}

@media (max-width: 767.98px) {
    .dashboard-nav-link.active {
        box-shadow: inset 0 -3px 0 var(--tln-brand-gold);
    }
}

/* Final visual polish for Tihove logo, dashboard sidebar and compact actions. */
.auth-brand-logo,
.dashboard-brand-logo {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.auth-brand-logo {
    width: 180px;
    height: 72px;
    padding: 0;
}

.auth-brand-logo img,
.dashboard-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo-boxed {
    background: #fff !important;
    border: 1px solid rgba(198, 208, 221, 0.5) !important;
    border-radius: 8px !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18) !important;
    padding: 0.45rem !important;
}

.auth-brand-logo.brand-logo-boxed {
    width: 180px;
    height: 86px;
}

.dashboard-brand {
    align-items: center;
}

.dashboard-brand-logo {
    flex: 0 0 86px;
    width: 86px;
    height: 42px;
    padding: 0;
}

.dashboard-brand-logo.brand-logo-boxed {
    flex-basis: 92px;
    width: 92px;
    height: 50px;
}

.dashboard-brand-copy strong {
    max-width: 155px;
    line-height: 1.2;
}

.dashboard-brand-copy small {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
}

.dashboard-nav {
    gap: 0.35rem;
}

.dashboard-nav-link {
    min-height: 42px;
    padding: 0.72rem 0.85rem;
}

.dashboard-nav-link span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.dashboard-side-card {
    margin-top: 0.35rem;
    padding: 0.9rem;
}

.dashboard-side-card-kicker {
    display: block;
    margin-bottom: 0.35rem;
    line-height: 1.1;
}

.dashboard-side-card strong {
    line-height: 1.2;
}

.dashboard-side-card p {
    font-size: 0.88rem;
    line-height: 1.45;
}

.dashboard-topbar-actions {
    align-items: center;
}

.dashboard-topbar-actions .btn {
    min-height: 36px;
    white-space: nowrap;
}

@media (max-height: 760px) and (min-width: 992px) {
    .dashboard-side-card {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .dashboard-brand-logo {
        flex-basis: 78px;
        width: 78px;
        height: 38px;
    }
}

/* Approval dashboard */
.approvals-head {
    align-items: center;
}

.approval-summary {
    display: flex;
    gap: 0.75rem;
}

.approval-summary div {
    min-width: 112px;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--tln-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--tln-shadow);
}

.approval-summary strong,
.approval-summary span {
    display: block;
}

.approval-summary strong {
    font-size: 1.35rem;
    line-height: 1;
}

.approval-summary span {
    margin-top: 0.25rem;
    color: var(--tln-muted);
    font-size: 0.82rem;
}

.approval-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.approval-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--tln-line);
    border-radius: 8px;
    background: var(--tln-surface);
    box-shadow: var(--tln-shadow);
}

.approval-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.approval-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.approval-list {
    display: grid;
    gap: 0.75rem;
}

.approval-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--tln-line);
    border-radius: 8px;
    background: #fff;
}

.approval-card.is-approved {
    border-color: rgba(16, 64, 112, 0.18);
}

.approval-card-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.approval-avatar {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(208, 146, 32, 0.16);
    color: var(--tln-brand-blue);
}

.approval-copy {
    min-width: 0;
}

.approval-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.approval-title-row h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.98rem;
    font-weight: 800;
}

.approval-meta,
.approval-status-line {
    color: var(--tln-muted);
    font-size: 0.82rem;
}

.approval-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.approval-status-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.25rem;
}

.approval-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    min-width: 92px;
}

.approval-actions form,
.approval-actions .btn {
    width: 100%;
}

.approval-actions .btn {
    min-height: 34px;
}

.approval-more {
    grid-column: 1 / -1;
    min-width: 0;
    border-top: 1px solid rgba(16, 64, 112, 0.1);
    padding-top: 0.65rem;
}

.approval-more summary {
    width: fit-content;
    cursor: pointer;
    color: var(--tln-brand-blue);
    font-size: 0.86rem;
    font-weight: 800;
}

.approval-more[open] summary {
    margin-bottom: 0.75rem;
}

.approval-documents {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(16, 64, 112, 0.09);
    border-radius: 8px;
    background: #f8fafc;
}

.approval-documents-title {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--tln-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.approval-document-links,
.document-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.document-upload-panel {
    padding: 1rem;
    border: 1px solid rgba(16, 64, 112, 0.12);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(225, 245, 242, 0.78), rgba(255, 255, 255, 0.96));
}

.document-upload-head {
    margin-bottom: 0.85rem;
}

.document-upload-head span {
    display: inline-flex;
    margin-bottom: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--tln-brand-green);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.document-upload-head strong {
    display: block;
    color: var(--tln-ink);
    font-size: 1rem;
    line-height: 1.25;
}

.document-upload-head p {
    max-width: 56rem;
    margin: 0.35rem 0 0;
    color: var(--tln-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.document-upload-field {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid rgba(16, 64, 112, 0.1);
    border-radius: 8px;
    background: #fff;
}

.document-upload-field .form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
}

.document-upload-field .form-label i {
    color: var(--tln-brand-gold);
}

.document-link {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(16, 64, 112, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--tln-ink);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.document-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-link:hover {
    border-color: var(--tln-brand-gold);
    color: var(--tln-brand-blue);
}

.tracking-timeline {
    display: grid;
    gap: 0.8rem;
}

.tracking-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.75rem;
}

.tracking-timeline-item::before {
    position: absolute;
    top: 18px;
    bottom: -0.8rem;
    left: 8px;
    width: 2px;
    background: rgba(16, 64, 112, 0.12);
    content: "";
}

.tracking-timeline-item:last-child::before {
    display: none;
}

.tracking-dot {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin-top: 0.25rem;
    border: 4px solid rgba(225, 245, 242, 0.95);
    border-radius: 999px;
    background: var(--tln-brand-green);
}

.tracking-card {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(16, 64, 112, 0.1);
    border-radius: 8px;
    background: #fff;
}

.tracking-card h5 {
    margin: 0;
    color: var(--tln-ink);
    font-size: 0.95rem;
    font-weight: 800;
}

.tracking-card span {
    color: var(--tln-muted);
    font-size: 0.76rem;
    white-space: nowrap;
}

.tracking-card p {
    margin: 0.35rem 0;
    color: var(--tln-muted);
    font-size: 0.86rem;
}

.profile-tabs {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.profile-tab {
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--tln-line);
    border-radius: 8px;
    background: #fff;
    color: var(--tln-ink);
    font-weight: 800;
    white-space: nowrap;
}

.profile-tab.active {
    background: var(--tln-brand-blue);
    border-color: var(--tln-brand-blue);
    color: #fff;
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.profile-card-full {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--tln-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--tln-shadow);
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-card-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.profile-card-head p {
    margin: 0.25rem 0 0;
    color: var(--tln-muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.profile-detail-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-detail {
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid rgba(16, 64, 112, 0.09);
    border-radius: 8px;
    background: #f8fafc;
}

.profile-detail span,
.profile-detail strong {
    display: block;
    min-width: 0;
}

.profile-detail span {
    margin-bottom: 0.2rem;
    color: var(--tln-muted);
    font-size: 0.72rem;
}

.profile-detail strong {
    color: var(--tln-ink);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
    .approval-grid {
        grid-template-columns: 1fr;
    }

    .profile-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .approval-summary {
        width: 100%;
    }

    .approval-summary div {
        flex: 1;
        min-width: 0;
    }

    .approval-panel {
        padding: 0.75rem;
    }

    .approval-card {
        grid-template-columns: 1fr;
    }

    .approval-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .approval-title-row h3 {
        white-space: normal;
    }

    .approval-actions {
        grid-template-columns: 1fr 1fr;
        min-width: 0;
    }

    .profile-card-head {
        display: grid;
    }

    .profile-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-detail-grid.compact,
    .approval-document-links,
    .document-upload-grid {
        grid-template-columns: 1fr;
    }
}

/* Final cascade: one authoritative visual layer. */
body { line-height: 1.55; }
.dashboard-content { gap: var(--tln-space-4); }
.page-head { align-items: center; margin-bottom: 0; }
.page-head-copy h1, .page-head-copy .h3 { max-width: 22ch; margin-bottom: var(--tln-space-1); }
.page-head-copy p, .dashboard-stat-label, .form-text, .text-muted { color: #526174 !important; }
.dashboard-menu-toggle { display: none; }
.dashboard-nav-link:hover { transform: none; }
.row.g-4 > [class*="col-"] > :is(.card, .panel-card, .info-panel, .dashboard-highlight), .dashboard-stats-grid > * { height: 100%; }
.btn { min-height: 44px; border-radius: 8px !important; }
.btn-sm { min-height: 38px; }
.form-control, .form-select { border-color: rgba(16, 64, 112, 0.24); }
.form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible, .btn:focus-visible, .dashboard-nav-link:focus-visible, .dashboard-menu-toggle:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f26a14; outline-offset: 3px; box-shadow: none !important; }
.form-section-heading { display: flex; align-items: center; gap: .8rem; margin-top: .65rem; padding: .85rem 0 .75rem; border-bottom: 1px solid var(--tln-line); }
.form-section-heading > span { display: inline-flex; flex: 0 0 2rem; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--tln-brand-blue); color: #fff; font-weight: 800; }
.form-section-heading strong, .form-section-heading small { display: block; }
.form-section-heading small { color: #526174; }
.form-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; }
.form-option-grid .form-check { min-height: 44px; margin: 0; padding: .55rem .75rem; border: 1px solid var(--tln-line); border-radius: 8px; background: #f8fafc; }
.table-responsive { position: relative; max-width: 100%; overflow-x: auto; border: 1px solid var(--tln-line); scrollbar-width: thin; }
.table-responsive table { margin-bottom: 0; }
.table-responsive thead th { position: sticky; top: 0; z-index: 2; background: #f5f7fa !important; color: #405065 !important; }
.table-responsive :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--tln-line); }
.table-responsive thead th:first-child { z-index: 3; background: #f5f7fa !important; }
.badge { min-height: 26px; font-weight: 750; }
.badge.text-bg-secondary { background: #526174 !important; color: #fff !important; }
.badge.text-bg-danger { background: #a5283d !important; color: #fff !important; }
.empty-state, .dashboard-content .text-center.py-5 { min-height: 220px; padding: 2rem !important; border: 1px dashed rgba(16, 64, 112, .25); border-radius: 8px; background: #f8fafc; text-align: center; }
.tln-whatsapp-float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 1060; display: inline-flex; width: 3.75rem; height: 3.75rem; align-items: center; justify-content: center; border: 3px solid #fff; border-radius: 50%; background: #147a46; color: #fff; text-decoration: none; box-shadow: 0 12px 30px rgba(6, 43, 80, .24); }
.tln-whatsapp-float:hover { color: #fff; transform: translateY(-3px); }
.tln-notification-region { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(3.75rem + 2rem); z-index: 1080; display: grid; width: min(390px, calc(100vw - 2rem)); max-height: min(70vh, 620px); gap: .65rem; overflow-y: auto; padding: .25rem; }
.tln-notification-toast { width: 100%; margin: 0; border: 1px solid var(--tln-line) !important; border-left: 4px solid var(--tln-brand-gold) !important; border-radius: 8px; background: #fff; color: var(--tln-ink); cursor: pointer; }
@media (max-width: 767.98px) {
    .dashboard-menu-toggle { display: inline-flex; min-height: 44px; align-items: center; gap: .5rem; padding: .6rem .85rem; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font-weight: 800; }
    .dashboard-nav { display: none; width: 100%; max-height: min(62vh, 480px); overflow: auto; padding: .35rem; border-top: 1px solid rgba(255,255,255,.14); }
    .dashboard-nav.is-open { display: grid; }
    .dashboard-nav-link { width: 100%; white-space: normal; }
    .dashboard-status-note, .dashboard-topbar-search { display: none; }
    .dashboard-topbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .dashboard-topbar-actions > *, .dashboard-topbar-actions form .btn { width: 100%; }
    .dashboard-user-pill { grid-column: 1 / -1; }
    .form-option-grid { grid-template-columns: 1fr; }
    .table-responsive { margin-inline: -.75rem; width: calc(100% + 1.5rem); border-radius: 0; }
    .tln-notification-region { left: 1rem; right: 1rem; width: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* Dashboard fixes: stable sidebar, plan catalogue, tracking and platform modal. */
.dashboard-shell,
.dashboard-main,
.dashboard-content,
.dashboard-sidebar,
.dashboard-sidebar-head,
.dashboard-nav,
.dashboard-side-card {
    min-width: 0;
}

.dashboard-sidebar {
    overflow-x: hidden;
}

.dashboard-sidebar-head {
    flex: 0 0 auto;
}

.dashboard-nav {
    flex: 1 1 auto;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.dashboard-nav-link {
    width: 100%;
}

.dashboard-nav-link > span:not(.badge) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .dashboard-nav-link > span:not(.badge) {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
}

.dashboard-side-card {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 0;
    overflow: hidden;
}

.dashboard-side-card strong,
.dashboard-side-card p {
    display: block;
    max-width: 100%;
    margin: 0;
    overflow-wrap: anywhere;
}

.dashboard-side-card p {
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.78);
}

.approval-empty {
    display: grid;
    min-height: 170px;
    place-items: center;
    align-content: center;
    gap: 0.4rem;
    padding: 1.5rem;
    border: 1px dashed rgba(16, 64, 112, 0.24);
    border-radius: 8px;
    background: #f8fafc;
    color: #526174;
    text-align: center;
}

.approval-empty i {
    color: #13724b;
    font-size: 1.5rem;
}

.approval-empty strong {
    color: var(--tln-ink);
}

.dashboard-plan-catalog {
    overflow: visible;
}

.dashboard-plan-catalog .plan-catalog-body {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.tln-plans-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 1.25rem;
    align-items: end;
}

.tln-plans-head h2 {
    max-width: 720px;
    margin: 0.25rem 0 0;
    color: var(--tln-brand-blue-dark);
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.15;
}

.tln-plans-note {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(16, 64, 112, 0.14);
    border-radius: 8px;
    background: #eef6f3;
    color: #34485c;
    font-size: 0.88rem;
    line-height: 1.5;
}

.tln-plans-note i {
    margin-top: 0.2rem;
    color: #13724b;
}

.plan-comparison {
    margin-top: 1.25rem;
}

.plan-comparison-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.plan-comparison-heading h3 {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.plan-comparison-heading > span {
    color: #526174;
    font-size: 0.78rem;
}

.plan-comparison-table {
    border-radius: 8px;
    background: #fff;
}

.plan-comparison-table table {
    min-width: 920px;
}

.plan-comparison-table :is(th, td) {
    min-width: 145px;
    padding: 0.85rem;
    border-color: rgba(16, 64, 112, 0.1);
    font-size: 0.84rem;
    vertical-align: middle;
}

.plan-comparison-table :is(th, td):first-child {
    min-width: 190px;
    color: var(--tln-brand-blue-dark);
    font-weight: 800;
}

.tln-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.tln-pricing-card {
    --plan-accent: var(--tln-brand-blue);
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 1.2rem;
    overflow: hidden;
    border: 1px solid rgba(16, 64, 112, 0.14);
    border-top: 4px solid var(--plan-accent);
    border-radius: 8px;
    background: #fff;
    color: var(--tln-ink);
    box-shadow: 0 12px 28px rgba(6, 43, 80, 0.07);
}

.tln-pricing-card.plan-level-2 { --plan-accent: #4d718f; }
.tln-pricing-card.plan-level-3 { --plan-accent: #13724b; }
.tln-pricing-card.plan-level-4 { --plan-accent: #b7760b; }
.tln-pricing-card.plan-level-5 { --plan-accent: #7d4eb0; }

.tln-pricing-card.featured {
    background: #fff;
    color: var(--tln-ink);
}

.tln-pricing-card.is-current {
    box-shadow: 0 0 0 2px var(--plan-accent), 0 16px 34px rgba(6, 43, 80, 0.12);
}

.tln-pricing-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.tln-plan-icon {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--plan-accent) 12%, white);
    color: var(--plan-accent);
}

.tln-pricing-card.featured .tln-plan-icon {
    background: color-mix(in srgb, var(--plan-accent) 12%, white);
    color: var(--plan-accent);
}

.tln-plan-badges {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.tln-plan-pill,
.tln-current-plan {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.1;
}

.tln-plan-pill {
    background: color-mix(in srgb, var(--plan-accent) 11%, white);
    color: var(--plan-accent);
}

.tln-current-plan {
    background: var(--tln-brand-blue-dark);
    color: #fff;
}

.tln-pricing-card > :is(h2, h3) {
    margin: 0;
    color: var(--tln-brand-blue-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

.tln-plan-description {
    min-height: 4.5em;
    margin: 0.45rem 0 0;
    color: #526174;
    font-size: 0.85rem;
    line-height: 1.5;
}

.tln-price {
    margin-top: 0.9rem;
}

.tln-price strong,
.tln-price span {
    display: block;
}

.tln-price strong {
    color: var(--tln-brand-blue-dark);
    font-size: 1.35rem;
    line-height: 1.2;
}

.tln-price span {
    margin-top: 0.15rem;
    color: #526174;
    font-size: 0.78rem;
}

.tln-plan-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.9rem 0;
}

.tln-plan-metrics div,
.tln-pricing-card.featured .tln-plan-metrics div {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(16, 64, 112, 0.08);
    border-radius: 8px;
    background: #f5f8fb;
}

.tln-plan-metrics span,
.tln-plan-metrics strong {
    display: block;
}

.tln-plan-metrics span {
    color: #526174;
    font-size: 0.7rem;
}

.tln-plan-audience {
    margin-bottom: 0.8rem;
    color: #526174;
    font-size: 0.78rem;
}

.tln-plan-section {
    margin-bottom: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(16, 64, 112, 0.1);
    border-radius: 8px;
    background: #fff;
}

.tln-plan-section summary {
    padding: 0.7rem;
    cursor: pointer;
    color: var(--tln-brand-blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.tln-plan-section[open] summary {
    border-bottom: 1px solid rgba(16, 64, 112, 0.08);
    background: #f8fafc;
}

.tln-plan-section .feature-list {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem 0.85rem 1.9rem;
}

.tln-plan-section .feature-list li,
.tln-pricing-card.featured .feature-list li {
    color: #435367;
    font-size: 0.76rem;
    line-height: 1.45;
    opacity: 1;
}

.tln-plan-policies,
.tln-plan-faq {
    margin-top: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(16, 64, 112, 0.1);
}

.tln-plan-policies h3,
.tln-plan-faq h3 {
    color: var(--tln-brand-blue-dark);
}

.tln-plan-policies p {
    color: #526174 !important;
}

.tln-plan-faq details {
    border-color: rgba(16, 64, 112, 0.12) !important;
}

.tln-plan-faq summary {
    color: var(--tln-brand-blue-dark);
    font-size: 0.78rem;
}

.tln-plan-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tracking-workspace > [class*="col-"] > :is(.info-panel, .table-panel) {
    height: auto !important;
}

.tracking-workspace-side {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.tracking-workspace-side > .info-panel {
    margin-bottom: 0 !important;
}

.tracking-workspace-main .table-panel {
    min-height: 100%;
}

.tracking-update-panel .card-body {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.status-icon {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.status-icon-info {
    background: #e6f1f8;
    color: var(--tln-brand-blue);
}

.platform-confirm-dialog {
    width: min(520px, calc(100vw - 2rem));
    max-width: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--tln-ink);
}

.platform-confirm-dialog::backdrop {
    background: rgba(4, 20, 36, 0.68);
    backdrop-filter: blur(3px);
}

.platform-confirm-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: clamp(1.2rem, 3vw, 1.65rem);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(3, 20, 37, 0.28);
}

.platform-confirm-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7f5ef;
    color: #13724b;
    font-size: 1.25rem;
}

.platform-confirm-icon.is-danger {
    background: #fff0ed;
    color: var(--tln-brand-red);
}

.platform-confirm-copy h2 {
    margin: 0.2rem 0 0.45rem;
    color: var(--tln-brand-blue-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

.platform-confirm-copy p {
    margin: 0;
    color: #526174;
    line-height: 1.55;
}

.platform-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

@media (max-width: 1199.98px) {
    .dashboard-sidebar {
        position: sticky;
        top: 0;
        z-index: 1040;
        display: grid;
        height: auto;
        max-height: none;
        gap: 0.75rem;
        overflow: visible;
    }

    .dashboard-sidebar-head {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .dashboard-sidebar .dashboard-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        min-height: 42px;
        align-items: center;
        gap: 0.5rem;
        padding: 0.55rem 0.8rem;
        border: 1px solid rgba(255, 255, 255, 0.24);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-weight: 800;
    }

    .dashboard-sidebar .dashboard-brand {
        margin: 0;
    }

    .dashboard-sidebar .dashboard-role-chip,
    .dashboard-status-note,
    .dashboard-side-card {
        display: none;
    }

    .dashboard-sidebar .dashboard-nav {
        display: none;
        width: 100%;
        max-height: min(65vh, 520px);
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .dashboard-sidebar .dashboard-nav.is-open {
        display: grid;
    }

    .dashboard-sidebar .dashboard-nav-link {
        width: 100%;
        white-space: normal;
    }

    .tln-plans-head {
        grid-template-columns: 1fr;
    }

    .tln-pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dashboard-sidebar-head {
        align-items: center !important;
    }

    .dashboard-brand-copy small,
    .plan-comparison-heading > span {
        display: none;
    }

    .tln-pricing-grid {
        grid-template-columns: 1fr;
    }

    .tln-plan-description {
        min-height: 0;
    }

    .tracking-card > .d-flex,
    .tracking-workspace-main .d-flex.justify-content-between {
        flex-direction: column;
    }

    .tracking-card span {
        white-space: normal;
    }

    .platform-confirm-card {
        grid-template-columns: 1fr;
    }

    .platform-confirm-icon {
        width: 42px;
        height: 42px;
    }

    .platform-confirm-actions {
        grid-column: 1;
        display: grid;
        grid-template-columns: 1fr;
    }

    .platform-confirm-actions .btn-primary,
    .platform-confirm-actions .btn-danger {
        grid-row: 1;
    }
}

.admin-driver-selection {
    display: grid;
    gap: 1rem;
}

.driver-selection-panel .table-panel-body,
.dispatch-pricing-panel .table-panel-body {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.driver-selection-table {
    border-radius: 8px;
}

.driver-selection-table table {
    min-width: 760px;
}

.driver-selection-table .driver-contact {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-selection-table .driver-unavailable td {
    background: #f5f7f9;
    color: #667587;
}

@media (max-width: 767.98px) {
    .driver-selection-table {
        width: 100%;
        margin-inline: 0;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .driver-selection-table table,
    .driver-selection-table tbody {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .driver-selection-table thead {
        display: none;
    }

    .driver-selection-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .driver-selection-table tr {
        display: grid;
        width: 100%;
        overflow: hidden;
        border: 1px solid rgba(16, 64, 112, 0.14);
        border-radius: 8px;
        background: #fff;
    }

    .driver-selection-table td,
    .driver-selection-table :is(th, td):first-child {
        position: static;
        z-index: auto;
        display: grid;
        grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
        gap: 0.75rem;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0.7rem 0.8rem;
        border: 0;
        border-bottom: 1px solid rgba(16, 64, 112, 0.08);
        background: transparent;
        box-shadow: none;
        text-align: left;
    }

    .driver-selection-table td:last-child {
        border-bottom: 0;
    }

    .driver-selection-table td::before {
        color: #526174;
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .driver-selection-table .driver-contact {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .dispatch-submit,
    .dispatch-submit .btn {
        width: 100%;
    }
}
@media print {
    .dashboard-sidebar,
    .dashboard-topbar,
    .no-print,
    .site-header,
    .site-footer,
    .whatsapp-floating,
    .tln-whatsapp-float,
    .platform-confirm-dialog {
        display: none !important;
    }

    .dashboard-shell,
    .dashboard-main,
    .dashboard-content {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        background: #fff !important;
    }

    .printable-document {
        border: 0 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
}

/* Requested operational polish: readable dark panels, cleaner scrollbars and separated admin views. */
.dashboard-highlight.dark .page-kicker {
    color: #f2c86b !important;
}

.dashboard-highlight.dark h3,
.dashboard-highlight.dark h4,
.dashboard-highlight.dark strong {
    color: #fff;
}

.dashboard-sidebar,
.dashboard-sidebar .dashboard-nav {
    scrollbar-color: rgba(208, 146, 32, 0.85) rgba(255, 255, 255, 0.10);
    scrollbar-width: thin;
}

.dashboard-sidebar::-webkit-scrollbar,
.dashboard-sidebar .dashboard-nav::-webkit-scrollbar {
    width: 8px;
}

.dashboard-sidebar::-webkit-scrollbar-track,
.dashboard-sidebar .dashboard-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.dashboard-sidebar::-webkit-scrollbar-thumb,
.dashboard-sidebar .dashboard-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(208, 146, 32, 0.85);
}

.table-responsive {
    scrollbar-color: #8fa0b4 #eef3f7;
}

.table-responsive::-webkit-scrollbar {
    height: 9px;
}

.table-responsive::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #eef3f7;
}

.table-responsive::-webkit-scrollbar-thumb {
    border: 2px solid #eef3f7;
    border-radius: 999px;
    background: #8fa0b4;
}

.admin-list-head,
.admin-user-row,
.admin-user-actions,
.admin-dialog-head,
.admin-dialog-actions,
.admin-driver-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-list-head,
.admin-dialog-head,
.admin-driver-card-head {
    justify-content: space-between;
}

.admin-user-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-user-row {
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(16, 64, 112, 0.12);
    border-radius: 8px;
    background: #fff;
}

.admin-user-identity,
.admin-user-state,
.admin-user-last {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
}

.admin-user-identity {
    flex: 1 1 260px;
}

.admin-user-identity span {
    color: #526174;
    overflow-wrap: anywhere;
}

.admin-user-state,
.admin-user-last {
    flex: 0 1 150px;
}

.admin-user-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.admin-password-note {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(16, 64, 112, 0.14);
    border-radius: 8px;
    color: #526174;
    font-size: 0.85rem;
    font-weight: 700;
}

.admin-dialog {
    width: min(560px, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.admin-dialog::backdrop {
    background: rgba(6, 43, 80, 0.46);
    backdrop-filter: blur(5px);
}

.admin-dialog-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(16, 64, 112, 0.16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(6, 43, 80, 0.24);
}

.admin-dialog-head h2 {
    margin: 0;
    color: var(--tln-brand-blue-dark);
    font-size: 1.35rem;
    font-weight: 800;
}

.admin-dialog-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.admin-driver-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-driver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.admin-driver-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(16, 64, 112, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--tln-shadow);
}

.admin-driver-card-head {
    align-items: flex-start;
}

.admin-driver-card-head h2 {
    margin: 0;
    color: var(--tln-ink);
    font-size: 1.12rem;
    font-weight: 800;
}

.admin-driver-card-head p {
    margin: 0.25rem 0 0;
    color: #526174;
    overflow-wrap: anywhere;
}

.admin-driver-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.admin-driver-meta div {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(16, 64, 112, 0.10);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-driver-meta span,
.admin-driver-meta strong {
    display: block;
}

.admin-driver-meta span {
    color: #526174;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-driver-meta strong {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .admin-user-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-user-state,
    .admin-user-last,
    .admin-user-actions {
        width: 100%;
    }

    .admin-user-actions {
        justify-content: flex-start;
    }

    .admin-driver-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .admin-dialog-actions,
    .admin-dialog-actions .btn,
    .admin-driver-meta {
        width: 100%;
    }

    .admin-dialog-actions {
        display: grid;
    }

    .admin-driver-stats,
    .admin-driver-meta {
        grid-template-columns: 1fr;
    }
}
