:root {
    --ts-bg: #fff7ef;
    --ts-primary: #f2b42b;
    --ts-primary-dark: #d99f22;
    --ts-text: #0f172a;
    --ts-muted: #6b7280;
    --ts-card-bg: #ffffff;
    --ts-border-subtle: rgba(148, 163, 184, 0.35);
    --ts-btn-primary-bg: #f2b42b;
    --ts-btn-primary-bg-hover: #d99f22;
    --ts-btn-primary-text: #0f172a;
}

/* Base layout */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--ts-bg);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ts-text);
}

a,.btn-link{color: var(--ts-text);}

.btn-primary{
    background:var(--ts-btn-primary-bg);
    border:1px solid var(--ts-btn-primary-bg);
    color:var(--ts-btn-primary-text);
}

.btn-primary:hover{
    background:var(--ts-btn-primary-bg);
    border:1px solid var(--ts-btn-primary-bg);
    color:var(--ts-btn-primary-text);
}

/* App shells */

.ts-app-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* CARD / SURFACE */

.ts-surface {
    background: var(--ts-card-bg);
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 2.25rem 2.5rem;
}

/* Brand header */

.ts-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.ts-brand-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.ts-logo-img {
    height: 40px;
    width: auto;
}

.ts-brand-text-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ts-muted);
}

.ts-brand-text-subtitle {
    font-size: 0.78rem;
    color: var(--ts-muted);
}

.ts-pill-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    color: var(--ts-muted);
}

.ts-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
}

/* Typography */

.ts-heading-main {
    font-weight: 700;
    font-size: 1.7rem;
    margin-bottom: 0.3rem;
}

.ts-heading-sub {
    font-size: 0.96rem;
    color: var(--ts-muted);
    margin-bottom: 1.6rem;
}

/* Forms */

.ts-form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #111827;
}

.ts-form-control {
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    padding: 0.7rem 0.95rem;
    font-size: 0.95rem;
}

.ts-form-control:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 2px rgba(242, 180, 43, 0.25);
}

/* Buttons */

.ts-btn-primary {
    background-color: var(--ts-primary);
    border: none;
    color: #111827;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.12s ease-out;
}

.ts-btn-primary:hover {
    background-color: var(--ts-primary-dark);
    box-shadow: 0 12px 26px rgba(148, 95, 14, 0.28);
    transform: translateY(-1px);
}

.ts-btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Alerts */

.ts-alert {
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.ts-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.ts-alert-success {
    background: #e8ffee;
    border-color: #b5e3c1;
    color: #4d6e55;
}

.ts-alert-info {
    background: #dcf5ff;
    border-color: #b5d1e3;
    color: #4d586e;
}

.ts-alert-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.ts-alert-body {
    opacity: 0.95;
}

/* Meta / small text */

.ts-divider {
    height: 1px;
    margin: 1.6rem 0 1rem;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}

.ts-meta {
    font-size: 0.78rem;
    color: var(--ts-muted);
}

.ts-meta a{
    color: var(--ts-muted);
}

/* Dashboard layout */

.ts-dashboard-layout {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(circle at top left, #fef3c7 0, #fff7ef 45%, #f9fafb 100%);
}

.ts-sidebar {
    width: 260px;
    background: #020617;
    color: #e5e7eb;
    padding: 1.6rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ts-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.ts-logo-img-small {
    height: 32px;
    width: auto;
}

.ts-sidebar-title {
    font-size: 1.02rem;
    font-weight: 600;
}

.ts-sidebar-subtitle {
    font-size: 0.78rem;
    color: #9ca3af;
}

.ts-sidebar-nav {
    margin-top: 0.75rem;
}

.ts-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.87rem;
    color: #e5e7eb;
    text-decoration: none;
    margin-bottom: 0.25rem;
    transition: background-color 0.12s ease-out, color 0.12s ease-out;
}

.ts-sidebar-nav a span.ts-nav-icon {
    font-size: 1rem;
}

.ts-sidebar-nav a.active {
    background: rgba(242, 180, 43, 0.16);
    color: #facc15;
}

.ts-sidebar-nav a:hover {
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

.ts-sidebar-footer {
    margin-top: auto;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Main */

.ts-main {
    flex: 1;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ts-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.ts-main-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.ts-main-subtitle {
    font-size: 0.9rem;
    color: var(--ts-muted);
}

/* User pill */

.ts-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ts-border-subtle);
    font-size: 0.84rem;
}

.ts-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--ts-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

/* Panels */

.ts-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 1.4rem;
}

.ts-panel {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 1.25rem;
    padding: 1.4rem 1.35rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

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

.ts-panel-title {
    font-size: 0.98rem;
    font-weight: 600;
}

.ts-panel-kicker {
    font-size: 0.8rem;
    color: var(--ts-muted);
}

.ts-chip-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.07);
    font-size: 0.76rem;
    color: #047857;
}

.ts-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #10b981;
}

