:root {
    --tf-blue: #071E3D;
    --tf-blue-2: #0B2E59;
    --tf-blue-3: #123E73;
    --tf-orange: #FF7A00;
    --tf-orange-2: #FF9A3D;
    --tf-white: #FFFFFF;
    --tf-bg: #F4F7FB;
    --tf-text: #1F2937;
    --tf-muted: #6B7280;
    --tf-border: #E5E7EB;
    --tf-card: #FFFFFF;
    --tf-shadow: 0 18px 45px rgba(7, 30, 61, 0.12);
    --tf-radius: 24px;
}

* {
    box-sizing: border-box;
}

body.tf-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--tf-bg);
    color: var(--tf-text);
}

a {
    text-decoration: none;
}

.auth-body {
    background:
        radial-gradient(circle at top left, rgba(255, 122, 0, 0.22), transparent 28%),
        radial-gradient(circle at bottom right, rgba(18, 62, 115, 0.45), transparent 28%),
        linear-gradient(135deg, var(--tf-blue), #031225);
}

/* Login */
.tf-auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 40px;
    padding: 48px;
}

.tf-auth-left {
    color: var(--tf-white);
    padding: 40px;
}

.tf-auth-brand {
    max-width: 660px;
}

.tf-auth-logo {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--tf-orange), var(--tf-orange-2));
    box-shadow: 0 20px 45px rgba(255, 122, 0, 0.28);
    font-size: 42px;
    margin-bottom: 28px;
}

.tf-auth-brand h1 {
    font-size: clamp(42px, 5vw, 72px);
    line-height: 0.95;
    font-weight: 900;
    margin-bottom: 18px;
    letter-spacing: -2px;
}

.tf-auth-brand p {
    font-size: 19px;
    color: rgba(255,255,255,0.76);
    max-width: 560px;
}

.tf-auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 620px;
    margin-top: 42px;
}

.tf-auth-feature {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
}

.tf-auth-feature i {
    color: var(--tf-orange);
    font-size: 22px;
}

.tf-auth-card-wrap {
    display: flex;
    justify-content: center;
}

.tf-auth-card {
    width: min(100%, 480px);
    padding: 34px;
    background: rgba(255,255,255,0.96);
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
}

.tf-auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.tf-mini-logo {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 122, 0, 0.12);
    color: var(--tf-orange);
    font-size: 26px;
}

.tf-auth-card h2 {
    font-weight: 850;
    color: var(--tf-blue);
    margin-bottom: 6px;
}

.tf-auth-card p {
    color: var(--tf-muted);
    margin: 0;
}

.tf-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tf-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 8px;
    color: var(--tf-blue);
}

.tf-input-icon {
    min-height: 54px;
    border: 1px solid var(--tf-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    background: #FAFBFF;
    transition: 0.2s ease;
}

.tf-input-icon:focus-within {
    border-color: var(--tf-orange);
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.10);
    background: var(--tf-white);
}

.tf-input-icon i {
    color: var(--tf-muted);
}

.tf-input-icon input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 15px;
    color: var(--tf-text);
}

.tf-password-toggle {
    border: none;
    background: transparent;
    color: var(--tf-muted);
    width: 34px;
    height: 34px;
}

.tf-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tf-muted);
    font-size: 14px;
}

.tf-link {
    color: var(--tf-orange);
    font-weight: 750;
    font-size: 14px;
}

.tf-primary-btn,
.tf-secondary-btn {
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 16px;
    font-weight: 800;
    transition: 0.2s ease;
}

.tf-primary-btn {
    background: linear-gradient(135deg, var(--tf-orange), var(--tf-orange-2));
    color: var(--tf-white);
    box-shadow: 0 16px 30px rgba(255, 122, 0, 0.25);
}

.tf-primary-btn:hover {
    color: var(--tf-white);
    transform: translateY(-1px);
}

.tf-secondary-btn {
    background: rgba(255,255,255,0.12);
    color: var(--tf-white);
    border: 1px solid rgba(255,255,255,0.18);
}

.tf-primary-btn.small,
.tf-secondary-btn.small {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 14px;
}

.tf-auth-note {
    margin-top: 22px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(7, 30, 61, 0.06);
    color: var(--tf-muted);
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.tf-auth-note i {
    color: var(--tf-orange);
}

.tf-alert:empty,
.validation-summary-valid {
    display: none;
}

/* Shell */
.tf-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px 1fr;
}

