:root {
    --tf-primary: #0f172a;
    --tf-secondary: #0ea5a4;
    --tf-accent: #f59e0b;
    --tf-surface: #f8fafc;
    --tf-text: #111827;
    --tf-muted: #6b7280;
    --tf-radius: 16px;
    --tf-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--tf-text);
    background:
        radial-gradient(circle at 20% 10%, rgba(14, 165, 164, 0.18), transparent 36%),
        radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.16), transparent 28%),
        #f1f5f9;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.02em;
}

.tf-header {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.tf-nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tf-brand {
    text-decoration: none;
    color: var(--tf-primary);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tf-brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tf-secondary), var(--tf-accent));
    box-shadow: 0 0 0 6px rgba(14, 165, 164, 0.15);
}

.tf-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.tf-menu a {
    text-decoration: none;
    color: var(--tf-primary);
    font-weight: 700;
}

.tf-link-ghost {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.18);
}

.tf-main {
    min-height: calc(100vh - 150px);
    padding: 28px 0 46px;
}

.tf-hero {
    background: linear-gradient(130deg, #0f172a 0%, #155e75 50%, #0f172a 100%);
    border-radius: 28px;
    padding: 38px;
    color: #fff;
    box-shadow: var(--tf-shadow);
    position: relative;
    overflow: hidden;
}

.tf-hero::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    right: -90px;
    top: -120px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.2);
}

.tf-hero p {
    color: rgba(255, 255, 255, 0.88);
}

.tf-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tf-btn-main {
    background: var(--tf-secondary);
    border: none;
    color: #fff;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    text-decoration: none;
}

.tf-btn-alt {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    text-decoration: none;
}

.tf-card {
    background: #fff;
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.tf-plan-card {
    padding: 24px;
    height: 100%;
}

.tf-plan-price {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--tf-primary);
}

.tf-badge {
    display: inline-block;
    background: rgba(14, 165, 164, 0.12);
    color: #0f766e;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tf-feature-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.tf-feature-list li {
    margin-bottom: 8px;
    color: var(--tf-text);
}

.tf-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
}

.tf-auth-card {
    padding: 28px;
}

.tf-form-control {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    padding: 11px 13px;
    width: 100%;
}

.tf-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tf-stat-card {
    padding: 18px;
}

.tf-stat-title {
    margin-bottom: 6px;
    color: var(--tf-muted);
    font-size: 0.9rem;
}

.tf-stat-value {
    margin: 0;
    font-weight: 800;
    color: var(--tf-primary);
    font-size: 1.7rem;
}

.tf-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.tf-section-card {
    padding: 20px;
}

.tf-rule-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 6px 10px;
    margin: 0 8px 8px 0;
    font-size: 0.82rem;
    font-weight: 700;
}

.tf-announcement {
    border-left: 4px solid var(--tf-accent);
    padding-left: 12px;
    margin-bottom: 14px;
}

.tf-player {
    margin-top: 18px;
    padding: 20px;
    background: linear-gradient(140deg, #0f172a, #1e293b);
    color: #fff;
    border-radius: 18px;
}

.tf-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tf-player-actions {
    display: flex;
    gap: 8px;
}

.tf-icon-btn {
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 800;
}

.tf-progress {
    width: 100%;
    margin-top: 14px;
}

.tf-progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}

.tf-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 16px 0;
    color: var(--tf-muted);
    font-size: 0.92rem;
}

.tf-menu-toggle {
    display: none;
    border: none;
    background: transparent;
    width: 42px;
    height: 42px;
    padding: 6px;
}

.tf-menu-toggle span {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: var(--tf-primary);
    margin: 5px 0;
}

.tf-hidden {
    display: none !important;
}

.tf-main-dashboard {
    padding-top: 18px;
}

.tf-menu-inline {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    padding: 0 !important;
}

.tf-admin-layout,
.tf-client-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
}

.tf-sidebar,
.tf-client-sidebar {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 18px;
    box-shadow: var(--tf-shadow);
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 96px;
}

.tf-sidebar-title {
    font-weight: 800;
    color: var(--tf-primary);
    margin-bottom: 10px;
}

