/* ============================================================
   DESNORA TOOLS — tools.css
   Premium calculator page (tools.php). Namespaced with .tl-
   ============================================================ */

/* ---- HERO ---- */
.tl-hero {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(3, 5, 10, 0.94) 0%, rgba(3, 5, 10, 0.72) 45%, rgba(3, 5, 10, 0.2) 100%),
        url('../images/tools-hero-bg.svg') center / cover no-repeat,
        #05070d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(180deg, transparent, var(--bg-dark));
    pointer-events: none;
}

.tl-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 4rem;
    align-items: center;
}

.tl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem 0.45rem 0.8rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.75rem;
}

.tl-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25F4EE;
    box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.15), 0 0 12px rgba(37, 244, 238, 0.8);
}

.tl-hero h1 {
    display: block;
    font-size: clamp(2.3rem, 4.6vw, 3.9rem);
    line-height: 1.08;
    letter-spacing: -1.2px;
    margin-bottom: 1.5rem;
    background: none;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.tl-grad {
    background: linear-gradient(110deg, #FE2C55 0%, #ff6b8a 30%, #25F4EE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tl-hero-sub {
    font-size: 1.12rem;
    line-height: 1.7;
    max-width: 580px;
    color: #b4b4bd;
    margin-bottom: 2.25rem;
}

.tl-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.75rem;
}

.tl-hero-btn {
    display: inline-block;
    padding: 1rem 2.1rem;
    border-radius: 10px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #FE2C55, #ff4d73);
    box-shadow: 0 12px 30px -10px rgba(254, 44, 85, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tl-hero-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -10px rgba(254, 44, 85, 0.85);
}

.tl-hero-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(37, 244, 238, 0.5);
    padding-bottom: 2px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.tl-hero-link:hover {
    color: #25F4EE;
    border-color: #25F4EE;
}

.tl-hero-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.tl-hero-stats li {
    display: flex;
    flex-direction: column;
    padding: 0 1.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-hero-stats li:first-child {
    padding-left: 0;
    border-left: 0;
}

.tl-hero-stats strong {
    font: 700 1.6rem 'Poppins', sans-serif;
    color: #fff;
    line-height: 1.2;
}

.tl-hero-stats span,
.tl-hv-ring span,
.tl-hv-stats span,
.tl-hv-foot > span:first-child,
.tl-hv-float span {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8b8b95;
}

/* hero visual: floating KPI card */
.tl-hero-visual {
    position: relative;
    padding: 2.5rem 1.5rem;
}

.tl-hv-card {
    padding: 1.6rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(22, 24, 32, 0.9), rgba(10, 11, 16, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
}

.tl-hv-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.tl-hv-title {
    font: 600 0.95rem 'Poppins', sans-serif;
    color: #fff;
}

.tl-hv-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #34d399;
}

.tl-hv-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    animation: tlPulse 1.8s infinite;
}

@keyframes tlPulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.tl-hv-main {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.25rem;
    align-items: center;
}

.tl-hv-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.tl-hv-ring svg {
    width: 100%;
    height: 100%;
}

.tl-hv-ring > div {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tl-hv-ring strong {
    font: 700 1.6rem 'Poppins', sans-serif;
    color: #fff;
    line-height: 1.1;
}

.tl-hv-stats {
    display: grid;
    gap: 0.55rem;
}

.tl-hv-stats div {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-hv-stats strong,
.tl-hv-foot strong {
    font: 700 1.05rem 'Poppins', sans-serif;
    color: #fff;
}

.tl-hv-stats em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 600;
    color: #34d399;
}

.tl-hv-spark {
    display: block;
    width: 100%;
    height: 70px;
    margin: 1.25rem 0 1rem;
}

.tl-hv-foot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.tl-hv-foot strong {
    margin-right: auto;
}

.tl-hv-pill {
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.tl-hv-float {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    background: rgba(14, 15, 21, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: tlFloat 6s ease-in-out infinite;
}

.tl-hv-float strong {
    font: 700 1.2rem 'Poppins', sans-serif;
    color: #fff;
}

.tl-hv-f1 {
    top: -1rem;
    right: 2.5rem;
    border-color: rgba(37, 244, 238, 0.35);
}

.tl-hv-f2 {
    bottom: 0;
    left: -0.5rem;
    border-color: rgba(254, 44, 85, 0.35);
    animation-delay: -3s;
}

@keyframes tlFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
    .tl-hv-float, .tl-hv-live i { animation: none; }
}

@media (max-width: 1024px) {
    .tl-hero {
        padding: 6rem 0 4.5rem;
        background:
            linear-gradient(180deg, rgba(3, 5, 10, 0.86), rgba(3, 5, 10, 0.78)),
            url('../images/tools-hero-bg.svg') 70% center / cover no-repeat,
            #05070d;
    }

    .tl-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .tl-hero-visual {
        max-width: 520px;
    }

    .tl-hv-card {
        transform: none;
    }
}

@media (max-width: 560px) {
    .tl-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .tl-hero-stats li,
    .tl-hero-stats li:first-child {
        padding: 0.7rem 0.8rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .tl-hero-stats strong {
        font-size: 1.25rem;
    }

    .tl-hv-main {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .tl-hv-float {
        display: none;
    }
}

.tl-section {
    padding: 4rem 0 6rem;
    position: relative;
    z-index: 1;
}

/* ---- TOOLBAR ---- */
.tl-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem 1rem;
    padding: 1rem;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    background: rgba(12, 12, 16, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
}

.tl-toolbar .tl-tabs {
    grid-column: 1 / -1;
    order: 3;
}

.tl-search {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transition: var(--transition);
}

.tl-search:focus-within {
    border-color: rgba(37, 244, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.12);
}

.tl-search input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: var(--white);
    font: inherit;
    font-size: 0.95rem;
}

.tl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tl-tab {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-light);
    font: 500 0.88rem 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

.tl-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.tl-tab.active {
    color: var(--white);
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.22), rgba(37, 244, 238, 0.22));
    border-color: rgba(37, 244, 238, 0.35);
}

.tl-currency {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tl-currency select {
    height: 42px;
    padding: 0 0.75rem;
    border-radius: 10px;
    background: #16161a;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font: 500 0.9rem 'Inter', sans-serif;
    cursor: pointer;
}

/* ---- SHARED FIELD STYLES ---- */
.tl-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.tl-field {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    min-width: 0;
}

.tl-label {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.2px;
    line-height: 1.35;
}

.tl-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    border-radius: 11px;
    background: #0b0b0e;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tl-input-wrap:focus-within {
    border-color: rgba(37, 244, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.12);
}

.tl-input-wrap input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 0.9rem;
    background: none;
    border: 0;
    outline: 0;
    color: var(--white);
    font: 600 1rem 'Poppins', sans-serif;
    -moz-appearance: textfield;
}

.tl-input-wrap input::-webkit-outer-spin-button,
.tl-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tl-input-wrap.has-pre input {
    padding-left: 0.35rem;
}

.tl-input-wrap.has-suf input {
    padding-right: 0.35rem;
}

.tl-adorn {
    padding: 0 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-green);
    white-space: nowrap;
}

.tl-input-wrap.has-pre .tl-adorn:first-child {
    padding-right: 0;
}

/* ---- PILLS ---- */
.tl-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tl-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tl-pill.tl-good { color: #34d399; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.25); }
.tl-pill.tl-ok   { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.25); }
.tl-pill.tl-bad  { color: #fb7185; background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.25); }

/* ---- BUTTONS ---- */
.tl-btn {
    padding: 0.55rem 0.95rem;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
    font: 500 0.8rem 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tl-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.tl-btn-copy {
    border-color: rgba(37, 244, 238, 0.35);
    color: var(--primary-green);
}

.tl-btn-copy:hover {
    background: rgba(37, 244, 238, 0.1);
    border-color: rgba(37, 244, 238, 0.6);
}

/* ---- DASHBOARD ---- */
.tl-dashboard {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid transparent;
    background:
        radial-gradient(ellipse 50% 80% at 0% 0%, rgba(37, 244, 238, 0.08), transparent 60%) padding-box,
        radial-gradient(ellipse 50% 80% at 100% 100%, rgba(254, 44, 85, 0.08), transparent 60%) padding-box,
        linear-gradient(160deg, #141418, #0a0a0d) padding-box,
        linear-gradient(135deg, rgba(254, 44, 85, 0.6), rgba(255, 255, 255, 0.07) 40%, rgba(255, 255, 255, 0.07) 60%, rgba(37, 244, 238, 0.6)) border-box;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95);
}

.tl-dashboard[hidden] {
    display: none;
}

.tl-dash-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.tl-dash-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.35rem;
}

.tl-dash-head h3 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.tl-dash-head p {
    font-size: 0.95rem;
    max-width: 560px;
}

.tl-dash-body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2rem;
    align-items: start;
}

.tl-dash-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tl-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: var(--transition);
}