.tf-sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--tf-blue), #04142A);
    color: var(--tf-white);
    padding: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.tf-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 22px;
}

.tf-brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--tf-orange), var(--tf-orange-2));
    display: grid;
    place-items: center;
    font-size: 24px;
}

.tf-brand-title {
    font-size: 18px;
    font-weight: 900;
}

.tf-brand-subtitle {
    color: rgba(255,255,255,0.58);
    font-size: 12px;
}

.tf-sidebar-search,
.tf-global-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 15px;
    padding: 0 14px;
}

.tf-sidebar-search {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.tf-sidebar-search input,
.tf-global-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.tf-sidebar-search input {
    color: var(--tf-white);
}

.tf-sidebar-search input::placeholder {
    color: rgba(255,255,255,0.45);
}

.tf-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tf-nav-section {
    color: rgba(255,255,255,0.40);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-weight: 800;
    margin: 18px 10px 8px;
}

.tf-nav-link {
    min-height: 46px;
    color: rgba(255,255,255,0.78);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    font-weight: 700;
    transition: 0.18s ease;
}

.tf-nav-link i {
    width: 22px;
    text-align: center;
}

.tf-nav-link small {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.5;
}

.tf-nav-link:hover,
.tf-nav-link.active {
    color: var(--tf-white);
    background: rgba(255, 122, 0, 0.18);
}

.tf-nav-link.active {
    border: 1px solid rgba(255, 122, 0, 0.35);
}

.disabled-link {
    cursor: not-allowed;
}

.tf-sidebar-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.tf-user-mini {
    display: flex;
    align-items: center;
    gap: 11px;
}

.tf-avatar {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tf-orange), var(--tf-orange-2));
    color: var(--tf-white);
    font-weight: 900;
}

.tf-user-name {
    font-weight: 800;
    font-size: 13px;
}

.tf-user-role {
    color: rgba(255,255,255,0.52);
    font-size: 12px;
}

.tf-main {
    min-width: 0;
}

.tf-topbar {
    min-height: 86px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tf-topbar-left,
.tf-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tf-topbar h1 {
    color: var(--tf-blue);
    font-size: 24px;
    font-weight: 900;
    margin: 0;
}

.tf-topbar p {
    color: var(--tf-muted);
    margin: 3px 0 0;
    font-size: 13px;
}

.tf-icon-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--tf-border);
    background: var(--tf-white);
    border-radius: 15px;
    color: var(--tf-blue);
    display: grid;
    place-items: center;
    position: relative;
}

.tf-dot {
    position: absolute;
    right: 11px;
    top: 10px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tf-orange);
    border: 2px solid var(--tf-white);
}

.tf-global-search {
    width: min(360px, 32vw);
    background: #F8FAFC;
    border: 1px solid var(--tf-border);
}

.tf-profile-btn {
    min-height: 44px;
    border: 1px solid var(--tf-border);
    background: var(--tf-white);
    color: var(--tf-blue);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 3px 14px 3px 3px;
    font-weight: 800;
}

.tf-dropdown {
    border: none;
    border-radius: 18px;
    box-shadow: var(--tf-shadow);
    padding: 10px;
}

.tf-content {
    padding: 28px;
}

/* Dashboard */
.tf-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tf-hero-card {
    background:
        radial-gradient(circle at 92% 20%, rgba(255,122,0,0.35), transparent 26%),
        linear-gradient(135deg, var(--tf-blue), var(--tf-blue-3));
    color: var(--tf-white);
    border-radius: 30px;
    padding: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: var(--tf-shadow);
}

.tf-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--tf-orange-2);
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 12px;
}

.tf-hero-card h2 {
    font-size: clamp(30px, 3vw, 48px);
    font-weight: 950;
    margin-bottom: 8px;
}

.tf-hero-card p {
    color: rgba(255,255,255,0.72);
    max-width: 720px;
    font-size: 16px;
}

.tf-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.tf-hero-illustration {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    position: relative;
    flex: 0 0 auto;
}

.tf-hero-illustration > i {
    font-size: 76px;
    color: var(--tf-orange-2);
    z-index: 2;
}

.tf-orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50%;
}

.tf-orbit.one {
    inset: 22px;
}

.tf-orbit.two {
    inset: 48px;
}

.tf-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.tf-metric-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: 24px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 17px;
    box-shadow: 0 12px 26px rgba(7,30,61,0.06);
}

.tf-metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 24px;
}

.metric-blue .tf-metric-icon {
    background: rgba(7, 30, 61, 0.10);
    color: var(--tf-blue);
}