.tf-sidebar a,
.tf-client-sidebar a {
    display: block;
    text-decoration: none;
    color: #334155;
    border-radius: 10px;
    padding: 9px 10px;
    margin-bottom: 5px;
    font-weight: 700;
}

.tf-sidebar a.is-active,
.tf-client-sidebar a.is-active,
.tf-sidebar a:hover,
.tf-client-sidebar a:hover {
    background: rgba(14, 165, 164, 0.12);
    color: #0f172a;
}

.tf-client-content,
.tf-admin-content {
    min-width: 0;
}

.tf-client-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tf-client-logo {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: linear-gradient(130deg, var(--client-secondary, #0ea5a4), var(--client-accent, #f59e0b));
    color: #fff;
}

.tf-client-logo-nav {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
}

.tf-client-login-card {
    border-top: 4px solid var(--tf-secondary);
}

.tf-client-login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tf-client-default .tf-player {
    background: linear-gradient(140deg, #0f172a, #1e293b);
}

.tf-client-modern {
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.08), rgba(16, 185, 129, 0.08));
    border-radius: 18px;
    padding: 10px;
}

.tf-client-modern .tf-client-sidebar a.is-active,
.tf-client-modern .tf-client-sidebar a:hover {
    background: color-mix(in srgb, var(--client-secondary), white 82%);
}

.tf-client-modern .tf-player {
    background: linear-gradient(140deg, var(--client-primary), var(--client-secondary));
}

.tf-client-modern .tf-btn-main {
    background: var(--client-secondary);
}

/* Admin dark layout inspired by user-provided example */
.tf-admin-theme {
    background:
        radial-gradient(circle at 15% 0%, rgba(148, 163, 184, 0.12), transparent 30%),
        radial-gradient(circle at 100% 10%, rgba(245, 158, 11, 0.12), transparent 28%),
        #020617;
    color: #e2e8f0;
}

.tf-admin-page {
    min-height: 100vh;
}

.tf-admin-shell {
    display: block;
    min-height: 100vh;
}

.tf-admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #111827 55%, #312e81 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    padding: 18px 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
}

.tf-admin-sidebar-head {
    padding: 0 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tf-admin-brand {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.tf-admin-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    color: #111827;
}

.tf-admin-nav {
    padding: 10px 0;
    overflow: auto;
    flex: 1;
}

.tf-admin-nav-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 14px 0 6px;
    padding: 0 18px;
    font-weight: 700;
}

.tf-admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-left: 3px solid transparent;
}

.tf-admin-nav a:hover,
.tf-admin-nav a.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.15);
    border-left-color: #f59e0b;
}

.tf-admin-sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.tf-admin-sidebar-foot small {
    color: rgba(255, 255, 255, 0.62);
}

.tf-admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.tf-admin-main {
    margin-left: 270px;
    min-height: 100vh;
}

.tf-admin-topbar {
    height: 70px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 1100;
}

.tf-admin-topbar h2 {
    color: #f8fafc;
    font-size: 1.2rem;
}

.tf-admin-hamburger {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.tf-admin-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 4px;
    background: #fff;
}

.tf-admin-logout {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 7px 14px;
}

.tf-company-switch-form {
    margin: 0;
}

.tf-company-switch {
    min-width: 220px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    padding: 7px 12px;
    font-weight: 700;
}

.tf-company-switch:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.75);
}

.tf-admin-content {
    padding: 20px;
}

.tf-chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
}

.tf-chart-wrap-sm {
    height: 230px;
}

.tf-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.tf-admin-theme .tf-card {
    background: linear-gradient(170deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 35px rgba(2, 6, 23, 0.45);
}

.tf-admin-theme .tf-stat-title,
.tf-admin-theme .text-secondary,
.tf-admin-theme .tf-rule-pill,
.tf-admin-theme .tf-announcement small {
    color: #94a3b8 !important;
}

.tf-admin-theme .tf-stat-value,
.tf-admin-theme h5,
.tf-admin-theme h6,
.tf-admin-theme p,
.tf-admin-theme small {
    color: #e2e8f0;
}

.tf-admin-theme .tf-rule-pill {
    background: rgba(148, 163, 184, 0.15);
}

.tf-admin-theme .tf-player {
    background: linear-gradient(120deg, #0f172a, #1e1b4b, #0f172a);
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.tf-admin-users-page .tf-card {
    background: linear-gradient(170deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.9));
}

.tf-company-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.5);
}

