﻿
/* â”€â”€ Navbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-navbar {
    background-color: var(--bg-surface, #fff);
    border-bottom: 1px solid var(--border-default, rgba(0,0,0,.08));
}

/* Autopilot project setup */
.lf-tool-btn--autopilot {
    border-color: rgba(20, 184, 166, .32);
    background: linear-gradient(135deg, rgba(16, 185, 129, .11), rgba(14, 165, 233, .09));
    color: #0f766e;
}

.lf-tool-btn--autopilot:hover {
    border-color: rgba(20, 184, 166, .48);
    color: #0f766e;
    transform: translateY(-1px);
}

.lf-ob-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lf-brand {
    font-family: 'Karla', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #10bb87 !important;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.lf-nav-link {
    color: var(--text-secondary, #555) !important;
    font-size: 13.5px;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.lf-nav-link:hover,
.lf-nav-link.active {
    background-color: rgba(16,187,135,.1);
    color: #10bb87 !important;
}

.lf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #10bb87;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.lf-username {
    font-size: 13.5px;
    color: var(--text-secondary, #444);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lf-user-btn {
    text-decoration: none;
}
.lf-user-btn::after {
    color: var(--text-tertiary, #999);
}

/* â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-footer {
    border-top: 1px solid var(--border-default, rgba(0,0,0,.07));
    background: var(--bg-surface, #fafafa);
}

/* â”€â”€ Toast overrides â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-toast-success {
    border-left: 4px solid #10bb87;
}
.lf-toast-error {
    border-left: 4px solid #dc3545;
}
.lf-toast-info {
    border-left: 4px solid #0dcaf0;
}

/* â”€â”€ Stats cards (dashboard) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stat-card {
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    transition: box-shadow 0.18s;
}
.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.stat-num {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary, #222);
}
.stat-label {
    font-size: 12px;
    color: var(--text-tertiary, #888);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* â”€â”€ Project cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.project-card .card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    transition: box-shadow 0.2s, transform 0.2s;
}
.project-card .card:hover {
    box-shadow: 0 6px 24px rgba(16,187,135,.15);
    transform: translateY(-2px);
}

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: var(--text-tertiary, #aaa);
}
.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    color: rgba(16,185,129,.25);
}
.empty-state h4 {
    color: var(--text-secondary, #555);
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-tertiary, #999);
    max-width: 360px;
    margin: 0 auto 24px;
    font-size: 14px;
}

.round-btn {
    background-color: #10bb87;
    color: #fff !important;
    font-size: 16px;
    font-weight: bold;
    width: 145px;
    height: 45px;
    border-radius: 22.5px;
    -webkit-transition: all 0.4s;
    transition: all 0.4s;
    position: relative;
    display: -webkit-box;
    -webkit-box-align: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    -webkit-box-pack: center;
}

.btn-outline-success {
    color: #10bb87;
    border-color: #10bb87;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #10bb87;
    border-color: #10bb87;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff !important;
    background-color: #10bb87;
    font-size: 16px;
    font-weight: bold;
}

.nav-pills .nav-link.terms.active, .nav-pills .show > .nav-link {
    color: black;
    background-color: white;
    border: 1px solid black;
    font-size: 16px;
    font-weight: bold;
}


.bottom-right-alert {
    position: fixed;
    top: 80px;
    right: 220px;
    z-index: 1050;
    display: none;
}

/* â”€â”€ Button refinements â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Slightly rounder corners + uniform transition on all buttons */
.btn {
    border-radius: 7px;
    font-size: 13.5px;
    transition: background-color 0.18s ease, border-color 0.18s ease,
                color 0.18s ease, box-shadow 0.18s ease;
}

.btn-sm {
    border-radius: 5px;
    font-size: 12px;
}

/* Focus ring in brand color instead of Bootstrap's blue */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 187, 135, 0.35) !important;
}

/* Filled brand-green â€” used for modal primary actions (Save / Start) */
.btn-green,
.btn-success {
    background-color: #10bb87;
    color: #fff;
    border: 1px solid #10bb87;
}
.btn-green:hover, .btn-green:focus,
.btn-success:hover, .btn-success:focus {
    background-color: #0da375;
    border-color: #0da375;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 187, 135, 0.3);
}

/* Green outline â€” keep existing fill, add subtle shadow on hover */
.btn-outline-success:hover {
    box-shadow: 0 2px 8px rgba(16, 187, 135, 0.25);
}

/* Secondary / danger outline â€” add the same transition */
.btn-outline-secondary,
.btn-outline-danger {
    transition: background-color 0.18s ease, border-color 0.18s ease,
                color 0.18s ease, box-shadow 0.18s ease;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GLOBAL â€” base reset + Inter font
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

:root {
    /* Legacy aliases â€” mapped to design-system.css tokens */
    --lf:           var(--lf-700, #047857);
    --lf-dark:      var(--lf-800, #065f46);
    --lf-light:     var(--lf-500, #10b981);
    --lf-accent:    var(--lf-300, #6ee7b7);
    --lf-sidebar-w: var(--sidebar-w, 240px);
    --lf-topbar-h:  var(--topbar-h, 56px);
}

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

html, body, body.lf-app-body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    color: var(--text-primary, #1c2b22);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   APP SHELL â€” sidebar layout
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.lf-app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* â”€â”€ Sidebar â€” base rules moved to design-system.css â”€â”€â”€â”€â”€ */
/* (width, flex, transition, collapse handled there) */

.lf-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.lf-sidebar-inner::-webkit-scrollbar { display: none; }

/* â”€â”€ Brand â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-sb-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 28px 24px 22px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.lf-sb-brand i {
    font-size: 1.3rem;
    color: var(--lf-accent);
}
.lf-sb-brand:hover { color: #fff; text-decoration: none; }

/* â”€â”€ Nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-sb-nav {
    flex: 1;
    padding: 4px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lf-sb-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: 18px 8px 7px;
}

.lf-sb-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    position: relative;
    transition: background 0.15s, color 0.15s;
}
.lf-sb-item i {
    width: 17px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
}
.lf-sb-item:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
}
.lf-sb-item.active {
    background: rgba(255,255,255,.16);
    color: #fff;
    font-weight: 600;
}

.lf-sb-item--dim {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.lf-sb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lf-accent);
    margin-left: auto;
    flex-shrink: 0;
}

/* â”€â”€ User section at bottom â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-sb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 10px 14px 0;
    border-radius: 12px;
    background: rgba(0,0,0,.2);
    flex-shrink: 0;
}

.lf-sb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--lf-light);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lf-sb-user-info {
    flex: 1;
    min-width: 0;
}
.lf-sb-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}
.lf-sb-user-role {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    line-height: 1.35;
}

.lf-sb-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
    transition: background 0.15s;
}
.lf-sb-user-link:hover { background: rgba(255,255,255,.07); }
.lf-sb-user-link:hover .lf-sb-user-role { color: rgba(255,255,255,.7); }

.lf-sb-logout {
    color: rgba(255,255,255,.4);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
    flex-shrink: 0;
}
.lf-sb-logout:hover { color: rgba(255,255,255,.9); }

/* â”€â”€ Mobile overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.25s;
}
.lf-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* â”€â”€ Content area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-app, #f4f6f9);
}

/* â”€â”€ Topbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-topbar {
    display: flex;
    align-items: center;
    height: var(--lf-topbar-h);
    padding: 0 28px;
    background: var(--bg-surface, #fff);
    border-bottom: 1px solid var(--border-default, rgba(0,0,0,.07));
    flex-shrink: 0;
    gap: 14px;
}

.lf-topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #111);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lf-hamburger {
    background: none;
    border: none;
    padding: 6px 9px;
    color: var(--text-secondary, #555);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.lf-hamburger:hover { background: var(--bg-surface-2, #f0f2f5); color: var(--text-primary, #222); }

/* â”€â”€ Main content â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-main {
    flex: 1;
    overflow-y: auto;
    padding: 32px 32px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-default, #cdd5de) transparent;
}
.lf-main::-webkit-scrollbar { width: 5px; }
.lf-main::-webkit-scrollbar-track { background: transparent; }
.lf-main::-webkit-scrollbar-thumb {
    background: var(--border-default, #cdd5de);
    border-radius: 99px;
}

/* â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    font-size: 11.5px;
    color: var(--text-tertiary, #aab4bf);
    background: var(--bg-surface, #fff);
    border-top: 1px solid var(--border-default, rgba(0,0,0,.06));
    flex-shrink: 0;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 767px) {
    .lf-sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100%;
        transform: translateX(-100%);
    }
    .lf-sidebar.open {
        transform: translateX(0);
        box-shadow: 6px 0 32px rgba(0,0,0,.18);
    }
    .lf-main {
        padding: 20px 16px 88px;
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }
    .lf-topbar { padding: 0 16px; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODERN COMPONENT OVERRIDES â€” auth-page rhythm inside the app
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 20px rgba(0,0,0,.06) !important;
    background: var(--bg-surface, #fff);
}
.card:hover {
    box-shadow: 0 6px 32px rgba(26,127,90,.1) !important;
    transform: translateY(-1px);
    transition: box-shadow 0.2s, transform 0.2s;
}

/* â”€â”€ Stat cards (no hover transform) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stat-card:hover { transform: none !important; }
.stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary, #111);
}
.stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-tertiary, #9aafaa);
    text-transform: uppercase;
    letter-spacing: .6px;
}
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
}

/* â”€â”€ Section headings â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pricing-table-title, .main-title { display: none; }

h4.fw-bold { font-weight: 700 !important; letter-spacing: -0.2px; }

/* â”€â”€ Form controls â€” match auth inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-control,
.form-select {
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13.5px;
    color: var(--text-primary, #222);
    background: var(--bg-surface-2, #fafafa);
    border: 1.5px solid var(--border-default, #e2e2e2);
    border-radius: 9px !important;
    padding: 10px 13px;
    transition: border .15s, box-shadow .15s, background .15s;
    box-shadow: none !important;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--lf-light, #10bb87) !important;
    box-shadow: 0 0 0 3px rgba(16,187,135,.13) !important;
    background: var(--bg-surface, #fff);
    outline: none;
}
.form-control-sm, .form-select-sm {
    font-size: 12.5px;
    padding: 7px 11px;
}
.form-floating > .form-control { padding-top: 22px; }
.form-floating > label { font-size: 12px; color: var(--text-tertiary, #999); }

textarea.form-control {
    resize: vertical;
    line-height: 1.55;
}

/* â”€â”€ Buttons â€” match auth submit rhythm â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-weight: 600;
    letter-spacing: 0.1px;
    border-radius: 9px;
    font-size: 13px;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-sm { font-size: 12px; padding: 5px 11px; }

.btn-green,
.btn-success {
    background: var(--lf, #1a7f5a);
    border-color: var(--lf, #1a7f5a);
    color: #fff !important;
    font-weight: 700;
}
.btn-green:hover, .btn-green:focus,
.btn-success:hover, .btn-success:focus {
    background: var(--lf-dark, #0d5c3c);
    border-color: var(--lf-dark, #0d5c3c);
    box-shadow: 0 4px 16px rgba(26,127,90,.25);
    color: #fff !important;
}

.btn-outline-success {
    color: var(--lf, #1a7f5a) !important;
    border-color: var(--lf, #1a7f5a) !important;
    background: transparent;
}
.btn-outline-success:hover {
    background: var(--lf, #1a7f5a) !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(26,127,90,.2);
}

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table-responsive.shadow,
.table-responsive { border-radius: 14px; overflow: hidden; box-shadow: 0 2px 18px rgba(0,0,0,.06) !important; }

.table {
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13.5px;
    color: var(--text-primary, #2d3e35);
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: rgba(16,187,135,.04);
}
.table thead tr, .table thead td, .table thead th {
    background: var(--bg-surface-2, #f6faf8) !important;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-tertiary, #7a9a8e);
    text-transform: uppercase;
    letter-spacing: .55px;
    border-bottom: 1px solid var(--border-default, #edf3f0) !important;
    padding: 11px 14px;
}
.table tbody td, .table tbody th {
    border-bottom: 1px solid var(--border-subtle, #f2f6f4) !important;
    padding: 12px 14px;
    vertical-align: middle;
}
.table tbody tr:last-child td,
.table tbody tr:last-child th { border-bottom: none !important; }
.table tbody tr:hover td,
.table tbody tr:hover th { background: rgba(16,187,135,.04) !important; }

/* Missing translation row â€” soft amber, not harsh yellow */
.table-warning, tr.table-warning > td, tr.table-warning > th {
    background-color: rgba(255,180,0,.06) !important;
    --bs-table-accent-bg: transparent;
}

/* â”€â”€ Language tab pills â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-pills {
    gap: 6px;
    background: var(--bg-surface, #fff);
    border-radius: 14px;
    padding: 10px 12px !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.06) !important;
}
.nav-pills .nav-link {
    border-radius: 10px !important;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary, #555) !important;
    padding: 8px 14px;
    background: transparent;
    border: 1.5px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.nav-pills .nav-link:hover {
    background: rgba(26,127,90,.07);
    color: var(--lf, #1a7f5a) !important;
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: var(--lf, #1a7f5a) !important;
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(26,127,90,.25);
    font-weight: 700;
    font-size: 12.5px;
}
.nav-pills .nav-link.active small,
.nav-pills .show > .nav-link small { color: rgba(255,255,255,.8) !important; }

/* â”€â”€ Modals â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-content {
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 48px rgba(0,0,0,.14) !important;
    font-family: var(--lf-font, 'Inter', sans-serif);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--border-default, #eef2f0) !important;
    padding: 20px 24px !important;
    background: var(--bg-surface, #fff);
}
.modal-title, .modal-header h2, .modal-header h5 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-primary, #111) !important;
    letter-spacing: -0.2px;
}
.modal-body { padding: 22px 24px !important; }
.modal-footer {
    border-top: 1px solid var(--border-default, #eef2f0) !important;
    padding: 16px 24px !important;
    background: var(--bg-surface-2, #fafcfb);
}

/* â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge {
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: .3px;
    border-radius: 6px;
    padding: 3px 8px;
}
.badge.bg-success { background: var(--lf, #1a7f5a) !important; }
.badge.bg-warning { background: #f59e0b !important; color: #fff !important; }
.badge.bg-secondary { background: #8fa099 !important; }
.badge.rounded-pill { border-radius: 99px !important; }

/* â”€â”€ Progress bars â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.progress {
    border-radius: 99px !important;
    background: #eef2f0 !important;
    overflow: hidden;
}
.progress-bar.bg-success { background: var(--lf-light, #10bb87) !important; }
.progress-bar.bg-warning { background: #f59e0b !important; }
.progress-bar.bg-danger  { background: #ef4444 !important; }

/* â”€â”€ Dropdown menus â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dropdown-menu {
    border: 1px solid #e8efec !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 28px rgba(0,0,0,.1) !important;
    padding: 6px !important;
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13px;
}
.dropdown-item {
    border-radius: 7px;
    padding: 8px 12px;
    font-weight: 500;
    color: var(--text-primary, #2d3e35);
    transition: background .12s;
}
.dropdown-item:hover { background: rgba(26,127,90,.08); color: var(--lf, #1a7f5a); }
.dropdown-item-text { padding: 6px 12px; font-weight: 700; color: #9aafaa; font-size: 11px; }
.dropdown-divider { border-color: #eef2f0 !important; margin: 4px 8px !important; }

/* â”€â”€ Alerts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert {
    border-radius: 10px !important;
    border: none !important;
    font-size: 13px;
    font-weight: 500;
}
.alert-success { background: rgba(16,187,135,.1); color: #0d5c3c; }
.alert-danger  { background: rgba(239,68,68,.08); color: #b91c1c; }
.alert-warning { background: rgba(245,158,11,.1); color: #92400e; }

/* â”€â”€ Page-level toolbar rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* â”€â”€ Spinners â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.spinner-border.text-success { color: var(--lf-light, #10bb87) !important; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TRANSLATES PAGE â€” full redesign
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Page header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid #e4ece9;
    color: #4a6b5d;
    font-size: 13px;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
}
.lf-back-btn:hover {
    background: var(--lf, #1a7f5a);
    border-color: var(--lf, #1a7f5a);
    color: #fff;
}

.lf-page-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9aafaa;
    margin-bottom: 2px;
}
.lf-page-heading {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* â”€â”€ Toolbar buttons (top-right of page) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--lf-font, 'Inter', sans-serif);
    color: #4a6b5d;
    background: #fff;
    border: 1.5px solid #e4ece9;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.lf-tool-btn i { font-size: 12px; }
.lf-tool-btn:hover {
    background: #f0f8f4;
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
    text-decoration: none;
}
.lf-tool-btn--primary {
    background: var(--lf, #1a7f5a);
    border-color: var(--lf, #1a7f5a);
    color: #fff !important;
}
.lf-tool-btn--primary:hover {
    background: var(--lf-dark, #0d5c3c);
    border-color: var(--lf-dark, #0d5c3c);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(26,127,90,.25);
}

/* â”€â”€ Language selector â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-lang-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.lf-lang-selector::-webkit-scrollbar { display: none; }

.lf-lang-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid #e8efec;
    cursor: pointer;
    font-family: var(--lf-font, 'Inter', sans-serif);
    text-align: left;
    flex-shrink: 0;
    min-width: 160px;
    transition: border-color .15s, box-shadow .15s;
    overflow: hidden;
}
.lf-lang-card:hover {
    border-color: #b8d9cc;
    box-shadow: 0 4px 16px rgba(26,127,90,.08);
}
.lf-lang-card.active {
    border-color: var(--lf, #1a7f5a);
    box-shadow: 0 4px 20px rgba(26,127,90,.14);
    background: #fff;
}

.lf-lang-flag {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e8efec;
    flex-shrink: 0;
}
.lf-lang-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.lf-lang-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #1c2b22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.lf-lang-code {
    font-size: 10.5px;
    font-weight: 700;
    color: #9aafaa;
    letter-spacing: .4px;
    line-height: 1.3;
}
.lf-lang-pct {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}
.lf-pct-full { color: var(--lf-light, #10bb87); }
.lf-pct-mid  { color: #f59e0b; }
.lf-pct-low  { color: #ef4444; }

/* Thin progress bar pinned to card bottom */
.lf-lang-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: #f0f5f2;
}
.lf-lang-bar-fill {
    height: 100%;
    border-radius: 0 2px 2px 0;
    transition: width .4s ease;
}
.lf-lang-bar-fill.lf-pct-full { background: var(--lf-light, #10bb87); }
.lf-lang-bar-fill.lf-pct-mid  { background: #f59e0b; }
.lf-lang-bar-fill.lf-pct-low  { background: #ef4444; }

/* â”€â”€ Translate toolbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-translate-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid #eef2f0;
    flex-wrap: wrap;
}

.lf-toolbar-progress {
    flex: 1;
    min-width: 160px;
}
.lf-toolbar-progress-text {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 7px;
    font-size: 13px;
}
.lf-count-done  { font-weight: 800; font-size: 15px; color: #111; }
.lf-count-sep   { color: #ccc; }
.lf-count-total { font-weight: 500; color: #888; }
.lf-count-label { color: #aaa; font-size: 12px; margin-left: 2px; }
.lf-missing-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(245,158,11,.1);
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.lf-complete-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(16,187,135,.1);
    color: var(--lf, #1a7f5a);
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.lf-toolbar-bar {
    height: 4px;
    background: #eef2f0;
    border-radius: 99px;
    overflow: hidden;
    max-width: 220px;
}
.lf-toolbar-bar-fill {
    height: 100%;
    background: var(--lf-light, #10bb87);
    border-radius: 99px;
    transition: width .4s ease;
}

.lf-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Search input */
.lf-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.lf-search-icon {
    position: absolute;
    left: 11px;
    color: #b0bdb9;
    font-size: 12px;
    pointer-events: none;
}
.lf-search-input {
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13px;
    padding: 8px 12px 8px 32px;
    border: 1.5px solid #e4ece9;
    border-radius: 9px;
    background: #f8fbf9;
    color: #222;
    width: 190px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf-search-input:focus {
    border-color: var(--lf-light, #10bb87);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1);
}
.lf-search-input::placeholder { color: #bbc9c4; }

/* Control buttons (toolbar) */
.lf-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--lf-font, 'Inter', sans-serif);
    background: #fff;
    border: 1.5px solid #e4ece9;
    color: #4a6b5d;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.lf-ctrl-btn i { font-size: 12px; }
.lf-ctrl-btn:hover {
    background: #f0f8f4;
    border-color: #b8d9cc;
    color: var(--lf, #1a7f5a);
}
.lf-ctrl-btn.active {
    background: rgba(26,127,90,.08);
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
}
.lf-ctrl-btn--green {
    background: var(--lf, #1a7f5a);
    border-color: var(--lf, #1a7f5a);
    color: #fff;
}
.lf-ctrl-btn--green:hover {
    background: var(--lf-dark, #0d5c3c);
    border-color: var(--lf-dark, #0d5c3c);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26,127,90,.25);
}
/* Dropdown toggle arrow */
.lf-ctrl-btn.dropdown-toggle::after {
    margin-left: 2px;
    opacity: .6;
}

/* â”€â”€ Translation table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-table-wrap {
    background: #fff;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.lf-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13.5px;
}
.lf-table thead tr {
    background: #f6faf8;
    border-bottom: 1px solid #edf3f0;
}
.lf-table thead th {
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #8aaa99;
    text-transform: uppercase;
    letter-spacing: .7px;
}
.lf-tr {
    border-bottom: 1px solid #f2f6f4;
    transition: background .12s;
}
.lf-tr:last-child { border-bottom: none; }
.lf-tr:hover { background: rgba(16,187,135,.03); }
.lf-tr--missing { background: rgba(245,158,11,.03); }
.lf-tr--missing:hover { background: rgba(245,158,11,.06); }

.lf-tr td { padding: 11px 16px; vertical-align: middle; }

/* Review check cell */
.lf-td-check { width: 44px; text-align: center; }
.lf-review-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #c8d9d2;
    font-size: 16px;
    line-height: 1;
    border-radius: 6px;
    transition: color .15s;
}
.lf-review-btn:hover { color: var(--lf-light, #10bb87); }
.lf-reviewed-dot { color: var(--lf-light, #10bb87); font-size: 16px; }
.lf-review-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 4px 8px;
    border: 1px solid rgba(16,185,129,.16);
    border-radius: 999px;
    background: rgba(16,185,129,.065);
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}
.lf-review-meta i {
    color: var(--lf-light, #10bb87);
    font-size: 10px;
}
.lf-review-meta strong {
    color: var(--text-primary, #1c2b22);
    font-weight: 850;
}
.lf-review-meta em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 750;
}

/* Term cell */
.lf-td-term { max-width: 260px; }
.lf-term-text {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1c2b22;
    line-height: 1.5;
}
.lf-context-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    background: #f0f5f2;
    color: #7a9a8e;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .3px;
}

/* Source URL link badge (crawled terms) */
.lf-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 6px;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: color .12s, border-color .12s, background .12s;
}
.lf-source-link:hover {
    color: var(--lf-700, #047857);
    border-color: rgba(16,185,129,.3);
    background: rgba(16,185,129,.06);
}
html[data-theme="dark"] .lf-source-link {
    color: var(--dk-text-dim);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-source-link:hover {
    color: var(--lf-light, #10bb87);
    border-color: rgba(16,187,135,.3);
    background: rgba(16,187,135,.08);
}

/* Translation textarea */
.lf-td-input { min-width: 280px; }
.lf-textarea {
    width: 100%;
    padding: 9px 12px;
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13px;
    color: #1c2b22;
    background: #f8fbf9;
    border: 1.5px solid #e4ece9;
    border-radius: 9px;
    resize: vertical;
    min-height: 68px;
    line-height: 1.55;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf-textarea:focus {
    border-color: var(--lf-light, #10bb87);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1);
}
.lf-textarea::placeholder { color: #bbc9c4; }

/* Text-expansion hint — shown when a UI-label translation grows much longer than
   the source and may overflow tight layouts (headers, nav, buttons). Informational. */
.lf-len-warn {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #9a6a00;
    background: #fff7e6;
    border: 1px solid #ffe2a8;
    border-radius: 7px;
    padding: 5px 8px;
}
.lf-len-warn i { margin-top: 1px; }
html[data-theme="dark"] .lf-len-warn {
    color: #f0c36b;
    background: rgba(154,106,0,.14);
    border-color: rgba(240,195,107,.28);
}

/* AI buttons */
.lf-td-ai { width: 120px; }
.lf-ai-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.lf-ai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #f6faf8;
    border: 1.5px solid #e4ece9;
    cursor: pointer;
    color: #6a9a8a;
    font-size: 12px;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    padding: 0;
}
.lf-ai-btn:hover {
    background: #fff;
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 2px 8px rgba(26,127,90,.15);
}
.lf-ai-icon {
    width: 15px; height: 15px;
    object-fit: contain;
    opacity: .75;
    display: block;
}
.lf-ai-btn:hover .lf-ai-icon { opacity: 1; }
.lf-ai-btn:disabled {
    opacity: .5;
    cursor: wait;
    pointer-events: none;
}

/* Smart AI button â€” âš¡ bolt icon, green accent */
.lf-ai-btn--smart {
    color: var(--lf-700, #047857);
    border-color: rgba(16,185,129,.3);
    background: rgba(16,185,129,.06);
}
.lf-ai-btn--smart:hover {
    background: rgba(16,185,129,.14);
    border-color: var(--lf-500, #10b981);
    color: var(--lf-700, #047857);
    box-shadow: 0 2px 8px rgba(16,185,129,.2);
}
html[data-theme="dark"] .lf-ai-btn--smart {
    color: var(--lf-light, #10bb87);
    border-color: rgba(16,187,135,.25);
    background: rgba(16,187,135,.08);
}
html[data-theme="dark"] .lf-ai-btn--smart:hover {
    background: rgba(16,187,135,.16);
    border-color: rgba(16,187,135,.45);
}

/* Engine badge â€” appears below textarea after AI translation */
.lf-engine-badge {
    display: inline-block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--lf-700, #047857);
    background: rgba(16,185,129,.08);
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.5;
    user-select: none;
}

/* Info box (modals) */
.lf-info-box {
    background: #f6faf8;
    border: 1px solid #d9ece5;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.lf-info-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #3a5a4a;
}
.lf-info-row i { font-size: 12px; flex-shrink: 0; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   HOME PAGE â€” stats + project cards
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Stat row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}
@media (max-width: 767px) { .lf-stats-row { grid-template-columns: repeat(2, 1fr); } }

.lf-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px 22px 0;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    overflow: hidden;
    cursor: default;
    transition: box-shadow .2s, transform .2s, background-color .25s;
}
.lf-stat-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.09);
    transform: translateY(-2px);
}

/* top row: label + icon */
.lf-sc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.lf-sc-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--sc, #9aafaa);
}
.lf-sc-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--sc-bg, rgba(0,0,0,.05));
    color: var(--sc, #9aafaa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* big number */
.lf-sc-num {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #111;
    line-height: 1;
    margin-bottom: 20px;
}
.lf-sc-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: #9aafaa;
    letter-spacing: 0;
}

/* coloured bottom bar */
.lf-sc-bar {
    height: 3px;
    background: var(--sc, #9aafaa);
    opacity: .35;
    margin: 0 -22px;
    transition: opacity .2s;
}
.lf-stat-card:hover .lf-sc-bar { opacity: .65; }

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-empty {
    text-align: center;
    padding: 72px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lf-empty-icon {
    font-size: 52px;
    color: #d0e8de;
    margin-bottom: 4px;
}
.lf-empty h4 { font-weight: 700; color: #3a5a4a; margin: 0; }
.lf-empty p  { color: #9aafaa; font-size: 14px; max-width: 320px; margin: 0; }

/* â”€â”€ Onboarding â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-onboarding {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 0 24px;
}
.lf-onboarding-header {
    text-align: center;
    margin-bottom: 36px;
}
.lf-onboarding-emoji {
    font-size: 2.8rem;
    margin-bottom: 12px;
}
.lf-onboarding-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.lf-onboarding-header p {
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    margin: 0;
}
.lf-onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 28px;
}
.lf-ob-step {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-surface-2, #f8fafb);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color .15s;
}
.lf-ob-step:first-child {
    border-color: #10b981;
    background: rgba(16,185,129,.04);
}
.lf-ob-step--muted { opacity: .6; }
.lf-ob-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lf-ob-step--muted .lf-ob-num {
    background: var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
}
.lf-ob-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.lf-ob-content strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}
.lf-ob-content span {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}
.lf-ob-content code {
    font-size: 12px;
    background: rgba(0,0,0,.06);
    padding: 1px 5px;
    border-radius: 4px;
}
.lf-onboarding-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* â”€â”€ Projects grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* â”€â”€ Project card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-proj-card {
    background: #fff;
    border-radius: 16px;
    /* NO overflow:hidden â€” would clip Bootstrap dropdowns */
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s, background-color .25s;
}
.lf-proj-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

/* Colour accent top bar â€” use border-top so no overflow:hidden needed */
.lf-proj-accent {
    position: relative;
    height: 6px;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, #eef5f1, #f7faf8);
    overflow: hidden;
}
.lf-proj-accent::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    opacity: .55;
}
.lf-proj-accent-fill {
    position: relative;
    z-index: 1;
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .55s cubic-bezier(.16,1,.3,1);
}
.lf-proj-accent-fill::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.65));
}
.lf-proj-accent-fill.lf-pct-full {
    background: linear-gradient(90deg, #10b981, #34d399 58%, #86efac);
    box-shadow: 0 0 18px rgba(16,185,129,.35);
}
.lf-proj-accent-fill.lf-pct-mid {
    background: linear-gradient(90deg, #f59e0b, #fbbf24 58%, #fde68a);
    box-shadow: 0 0 18px rgba(245,158,11,.28);
}
.lf-proj-accent-fill.lf-pct-low {
    background: linear-gradient(90deg, #ef4444, #fb7185 58%, #fecdd3);
    box-shadow: 0 0 18px rgba(239,68,68,.25);
}

.lf-proj-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
}

/* Top row */
.lf-proj-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lf-proj-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    letter-spacing: .3px;
}
.lf-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.lf-status-active  { background: rgba(16,187,135,.1); color: var(--lf, #1a7f5a); }
.lf-status-active .lf-status-dot  { background: var(--lf-light, #10bb87); }
.lf-status-inactive { background: rgba(0,0,0,.05); color: #9aafaa; }
.lf-status-inactive .lf-status-dot { background: #c5d5cf; }

.lf-proj-delete {
    background: none;
    border: none;
    padding: 5px 6px;
    border-radius: 7px;
    color: #c8d9d2;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
}
.lf-proj-delete:hover { background: rgba(239,68,68,.08); color: #ef4444; }

/* Name & URL */
.lf-proj-title-wrap { display: flex; flex-direction: column; gap: 3px; }
.lf-proj-name {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.2px;
    line-height: 1.3;
}
.lf-proj-url {
    font-size: 11.5px;
    color: #9aafaa;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: block;
    transition: color .15s;
}
.lf-proj-url:hover { color: var(--lf, #1a7f5a); }

/* Language flags */
.lf-proj-langs-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.lf-proj-flag {
    width: 24px; height: 16px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #e8efec;
    transition: transform .15s;
}
.lf-proj-langs-inner:hover .lf-proj-flag { transform: translateY(-1px); }
.lf-proj-flag-more {
    font-size: 11px;
    font-weight: 700;
    color: #9aafaa;
    padding: 0 4px;
}
.lf-proj-add-lang {
    font-size: 12px;
    font-weight: 600;
    color: var(--lf, #1a7f5a);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.lf-proj-add-lang:hover { text-decoration: underline; }

/* Completion summary */
.lf-proj-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}
.lf-proj-terms { font-size: 12px; color: #9aafaa; font-weight: 500; }
.lf-proj-pct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15,23,42,.04);
    font-size: 12.5px;
    font-weight: 850;
    letter-spacing: -.02em;
}
.lf-proj-pct.lf-pct-full { color: var(--lf-light, #10bb87); }
.lf-proj-pct.lf-pct-mid  { color: #f59e0b; }
.lf-proj-pct.lf-pct-low  { color: #ef4444; }

/* Meta */
.lf-proj-meta {
    font-size: 12px;
    color: #9aafaa;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Action rows */
.lf-proj-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
}
.lf-proj-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--lf-font, 'Inter', sans-serif);
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.lf-proj-btn i { font-size: 11px; }
.lf-proj-btn--outline {
    background: transparent;
    border: 1.5px solid #e4ece9;
    color: #4a6b5d;
}
.lf-proj-btn--outline:hover {
    background: #f0f8f4;
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
}
.lf-proj-btn--primary {
    background: var(--lf, #1a7f5a);
    border: 1.5px solid var(--lf, #1a7f5a);
    color: #fff;
}
.lf-proj-btn--primary:hover {
    background: var(--lf-dark, #0d5c3c);
    border-color: var(--lf-dark, #0d5c3c);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26,127,90,.22);
}

/* Secondary icon row â€” clearly separated */
.lf-proj-icon-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f0f4f2;
}
.lf-proj-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1.5px solid #e8efec;
    color: #8aaa99;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    padding: 0;
    flex-shrink: 0;
}
.lf-proj-icon-btn:hover {
    background: #f0f8f4;
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 2px 8px rgba(26,127,90,.1);
    text-decoration: none;
}
/* Hide Bootstrap dropdown caret on icon-only buttons */
.lf-proj-icon-btn::after,
.lf-ctrl-btn.dropdown-toggle::after { display: none !important; }

/* Home dashboard polish */
.lf-home-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 38px 0 20px;
}
.lf-home-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.lf-home-subtitle {
    margin-top: 6px;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    line-height: 1.45;
}
.lf-stats-row {
    gap: 12px;
    margin-bottom: 10px;
}
.lf-stat-card {
    position: relative;
    padding: 18px 18px 0;
    border: 1px solid rgba(15,23,42,.04);
    box-shadow: 0 1px 10px rgba(15,23,42,.045);
}
.lf-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,.28), transparent);
}
.lf-stat-card:hover {
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.lf-sc-top { margin-bottom: 12px; }
.lf-sc-label {
    color: #6b8279;
    letter-spacing: .08em;
}
.lf-sc-icon {
    width: 30px;
    height: 30px;
    background: color-mix(in srgb, var(--sc, #10bb87) 10%, #fff);
}
.lf-sc-num {
    font-size: 2.15rem;
    margin-bottom: 18px;
}
.lf-sc-bar {
    height: 2px;
    opacity: .32;
}

.lf-onboarding {
    max-width: 760px;
    padding: 44px 22px 28px;
    border: 1px solid rgba(16,185,129,.12);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(16,185,129,.08), rgba(255,255,255,0) 42%),
        var(--bg-surface, #fff);
    box-shadow: 0 16px 44px rgba(15,23,42,.06);
}
.lf-onboarding-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: rgba(16,185,129,.1);
    color: var(--lf-light, #10bb87);
    font-size: 24px;
}
.lf-onboarding-header {
    margin-bottom: 28px;
}
.lf-onboarding-header h3 {
    font-size: 1.55rem;
}
.lf-ob-step {
    border-color: rgba(15,23,42,.06);
    background: rgba(248,251,249,.78);
}
.lf-ob-step:first-child {
    border-color: rgba(16,185,129,.38);
    background: rgba(16,185,129,.065);
    box-shadow: 0 8px 24px rgba(16,185,129,.08);
}
.lf-ob-step--muted {
    opacity: 1;
}
.lf-ob-step--muted .lf-ob-num {
    background: #eaf3ef;
    color: #6f8a7e;
}
.lf-onboarding-footer {
    flex-wrap: wrap;
}

html[data-theme="dark"] .lf-home-subtitle { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-stat-card,
html[data-theme="dark"] .lf-onboarding {
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-sc-label { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-sc-icon {
    background: rgba(255,255,255,.055);
}
html[data-theme="dark"] .lf-onboarding {
    background:
        linear-gradient(135deg, rgba(16,185,129,.09), transparent 42%),
        var(--dk-surface);
}
html[data-theme="dark"] .lf-ob-step {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-ob-step:first-child {
    background: rgba(16,185,129,.1);
    border-color: rgba(16,185,129,.28);
}
html[data-theme="dark"] .lf-ob-step--muted .lf-ob-num {
    background: rgba(255,255,255,.07);
    color: var(--dk-text-sub);
}

@media (max-width: 767px) {
    .lf-home-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin: 28px 0 18px;
    }
    .lf-home-header-actions {
        flex-direction: column;
        width: 100%;
    }
    .lf-home-header .lf-tool-btn {
        width: 100%;
        justify-content: center;
    }
    .lf-stats-row {
        gap: 10px;
    }
    .lf-stat-card {
        padding: 15px 15px 0;
    }
    .lf-sc-num {
        font-size: 1.85rem;
    }
    .lf-onboarding {
        padding: 28px 14px 20px;
        border-radius: 18px;
    }
    .lf-ob-step {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 15px;
    }
    .lf-ob-step .lf-tool-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }
    .lf-onboarding-footer {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   COVERAGE PAGE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.lf-coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.lf-cov-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 20px 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow .2s, transform .2s;
}
.lf-cov-card:hover {
    box-shadow: 0 6px 28px rgba(26,127,90,.1);
    transform: translateY(-2px);
}

.lf-cov-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lf-cov-flag {
    width: 36px; height: 24px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #e8efec;
    flex-shrink: 0;
}
.lf-cov-lang { flex: 1; min-width: 0; }
.lf-cov-langname {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1c2b22;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lf-cov-langcode {
    font-size: 10.5px;
    font-weight: 700;
    color: #9aafaa;
    letter-spacing: .5px;
}
/* Crawl modal tab buttons */
.lf-crawl-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 8px; border: 1.5px solid var(--border-default, rgba(0,0,0,.08));
    background: transparent; color: var(--text-secondary, #64748b);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.lf-crawl-tab:hover { border-color: rgba(16,185,129,.35); color: var(--lf-700,#047857); }
.lf-crawl-tab.active {
    background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.4);
    color: var(--lf-700,#047857);
}
html[data-theme="dark"] .lf-crawl-tab { border-color: var(--dk-border); color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-crawl-tab.active { background: rgba(16,187,135,.1); border-color: rgba(16,187,135,.35); color: var(--lf-light,#10bb87); }

/* Detected language pill in crawl modal */
.lf-lang-detect-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 99px;
    cursor: pointer;
    font-size: 13px;
    background: #fff;
    user-select: none;
    transition: border-color .15s, background .15s;
}
.lf-lang-detect-pill:has(input:checked) { border-color: #10bb87; background: rgba(16,187,135,.07); }
.lf-lang-detect-pill input { display: none; }
html[data-theme="dark"] .lf-lang-detect-pill { background: var(--dk-surface2); border-color: var(--dk-border); }
html[data-theme="dark"] .lf-lang-detect-pill:has(input:checked) { border-color: #10bb87; }

.lf-lang-group-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
    min-width: 120px;
}
.lf-lang-group-btn:hover { border-color: #10bb87; background: rgba(16,187,135,.04); }
.lf-lang-group-btn.active { border-color: #10bb87; background: rgba(16,187,135,.08); box-shadow: 0 0 0 3px rgba(16,187,135,.15); }
.lf-lang-group-btn .lf-lang-code { font-size: 15px; font-weight: 700; text-transform: uppercase; color: #1a7f5a; }
.lf-lang-group-btn .lf-lang-count { font-size: 13px; font-weight: 600; color: #334155; }
.lf-lang-group-btn .lf-lang-context-info { font-size: 11px; color: #94a3b8; }
html[data-theme="dark"] .lf-lang-group-btn { background: var(--dk-surface2); border-color: var(--dk-border); }
html[data-theme="dark"] .lf-lang-group-btn:hover { border-color: #10bb87; }
html[data-theme="dark"] .lf-lang-group-btn.active { border-color: #10bb87; background: rgba(16,187,135,.12); }
html[data-theme="dark"] .lf-lang-group-btn .lf-lang-count { color: var(--dk-text); }

.lf-source-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    background: rgba(16,187,135,.12);
    color: var(--lf, #1a7f5a);
    letter-spacing: .3px;
    flex-shrink: 0;
}

.lf-cov-counts {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f6faf8;
    border-radius: 10px;
    padding: 10px 0;
}
.lf-cov-count {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lf-cov-num {
    font-size: 17px;
    font-weight: 800;
    color: #1c2b22;
    letter-spacing: -0.5px;
    line-height: 1;
}
.lf-cov-lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9aafaa;
}
.lf-cov-done .lf-cov-num { color: var(--lf-light, #10bb87); }
.lf-cov-miss .lf-cov-num { color: #f59e0b; }
.lf-cov-divider {
    width: 1px;
    height: 28px;
    background: #e4ece9;
}

.lf-cov-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--lf, #1a7f5a);
    text-decoration: none;
    padding: 6px 0 0;
    transition: color .15s;
}
.lf-cov-edit-btn:hover { color: var(--lf-dark, #0d5c3c); text-decoration: none; }

/* â”€â”€ Checkbox â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-checkbox {
    width: 15px; height: 15px;
    accent-color: var(--lf, #1a7f5a);
    cursor: pointer;
    border-radius: 4px;
}

/* â”€â”€ Code preview block â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-code-preview {
    background: #f6faf8;
    border: 1px solid #d9ece5;
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 12px;
    color: #3a5a4a;
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    line-height: 1.6;
}

/* â”€â”€ Dark mode toggle button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    background: #f2f5f3;
    border: 1.5px solid #e4ece9;
    color: #6a8a7a;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}
.lf-theme-toggle:hover {
    background: #e8f4ee;
    border-color: var(--lf, #1a7f5a);
    color: var(--lf, #1a7f5a);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DARK MODE â€” smooth + complete
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Smooth transitions â€” global rule in design-system.css */
/* Page-specific transition overrides */
.lf-proj-card,
.lf-lang-card,
.lf-cov-card,
.lf-stat-card { transition: box-shadow .2s, transform .2s, background-color .25s, border-color .25s; }

html[data-theme="dark"] {
    /* Legacy aliases â€” mapped to design-system.css dark tokens */
    --dk-bg:         var(--bg-app);
    --dk-surface:    var(--bg-surface);
    --dk-surface2:   var(--bg-surface-2);
    --dk-border:     var(--border-default);
    --dk-border2:    var(--border-subtle);
    --dk-text:       var(--text-primary);
    --dk-text-sub:   var(--text-secondary);
    --dk-text-dim:   var(--text-tertiary);
}

html[data-theme="dark"] body.lf-app-body { color: var(--text-primary); background: var(--bg-app); }

/* â”€â”€ Content area + layout â€” base handled by design-system.css â”€â”€ */

/* â”€â”€ Typography â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-page-heading,
html[data-theme="dark"] h4.fw-bold { color: var(--text-primary) !important; }
html[data-theme="dark"] .lf-page-eyebrow { color: var(--text-secondary); }

/* â”€â”€ Stat cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-stat-card {
    background: var(--dk-surface);
    box-shadow: 0 2px 20px rgba(0,0,0,.35);
}
html[data-theme="dark"] .lf-sc-num  { color: #dff0e8; }
html[data-theme="dark"] .lf-sc-unit { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-sc-icon { background: rgba(255,255,255,.06); }

/* â”€â”€ Project cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-proj-card {
    background: var(--dk-surface);
    box-shadow: 0 2px 16px rgba(0,0,0,.35);
}
html[data-theme="dark"] .lf-proj-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
html[data-theme="dark"] .lf-proj-name { color: #dff0e8; }
html[data-theme="dark"] .lf-proj-url  { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-proj-terms { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-proj-accent {
    background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
}
html[data-theme="dark"] .lf-proj-pct {
    background: rgba(255,255,255,.06);
}
html[data-theme="dark"] .lf-proj-meta { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-status-inactive { background: rgba(255,255,255,.05); color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-proj-icon-row {
    border-top-color: var(--dk-border);
}
html[data-theme="dark"] .lf-proj-icon-btn {
    background: transparent;
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-proj-icon-btn:hover {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.3);
    color: var(--lf-light, #10bb87);
}
html[data-theme="dark"] .lf-proj-btn--outline {
    background: transparent;
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-proj-btn--outline:hover {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.3);
    color: var(--lf-light, #10bb87);
}
html[data-theme="dark"] .lf-proj-flag { border-color: var(--dk-border); }
html[data-theme="dark"] .lf-proj-delete { color: var(--dk-text-dim); }

/* â”€â”€ Generic cards â€” handled by design-system.css â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Form controls (page-specific extras only) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-textarea,
html[data-theme="dark"] .lf-search-input {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-textarea:focus,
html[data-theme="dark"] .lf-search-input:focus {
    background: var(--bg-elevated, #1e2d28);
    border-color: rgba(16,185,129,.5) !important;
    box-shadow: var(--shadow-ring) !important;
}
html[data-theme="dark"] .lf-textarea::placeholder,
html[data-theme="dark"] .lf-search-input::placeholder { color: var(--dk-text-dim); }

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-table-wrap {
    background: var(--dk-surface);
    box-shadow: 0 2px 20px rgba(0,0,0,.35) !important;
}
html[data-theme="dark"] .lf-table thead tr { background: #111a16; }
html[data-theme="dark"] .lf-table thead th {
    color: var(--dk-text-sub);
    border-bottom-color: var(--dk-border) !important;
}
html[data-theme="dark"] .lf-tr { border-bottom-color: var(--dk-border) !important; }
html[data-theme="dark"] .lf-tr:hover { background: rgba(16,187,135,.04) !important; }
html[data-theme="dark"] .lf-tr--missing { background: rgba(245,158,11,.04) !important; }
html[data-theme="dark"] .lf-term-text { color: var(--dk-text); }
html[data-theme="dark"] .lf-context-tag {
    background: rgba(255,255,255,.05);
    color: var(--dk-text-sub);
}

/* â”€â”€ Translate toolbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-translate-toolbar {
    background: var(--dk-surface);
    border-bottom-color: var(--dk-border);
}
html[data-theme="dark"] .lf-count-done  { color: #dff0e8; }
html[data-theme="dark"] .lf-count-total,
html[data-theme="dark"] .lf-count-label { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-toolbar-bar { background: rgba(255,255,255,.08); }
html[data-theme="dark"] .lf-missing-badge  { background: rgba(245,158,11,.12); color: #fbbf24; }
html[data-theme="dark"] .lf-complete-badge { background: rgba(16,187,135,.12); color: var(--lf-light, #10bb87); }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-back-btn,
html[data-theme="dark"] .lf-tool-btn:not(.lf-tool-btn--primary),
html[data-theme="dark"] .lf-ctrl-btn:not(.lf-ctrl-btn--green) {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-back-btn:hover,
html[data-theme="dark"] .lf-tool-btn:not(.lf-tool-btn--primary):hover,
html[data-theme="dark"] .lf-ctrl-btn:not(.lf-ctrl-btn--green):hover {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.3);
    color: var(--lf-light, #10bb87);
}
html[data-theme="dark"] .lf-ai-btn {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-ai-btn:hover {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.3);
    color: var(--lf-light, #10bb87);
}
html[data-theme="dark"] .lf-engine-badge {
    color: var(--lf-light, #10bb87);
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.2);
}
html[data-theme="dark"] .lf-review-btn { color: var(--dk-text-dim); }
html[data-theme="dark"] .lf-review-meta {
    border-color: rgba(16,187,135,.2);
    background: rgba(16,187,135,.08);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-review-meta strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .btn-outline-secondary {
    background: var(--dk-surface2) !important;
    border-color: var(--dk-border) !important;
    color: var(--dk-text-sub) !important;
}
html[data-theme="dark"] .btn-close { filter: invert(.7) brightness(1.5); }

/* â”€â”€ Language selector â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-lang-selector { scrollbar-color: transparent transparent; }
html[data-theme="dark"] .lf-lang-card {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-lang-card:hover { border-color: rgba(16,187,135,.3); }
html[data-theme="dark"] .lf-lang-card.active {
    background: var(--dk-surface2);
    border-color: var(--lf, #1a7f5a);
}
html[data-theme="dark"] .lf-lang-name { color: var(--dk-text); }
html[data-theme="dark"] .lf-lang-bar  { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .lf-lang-flag { border-color: var(--dk-border); }

/* â”€â”€ Coverage cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-cov-card {
    background: var(--dk-surface);
    box-shadow: 0 2px 16px rgba(0,0,0,.35);
}
html[data-theme="dark"] .lf-cov-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.5); }
html[data-theme="dark"] .lf-cov-langname { color: var(--dk-text); }
html[data-theme="dark"] .lf-cov-counts   { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .lf-cov-num      { color: var(--dk-text); }
html[data-theme="dark"] .lf-cov-lbl      { color: var(--dk-text-sub); }
html[data-theme="dark"] .lf-cov-divider  { background: var(--dk-border); }
html[data-theme="dark"] .lf-cov-flag     { border-color: var(--dk-border); }

/* â”€â”€ Modals / Dropdowns / Nav pills / Progress / Badges / Alerts â”€â”€ */
/* Generic dark overrides handled by design-system.css */

/* Page-specific progress bars */
html[data-theme="dark"] .lf-lang-bar { background: rgba(255,255,255,.08) !important; }

/* Page-specific badges */
html[data-theme="dark"] .badge.bg-secondary { background: var(--dk-surface2) !important; color: var(--dk-text-sub) !important; }
html[data-theme="dark"] .lf-source-badge { background: rgba(16,185,129,.15); }
html[data-theme="dark"] .lf-status-active { background: rgba(16,185,129,.12); }

/* â”€â”€ Info / code blocks â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-info-box  { background: rgba(16,185,129,.06); border-color: rgba(16,185,129,.14); }
html[data-theme="dark"] .lf-info-row  { color: var(--text-primary); }
html[data-theme="dark"] .lf-code-preview { background: var(--bg-surface-2); border-color: var(--border-default); color: var(--text-primary); }

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html[data-theme="dark"] .lf-empty h4 { color: var(--text-primary); }
html[data-theme="dark"] .lf-empty p  { color: var(--text-secondary); }
html[data-theme="dark"] .lf-empty-icon { color: rgba(16,185,129,.2); }

/* â”€â”€ Scrollbar â€” handled by design-system.css â”€â”€ */

/* â”€â”€ Translation Memory hint â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lf-tm-hint {
    font-size: 12px;
    color: var(--text-tertiary, #9aafaa);
    margin-top: 4px;
}
.lf-tm-hint .lf-tm-accept {
    font-weight: 600;
    color: var(--lf-light);
    text-decoration: none;
}
.lf-tm-hint .lf-tm-accept:hover { text-decoration: underline; }

/* Mobile refinements for Terms and Translates workspace */
.lf-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 3rem;
}
.lf-page-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.lf-page-title-row > div { min-width: 0; }
.lf-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .lf-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 1.25rem;
    }
    .lf-page-title-row { align-items: flex-start; }
    .lf-page-heading {
        font-size: 1.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .lf-page-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .lf-page-actions > .lf-tool-btn,
    .lf-page-actions > .dropdown,
    .lf-page-actions .dropdown > .lf-tool-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
    .lf-page-actions > .lf-tool-btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
    .lf-translate-toolbar { padding: 12px; }
    .lf-toolbar-controls {
        width: 100%;
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .lf-toolbar-controls > div {
        width: 100%;
        flex-wrap: wrap;
    }
    .lf-search-wrap {
        width: 100%;
        max-width: none !important;
    }
    .lf-search-input {
        width: 100% !important;
        min-width: 0;
    }
    .lf-toolbar-progress,
    .lf-toolbar-bar {
        width: 100%;
        max-width: none;
    }
    #addRowBtn,
    #bulkDeleteBtn {
        width: 100%;
        justify-content: center;
    }
    .lf-lang-selector {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        overflow: visible;
    }
    .lf-lang-card {
        width: 100%;
        min-width: 0;
    }
    .lf-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .lf-table {
        min-width: 720px;
    }
    #termsTable {
        min-width: 640px;
    }
    .lf-tool-btn,
    .lf-ctrl-btn,
    .lf-ai-btn {
        min-height: 38px;
    }
}

@media (max-width: 420px) {
    .lf-page-actions { grid-template-columns: 1fr; }
}

/* Project export offcanvas */
.lf-export-canvas {
    width: min(460px, 100vw) !important;
    border-left: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(16,185,129,.08), transparent 240px),
        var(--bg-surface, #fff);
    color: var(--text-primary, #1c2b22);
}
.lf-export-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-default, #e8efec);
    flex-shrink: 0;
}
.lf-export-kicker {
    margin-bottom: 6px;
    color: var(--lf-light, #10bb87);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.lf-export-head h5 {
    margin: 0;
    color: var(--text-primary, #111);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.lf-export-head p {
    margin: 8px 0 0;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
}
.lf-export-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-default, #e4ece9);
    border-radius: 10px;
    background: var(--bg-surface, #fff);
    color: var(--text-secondary, #64748b);
    transition: border-color .15s, color .15s, background .15s;
}
.lf-export-close:hover {
    border-color: rgba(16,185,129,.35);
    background: rgba(16,185,129,.08);
    color: var(--lf-light, #10bb87);
}
.lf-export-template {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 20px 14px;
    padding: 16px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 14px;
    background: rgba(16,185,129,.07);
    flex-shrink: 0;
}
.lf-export-template span,
.lf-export-lang strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13px;
    font-weight: 800;
}
.lf-export-template small,
.lf-export-lang span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.35;
}
.lf-export-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--lf, #1a7f5a);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.lf-export-template-btn:hover {
    background: var(--lf-dark, #0d5c3c);
    color: #fff;
}
.lf-export-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(16,185,129,.28) transparent;
}
.lf-export-list::-webkit-scrollbar { width: 5px; }
.lf-export-list::-webkit-scrollbar-track { background: transparent; }
.lf-export-list::-webkit-scrollbar-thumb {
    background: rgba(16,185,129,.28);
    border-radius: 999px;
}
.lf-export-lang {
    padding: 16px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface, #fff);
    box-shadow: 0 2px 14px rgba(0,0,0,.04);
}
.lf-export-lang-top {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
}
.lf-export-lang-top img {
    width: 34px;
    height: 24px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 6px;
    object-fit: cover;
}
.lf-export-lang-top em {
    font-style: normal;
    font-size: 13px;
    font-weight: 850;
}
.lf-export-mini-bar {
    height: 4px;
    margin: 13px 0 14px;
    border-radius: 99px;
    background: var(--bg-surface-2, #edf3f0);
    overflow: hidden;
}
.lf-export-mini-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.lf-export-mini-bar .lf-pct-full { background: var(--lf-light, #10bb87); }
.lf-export-mini-bar .lf-pct-mid { background: #f59e0b; }
.lf-export-mini-bar .lf-pct-low { background: #ef4444; }
.lf-export-formats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.lf-export-formats a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 6px;
    border: 1px solid var(--border-default, #e4ece9);
    border-radius: 10px;
    background: var(--bg-surface-2, #f8fbf9);
    color: var(--text-secondary, #4a6b5d);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.lf-export-formats a:hover {
    border-color: rgba(16,185,129,.36);
    background: rgba(16,185,129,.08);
    color: var(--lf, #1a7f5a);
    transform: translateY(-1px);
}

html[data-theme="dark"] .lf-export-canvas {
    background:
        linear-gradient(180deg, rgba(16,185,129,.09), transparent 240px),
        var(--dk-surface);
}
html[data-theme="dark"] .lf-export-head,
html[data-theme="dark"] .lf-export-lang,
html[data-theme="dark"] .lf-export-close {
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-export-head h5,
html[data-theme="dark"] .lf-export-template span,
html[data-theme="dark"] .lf-export-lang strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-export-head p,
html[data-theme="dark"] .lf-export-template small,
html[data-theme="dark"] .lf-export-lang span {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-export-template {
    border-color: rgba(16,185,129,.2);
    background: rgba(16,185,129,.09);
}
html[data-theme="dark"] .lf-export-lang,
html[data-theme="dark"] .lf-export-close,
html[data-theme="dark"] .lf-export-formats a {
    background: var(--dk-surface2);
}
html[data-theme="dark"] .lf-export-mini-bar {
    background: rgba(255,255,255,.08);
}

@media (max-width: 480px) {
    .lf-export-canvas {
        width: 100vw !important;
    }
    .lf-export-head {
        padding: 22px 18px 18px;
    }
    .lf-export-template,
    .lf-export-list {
        margin-left: 14px;
        margin-right: 14px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .lf-export-list {
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
    }
    .lf-export-formats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Language picker modal */
.lf-language-picker {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lf-lp-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.02)),
        var(--bg-surface, #fff);
}
.lf-lp-kicker {
    margin-bottom: 6px;
    color: var(--lf-light, #10bb87);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.lf-lp-hero h3 {
    margin: 0;
    color: var(--text-primary, #111);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -.03em;
}
.lf-lp-hero p {
    max-width: 500px;
    margin: 7px 0 0;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    line-height: 1.5;
}
.lf-lp-count {
    min-width: 82px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(16,185,129,.16);
    text-align: center;
    box-shadow: 0 10px 26px rgba(16,185,129,.08);
}
.lf-lp-count strong {
    display: block;
    color: var(--lf, #1a7f5a);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}
.lf-lp-count span {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lf-lp-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.lf-lp-search {
    position: relative;
}
.lf-lp-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aafaa;
    font-size: 13px;
}
.lf-lp-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    border: 1.5px solid var(--border-default, #e4ece9);
    border-radius: 12px;
    background: var(--bg-surface-2, #f8fbf9);
    color: var(--text-primary, #111);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf-lp-search input:focus {
    border-color: rgba(16,185,129,.55);
    background: var(--bg-surface, #fff);
    box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
.lf-lp-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-surface-2, #f3f7f5);
    border: 1px solid var(--border-default, #e8efec);
}
.lf-lp-tab {
    min-width: 72px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.lf-lp-tab.active {
    background: var(--bg-surface, #fff);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 3px 12px rgba(15,23,42,.08);
}
.lf-lp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    max-height: 390px;
    overflow-y: auto;
    padding: 2px 4px 2px 0;
}
.lf-lp-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 11px;
    min-height: 64px;
    padding: 10px 12px;
    border: 1.5px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface, #fff);
    text-align: left;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
.lf-lp-card:hover {
    transform: translateY(-1px);
    border-color: rgba(16,185,129,.35);
    box-shadow: 0 8px 22px rgba(16,185,129,.08);
}
.lf-lp-card.selected {
    border-color: var(--lf-light, #10bb87);
    background: rgba(16,185,129,.08);
    box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
.lf-lp-flag-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-surface-2, #f6faf8);
}
.lf-lp-flag-wrap img {
    width: 30px;
    height: 21px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--border-default, #e8efec);
}
.lf-lp-card-main {
    min-width: 0;
}
.lf-lp-card-main strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary, #1c2b22);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lf-lp-card-main small {
    display: block;
    margin-top: 3px;
    color: var(--text-tertiary, #9aafaa);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.lf-lp-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-surface-2, #f2f6f4);
    color: transparent;
    font-size: 11px;
    transition: background .15s, color .15s;
}
.lf-lp-card.selected .lf-lp-check {
    background: var(--lf-light, #10bb87);
    color: #fff;
}
.lf-lp-selected {
    display: grid;
    grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-lp-selected strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13px;
    font-weight: 850;
}
.lf-lp-selected span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
}
.lf-lp-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-height: 28px;
}
.lf-lp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 170px;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--bg-surface, #fff);
    border: 1px solid rgba(16,185,129,.18);
    color: var(--text-primary, #111);
    font-size: 12px;
    font-weight: 750;
}
.lf-lp-chip img {
    width: 18px;
    height: 13px;
    border-radius: 3px;
    object-fit: cover;
}
.lf-lp-no-results,
.lf-lp-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
    border: 1px dashed var(--border-default, #dbe7e1);
    border-radius: 14px;
    color: var(--text-secondary, #64748b);
    text-align: center;
}
.lf-lp-no-results i,
.lf-lp-empty i {
    color: var(--lf-light, #10bb87);
    font-size: 24px;
}

html[data-theme="dark"] .lf-lp-hero,
html[data-theme="dark"] .lf-lp-count,
html[data-theme="dark"] .lf-lp-card,
html[data-theme="dark"] .lf-lp-tab.active,
html[data-theme="dark"] .lf-lp-chip {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-lp-search input,
html[data-theme="dark"] .lf-lp-tabs,
html[data-theme="dark"] .lf-lp-flag-wrap,
html[data-theme="dark"] .lf-lp-check,
html[data-theme="dark"] .lf-lp-selected {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-lp-hero h3,
html[data-theme="dark"] .lf-lp-card-main strong,
html[data-theme="dark"] .lf-lp-selected strong,
html[data-theme="dark"] .lf-lp-chip {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-lp-hero p,
html[data-theme="dark"] .lf-lp-selected span {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-lp-card.selected {
    background: rgba(16,185,129,.12);
    border-color: var(--lf-light, #10bb87);
}

@media (max-width: 767px) {
    .lf-lp-hero,
    .lf-lp-tools,
    .lf-lp-selected {
        grid-template-columns: 1fr;
    }
    .lf-lp-hero {
        flex-direction: column;
    }
    .lf-lp-count {
        width: 100%;
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 8px;
    }
    .lf-lp-grid {
        grid-template-columns: 1fr;
        max-height: 50vh;
    }
    .lf-lp-tabs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .lf-lp-tab {
        min-width: 0;
        width: 100%;
    }
    .lf-lp-chips {
        justify-content: flex-start;
    }
}

/* Project create/edit modal */
.lf-project-form .modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lf-pm-hero {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.02)),
        var(--bg-surface, #fff);
}
.lf-pm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(16,185,129,.16);
    color: var(--lf-light, #10bb87);
    font-size: 20px;
    box-shadow: 0 10px 26px rgba(16,185,129,.08);
}
.lf-pm-kicker {
    margin-bottom: 6px;
    color: var(--lf-light, #10bb87);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.lf-pm-hero h3 {
    margin: 0;
    color: var(--text-primary, #111);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -.03em;
}
.lf-pm-hero p {
    margin: 7px 0 0;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    line-height: 1.5;
}
.lf-pm-fields {
    display: grid;
    gap: 12px;
}
.lf-pm-field {
    display: grid;
    gap: 7px;
}
.lf-pm-field > span {
    color: var(--text-secondary, #4a6b5d);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
}
.lf-pm-input {
    position: relative;
}
.lf-pm-input > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aafaa;
    font-size: 13px;
    pointer-events: none;
}
.lf-pm-input--textarea > i {
    top: 17px;
    transform: none;
}
.lf-pm-input input,
.lf-pm-input textarea {
    width: 100%;
    border: 1.5px solid var(--border-default, #e4ece9);
    border-radius: 13px;
    background: var(--bg-surface-2, #f8fbf9);
    color: var(--text-primary, #111);
    font-family: var(--lf-font, 'Inter', sans-serif);
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf-pm-input input {
    height: 46px;
    padding: 0 14px 0 40px;
}
.lf-pm-input textarea {
    min-height: 112px;
    resize: vertical;
    padding: 13px 14px 13px 40px;
}
.lf-pm-input input:focus,
.lf-pm-input textarea:focus {
    border-color: rgba(16,185,129,.55);
    background: var(--bg-surface, #fff);
    box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
.lf-pm-input input::placeholder,
.lf-pm-input textarea::placeholder {
    color: #b2c0bb;
}
.lf-pm-preview {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-pm-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lf-light, #10bb87);
    box-shadow: 0 0 0 5px rgba(16,185,129,.12);
}
.lf-pm-preview strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13px;
    font-weight: 850;
}
.lf-pm-preview span {
    display: block;
    margin-top: 2px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.4;
}
.lf-pm-footer {
    justify-content: space-between !important;
}

html[data-theme="dark"] .lf-pm-hero,
html[data-theme="dark"] .lf-pm-icon {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-pm-input input,
html[data-theme="dark"] .lf-pm-input textarea,
html[data-theme="dark"] .lf-pm-preview {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-pm-hero h3,
html[data-theme="dark"] .lf-pm-preview strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-pm-hero p,
html[data-theme="dark"] .lf-pm-preview span,
html[data-theme="dark"] .lf-pm-field > span {
    color: var(--dk-text-sub);
}

@media (max-width: 560px) {
    .lf-pm-hero {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .lf-pm-footer {
        display: grid !important;
        grid-template-columns: 1fr;
    }
    .lf-pm-footer .lf-tool-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Terms import modal */
.lf-import-hero {
    margin-bottom: 16px;
}
.lf-import-layout {
    display: grid;
    gap: 12px;
}
.lf-import-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 15px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-import-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid rgba(16,185,129,.16);
    color: var(--lf-light, #10bb87);
    font-size: 17px;
}
.lf-import-card strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13.5px;
    font-weight: 850;
}
.lf-import-card span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.45;
}
.lf-import-steps {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface, #fff);
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
}
.lf-import-steps b {
    color: var(--lf, #1a7f5a);
}
.lf-import-upload {
    display: block;
    margin-top: 14px;
}
.lf-import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

html[data-theme="dark"] .lf-import-card,
html[data-theme="dark"] .lf-import-card-icon,
html[data-theme="dark"] .lf-import-steps {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-import-card strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-import-card span,
html[data-theme="dark"] .lf-import-steps {
    color: var(--dk-text-sub);
}

@media (max-width: 640px) {
    .lf-import-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .lf-import-card .lf-tool-btn {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
    .lf-import-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .lf-import-actions .lf-tool-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Crawl import modal */
.lf-crawl-hero {
    margin-bottom: 16px;
}
.lf-crawl-panel,
.lf-crawl-results {
    display: grid;
    gap: 14px;
}
.lf-crawl-tabs {
    display: inline-flex;
    gap: 4px;
    width: fit-content;
    padding: 4px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 13px;
    background: var(--bg-surface-2, #f3f7f5);
}
.lf-crawl-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
    font-weight: 850;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.lf-crawl-tab.active {
    background: var(--bg-surface, #fff);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 4px 14px rgba(15,23,42,.08);
}
.lf-crawl-source-card,
.lf-crawl-section {
    padding: 16px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 16px;
    background: var(--bg-surface, #fff);
}
.lf-crawl-source-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.lf-crawl-source-head strong,
.lf-crawl-section-title strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13.5px;
    font-weight: 850;
}
.lf-crawl-source-head span,
.lf-crawl-section-title span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.45;
}
.lf-crawl-url-wrap {
    max-width: 100%;
}
.lf-crawl-url-wrap .lf-search-input {
    width: 100%;
    padding-right: 128px;
}
.lf-crawl-url-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 15px;
}
.lf-crawl-auth {
    margin-top: 12px;
}
.lf-crawl-auth-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 750;
    padding: 0;
}
.lf-crawl-auth-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-crawl-note {
    margin-bottom: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 13px;
    background: rgba(16,185,129,.06);
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.5;
}
.lf-crawl-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-crawl-table-wrap {
    max-height: 340px;
    overflow-y: auto;
}
.lf-crawl-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.lf-crawl-section-title > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(16,185,129,.1);
    color: var(--lf-light, #10bb87);
    flex: 0 0 auto;
}

html[data-theme="dark"] .lf-crawl-tabs,
html[data-theme="dark"] .lf-crawl-source-card,
html[data-theme="dark"] .lf-crawl-section,
html[data-theme="dark"] .lf-crawl-auth-box,
html[data-theme="dark"] .lf-crawl-toolbar {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-crawl-tab.active {
    background: var(--dk-surface);
}
html[data-theme="dark"] .lf-crawl-source-head strong,
html[data-theme="dark"] .lf-crawl-section-title strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-crawl-source-head span,
html[data-theme="dark"] .lf-crawl-section-title span,
html[data-theme="dark"] .lf-crawl-auth-toggle,
html[data-theme="dark"] .lf-crawl-note {
    color: var(--dk-text-sub);
}

@media (max-width: 767px) {
    .lf-crawl-tabs {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }
    .lf-crawl-url-wrap .lf-search-input {
        padding-right: 14px;
    }
    .lf-crawl-url-btn {
        position: static;
        width: 100%;
        margin-top: 10px;
        transform: none;
        justify-content: center;
    }
    .lf-crawl-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .lf-crawl-toolbar > .d-flex:last-child {
        width: 100%;
        flex-direction: column;
    }
    .lf-crawl-toolbar .lf-search-wrap,
    .lf-crawl-toolbar .lf-search-input,
    .lf-crawl-toolbar .lf-ctrl-btn {
        width: 100% !important;
    }
}

/* Terms table polish */
.lf-terms-toolbar {
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(15,23,42,.055);
    border-bottom: 0;
    box-shadow: 0 1px 12px rgba(15,23,42,.045);
}
.lf-terms-toolbar-controls {
    flex: 1;
    width: 100%;
    justify-content: space-between;
}
.lf-terms-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.lf-terms-count {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(16,185,129,.14);
    border-radius: 11px;
    background: rgba(16,185,129,.06);
    white-space: nowrap;
}
.lf-terms-count strong {
    color: var(--lf, #1a7f5a);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}
.lf-terms-count span {
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 750;
}
.lf-terms-table-wrap {
    position: relative;
    border: 1px solid rgba(15,23,42,.055);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.lf-terms-table-wrap .lf-table thead tr {
    background: linear-gradient(180deg, #f8fbf9, #f3f8f5);
}
.lf-terms-table-wrap .lf-table thead th {
    padding-top: 13px;
    padding-bottom: 13px;
}
.lf-terms-table-wrap .lf-tr {
    background: #fff;
}
.lf-terms-table-wrap .lf-tr:hover {
    background: rgba(16,185,129,.035);
}
.lf-terms-table-wrap .lf-tr td {
    padding-top: 10px;
    padding-bottom: 10px;
}
.lf-terms-table-wrap .lf-textarea {
    min-height: 54px !important;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
}
.lf-terms-table-wrap .lf-tr:hover .lf-textarea {
    background: rgba(248,251,249,.85);
    border-color: #e4ece9;
}
.lf-terms-table-wrap .lf-textarea:focus {
    background: #fff !important;
    border-color: var(--lf-light, #10bb87) !important;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1) !important;
}
.lf-terms-table-wrap .lf-context-tag {
    margin-top: 0;
    border-radius: 999px;
    padding: 3px 8px;
}
.lf-terms-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 210px;
    padding: 28px;
    border-top: 1px solid #eef2f0;
    color: var(--text-secondary, #64748b);
    text-align: center;
}
.lf-terms-empty i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(16,185,129,.1);
    color: var(--lf-light, #10bb87);
    font-size: 20px;
}
.lf-terms-empty strong {
    color: var(--text-primary, #111);
    font-size: 16px;
    font-weight: 850;
}
.lf-terms-empty span {
    max-width: 430px;
    font-size: 13px;
    line-height: 1.5;
}
.lf-terms-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 10px 4px;
}
.lf-terms-more #termsVisibleInfo {
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 750;
}
.lf-trans-more .lf-trans-visible-info {
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 750;
}
.lf-terms-loading {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}
.lf-terms-danger-hero {
    border-color: rgba(239,68,68,.2);
    background:
        linear-gradient(135deg, rgba(239,68,68,.08), rgba(239,68,68,.015)),
        var(--bg-surface, #fff);
}
.lf-terms-danger-hero .lf-pm-icon {
    color: #ef4444;
    border-color: rgba(239,68,68,.18);
    box-shadow: 0 10px 26px rgba(239,68,68,.08);
}
.lf-terms-danger-btn {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.lf-terms-danger-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

html[data-theme="dark"] .lf-terms-toolbar,
html[data-theme="dark"] .lf-terms-table-wrap {
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-terms-count {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.22);
}
html[data-theme="dark"] .lf-terms-count span {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-terms-table-wrap .lf-tr {
    background: var(--dk-surface);
}
html[data-theme="dark"] .lf-terms-table-wrap .lf-tr:hover {
    background: rgba(16,187,135,.05);
}
html[data-theme="dark"] .lf-terms-table-wrap .lf-tr:hover .lf-textarea {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
/* FIX: the light-mode :focus rule forces a white background with !important —
   without an equally-!important dark override here, clicking into a term textarea
   in dark mode showed white-on-white (invisible text). */
html[data-theme="dark"] .lf-terms-table-wrap .lf-textarea:focus {
    background: var(--bg-elevated, #1e2d28) !important;
    color: var(--dk-text) !important;
    border-color: var(--lf-light, #10bb87) !important;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1) !important;
}
html[data-theme="dark"] .lf-terms-empty {
    border-top-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-terms-empty strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-terms-more #termsVisibleInfo {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-trans-more .lf-trans-visible-info {
    color: var(--dk-text-sub);
}

@media (max-width: 767px) {
    .lf-terms-toolbar-left {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    .lf-terms-count {
        justify-content: center;
    }
}

/* Translates workspace polish */
.lf-trans-hero {
    margin-bottom: 16px;
}
.lf-trans-template-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 15px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-trans-template-card strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 13.5px;
    font-weight: 850;
}
.lf-trans-template-card span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.45;
}
.lf-trans-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
    font-weight: 700;
}
.lf-trans-engine-field {
    padding: 14px;
    border: 1px solid var(--border-default, #e8efec);
    border-radius: 14px;
    background: var(--bg-surface-2, #f8fbf9);
}
.lf-trans-engine-field .form-select {
    min-height: 42px;
    border: 1.5px solid var(--border-default, #e4ece9);
    border-radius: 12px;
    background-color: var(--bg-surface, #fff);
    color: var(--text-primary, #111);
    font-size: 13px;
    font-weight: 700;
}
.lf-trans-ai-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 4px;
    padding: 11px 12px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 13px;
    background: rgba(16,185,129,.06);
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
    line-height: 1.45;
}
.lf-trans-ai-note i {
    margin-top: 2px;
    color: var(--lf-light, #10bb87);
}
.lf-trans-toolbar {
    border: 1px solid rgba(15,23,42,.055);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 1px 12px rgba(15,23,42,.045);
}
.lf-trans-table-wrap {
    border: 1px solid rgba(15,23,42,.055);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.lf-trans-table-wrap .lf-table thead tr {
    background: linear-gradient(180deg, #f8fbf9, #f3f8f5);
}
.lf-trans-table-wrap .lf-textarea {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.lf-trans-table-wrap .lf-tr:hover .lf-textarea {
    background: rgba(248,251,249,.85);
    border-color: #e4ece9;
}
.lf-trans-table-wrap .lf-textarea:focus {
    background: #fff !important;
    border-color: var(--lf-light, #10bb87) !important;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1) !important;
}
.lf-trans-table-wrap .lf-tr--missing {
    background: rgba(245,158,11,.025);
}
.lf-trans-table-wrap .lf-tr--missing:hover {
    background: rgba(245,158,11,.055);
}

html[data-theme="dark"] .lf-trans-template-card,
html[data-theme="dark"] .lf-trans-engine-field,
html[data-theme="dark"] .lf-trans-toolbar,
html[data-theme="dark"] .lf-trans-table-wrap {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-trans-template-card strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-trans-template-card span,
html[data-theme="dark"] .lf-trans-spinner,
html[data-theme="dark"] .lf-trans-ai-note {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-trans-engine-field .form-select {
    background-color: var(--dk-surface);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-trans-table-wrap .lf-tr:hover .lf-textarea {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
}
/* FIX: same as .lf-terms-table-wrap above — the light-mode :focus rule forces a
   white background with !important; without a dark override, clicking into a
   translation textarea showed white-on-white (invisible text). */
html[data-theme="dark"] .lf-trans-table-wrap .lf-textarea:focus {
    background: var(--bg-elevated, #1e2d28) !important;
    color: var(--dk-text) !important;
    border-color: var(--lf-light, #10bb87) !important;
    box-shadow: 0 0 0 3px rgba(16,187,135,.1) !important;
}

@media (max-width: 640px) {
    .lf-trans-template-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .lf-trans-template-card .lf-tool-btn {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}

/* Translation export offcanvas and premium AI buttons */
.lf-trans-export-canvas {
    width: min(430px, 100vw);
    border-left: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}
.lf-trans-export-summary {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 20px 16px;
    padding: 14px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 15px;
    background: rgba(16,185,129,.06);
    flex-shrink: 0;
}
.lf-trans-export-summary img {
    width: 46px;
    height: 32px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(15,23,42,.08);
}
.lf-trans-export-summary strong {
    display: block;
    color: var(--text-primary, #111);
    font-size: 15px;
    font-weight: 900;
}
.lf-trans-export-summary span {
    display: block;
    margin-top: 2px;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 700;
}
.lf-trans-export-summary em {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff;
    color: var(--lf, #1a7f5a);
    border: 1px solid rgba(16,185,129,.18);
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}
.lf-trans-export-formats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 20px 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(16,185,129,.28) transparent;
}
.lf-trans-export-formats::-webkit-scrollbar { width: 5px; }
.lf-trans-export-formats::-webkit-scrollbar-track { background: transparent; }
.lf-trans-export-formats::-webkit-scrollbar-thumb {
    background: rgba(16,185,129,.28);
    border-radius: 999px;
}
.lf-trans-table-wrap .lf-ai-group {
    display: inline-flex;
    gap: 5px;
    padding: 4px;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f7fbf9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 12px rgba(15,23,42,.04);
}
.lf-trans-table-wrap .lf-ai-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.07);
    color: #5f7f73;
    box-shadow: 0 1px 5px rgba(15,23,42,.055);
    overflow: hidden;
}
.lf-trans-table-wrap .lf-ai-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16,185,129,.14), transparent 55%);
    opacity: 0;
    transition: opacity .15s;
}
.lf-trans-table-wrap .lf-ai-btn:hover {
    transform: translateY(-1px);
    background: #fff;
    border-color: rgba(16,185,129,.38);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 7px 18px rgba(16,185,129,.14);
}
.lf-trans-table-wrap .lf-ai-btn:hover::before {
    opacity: 1;
}
.lf-trans-table-wrap .lf-ai-btn > i,
.lf-trans-table-wrap .lf-ai-btn > img {
    position: relative;
    z-index: 1;
}
.lf-trans-table-wrap .lf-ai-btn:nth-child(2) {
    color: #0f766e;
}
.lf-trans-table-wrap .lf-ai-icon {
    width: 16px;
    height: 16px;
    opacity: .9;
}

html[data-theme="dark"] .lf-trans-export-summary {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.22);
}
html[data-theme="dark"] .lf-trans-export-summary img,
html[data-theme="dark"] .lf-trans-export-summary em {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-trans-export-summary strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-trans-export-summary span {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-trans-table-wrap .lf-ai-group {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    box-shadow: none;
}
html[data-theme="dark"] .lf-trans-table-wrap .lf-ai-btn {
    background: var(--dk-surface);
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-trans-table-wrap .lf-ai-btn:hover {
    background: rgba(16,187,135,.1);
    border-color: rgba(16,187,135,.32);
    color: var(--lf-light, #10bb87);
}

@media (max-width: 520px) {
    .lf-trans-export-canvas {
        width: 100vw;
    }
    .lf-trans-export-formats {
        grid-template-columns: 1fr;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

/* Add term modal */
.lf-add-term-canvas {
    width: min(520px, 100vw);
    border-left: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--bg-surface, #fff);
}
.lf-add-term-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    align-items: flex-start;
    gap: 13px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(15,23,42,.07);
    background:
        linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.02)),
        var(--bg-surface, #fff);
}
.lf-add-term-head h3 {
    margin: 2px 0 4px;
    color: var(--text-primary, #111);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.16;
}
.lf-add-term-head p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
    line-height: 1.45;
}
.lf-add-term-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px 104px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.lf-add-term-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(15,23,42,.07);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
}
.lf-add-term-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lf-add-term-hero {
    margin-bottom: 16px;
}
.lf-add-term-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr);
    gap: 12px;
}
.lf-add-term-text,
.lf-add-term-url {
    grid-column: 1 / -1;
}
.lf-add-term-grid .lf-pm-field {
    margin: 0;
}
.lf-add-term-grid .lf-pm-field span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.lf-add-term-grid .lf-pm-field em {
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}
.lf-add-term-grid textarea.form-control {
    min-height: 112px;
    resize: vertical;
}
.lf-add-term-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 13px;
    background: rgba(16,185,129,.06);
    color: var(--text-secondary, #64748b);
    font-size: 12.5px;
    line-height: 1.45;
}
.lf-add-term-note i {
    margin-top: 2px;
    color: var(--lf-light, #10bb87);
}

html[data-theme="dark"] .lf-add-term-grid .lf-pm-field em,
html[data-theme="dark"] .lf-add-term-note {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-add-term-canvas {
    background: var(--dk-surface);
}
html[data-theme="dark"] .lf-add-term-head {
    background:
        linear-gradient(135deg, rgba(16,187,135,.12), rgba(16,187,135,.03)),
        var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-add-term-head h3 {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-add-term-head p {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-add-term-footer {
    background: rgba(13,18,17,.92);
    border-color: var(--dk-border);
}

@media (max-width: 680px) {
    .lf-add-term-grid {
        grid-template-columns: 1fr;
    }
    .lf-add-term-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .lf-add-term-actions,
    .lf-add-term-footer .lf-tool-btn {
        width: 100%;
    }
    .lf-add-term-actions {
        flex-direction: column-reverse;
    }
    .lf-add-term-footer .lf-tool-btn {
        justify-content: center;
    }
}

/* Settings page polish */
.lf-settings-header {
    margin-bottom: 24px;
}
.lf-settings-grid {
    align-items: stretch;
}
.lf-settings-card {
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.055) !important;
    border-radius: 16px !important;
    background: var(--bg-surface, #fff);
    box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.lf-settings-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(15,23,42,.06) !important;
    background: linear-gradient(180deg, #f8fbf9, #f3f8f5) !important;
}
.lf-settings-card-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-primary, #111);
    font-size: 14px;
    font-weight: 850;
}
.lf-settings-card-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(16,185,129,.1);
    color: var(--lf, #1a7f5a);
    font-size: 13px;
}
.lf-settings-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(16,185,129,.09);
    color: var(--lf, #1a7f5a);
    font-size: 11px;
    font-weight: 850;
}
.lf-settings-card-body {
    padding: 20px !important;
}
.lf-settings-table-card {
    background: var(--bg-surface, #fff);
}
.lf-settings-table {
    width: 100%;
}
.lf-settings-table thead tr {
    background: transparent;
}
.lf-settings-table thead th {
    padding: 12px 14px;
    color: var(--text-secondary, #64748b);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 1px solid rgba(15,23,42,.06);
}
.lf-settings-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(15,23,42,.045);
    vertical-align: middle;
}
.lf-settings-table tbody tr:hover {
    background: rgba(16,185,129,.035);
}
.lf-settings-status,
.lf-settings-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 4px 8px;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 999px;
    background: rgba(100,116,139,.08);
    color: var(--text-secondary, #64748b);
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
}
.lf-settings-status--source,
.lf-settings-event {
    border-color: rgba(16,185,129,.18);
    background: rgba(16,185,129,.08);
    color: var(--lf, #1a7f5a);
}
.lf-settings-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 9px;
    background: var(--bg-surface, #fff);
    color: var(--text-secondary, #64748b);
    transition: transform .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.lf-settings-icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(16,185,129,.35);
    color: var(--lf, #1a7f5a);
    box-shadow: 0 7px 18px rgba(16,185,129,.12);
}
.lf-settings-icon-btn--danger:hover {
    border-color: rgba(239,68,68,.35);
    color: #dc2626;
    box-shadow: 0 7px 18px rgba(239,68,68,.1);
}
.lf-settings-codebox {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    padding-right: 94px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    background: #0f172a;
    color: #d5dee8;
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
}
.lf-settings-codebox code {
    color: inherit;
    white-space: normal;
    word-break: break-all;
}
.lf-settings-codebox button {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
}
.lf-settings-danger {
    border-color: rgba(239,68,68,.22) !important;
}
.lf-settings-danger .lf-settings-card-head {
    background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(239,68,68,.015)) !important;
    border-bottom-color: rgba(239,68,68,.12) !important;
}
.lf-settings-danger .lf-settings-card-title,
.lf-settings-danger .lf-settings-card-title i {
    color: #dc2626;
}
.lf-settings-danger .lf-settings-card-title i {
    background: rgba(239,68,68,.1);
}

html[data-theme="dark"] .lf-settings-card,
html[data-theme="dark"] .lf-settings-table-card {
    background: var(--dk-surface);
    border-color: var(--dk-border) !important;
}
html[data-theme="dark"] .lf-settings-card-head {
    background: var(--dk-surface2) !important;
    border-color: var(--dk-border) !important;
}
html[data-theme="dark"] .lf-settings-card-title {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-settings-table thead th,
html[data-theme="dark"] .lf-settings-table td {
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-settings-table thead th,
html[data-theme="dark"] .lf-settings-status {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-settings-table tbody tr:hover {
    background: rgba(16,187,135,.05);
}
html[data-theme="dark"] .lf-settings-icon-btn {
    background: var(--dk-surface);
    border-color: var(--dk-border);
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-settings-codebox {
    border-color: var(--dk-border);
}

@media (max-width: 767px) {
    .lf-settings-card-head {
        align-items: stretch;
        flex-direction: column;
    }
    .lf-settings-card-head .lf-tool-btn {
        width: 100%;
        justify-content: center;
    }
    .lf-settings-codebox {
        padding-right: 20px;
        padding-top: 56px;
    }
    .lf-settings-codebox button {
        right: auto;
        left: 12px;
    }
}

/* Coverage view refinement */
.lf-coverage-header {
    margin-bottom: 22px;
}
.lf-coverage-stats {
    margin-bottom: 24px;
}
.lf-coverage-stat {
    border: 1px solid rgba(15,23,42,.055);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(15,23,42,.055);
}
.lf-coverage-panel {
    overflow: hidden;
}
.lf-coverage-panel-body {
    padding: 18px;
}
.lf-coverage-panel .lf-settings-card-head {
    padding: 16px 18px;
}
.lf-coverage-panel .lf-coverage-grid {
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 14px;
}
.lf-coverage-panel .lf-cov-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 15px;
    box-shadow: 0 10px 26px rgba(15,23,42,.045);
}
.lf-coverage-panel .lf-cov-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--lf-light, #10bb87), rgba(15,118,110,.35));
}
.lf-coverage-panel .lf-cov-counts {
    border: 1px solid rgba(15,23,42,.045);
    background: rgba(248,250,252,.72);
}
.lf-coverage-panel .lf-cov-edit-btn {
    min-height: 36px;
    margin-top: 2px;
    padding: 0 12px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 10px;
    background: rgba(16,185,129,.055);
    color: var(--lf, #1a7f5a);
    font-weight: 800;
}
.lf-coverage-panel .lf-cov-edit-btn:hover {
    border-color: rgba(16,185,129,.34);
    background: rgba(16,185,129,.095);
    color: var(--lf-dark, #0d5c3c);
}

/* Invite contributor modal */
#inviteModal .modal-content {
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15,23,42,.22);
}
#inviteModal .modal-body {
    padding: 20px;
}
.lf-invite-hero {
    margin-bottom: 16px;
}
.lf-pm-field > label {
    margin-bottom: 0;
    color: var(--text-secondary, #4a6b5d);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
}
.lf-pm-field .form-control,
.lf-pm-field .form-select {
    min-height: 46px;
    border: 1.5px solid var(--border-default, #e4ece9);
    border-radius: 13px;
    background-color: var(--bg-surface-2, #f8fbf9);
    color: var(--text-primary, #111);
    font-size: 13.5px;
    font-weight: 650;
    box-shadow: none;
}
.lf-pm-field .form-control:focus,
.lf-pm-field .form-select:focus {
    border-color: rgba(16,185,129,.55);
    background-color: var(--bg-surface, #fff);
    box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
.lf-invite-note {
    margin-top: 4px;
    margin-bottom: 0;
}
#inviteResult {
    margin-top: 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

html[data-theme="dark"] .lf-coverage-stat,
html[data-theme="dark"] .lf-coverage-panel .lf-cov-card {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-coverage-panel .lf-cov-counts {
    background: rgba(255,255,255,.04);
    border-color: var(--dk-border);
}
html[data-theme="dark"] #inviteModal .modal-content {
    background: var(--dk-surface);
    border-color: var(--dk-border);
}
html[data-theme="dark"] .lf-pm-field > label {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-pm-field .form-control,
html[data-theme="dark"] .lf-pm-field .form-select {
    background-color: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-pm-field .form-control:focus,
html[data-theme="dark"] .lf-pm-field .form-select:focus {
    background-color: var(--dk-surface);
}

@media (max-width: 767px) {
    .lf-coverage-panel-body {
        padding: 12px;
    }
    .lf-coverage-panel .lf-coverage-grid {
        grid-template-columns: 1fr;
    }
    #inviteModal .modal-body {
        padding: 16px;
    }

    #termsPartialHost,
    #pills-tabContent {
        padding-bottom: 76px;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .lf-terms-table-wrap,
    .lf-trans-table-wrap {
        margin-bottom: 18px;
    }
}

/* Billing */
.lf-billing-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:22px}
.lf-billing-hero p{margin:8px 0 0;max-width:680px;color:var(--text-secondary,#64748b);font-size:14px}
.lf-billing-plan-chip{min-width:130px;padding:12px 14px;border:1px solid rgba(16,187,135,.2);border-radius:8px;background:rgba(16,187,135,.08);text-align:right}
.lf-billing-plan-chip span{display:block;font-size:18px;font-weight:900;color:var(--lf-700,#047857)}
.lf-billing-plan-chip small{color:var(--text-secondary,#64748b);text-transform:capitalize}
.lf-billing-alert{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:8px;margin-bottom:16px;font-size:14px;font-weight:700}
.lf-billing-alert--success{color:#047857;background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.2)}
.lf-billing-alert--info{color:#1d4ed8;background:rgba(59,130,246,.1);border:1px solid rgba(59,130,246,.25)}
.lf-billing-alert--danger{color:#b91c1c;background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.25)}
.lf-billing-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:stretch}
.lf-billing-usage,.lf-billing-credits,.lf-billing-note,.lf-billing-plan,.lf-billing-history-card{background:var(--bg-card,#fff);border:1px solid var(--border-subtle,#e5e7eb);border-radius:8px;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.lf-billing-usage{padding:18px}
.lf-billing-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}
.lf-billing-section-head strong{display:block;color:var(--text-primary,#0f172a);font-size:16px}
.lf-billing-section-head span,.lf-billing-section-head small{color:var(--text-secondary,#64748b);font-size:12px}
.lf-billing-meter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.lf-billing-meter{--meter:var(--lf-500,#10b981);padding:14px;border:1px solid rgba(148,163,184,.18);border-radius:8px;background:linear-gradient(180deg,rgba(248,250,252,.7),rgba(255,255,255,.95))}
.lf-billing-meter--blue{--meter:#2563eb}.lf-billing-meter--amber{--meter:#d97706}.lf-billing-meter--violet{--meter:#7c3aed}.lf-billing-meter--slate{--meter:#475569}.lf-billing-meter--teal{--meter:#0f766e}.lf-billing-meter.is-warning{--meter:#d97706}.lf-billing-meter.is-danger{--meter:#dc2626}
.lf-billing-meter-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.lf-billing-meter-top span{display:inline-flex;align-items:center;gap:7px;color:var(--text-primary,#0f172a);font-size:13px;font-weight:800}.lf-billing-meter-top i{color:var(--meter)}.lf-billing-meter-top small{color:var(--text-tertiary,#94a3b8);font-size:11px}
.lf-billing-meter-value{display:flex;align-items:baseline;gap:5px;margin-bottom:10px}.lf-billing-meter-value strong{font-size:24px;line-height:1;color:var(--text-primary,#0f172a)}.lf-billing-meter-value span{color:var(--text-secondary,#64748b);font-size:12px}
.lf-billing-progress{height:6px;border-radius:999px;background:rgba(148,163,184,.16);overflow:hidden}.lf-billing-progress span{display:block;height:100%;border-radius:inherit;background:var(--meter,var(--lf-500,#10b981))}
.lf-billing-credits{padding:22px;display:flex;flex-direction:column;justify-content:center;gap:10px}.lf-billing-credit-icon{width:46px;height:46px;border-radius:8px;display:grid;place-items:center;color:#b45309;background:rgba(245,158,11,.12)}
.lf-billing-credits>span{color:var(--text-secondary,#64748b);font-size:13px;font-weight:800}.lf-billing-credits>strong{color:var(--text-primary,#0f172a);font-size:42px;line-height:1;font-weight:950}.lf-billing-credits>small{color:var(--text-tertiary,#94a3b8)}.lf-billing-progress--credits span{background:#d97706}
.lf-billing-note{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:12px 14px;color:var(--text-secondary,#64748b);font-size:13px}.lf-billing-note i{color:var(--lf-600,#059669);margin-top:2px}
.lf-billing-plans-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:28px 0 14px}.lf-billing-plans-head h2{margin:0;color:var(--text-primary,#0f172a);font-size:20px;font-weight:900}
.lf-billing-plans{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.lf-billing-plan{position:relative;padding:18px;display:flex;flex-direction:column;gap:14px}.lf-billing-plan.is-current{border-color:rgba(16,187,135,.55);box-shadow:0 12px 32px rgba(16,187,135,.13)}
.lf-billing-current{position:absolute;top:12px;right:12px;padding:4px 8px;border-radius:999px;color:#047857;background:rgba(16,185,129,.1);font-size:11px;font-weight:900}
.lf-billing-plan-title span{display:block;color:var(--text-tertiary,#94a3b8);font-size:11px;font-weight:900;text-transform:uppercase}.lf-billing-plan-title strong{display:block;color:var(--text-primary,#0f172a);font-size:18px;font-weight:950}
.lf-billing-price strong{color:var(--text-primary,#0f172a);font-size:34px;font-weight:950}.lf-billing-price span{color:var(--text-secondary,#64748b);font-size:13px}
.lf-billing-plan ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}.lf-billing-plan li{display:flex;align-items:center;gap:8px;color:var(--text-secondary,#475569);font-size:13px}.lf-billing-plan li i{width:15px;color:var(--lf-600,#059669)}
.lf-billing-history{display:grid;grid-template-columns:1fr;gap:16px;margin-top:24px;margin-bottom:28px}.lf-billing-history-card{padding:16px;overflow:hidden}.lf-billing-badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;color:var(--text-secondary,#475569);background:rgba(148,163,184,.12);font-size:11px;font-weight:800}
html[data-theme="dark"] .lf-billing-usage,html[data-theme="dark"] .lf-billing-credits,html[data-theme="dark"] .lf-billing-note,html[data-theme="dark"] .lf-billing-plan,html[data-theme="dark"] .lf-billing-history-card,html[data-theme="dark"] .lf-billing-meter{background:var(--bg-card,#111827);border-color:var(--border-subtle,#263229)}
html[data-theme="dark"] .lf-billing-meter{background:linear-gradient(180deg,rgba(15,23,42,.7),rgba(17,24,39,.95))}
@media (max-width:1180px){.lf-billing-grid,.lf-billing-plans{grid-template-columns:repeat(2,minmax(0,1fr))}.lf-billing-credits{grid-column:span 2}}
@media (max-width:760px){.lf-billing-hero,.lf-billing-plans-head,.lf-billing-section-head{flex-direction:column;align-items:stretch}.lf-billing-grid,.lf-billing-meter-grid,.lf-billing-plans{grid-template-columns:1fr}.lf-billing-credits{grid-column:auto}.lf-billing-plan-chip{text-align:left}}

/* Required field states */
.lf-field-invalid,
.form-control.lf-field-invalid,
.form-select.lf-field-invalid,
.lf-search-input.lf-field-invalid,
.lf-textarea.lf-field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
    background-image: none;
}
.lf-required-message {
    margin-top: 6px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
}
html[data-theme="dark"] .lf-required-message {
    color: #fca5a5;
}

/* Identity account management */
.lf-manage-shell {
    max-width: 1180px;
    margin: 0 auto;
}
.lf-manage-header {
    margin-bottom: 22px;
}
.lf-manage-subtitle {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
}
.lf-manage-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.lf-manage-nav-card {
    padding: 12px;
}
.lf-manage-nav {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.lf-manage-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}
.lf-manage-nav a i {
    width: 16px;
    color: var(--text-tertiary, #94a3b8);
    text-align: center;
}
.lf-manage-nav a:hover {
    background: rgba(16,185,129,.07);
    color: var(--lf-700, #047857);
}
.lf-manage-nav a.active {
    background: rgba(16,185,129,.12);
    color: var(--lf-700, #047857);
}
.lf-manage-nav a.active i {
    color: var(--lf-600, #059669);
}
.lf-manage-panel {
    padding: 24px;
}
.lf-manage-panel h2,
.lf-manage-panel h3,
.lf-manage-panel h4 {
    margin: 0 0 14px;
    color: var(--text-primary, #0f172a);
    font-weight: 900;
    letter-spacing: 0;
}
.lf-manage-panel h3 {
    font-size: 20px;
}
.lf-manage-panel p {
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    line-height: 1.65;
}
.lf-manage-panel .row {
    --bs-gutter-x: 0;
}
.lf-manage-panel [class*="col-md-"] {
    width: 100%;
    max-width: 620px;
    flex: 0 0 100%;
}
.lf-manage-panel .form-floating {
    margin-bottom: 14px !important;
}
.lf-manage-panel .form-control,
.lf-manage-panel .form-select {
    min-height: 48px;
    border: 1.5px solid var(--border-default, #e4ece9);
    border-radius: 12px;
    background: var(--bg-surface-2, #f8fbf9);
    color: var(--text-primary, #0f172a);
    font-size: 13.5px;
    font-weight: 650;
    box-shadow: none;
}
.lf-manage-panel .form-control:disabled {
    color: var(--text-secondary, #64748b);
    background: rgba(148,163,184,.08);
}
.lf-manage-panel .form-control:focus,
.lf-manage-panel .form-select:focus {
    border-color: rgba(16,185,129,.55);
    background: var(--bg-surface, #fff);
    box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
.lf-manage-panel .form-floating > label {
    color: var(--text-secondary, #64748b);
    font-size: 13px;
}
.lf-manage-panel .btn-primary,
.lf-manage-panel .btn-success {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--lf-600, #059669);
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}
.lf-manage-panel .btn-primary:hover,
.lf-manage-panel .btn-success:hover {
    background: var(--lf-700, #047857);
    color: #fff;
}
.lf-manage-panel .btn-danger {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 850;
}
.lf-manage-panel .btn-link,
.lf-manage-panel a {
    color: var(--lf-700, #047857);
    font-weight: 750;
}
.lf-manage-panel .alert {
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
}
.lf-manage-panel .table {
    color: var(--text-primary, #0f172a);
}
.lf-manage-panel .table td,
.lf-manage-panel .table th {
    border-color: rgba(15,23,42,.07);
    vertical-align: middle;
}
.lf-manage-panel code,
.lf-manage-panel .recovery-code {
    display: inline-block;
    margin: 4px 4px 4px 0;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(15,23,42,.06);
    color: var(--text-primary, #0f172a);
    font-size: 12px;
}

html[data-theme="dark"] .lf-manage-subtitle,
html[data-theme="dark"] .lf-manage-panel p,
html[data-theme="dark"] .lf-manage-nav a {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-manage-panel h2,
html[data-theme="dark"] .lf-manage-panel h3,
html[data-theme="dark"] .lf-manage-panel h4,
html[data-theme="dark"] .lf-manage-panel .table,
html[data-theme="dark"] .lf-manage-panel code,
html[data-theme="dark"] .lf-manage-panel .recovery-code {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-manage-panel .form-control,
html[data-theme="dark"] .lf-manage-panel .form-select {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-manage-panel .form-control:focus,
html[data-theme="dark"] .lf-manage-panel .form-select:focus {
    background: var(--dk-surface);
}
html[data-theme="dark"] .lf-manage-panel code,
html[data-theme="dark"] .lf-manage-panel .recovery-code {
    background: rgba(255,255,255,.06);
}

@media (max-width: 900px) {
    .lf-manage-grid {
        grid-template-columns: 1fr;
    }
    .lf-manage-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .lf-manage-panel {
        padding: 18px;
    }
    .lf-manage-nav {
        grid-template-columns: 1fr;
    }
}

/* Public blog */
.lf-public-blog-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(16,185,129,.06), transparent 360px),
        #f7faf8;
    color: var(--text-primary, #0f172a);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.lf-public-blog-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(15,23,42,.07);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
}
.lf-public-blog-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    min-height: 66px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 18px;
}
.lf-public-blog-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #064e3b;
    text-decoration: none;
    font-size: 20px;
    font-weight: 950;
}
.lf-public-blog-brand i {
    color: var(--lf-500, #10b981);
}
.lf-public-blog-brand:hover {
    color: #064e3b;
}
.lf-public-blog-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lf-public-blog-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}
.lf-public-blog-links a:hover {
    background: rgba(16,185,129,.08);
    color: #047857;
}
.lf-public-blog-links .lf-public-blog-cta {
    margin-left: 4px;
    padding: 0 16px;
    background: #10b981;
    color: #fff;
    box-shadow: 0 10px 24px rgba(16,185,129,.22);
}
.lf-public-blog-links .lf-public-blog-cta:hover {
    background: #059669;
    color: #fff;
}
.lf-public-blog-main {
    padding: 58px 24px 72px;
}
.lf-public-blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    border-top: 1px solid rgba(15,23,42,.07);
    color: #64748b;
    font-size: 12px;
}
.lf-blog-shell,
.lf-blog-article-shell {
    max-width: 1120px;
    margin: 0 auto;
}
.lf-blog-header {
    margin-bottom: 24px;
}
.lf-blog-subtitle {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--text-secondary, #64748b);
    font-size: 15px;
}
.lf-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.lf-blog-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.lf-blog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16,185,129,.28) !important;
    box-shadow: 0 16px 42px rgba(15,23,42,.08);
}
.lf-blog-cover-link {
    display: block;
    text-decoration: none;
}
.lf-blog-cover {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(15,23,42,.06);
}
.lf-blog-placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.32), transparent 28%),
        linear-gradient(135deg, #064e3b 0%, #10b981 58%, #a7f3d0 100%);
    color: rgba(255,255,255,.9);
    font-size: 34px;
}
.lf-blog-card-body {
    padding: 18px;
}
.lf-blog-meta,
.lf-blog-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--text-tertiary, #94a3b8);
    font-size: 12px;
    font-weight: 750;
}
.lf-blog-meta span:not(:last-child)::after,
.lf-blog-byline span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 12px;
    border-radius: 50%;
    background: rgba(148,163,184,.55);
    vertical-align: middle;
}
.lf-blog-card h2 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: 0;
}
.lf-blog-card h2 a {
    color: var(--text-primary, #0f172a);
    text-decoration: none;
}
.lf-blog-card h2 a:hover {
    color: var(--lf-700, #047857);
}
.lf-blog-card p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    line-height: 1.6;
}
.lf-blog-empty {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 280px;
    padding: 36px;
    text-align: center;
}
.lf-blog-empty i {
    color: var(--lf-500, #10b981);
    font-size: 30px;
}
.lf-blog-empty h2 {
    margin: 0;
    color: var(--text-primary, #0f172a);
    font-size: 18px;
    font-weight: 900;
}
.lf-blog-article-shell {
    max-width: 860px;
}
.lf-blog-crumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--text-tertiary, #94a3b8);
    font-size: 12px;
    font-weight: 800;
}
.lf-blog-crumb a {
    color: var(--lf-700, #047857);
    text-decoration: none;
}
.lf-blog-crumb i {
    font-size: 10px;
}
.lf-blog-crumb span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lf-blog-article-head {
    margin-bottom: 22px;
}
.lf-blog-article-head h1 {
    max-width: 820px;
    margin: 8px 0 12px;
    color: var(--text-primary, #0f172a);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: 0;
}
.lf-blog-article-cover {
    width: 100%;
    max-height: 440px;
    margin-bottom: 18px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.07);
}
.lf-blog-article {
    padding: 34px;
    color: var(--text-secondary, #334155);
    font-size: 16px;
    line-height: 1.82;
}
.lf-blog-article h2 {
    margin: 32px 0 12px;
    color: var(--text-primary, #0f172a);
    font-size: 22px;
    font-weight: 900;
}
.lf-blog-article p {
    margin: 0 0 18px;
}
.lf-blog-article ol {
    padding-left: 22px;
}
.lf-blog-article li {
    margin-bottom: 12px;
}
.lf-blog-article pre {
    overflow-x: auto;
    margin: 18px 0;
    padding: 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #d1fae5;
    font-size: 13px;
}
.lf-blog-article code {
    font-family: "JetBrains Mono", Consolas, monospace;
}
.lf-blog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(16,185,129,.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.03));
}
.lf-blog-cta span {
    display: block;
    color: var(--text-secondary, #64748b);
    font-size: 12px;
    font-weight: 800;
}
.lf-blog-cta strong {
    display: block;
    color: var(--text-primary, #0f172a);
    font-size: 17px;
    font-weight: 950;
}

html[data-theme="dark"] .lf-blog-card,
html[data-theme="dark"] .lf-blog-empty,
html[data-theme="dark"] .lf-blog-article {
    background: var(--dk-surface);
    border-color: var(--dk-border) !important;
}
html[data-theme="dark"] .lf-blog-subtitle,
html[data-theme="dark"] .lf-blog-card p,
html[data-theme="dark"] .lf-blog-article,
html[data-theme="dark"] .lf-blog-cta span {
    color: var(--dk-text-sub);
}
html[data-theme="dark"] .lf-blog-card h2 a,
html[data-theme="dark"] .lf-blog-empty h2,
html[data-theme="dark"] .lf-blog-article-head h1,
html[data-theme="dark"] .lf-blog-article h2,
html[data-theme="dark"] .lf-blog-cta strong {
    color: var(--dk-text);
}
html[data-theme="dark"] .lf-blog-cta {
    background: linear-gradient(135deg, rgba(16,185,129,.13), rgba(16,185,129,.035));
    border-color: rgba(16,185,129,.2);
}

@media (max-width: 900px) {
    .lf-blog-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 767px) {
    .lf-public-blog-nav-inner {
        min-height: 60px;
        padding: 0 16px;
    }
    .lf-public-blog-links {
        gap: 2px;
    }
    .lf-public-blog-links a {
        padding: 0 8px;
        font-size: 12px;
    }
    .lf-public-blog-links a:nth-child(3) {
        display: none;
    }
    .lf-public-blog-main {
        padding: 34px 16px 58px;
    }
    .lf-public-blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 20px 16px;
    }
    .lf-blog-card-body,
    .lf-blog-article {
        padding: 18px;
    }
    .lf-blog-article-head h1 {
        font-size: 34px;
        line-height: 1.08;
    }
    .lf-blog-cta {
        align-items: stretch;
        flex-direction: column;
    }
    .lf-blog-cta .lf-tool-btn {
        width: 100%;
        justify-content: center;
    }
}

.lf-tool-btn.lf-tool-btn--autopilot {
    border-color: rgba(20, 184, 166, .32);
    background: linear-gradient(135deg, rgba(16, 185, 129, .11), rgba(14, 165, 233, .09));
    color: #0f766e;
}

.lf-tool-btn.lf-tool-btn--autopilot:hover {
    border-color: rgba(20, 184, 166, .48);
    color: #0f766e;
}
