:root {
    /* ── Brand colors ─────────────────────────────────────────── */
    --tb-primary: #3B9EFF;
    /* Biru utama - tombol, link, aksen */
    --tb-primary-hover: #2d8fe8;
    /* Hover state tombol primary */
    --tb-primary-dim: rgba(59, 158, 255, 0.12);
    /* Background tint primary */
    --tb-primary-glow: rgba(59, 158, 255, 0.25);
    /* Glow / shadow primary */
    --tb-primary-border: rgba(59, 158, 255, 0.25);
    /* Border tipis primary */

    --tb-secondary: #A78BFA;
    /* Ungu - aksen sekunder / badge */
    --tb-secondary-hover: #9372f5;
    --tb-secondary-dim: rgba(167, 139, 250, 0.12);
    --tb-secondary-border: rgba(167, 139, 250, 0.25);

    /* ── Surface / background ──────────────────────────────────── */
    --tb-bg: #0E0E0F;
    /* Background halaman */
    --tb-surface: #18181B;
    /* Card, panel, navbar bg */
    --tb-surface-2: #222226;
    /* Card lebih dalam, input bg */
    --tb-surface-3: #2a2a2f;
    /* Hover state surface */

    /* ── Border ────────────────────────────────────────────────── */
    --tb-border: rgba(255, 255, 255, 0.08);
    /* Border default */
    --tb-border-hover: rgba(255, 255, 255, 0.16);
    /* Border hover */
    --tb-border-strong: rgba(255, 255, 255, 0.24);
    /* Border kuat */

    /* ── Text ───────────────────────────────────────────────────── */
    --tb-text: #F0F0F2;
    /* Teks utama */
    --tb-text-muted: #8E8E9A;
    /* Teks sekunder / deskripsi */
    --tb-text-faint: #5A5A68;
    /* Label, placeholder */

    --tb-green: #34D399;
    --tb-green-dim: rgba(52, 211, 153, 0.12);
    --tb-green-border: rgba(52, 211, 153, 0.25);

    --tb-amber: #FBB040;
    --tb-amber-dim: rgba(251, 176, 64, 0.12);
    --tb-amber-border: rgba(251, 176, 64, 0.25);

    --tb-coral: #FB7185;
    --tb-coral-dim: rgba(251, 113, 133, 0.12);
    --tb-coral-border: rgba(251, 113, 133, 0.25);

    --tb-font-sans: 'DM Sans', system-ui, sans-serif;
    --tb-font-mono: 'DM Mono', 'Courier New', monospace;

    --tb-text-xs: 11px;
    --tb-text-sm: 13px;
    --tb-text-base: 15px;
    --tb-text-lg: 17px;
    --tb-text-xl: 22px;

    --tb-space-xs: 4px;
    --tb-space-sm: 8px;
    --tb-space-md: 16px;
    --tb-space-lg: 24px;
    --tb-space-xl: 40px;
    --tb-space-2xl: 64px;

    --tb-radius: 10px;
    --tb-radius-lg: 16px;
    --tb-radius-xl: 20px;
    --tb-radius-full: 9999px;

    --tb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --tb-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --tb-shadow-glow: 0 0 40px var(--tb-primary-glow);

    --tb-transition: 0.15s ease;

    /* ── Bootstrap overrides ───────────────────────────────────── */
    --bs-primary: var(--tb-primary);
    --bs-primary-rgb: 59, 158, 255;
    --bs-body-font-family: var(--tb-font-sans);
    --bs-body-bg: var(--tb-bg);
    --bs-body-color: var(--tb-text);
    --bs-border-color: var(--tb-border);
    --bs-border-radius: var(--tb-radius);
    --bs-link-color: var(--tb-primary);
    --bs-link-hover-color: var(--tb-primary-hover);
}

/* ── Base ───────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--tb-font-sans);
    background-color: var(--tb-bg);
    color: var(--tb-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Utilities ──────────────────────────────────────────────── */
.tb-text-muted {
    color: var(--tb-text-muted) !important;
}

.tb-text-faint {
    color: var(--tb-text-faint) !important;
}

.tb-text-primary {
    color: var(--tb-primary) !important;
}

.tb-text-green {
    color: var(--tb-green) !important;
}

.tb-text-amber {
    color: var(--tb-amber) !important;
}

.tb-text-coral {
    color: var(--tb-coral) !important;
}

.tb-font-mono {
    font-family: var(--tb-font-mono) !important;
}

.tb-surface {
    background-color: var(--tb-surface) !important;
}

.tb-surface-2 {
    background-color: var(--tb-surface-2) !important;
}

.tb-border {
    border: 1px solid var(--tb-border) !important;
}

.tb-border-hover {
    border-color: var(--tb-border-hover) !important;
}

.tb-radius {
    border-radius: var(--tb-radius) !important;
}