.tf-company-logo-preview,
.tf-company-logo-fallback {
    width: 74px;
    height: 74px;
    border-radius: 16px;
}

.tf-company-logo-preview {
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.tf-company-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    color: #111827;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
}

.tf-company-mini-logo,
.tf-company-mini-fallback {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.tf-company-mini-logo {
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.tf-company-mini-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    color: #111827;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
}

.tf-company-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 14px;
}

.tf-color-chip {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    display: inline-block;
}

.tf-spotify-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #f5f3ff 100%);
}

.tf-spotify-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tf-spotify-pill.is-connected {
    background: #dcfce7;
    color: #166534;
}

.tf-spotify-pill.is-warning {
    background: #fef3c7;
    color: #92400e;
}

.tf-spotify-pill.is-disconnected {
    background: #e2e8f0;
    color: #334155;
}

.tf-spotify-scope {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.74rem;
    font-weight: 700;
}

.tf-admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    z-index: 1150;
}

.modal-backdrop {
    z-index: 2000 !important;
}

.modal {
    z-index: 2010 !important;
}

.tf-admin-theme .modal-dialog {
    margin: 1rem auto;
}

.tf-admin-theme .modal-content {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
}

.tf-admin-theme .modal-header,
.tf-admin-theme .modal-footer {
    border-color: rgba(148, 163, 184, 0.28) !important;
}

.tf-admin-theme .modal-title,
.tf-admin-theme .modal-body,
.tf-admin-theme .modal-body .form-label {
    color: #e2e8f0;
}

.tf-admin-theme .modal-body .text-secondary,
.tf-admin-theme .modal-body small.text-secondary {
    color: #cbd5e1 !important;
}

.tf-admin-theme .modal .tf-form-control,
.tf-admin-theme .modal .form-select,
.tf-admin-theme .modal input[type='color'] {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.tf-admin-theme .modal .tf-form-control::placeholder {
    color: rgba(203, 213, 225, 0.7);
}

.tf-admin-theme .modal .form-check-label {
    color: #e2e8f0;
}

.tf-admin-theme .modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    overflow-x: hidden;
}

.tf-admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tf-admin-login-wrap {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 18px;
}

.tf-admin-login-showcase {
    background: linear-gradient(140deg, #020617, #1e1b4b);
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 32px;
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.5);
}

.tf-admin-login-showcase h1 {
    color: #fff;
}

.tf-admin-login-showcase p {
    color: #cbd5e1;
}