.tl-metric:hover {
    border-color: rgba(37, 244, 238, 0.3);
    transform: translateY(-2px);
}

.tl-metric-k {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-light);
}

.tl-metric-v {
    font: 700 1.45rem 'Poppins', sans-serif;
    color: var(--white);
    line-height: 1.2;
    word-break: break-all;
}

.tl-metric .tl-pill {
    font-size: 0.62rem;
    padding: 0.15rem 0.55rem;
}

/* ---- CALCULATOR GRID ---- */
.tl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.tl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.6rem;
    border-radius: 20px;
    background: linear-gradient(170deg, #141417 0%, #0c0c0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.tl-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 1.6rem;
    right: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 244, 238, 0.5), rgba(254, 44, 85, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.tl-card:hover,
.tl-card:focus-within {
    border-color: rgba(37, 244, 238, 0.22);
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -25px rgba(37, 244, 238, 0.18);
}

.tl-card:hover::after,
.tl-card:focus-within::after {
    opacity: 1;
}

.tl-card[hidden] {
    display: none;
}

.tl-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.tl-icon {
    flex: 0 0 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font: 700 0.85rem 'Poppins', sans-serif;
    color: var(--white);
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.85), rgba(37, 244, 238, 0.85));
    box-shadow: 0 8px 20px -8px rgba(254, 44, 85, 0.6);
}