/* Table */

.ts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.ts-table th,
.ts-table td {
    padding: 0.45rem 0.3rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.ts-table th {
    font-weight: 600;
    color: var(--ts-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
}

.ts-badge-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(59, 130, 246, 0.06);
    font-size: 0.72rem;
    color: #1d4ed8;
}

/* Footer text */

.ts-footer-text {
    font-size: 0.78rem;
    color: var(--ts-muted);
    margin-top: 1.4rem;
}

/* Responsive */

@media (max-width: 960px) {
    .ts-dashboard-layout {
        flex-direction: column;
    }

    .ts-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .ts-sidebar-nav {
        display: flex;
        gap: 0.35rem;
    }

    .ts-sidebar-footer {
        display: none;
    }

    .ts-main {
        padding: 1.5rem 1.3rem;
    }

    .ts-panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .ts-surface {
        padding: 2rem 1.6rem;
    }

    .ts-brand-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === Top navigation bar === */

.ts-topnav {
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding-inline: 1rem;
}

.ts-logo-img-nav {
    height: 28px;
    width: auto;
}

.ts-topnav .navbar-brand {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ts-text);
}

.ts-topnav .nav-link {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--ts-muted);
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    position: relative;
    margin:auto 10px;
}

.ts-topnav .nav-link:hover {
    color: var(--ts-text);
}

.ts-topnav .nav-link.active {
    color: var(--ts-text);
}

/*
.ts-topnav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.1rem;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ts-primary);
}
*/

/* Page shell under the nav */

.ts-page-shell {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.ts-page-surface {
    max-width: 1160px;
    width: 100%;
    margin-top: 1.25rem;
}

/* Make the main card a bit tighter on mobile */
@media (max-width: 576px) {
    .ts-page-shell {
        padding: 1rem;
    }
    .ts-page-surface {
        margin-top: 1rem;
    }
    .ts-surface {
        padding: 1.75rem 1.4rem;
    }
}



.ts-btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.ts-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: tsSpin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes tsSpin {
    to {
        transform: rotate(360deg);
    }
}


.ts-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    margin-top: 3rem;
}

.ts-footer-text {
    font-size: 0.75rem;
    color: var(--ts-muted);
}


.ts-divider-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.4rem 0 0.9rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ts-muted);
}

.ts-divider-or::before,
.ts-divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(148, 163, 184, 0.6),
        transparent
    );
}

/* === Processing full-screen layout === */
.ts-processing-screen {
    min-height: 100vh;
    background: var(--ts-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* === ORB ANIMATION CONTAINER === */
.ts-orb-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 2rem;
}

/* === GLOWING FLOATING ORBS === */
.ts-orb {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ts-primary);
    opacity: 0.8;
    box-shadow: 0 0 18px rgba(242, 180, 43, 0.7);
    animation: floatOrb 2.8s ease-in-out infinite;
}

/* Each orb has unique timing + movement */
.orb-1 {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}
.orb-2 {
    top: 50%;
    left: 10%;
    animation-delay: -0.9s;
}
.orb-3 {
    top: 55%;
    right: 10%;
    animation-delay: -1.7s;
}