.tf-admin-login-card {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.tf-admin-login-card .tf-form-control {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

.tf-admin-login-card .form-label {
    color: #cbd5e1;
}

.tf-admin-login-card .tf-btn-main {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111827;
}

.tf-register-link {
    text-align: center;
    font-weight: 700;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
}

.tf-register-link:hover {
    color: #fff;
    text-decoration: underline;
}

.tf-register-wrap {
    width: min(1140px, 100%);
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 18px;
}

.tf-register-card .tf-form-control {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

.tf-register-card .form-label {
    color: #cbd5e1;
}

.tf-radio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tf-radio-card {
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
}

.tf-radio-card input {
    margin-right: 8px;
}

.tf-radio-card span {
    font-weight: 700;
    color: #f8fafc;
}

.tf-radio-card small {
    display: block;
    color: #94a3b8;
    margin-top: 4px;
}

.tf-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tf-plan-pick {
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tf-plan-pick input {
    margin-bottom: 4px;
}

.tf-plan-pick strong {
    color: #f8fafc;
}

.tf-plan-pick small {
    color: #94a3b8;
}

.tf-plan-pick.is-selected {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

/* Client dark layout inspired by admin visual with company branding */
.tf-client-portal-theme {
    background:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--client-secondary, #0ea5a4), transparent 82%), transparent 38%),
        radial-gradient(circle at 94% 6%, color-mix(in srgb, var(--client-accent, #f59e0b), transparent 80%), transparent 34%),
        #020617;
    color: #e2e8f0;
}

.tf-client-page {
    min-height: 100vh;
}

.tf-client-shell {
    display: block;
    min-height: 100vh;
}

.tf-client-portal-theme .tf-client-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(180deg, #020617 0%, #0f172a 58%, color-mix(in srgb, var(--client-primary, #1f2937), #312e81 45%) 100%);
    padding: 16px 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
}

.tf-client-sidebar-head {
    padding: 0 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.tf-client-brand-link {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.tf-client-nav {
    padding: 10px 0;
    overflow: auto;
    flex: 1;
}

.tf-client-nav-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 14px 0 6px;
    padding: 0 18px;
    font-weight: 700;
}

.tf-client-portal-theme .tf-client-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-left: 3px solid transparent;
    border-radius: 0;
    margin: 0;
}

.tf-client-portal-theme .tf-client-sidebar a:hover,
.tf-client-portal-theme .tf-client-sidebar a.is-active {
    color: #fff;
    background: color-mix(in srgb, var(--client-secondary, #0ea5a4), transparent 82%);
    border-left-color: var(--client-accent, #f59e0b);
}

.tf-client-sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.tf-client-sidebar-foot small {
    color: rgba(255, 255, 255, 0.62);
}

.tf-client-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #0b1120;
    background: linear-gradient(135deg, var(--client-accent, #f59e0b), #fbbf24);
}

.tf-client-portal-theme .tf-client-logo {
    background: linear-gradient(130deg, var(--client-secondary, #0ea5a4), var(--client-accent, #f59e0b));
}

.tf-client-main {
    margin-left: 270px;
    min-height: 100vh;
}

.tf-client-topbar {
    height: 70px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 1100;
}

.tf-client-topbar h2 {
    color: #f8fafc;
    font-size: 1.18rem;
}

.tf-client-topbar small {
    color: #94a3b8;
}

.tf-client-hamburger {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.tf-client-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 4px;
    background: #fff;
}

.tf-client-logout {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 7px 14px;
}

.tf-client-content {
    padding: 20px;
}

.tf-client-portal-theme .tf-card {
    background: linear-gradient(170deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 35px rgba(2, 6, 23, 0.45);
}

.tf-client-portal-theme .tf-stat-title,
.tf-client-portal-theme .text-secondary,
.tf-client-portal-theme .tf-announcement small,
.tf-client-portal-theme .tf-progress-time {
    color: #94a3b8 !important;
}

.tf-client-portal-theme .tf-stat-value,
.tf-client-portal-theme h5,
.tf-client-portal-theme p,
.tf-client-portal-theme small {
    color: #e2e8f0;
}

.tf-client-portal-theme .tf-btn-main {
    background: linear-gradient(135deg, var(--client-secondary, #0ea5a4), var(--client-primary, #1f2937));
}

.tf-client-portal-theme .tf-player {
    background: linear-gradient(120deg, #0f172a, color-mix(in srgb, var(--client-primary, #1f2937), #1e1b4b 45%), #0f172a);
    border: 1px solid color-mix(in srgb, var(--client-accent, #f59e0b), transparent 68%);
}

.tf-client-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    z-index: 1150;
}

@media (max-width: 992px) {
    .tf-admin-layout,
    .tf-client-layout {
        grid-template-columns: 1fr;
    }

    .tf-sidebar,
    .tf-client-sidebar {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 82px;
        z-index: 1100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.2s ease;
        max-height: calc(100vh - 110px);
        overflow: auto;
    }

    .tf-sidebar.is-open,
    .tf-client-sidebar.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .tf-admin-shell {
        display: block;
    }

    .tf-admin-main {
        margin-left: 0;
    }

    .tf-admin-sidebar {
        left: -300px;
        transition: left 0.25s ease;
    }

    .tf-admin-sidebar.is-open {
        left: 0;
    }

    .tf-admin-hamburger {
        display: inline-flex;
    }

    .tf-company-switch {
        min-width: 160px;
        font-size: 0.86rem;
    }

    .tf-company-checklist {
        grid-template-columns: 1fr;
    }

    .tf-company-info-grid {
        grid-template-columns: 1fr;
    }

    .tf-client-main {
        margin-left: 0;
    }

    .tf-client-portal-theme .tf-client-sidebar {
        left: -300px;
        transition: left 0.25s ease;
    }

    .tf-client-portal-theme .tf-client-sidebar.is-open {
        left: 0;
    }

    .tf-client-hamburger {
        display: inline-flex;
    }

    .tf-admin-login-wrap {
        grid-template-columns: 1fr;
    }

    .tf-register-wrap {
        grid-template-columns: 1fr;
    }

    .tf-radio-grid {
        grid-template-columns: 1fr;
    }

    .tf-plan-grid {
        grid-template-columns: 1fr;
    }

    .tf-admin-login-showcase {
        order: 2;
    }

    .tf-chart-wrap {
        height: 220px;
    }

    .tf-chart-wrap-sm {
        height: 200px;
    }
}

@media (max-width: 992px) {
    .tf-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tf-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tf-menu-toggle {
        display: inline-block;
    }

    .tf-menu {
        position: absolute;
        right: 16px;
        top: 76px;
        flex-direction: column;
        align-items: flex-start;
        width: min(300px, calc(100% - 32px));
        background: #fff;
        border-radius: 12px;
        padding: 16px;
        box-shadow: var(--tf-shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.2s ease;
    }

    .tf-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .tf-main {
        padding-top: 18px;
    }

    .tf-hero {
        padding: 24px;
    }

    .tf-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Clean professional admin refresh */
.tf-admin-theme {
    background: #f3f6fb;
    color: #0f172a;
}

.tf-admin-sidebar {
    width: 252px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.tf-admin-sidebar-head,
.tf-admin-sidebar-foot {
    border-color: #e2e8f0;
}

.tf-admin-brand,
.tf-admin-sidebar-foot,
.tf-admin-nav a {
    color: #334155;
}

.tf-admin-brand-icon {
    background: #eef2ff;
    color: #3730a3;
}

.tf-admin-nav-label {
    color: #94a3b8;
}

.tf-admin-nav a {
    border-left: 2px solid transparent;
    border-radius: 10px;
    margin: 1px 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
}

.tf-admin-nav a:hover,
.tf-admin-nav a.is-active {
    color: #0f172a;
    background: #f1f5f9;
    border-left-color: #0ea5a4;
}

.tf-admin-avatar {
    background: #e2e8f0;
    color: #0f172a;
}

.tf-admin-main {
    margin-left: 252px;
}

.tf-admin-topbar {
    height: 64px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
}

.tf-admin-topbar h2,
.tf-admin-topbar small {
    color: #0f172a !important;
}

.tf-admin-hamburger {
    border-color: #cbd5e1;
}

.tf-admin-hamburger span {
    background: #0f172a;
}

.tf-admin-logout {
    color: #334155;
    border-color: #cbd5e1;
    background: #ffffff;
    font-weight: 600;
    padding: 6px 12px;
}

.tf-company-switch {
    min-width: 190px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 6px 10px;
}

.tf-admin-content {
    padding: 16px;
}

.tf-admin-theme .tf-card,
.tf-admin-users-page .tf-card,
.tf-client-portal-theme .tf-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.tf-admin-theme .tf-stat-title,
.tf-admin-theme .text-secondary,
.tf-admin-theme .tf-announcement small,
.tf-admin-theme .tf-rule-pill,
.tf-admin-theme p,
.tf-admin-theme small,
.tf-admin-theme h5,
.tf-admin-theme h6,
.tf-admin-theme .tf-stat-value {
    color: #334155 !important;
}

.tf-admin-theme .tf-rule-pill {
    background: #f1f5f9;
}

.tf-admin-theme .tf-player,
.tf-client-portal-theme .tf-player {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.tf-progress-time {
    color: #64748b;
}

.tf-btn-main {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #0f766e;
}

.tf-btn-main:hover {
    filter: brightness(1.04);
}

.tf-form-control {
    border-radius: 10px;
    border-color: #cbd5e1;
    padding: 8px 10px;
    font-size: 0.9rem;
    line-height: 1.25;
}

.tf-admin-theme .tf-form-control,
.tf-admin-theme .modal .tf-form-control,
.tf-admin-theme .modal .form-select,
.tf-admin-theme .modal input[type='color'] {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.tf-admin-theme .modal-content {
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
}

.tf-admin-theme .modal-title,
.tf-admin-theme .modal-body,
.tf-admin-theme .modal-body .form-label,
.tf-admin-theme .modal .form-check-label {
    color: #0f172a;
}

.tf-admin-theme .modal-body .text-secondary,
.tf-admin-theme .modal-body small.text-secondary {
    color: #64748b !important;
}

.table.table-dark {
    --bs-table-bg: #ffffff;
    --bs-table-color: #0f172a;
    --bs-table-border-color: #e2e8f0;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-striped-color: #0f172a;
    --bs-table-hover-bg: #f1f5f9;
    --bs-table-hover-color: #0f172a;
}

@media (max-width: 992px) {
    .tf-admin-sidebar {
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    }

    .tf-admin-main {
        margin-left: 0;
    }
}

/* Contrast fixes for legacy dark utility classes in admin pages */
.tf-admin-theme .tf-btn-main {
    color: #ffffff;
    border: 1px solid #0b5f5a;
}

.tf-admin-theme .tf-icon-btn {
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.tf-admin-theme .tf-icon-btn:hover {
    background: #cbd5e1;
}

.tf-admin-theme .text-light,
.tf-admin-theme .text-light-emphasis {
    color: #334155 !important;
}

.tf-admin-theme .modal .text-light,
.tf-admin-theme .modal .form-check.text-light,
.tf-admin-theme .modal .form-check.text-light .form-check-label {
    color: #0f172a !important;
}

.tf-admin-theme .btn-outline-light {
    color: #334155;
    border-color: #94a3b8;
    background: #ffffff;
}

.tf-admin-theme .btn-outline-light:hover,
.tf-admin-theme .btn-outline-light:focus,
.tf-admin-theme .btn-outline-light:active {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
}

.tf-admin-theme .btn-close-white {
    filter: none;
    opacity: 0.7;
}

.tf-admin-theme .btn-close-white:hover {
    opacity: 1;
}

.tf-player-featured {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 45%, #eef2ff 100%);
    border: 1px solid #dbe3ef;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.tf-player-cover-wrap {
    width: 118px;
    height: 118px;
}

.tf-player-cover {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid #dbe3ef;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.tf-player-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0f766e, #155e75);
    color: #ecfeff;
    font-size: 2rem;
}

.tf-player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tf-player-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #dbeafe;
    color: #1d4ed8;
}

.tf-player-meta-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tf-player-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tf-player-chip-artist {
    background: #ccfbf1;
    color: #0f766e;
}

.tf-player-chip-year {
    background: #fef3c7;
    color: #92400e;
}

.tf-player-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 800;
}

.tf-player-subtitle {
    color: #475569;
    font-size: 0.95rem;
}

.tf-player-featured .tf-player-actions {
    gap: 10px;
}

.tf-player-featured .tf-icon-btn {
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.tf-player-featured .tf-icon-btn:hover {
    background: #cbd5e1;
}

.tf-player-featured .tf-progress {
    margin-top: 10px;
}

.tf-player-featured #playerProgress {
    --tf-progress-percent: 0%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    border: none;
    outline: none;
    background: linear-gradient(
        90deg,
        #14b8a6 0%,
        #0ea5e9 var(--tf-progress-percent),
        #dbe3ef var(--tf-progress-percent),
        #dbe3ef 100%
    );
}

.tf-player-featured #playerProgress:focus {
    box-shadow: none;
}

.tf-player-featured #playerProgress::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
}

.tf-player-featured #playerProgress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tf-player-featured #playerProgress::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #dbe3ef;
    border: none;
}

.tf-player-featured #playerProgress::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
}

.tf-player-featured #playerProgress::-moz-range-thumb {
    width: 0;
    height: 0;
    border: 0;
    background: transparent;
}

.tf-player-featured .tf-progress-time {
    color: #64748b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .tf-player-featured {
        grid-template-columns: 1fr;
    }

    .tf-player-cover-wrap {
        width: 100px;
        height: 100px;
    }
}