.tb-radius-lg {
    border-radius: var(--tb-radius-lg) !important;
}

.tb-bg-primary {
    background-color: var(--tb-primary-dim) !important;
}

.tb-bg-secondary {
    background-color: var(--tb-secondary-dim) !important;
}

.tb-bg-green {
    background-color: var(--tb-green-dim) !important;
}

.tb-bg-amber {
    background-color: var(--tb-amber-dim) !important;
}

.tb-bg-coral {
    background-color: var(--tb-coral-dim) !important;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-tb-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--tb-space-sm);
    font-size: var(--tb-text-sm);
    font-weight: 500;
    padding: 10px 22px;
    border-radius: var(--tb-radius);
    background: var(--tb-primary);
    color: #fff;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--tb-transition), transform var(--tb-transition);
}

.btn-tb-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
}

.btn-tb-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--tb-space-sm);
    font-size: var(--tb-text-sm);
    font-weight: 500;
    padding: 10px 22px;
    border-radius: var(--tb-radius);
    background: transparent;
    color: var(--tb-text-muted);
    border: 1px solid var(--tb-border-hover);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--tb-transition), background var(--tb-transition), border-color var(--tb-transition);
}

.btn-tb-ghost:hover {
    color: var(--tb-text);
    background: var(--tb-surface);
    border-color: var(--tb-border-strong);
}

/* ── Badges ─────────────────────────────────────────────────── */
.tb-badge {
    display: inline-block;
    font-size: var(--tb-text-xs);
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--tb-radius-full);
    line-height: 1.5;
}

.tb-badge-primary {
    background: var(--tb-primary-dim);
    color: var(--tb-primary);
}

.tb-badge-secondary {
    background: var(--tb-secondary-dim);
    color: var(--tb-secondary);
}

.tb-badge-green {
    background: var(--tb-green-dim);
    color: var(--tb-green);
}

.tb-badge-amber {
    background: var(--tb-amber-dim);
    color: var(--tb-amber);
}

.tb-badge-coral {
    background: var(--tb-coral-dim);
    color: var(--tb-coral);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.tb-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(24px, calc((100vw - 1100px) / 2));
    background: rgba(14, 14, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tb-border);
}

.tb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: var(--tb-text-base);
    color: var(--tb-text);
    text-decoration: none;
}

.tb-logo:hover {
    color: var(--tb-text);
}

.tb-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--tb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tb-font-mono);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    flex-shrink: 0;
}

.tb-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb-nav-links a {
    font-size: var(--tb-text-sm);
    color: var(--tb-text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--tb-radius);
    transition: color var(--tb-transition), background var(--tb-transition);
}

.tb-nav-links a:hover {
    color: var(--tb-text);
    background: var(--tb-surface);
}

/* ── Section (dipakai di banyak halaman) ────────────────────── */
.tb-section {
    padding: 80px max(24px, calc((100vw - 1100px) / 2));
}

.tb-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}

.tb-section-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--tb-text);
    margin: 0;
}

.tb-section-link {
    font-size: var(--tb-text-sm);
    color: var(--tb-primary);
    text-decoration: none;
    transition: opacity var(--tb-transition);
}

.tb-section-link:hover {
    opacity: 0.75;
}

/* ── Form elements ──────────────────────────────────────────── */
.tb-label {
    display: block;
    font-size: 11px;
    color: var(--tb-text-faint);
    margin-bottom: 5px;
}

.tb-select,
.tb-input {
    width: 100%;
    font-size: var(--tb-text-sm);
    font-family: var(--tb-font-sans);
    background: var(--tb-surface-2);
    color: var(--tb-text);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 7px 10px;
    outline: none;
    -webkit-appearance: none;
    transition: border-color var(--tb-transition);
}

.tb-tool-page {
    min-height: calc(100vh - 76.5px);
}

.tb-select:focus,
.tb-input:focus {
    border-color: var(--tb-primary);
}

/* ── Footer ─────────────────────────────────────────────────── */
.tb-footer {
    padding: 28px max(24px, calc((100vw - 1100px) / 2));
    border-top: 1px solid var(--tb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tb-footer-copy {
    font-size: var(--tb-text-sm);
    color: var(--tb-text-faint);
}

.tb-footer-links {
    display: flex;
    gap: 20px;
}

.tb-footer-links a {
    font-size: var(--tb-text-sm);
    color: var(--tb-text-faint);
    text-decoration: none;
    transition: color var(--tb-transition);
}

.tb-footer-links a:hover {
    color: var(--tb-text-muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .tb-section {
        padding: 60px 20px;
    }

    .tb-navbar {
        padding: 0 20px;
    }

    .tb-nav-links {
        display: none;
    }

    .tb-footer {
        padding: 24px 20px;
    }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}