/* KEYFRAMES: Smooth floating motion */
@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(12px, -18px) scale(1.1); }
    50%  { transform: translate(-10px, 8px) scale(0.95); }
    75%  { transform: translate(14px, 10px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Titles */
.ts-processing-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ts-text);
    margin-bottom: 0.4rem;
}

.ts-processing-subtitle {
    font-size: 0.95rem;
    color: var(--ts-muted);
}

/* === Dashboard progress card === */

.ts-progress-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.ts-progress-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ts-text);
}

.ts-progress-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ts-muted);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

.ts-progress-table tbody td {
    font-size: 0.88rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.ts-progress-label {
    font-weight: 500;
}

/* Status pill styles */

.ts-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    min-width: 92px;
}

/* little "image" indicator (colored dot) */
/* ------------------------------------
   Base Icon Style
-------------------------------------*/
.ts-status-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid transparent;
}

/* ------------------------------------
   COMPLETE
-------------------------------------*/
.ts-status-complete.ts-status-pill {
    background: rgba(34, 197, 94, 0.10);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.35);
}

.ts-status-complete.ts-status-icon {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.20);
}

/* ------------------------------------
   PROCESSING
-------------------------------------*/
.ts-status-processing.ts-status-pill {
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.35);
}

.ts-status-processing.ts-status-icon {
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.20);
}

/* ------------------------------------
   NEEDS ATTENTION
-------------------------------------*/
.ts-status-needs-attention.ts-status-pill {
    background: rgba(234, 179, 8, 0.10);
    color: #92400e;
    border-color: rgba(234, 179, 8, 0.35);
}

.ts-status-needs-attention.ts-status-icon {
    background: #eab308;
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.20);
}

/* ------------------------------------
   REQUIRES CANDIDATE UPDATE
-------------------------------------*/
.ts-status-requires-update.ts-status-pill {
    background: rgba(249, 115, 22, 0.10);
    color: #c2410c;
    border-color: rgba(249, 115, 22, 0.35);
}

.ts-status-requires-update.ts-status-icon {
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.20);
}

/* ------------------------------------
   INCOMPLETE
-------------------------------------*/
.ts-status-incomplete.ts-status-pill {
    background: rgba(248, 113, 113, 0.10);
    color: #b91c1c;
    border-color: rgba(248, 113, 113, 0.35);
}

.ts-status-incomplete.ts-status-icon {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.20);
}

/* ------------------------------------
   UNKNOWN
-------------------------------------*/
.ts-status-unknown.ts-status-pill {
    background: rgba(156, 163, 175, 0.10);
    color: #374151;
    border-color: rgba(156, 163, 175, 0.35);
}

.ts-status-unknown.ts-status-icon {
    background: #9ca3af;
    box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.20);
}

/* Small inline action button used inside the progress table */
.ts-btn-link-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--ts-primary);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ts-primary);
    background: transparent;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.ts-btn-link-sm:hover {
    background: rgba(242, 180, 43, 0.08);
    color: var(--ts-primary);
    box-shadow: 0 0 0 1px rgba(242, 180, 43, 0.25);
    text-decoration: none;
    transform: translateY(-0.5px);
}

.ts-btn-link-sm:active {
    transform: translateY(0);
    box-shadow: none;
}
/* Sticky apply bar */
.ts-apply-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 9999;
    display: flex;
    justify-content: center;
}

/* Apply bar button */
.ts-apply-bar .ts-apply-btn {
    padding: 0.75rem 2.2rem;
    font-size: 1.05rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Smaller on mobile */
@media (max-width: 576px) {
    .ts-apply-bar .ts-apply-btn {
        padding: 0.65rem 1.6rem;
        font-size: 0.9rem;
    }
}

/* Provide safe space for content so it doesn't go behind bar */
.ts-apply-padding {
    padding-bottom: 90px; 
}