.metric-orange .tf-metric-icon {
    background: rgba(255, 122, 0, 0.12);
    color: var(--tf-orange);
}

.metric-green .tf-metric-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.metric-purple .tf-metric-icon {
    background: rgba(124, 58, 237, 0.12);
    color: #7C3AED;
}

.tf-metric-card p {
    color: var(--tf-muted);
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 750;
}

.tf-metric-card h3 {
    font-size: 30px;
    font-weight: 950;
    color: var(--tf-blue);
    margin: 0;
}

.tf-metric-card span {
    color: var(--tf-muted);
    font-size: 12px;
}

.tf-panel {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 12px 26px rgba(7,30,61,0.05);
    height: 100%;
}

.tf-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.tf-panel-header h3 {
    color: var(--tf-blue);
    font-size: 19px;
    font-weight: 900;
    margin: 0 0 4px;
}

.tf-panel-header p {
    color: var(--tf-muted);
    margin: 0;
    font-size: 13px;
}

.tf-badge {
    background: rgba(255, 122, 0, 0.12);
    color: var(--tf-orange);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 850;
    font-size: 12px;
}

.tf-badge.success {
    background: rgba(16,185,129,0.12);
    color: #059669;
}

.tf-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tf-module-card {
    border: 1px solid var(--tf-border);
    border-radius: 20px;
    padding: 18px;
    background: #FBFDFF;
}

.tf-module-card i {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 122, 0, 0.12);
    color: var(--tf-orange);
    font-size: 20px;
    margin-bottom: 14px;
}

.tf-module-card h4 {
    color: var(--tf-blue);
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 6px;
}

.tf-module-card p {
    color: var(--tf-muted);
    font-size: 13px;
    margin: 0;
}

.tf-action-list,
.tf-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tf-action-item,
.tf-status-row {
    border: 1px solid var(--tf-border);
    background: #FBFDFF;
    border-radius: 16px;
    min-height: 50px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tf-blue);
    font-weight: 800;
}

.tf-action-item span,
.tf-status-row span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tf-action-item i {
    color: var(--tf-orange);
}

.disabled-action {
    opacity: 0.82;
    cursor: not-allowed;
}

.tf-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tf-timeline-item {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 13px;
}

.tf-timeline-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(7, 30, 61, 0.08);
    color: var(--tf-blue);
}

.tf-timeline-item h4 {
    margin: 0 0 4px;
    color: var(--tf-blue);
    font-size: 15px;
    font-weight: 900;
}

.tf-timeline-item p {
    margin: 0 0 4px;
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-timeline-item span {
    color: var(--tf-orange);
    font-size: 12px;
    font-weight: 850;
}

.tf-status-row strong {
    color: var(--tf-orange);
    font-size: 13px;
}

.tf-error-page {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
}

.tf-error-card {
    max-width: 520px;
    text-align: center;
    background: var(--tf-white);
    padding: 42px;
    border-radius: 30px;
    box-shadow: var(--tf-shadow);
}

.tf-error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255,122,0,0.12);
    color: var(--tf-orange);
    font-size: 34px;
}

.text-danger {
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    display: block;
}

/* Responsive */
@media (max-width: 1180px) {
    .tf-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tf-auth-page {
        grid-template-columns: 1fr;
    }

    .tf-auth-left {
        padding-bottom: 0;
    }
}

@media (max-width: 900px) {
    .tf-shell {
        grid-template-columns: 1fr;
    }

    .tf-sidebar {
        position: fixed;
        z-index: 50;
        transform: translateX(-100%);
        transition: 0.2s ease;
        width: 292px;
    }

    .tf-shell.sidebar-collapsed .tf-sidebar {
        transform: translateX(0);
    }

    .tf-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .tf-topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .tf-global-search {
        width: 100%;
    }

    .tf-content {
        padding: 18px;
    }

    .tf-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tf-hero-illustration {
        display: none;
    }
}

@media (max-width: 640px) {
    .tf-auth-page {
        padding: 18px;
    }

    .tf-auth-left {
        padding: 20px 4px;
    }

    .tf-auth-feature-grid,
    .tf-module-grid,
    .tf-metrics-grid {
        grid-template-columns: 1fr;
    }

    .tf-auth-card {
        padding: 24px;
        border-radius: 24px;
    }

    .tf-hero-actions,
    .tf-form-row {
        flex-direction: column;
        align-items: stretch;
    }
}