.tl-card-head h3 {
    font-size: 1.1rem;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tl-tags span {
    font-size: 0.66rem;
    font-weight: 500;
    padding: 0.12rem 0.5rem;
    border-radius: 5px;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.tl-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

/* ---- RESULT ---- */
.tl-result {
    padding: 1.1rem 1.2rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.06), rgba(254, 44, 85, 0.05));
    border: 1px solid rgba(37, 244, 238, 0.14);
}

.tl-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.tl-main-label {
    flex-basis: 100%;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
}

.tl-main-val {
    font: 700 2rem 'Poppins', sans-serif;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 30%, #25F4EE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

.tl-gauge {
    height: 6px;
    margin-top: 0.9rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.tl-gauge-fill {
    display: block;
    height: 100%;
    border-radius: 6px;
    transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tl-gauge-fill.tl-good { background: linear-gradient(90deg, #10b981, #34d399); }
.tl-gauge-fill.tl-ok   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tl-gauge-fill.tl-bad  { background: linear-gradient(90deg, #FE2C55, #fb7185); }

.tl-rows {
    margin: 0.9rem 0 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 0.6rem;
}

.tl-rows div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.28rem 0;
    font-size: 0.86rem;
}

.tl-rows dt {
    color: var(--text-light);
}

.tl-rows dd {
    margin: 0;
    font-weight: 600;
    color: var(--white);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tl-note {
    margin: 0.6rem 0 0;
    font-size: 0.74rem;
    color: #71717a;
}

.tl-card-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tl-formula {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 9px;
    font: 500 0.74rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #a5f3fc;
    background: rgba(37, 244, 238, 0.04);
    border-left: 2px solid rgba(37, 244, 238, 0.5);
}

.tl-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.tl-empty {
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

/* ---- QUICK REFERENCE ---- */
.tl-ref-section {
    background: #050508;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6rem 0;
}

.tl-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.tl-ref {
    padding: 1.4rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-ref-k {
    display: block;
    font: 700 1.05rem 'Poppins', sans-serif;
    color: var(--white);
    margin-bottom: 0.6rem;
}

.tl-ref code {
    display: inline-block;
    font: 500 0.8rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--primary-green);
    margin-bottom: 0.6rem;
}

.tl-ref p {
    font-size: 0.86rem;
    margin: 0;
}

/* ---- TOAST ---- */
.tl-toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    z-index: 1000;
    transform: translate(-50%, 20px);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: #16161a;
    border: 1px solid rgba(37, 244, 238, 0.4);
    color: var(--white);
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.tl-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---- LAYOUT WITH SIDEBAR ---- */
.tl-section .tl-layout {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.tl-main-col {
    min-width: 0;
}

.tl-sidebar {
    position: sticky;
    top: 96px;
    border-radius: 18px;
    background: linear-gradient(170deg, #121215 0%, #0a0a0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.tl-side-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--white);
    font: 600 0.95rem 'Poppins', sans-serif;
    cursor: default;
}

.tl-side-toggle svg {
    display: none;
    transition: transform 0.3s;
}

.tl-side-nav {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 0.75rem 0.6rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.tl-side-group {
    margin-top: 0.9rem;
}

.tl-side-cat {
    display: block;
    padding: 0 0.7rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #71717a;
}

.tl-side-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.87rem;
    line-height: 1.3;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tl-side-link svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #71717a;
    transition: color 0.2s;
}

.tl-side-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.tl-side-link:hover svg {
    color: var(--primary-green);
}

.tl-side-link.active {
    color: var(--white);
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.16), rgba(37, 244, 238, 0.16));
    border-color: rgba(37, 244, 238, 0.25);
}

.tl-side-link.active svg {
    color: var(--primary-green);
}

.tl-side-link.dim {
    opacity: 0.35;
}

.tl-side-featured {
    font-weight: 600;
    color: var(--white);
}

.tl-side-featured svg {
    color: var(--accent-green);
}

.tl-icon svg {
    width: 22px;
    height: 22px;
}

.tl-icon-lg {
    flex-basis: 54px;
    height: 54px;
    border-radius: 15px;
}

.tl-icon-lg svg {
    width: 26px;
    height: 26px;
}

.tl-dash-title {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tl-dashboard {
    scroll-margin-top: 110px;
}

.tl-card {
    scroll-margin-top: 110px;
}

@keyframes tlFlash {
    0% { box-shadow: 0 0 0 0 rgba(37, 244, 238, 0.55); border-color: rgba(37, 244, 238, 0.8); }
    100% { box-shadow: 0 0 0 14px rgba(37, 244, 238, 0); border-color: rgba(255, 255, 255, 0.07); }
}

.tl-flash {
    animation: tlFlash 1.4s ease-out 0.35s;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1280px) {
    .tl-dash-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .tl-section .tl-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .tl-sidebar {
        top: 72px;
        z-index: 30;
        box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
    }

    .tl-side-toggle {
        cursor: pointer;
        border-bottom: 0;
    }

    .tl-side-toggle svg {
        display: block;
    }

    .tl-side-nav {
        display: none;
        max-height: 60vh;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tl-sidebar.open .tl-side-nav {
        display: block;
    }

    .tl-sidebar.open .tl-side-toggle svg {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .tl-toolbar {
        padding: 0.85rem;
    }

    .tl-currency > span {
        display: none;
    }

    .tl-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        scrollbar-width: none;
    }

    .tl-tabs::-webkit-scrollbar {
        display: none;
    }

    .tl-tab {
        flex: 0 0 auto;
    }

    .tl-dashboard {
        padding: 1.4rem;
    }

    .tl-dash-head {
        flex-direction: column;
    }

    .tl-dash-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-grid {
        grid-template-columns: 1fr;
    }

    .tl-card {
        padding: 1.3rem;
    }

    .tl-ref-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 359px) {
    .tl-fields {
        grid-template-columns: 1fr;
    }
}
