/* Navigation */
.navbar, .navbar-app {
    background: rgba(0, 42, 36, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(1, 249, 196, 0.1);
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.2s;
    text-transform: uppercase;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-brand img {
    height: 28px;
    width: auto;
}

.nav-brand-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 300;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--light-green);
}

/* Buttons */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-hero,
.btn-text,
.btn-sm,
.btn-action,
.btn-accent,
.btn-edit,
.btn-icon,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 36px;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
    box-sizing: border-box;
}

.btn svg,
.btn-primary svg,
.btn-secondary svg,
.btn-danger svg,
.btn-hero svg,
.btn-text svg,
.btn-sm svg,
.btn-action svg,
.btn-accent svg,
.btn-edit svg,
.btn-icon svg,
.btn-ghost svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* `[hidden]` would normally hide the element, but the `display: inline-flex`
   rule above wins on specificity. Without this re-override, any button that
   uses one of these shared classes ignores its `hidden` attribute (e.g. the
   review-mode-only Discard / Save edits buttons rendering in regular
   Compose). Scoped here so the fix applies app-wide. */
.btn-primary[hidden],
.btn-secondary[hidden],
.btn-danger[hidden],
.btn-hero[hidden],
.btn-text[hidden],
.btn-sm[hidden],
.btn-action[hidden],
.btn-accent[hidden],
.btn-edit[hidden],
.btn-icon[hidden],
.btn-ghost[hidden] {
    display: none;
}

.btn-primary,
.btn-action,
.btn-edit {
    background: var(--dark-green);
    color: var(--white);
    border-color: var(--dark-green);
}

.btn-primary:hover,
.btn-action:hover,
.btn-edit:hover {
    background: var(--dark-green-hover);
    border-color: var(--dark-green-hover);
    box-shadow: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-accent {
    background: var(--action-orange);
    color: var(--white);
    border-color: var(--action-orange);
}

.btn-accent:hover,
.btn-hero:hover {
    background: var(--action-orange-hover);
    border-color: var(--action-orange-hover);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(246, 81, 29, 0.25);
}

.btn-danger {
    background: var(--white);
    color: var(--red-600);
    border-color: rgba(220, 38, 38, 0.28);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.45);
}

.btn-danger.btn-solid,
.btn-danger.solid {
    background: var(--red-600);
    color: var(--white);
    border-color: var(--red-600);
}

.btn-danger.btn-solid:hover,
.btn-danger.solid:hover {
    background: var(--red-700);
    border-color: var(--red-700);
}

.btn-hero {
    background: var(--action-orange);
    color: var(--white);
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 20px 40px -10px rgba(246, 81, 29, 0.3);
}

.btn-hero:hover {
    background: var(--action-orange-hover);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 30px 60px -10px rgba(246, 81, 29, 0.5);
}

.btn-text {
    background: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    font-weight: 300;
}

.btn-text:hover {
    color: var(--white);
}

.btn-logout {
    background: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    font-weight: 300;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: var(--white);
}

.btn-edit {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-icon {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    background: var(--white);
    color: var(--gray-500);
    border-color: var(--gray-200);
}

.btn-icon:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.btn-icon.danger:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.3);
    color: var(--red-600);
}
.btn-icon .ip-copied-icon { display: none; }
.btn-icon.ip-copy-btn--copied {
    color: var(--dark-green);
    border-color: var(--dark-green-ring);
    background: var(--dark-green-tint);
}
.btn-icon.ip-copy-btn--copied .ip-copy-icon { display: none; }
.btn-icon.ip-copy-btn--copied .ip-copied-icon { display: block; }

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    min-height: 32px;
    font-size: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   APP TOPBAR
   White 56px bar with title on the left and actions on the right. The single
   canonical shape behind .cl-topbar, .cp-topbar, .wz-topbar, .adm-topbar,
   .qad-topbar, .tmp-topbar, .ip-topbar, .lib-topbar, .inv-topbar,
   .dash-topbar, .afb-topbar, .ael-topbar, .aip-topbar, .gen-detail-topbar,
   and .gen-tryout-topbar. The DE client dashboard keeps its own topbar
   (.dec-topbar) because it has a different shape. Page sheets may extend
   with deltas only.
   See module-headers.mdc.
   ───────────────────────────────────────────────────────────────────────── */
.app-topbar,
.cl-topbar,
.cp-topbar,
.wz-topbar,
.adm-topbar,
.qad-topbar,
.tmp-topbar,
.ip-topbar,
.lib-topbar,
.inv-topbar,
.dash-topbar,
.afb-topbar,
.ael-topbar,
.aip-topbar,
.gen-detail-topbar,
.gen-tryout-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--topbar-padding-x);
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.app-topbar-left,
.cl-topbar-left,
.cp-topbar-left,
.wz-topbar-left,
.adm-topbar-left,
.qad-topbar-left,
.tmp-topbar-left,
.ip-topbar-left,
.lib-topbar-left,
.inv-topbar-left,
.dash-topbar-left,
.afb-topbar-left,
.ael-topbar-left,
.aip-topbar-left,
.gen-detail-topbar-left,
.gen-tryout-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-topbar-right,
.cl-topbar-right,
.cp-topbar-right,
.wz-topbar-right,
.adm-topbar-right,
.dash-topbar-right,
.afb-topbar-right,
.ael-topbar-right,
.gen-detail-topbar-right,
.gen-tryout-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-topbar-title,
.cl-topbar-title,
.cp-topbar-title,
.wz-topbar-title,
.adm-topbar-title,
.qad-topbar-title,
.tmp-topbar-title,
.ip-topbar-title,
.lib-topbar-title,
.aip-topbar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    line-height: 1.2;
}

.app-topbar-title svg,
.cl-topbar-title svg,
.cp-topbar-title svg,
.wz-topbar-title svg,
.adm-topbar-title svg,
.qad-topbar-title svg,
.tmp-topbar-title svg,
.ip-topbar-title svg,
.lib-topbar-title svg,
.aip-topbar-title svg {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Subtitle slot underneath the title (used in cp-/wz-/dash-/user-settings). */
.app-topbar-sub,
.cp-topbar-sub,
.wz-topbar-sub,
.dash-topbar-subtitle {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--gray-500);
    line-height: 1.3;
}

/* Count/Tag chip next to the title. */
.app-topbar-count,
.cl-topbar-count {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--dark-green-tint);
    color: var(--dark-green);
    flex-shrink: 0;
}

.app-topbar-tag,
.cl-topbar-tag,
.inv-topbar-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--action-orange);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--action-orange-tint);
    border: 1px solid var(--action-orange-ring);
}

@media (max-width: 900px) {
    .app-topbar,
    .cl-topbar,
    .cp-topbar,
    .wz-topbar,
    .adm-topbar,
    .qad-topbar,
    .tmp-topbar,
    .ip-topbar,
    .lib-topbar,
    .inv-topbar,
    .dash-topbar,
    .afb-topbar,
    .ael-topbar,
    .aip-topbar {
        padding: 0.75rem 1rem;
        min-height: 52px;
        height: auto;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .app-topbar-left,
    .cl-topbar-left {
        flex: 1;
        min-width: 0;
    }
    .app-topbar-title,
    .cl-topbar-title,
    .cp-topbar-title,
    .wz-topbar-title,
    .adm-topbar-title,
    .qad-topbar-title,
    .tmp-topbar-title,
    .ip-topbar-title,
    .lib-topbar-title,
    .aip-topbar-title {
        font-size: 1rem;
    }
    .app-topbar-tag,
    .cl-topbar-tag,
    .inv-topbar-tag {
        flex-shrink: 0;
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   APP PROFILE CARD
   Identity card that opens the left column of a LEXR record page (individual
   profile, company dashboard): brand cover band, overlapping avatar, name,
   one meta line, status tags, and a stat strip.

   It carries identity, status and at-a-glance counts only. Field-by-field
   data stays in the Overview panel underneath, so the two never repeat each
   other. A fact belongs here when it is a headline (status, jurisdiction) or
   a roll-up of a list rendered elsewhere on the page (counts).
   ───────────────────────────────────────────────────────────────────────── */
.app-profile-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-profile-glow);
    overflow: hidden;
}

/* Identity lives in the brand cover; stats stay on white underneath. */
.app-profile-cover {
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(1, 249, 196, 0.28) 0%, transparent 55%),
        radial-gradient(80% 120% at 0% 100%, rgba(47, 123, 240, 0.18) 0%, transparent 50%),
        linear-gradient(125deg, var(--dark-green) 0%, var(--dark-green-mid) 48%, var(--dark-green-lighter) 100%);
}

.app-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.app-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    background: var(--gray-400);
    color: var(--white);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    overflow: hidden;
}

.app-profile-identity {
    min-width: 0;
    flex: 1;
}

.app-profile-name {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--white);
    word-break: break-word;
}

.app-profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.3125rem 0 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
}
.app-profile-meta a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    text-decoration: none;
}
.app-profile-meta a:hover {
    color: var(--white);
    text-decoration: underline;
}
.app-profile-meta-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}
.app-profile-meta-flag .gen-lc-flag-icon {
    display: block;
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.app-profile-meta-flag .gen-lc-flag-icon--square { width: 13px; }
.app-profile-meta-flag .gen-lc-flag-icon--globe {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.78);
    box-shadow: none;
}

.app-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    flex-shrink: 0;
    justify-content: flex-end;
}
.app-profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25;
}
.app-profile-tag svg { width: 12px; height: 12px; flex-shrink: 0; }
.app-profile-view-form { margin: 0; display: inline-flex; }
button.app-profile-tag--action {
    margin: 0;
    padding: 0.1875rem 0.5rem;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
button.app-profile-tag--action svg {
    width: 11px;
    height: 11px;
}
button.app-profile-tag--action:hover {
    filter: brightness(1.08);
}
button.app-profile-tag--ok.app-profile-tag--action:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
}
.app-profile-tag--ok {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--white);
}
.app-profile-tag--soft {
    background: rgba(255, 255, 255, 0.92);
    border-color: transparent;
    color: var(--gray-700);
}
.app-profile-tag--danger {
    background: var(--red-600);
    border-color: var(--red-600);
    color: var(--white);
}
.app-profile-tag--accent {
    background: var(--action-orange);
    border-color: var(--action-orange);
    color: var(--white);
}
.app-profile-tag--warn {
    background: rgba(255, 255, 255, 0.92);
    border-color: transparent;
    color: var(--warning);
}

/* 1px grid gaps double as the cell separators, so wrapped rows stay ruled. */
.app-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1px;
    margin: 0;
    padding-top: 1px;
    background: var(--gray-100);
}
.app-profile-stat {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.1875rem;
    min-width: 0;
    padding: 0.8125rem 1.125rem;
    background: var(--white);
}
.app-profile-stat dt {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
}
.app-profile-stat dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gray-900);
}
.app-profile-stat dd.app-profile-stat-pending { color: var(--gray-400); }

@media (max-width: 900px) {
    .app-profile-head { padding: 1.125rem 1.25rem; }
    .app-profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 0.9375rem;
    }
    .app-profile-name { font-size: 1.125rem; }
    .app-profile-stat { padding: 0.75rem 1rem; }
}

/* ─────────────────────────────────────────────────────────────────────────
   APP TABLE
   Light desktop table with hover and a mobile card-stack collapse.
   Canonical shape for list tables. Variants: .cl-table (companies,
   individuals, vqf), .adm-table (admin). Denser admin tables (afb / ael /
   aip) keep their own definitions because they have very different spacing.
   ───────────────────────────────────────────────────────────────────────── */
.app-table-wrap,
.cl-table-wrap,
.adm-table-wrap {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.app-table,
.cl-table,
.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.app-table th,
.cl-table th,
.adm-table th {
    text-align: left;
    padding: 0.875rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.app-table td,
.cl-table td,
.adm-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.app-table tr:last-child td,
.cl-table tr:last-child td,
.adm-table tr:last-child td {
    border-bottom: none;
}

.app-table tr:hover td,
.cl-table tr:hover td,
.adm-table tr:hover td {
    background: var(--gray-50);
}

@media (max-width: 900px) {
    .app-table-wrap,
    .cl-table-wrap,
    .adm-table-wrap {
        overflow: visible;
        border-radius: 12px;
        border: none;
        background: transparent;
    }
    .app-table thead,
    .cl-table thead,
    .adm-table thead { display: none; }
    .app-table, .app-table tbody, .app-table tr, .app-table td,
    .cl-table, .cl-table tbody, .cl-table tr, .cl-table td,
    .adm-table, .adm-table tbody, .adm-table tr, .adm-table td {
        display: block;
    }
    .app-table tr,
    .cl-table tr,
    .adm-table tr {
        border: 1px solid var(--gray-200);
        border-radius: 12px;
        margin-bottom: 0.75rem;
        padding: 1rem;
        background: var(--white);
    }
    .app-table td,
    .cl-table td,
    .adm-table td {
        padding: 0.375rem 0;
        border-bottom: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   APP SEARCH
   White rounded input with the magnifying-glass icon embedded as a data URI.
   Canonical shape behind .cl-search and other list-page search inputs.
   ───────────────────────────────────────────────────────────────────────── */
.app-search-wrap,
.cl-search-wrap {
    margin-bottom: 1rem;
}

.app-search,
.cl-search {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 300;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z'/%3E%3C/svg%3E") 0.75rem center / 16px 16px no-repeat;
    box-sizing: border-box;
    color: var(--gray-900);
}

.app-search:focus,
.cl-search:focus {
    outline: none;
    border-color: var(--dark-green);
    box-shadow: 0 0 0 3px var(--dark-green-tint);
}

.app-search::placeholder,
.cl-search::placeholder {
    color: var(--gray-400);
}

/* ─────────────────────────────────────────────────────────────────────────
   APP EMPTY STATE
   Used when a list/table is empty. Variants: .cl-no-results, .tm-empty,
   .gen-lc-empty, .gen-md-empty, .notify-empty, .vqf-empty.
   ───────────────────────────────────────────────────────────────────────── */
.app-empty,
.cl-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Placeholder rows for .cl-table bodies that hydrate from an API, so a list
   never paints as empty before its rows arrive. Shared by the companies and
   individuals lists. */
.cl-skeleton-row > td {
    padding: 1rem 1.25rem;
}
.cl-skeleton-bar {
    display: block;
    height: 0.9rem;
    width: 38%;
    border-radius: 4px;
    background: linear-gradient(90deg,
        var(--gray-50) 0%,
        var(--gray-100) 50%,
        var(--gray-50) 100%);
    background-size: 400% 100%;
    animation: clSkeletonShimmer 1.4s ease-in-out infinite;
}
.cl-skeleton-row:nth-child(even) .cl-skeleton-bar { width: 52%; }
@keyframes clSkeletonShimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}
@media (prefers-reduced-motion: reduce) {
    .cl-skeleton-bar { animation: none; }
}

.app-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-empty-icon svg { width: 28px; height: 28px; }

.app-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 0 0 0.25rem;
}

.app-empty-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin: 0;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row .form-group {
    min-width: 0;
}

.form-row .form-group input {
    width: 100%;
    min-width: 0;
}

.form-group label {
    font-weight: 300;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.form-group input, .form-group select {
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 300;
    transition: all 0.2s;
    background: var(--white);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--light-green);
    box-shadow: 0 0 0 4px rgba(1, 249, 196, 0.1);
}

/* Dashboard */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 80px);
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 700;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    font-weight: 300;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.company-overview-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 81, 29, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    position: relative;
}

.company-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.company-overview-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.25rem;
}

.company-overview-title p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.company-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.company-overview-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.company-overview-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 300;
}

.company-overview-value {
    font-size: 1.125rem;
    color: var(--gray-900);
    font-weight: 300;
}

.document-automation-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 81, 29, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    position: relative;
}

.document-automation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.document-automation-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-green);
    margin: 0;
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 300;
}

.powered-by-badge {
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    color: var(--dark-green);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* LEXR Standard Certification Card */
.certification-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 81, 29, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.certification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.certification-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.certification-header p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    font-weight: 300;
}

.certification-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.certification-tier {
    position: relative;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.certification-tier:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.15);
}

.tier-free {
    border-color: var(--gray-300);
}

.tier-premium {
    border-color: var(--light-green);
    background: linear-gradient(135deg, rgba(1, 249, 196, 0.05) 0%, var(--white) 100%);
}

.tier-premium:hover {
    border-color: var(--light-green-darker);
    box-shadow: 0 8px 24px -4px rgba(1, 249, 196, 0.3);
}

.tier-expert {
    border-color: var(--action-orange);
    background: linear-gradient(135deg, rgba(246, 81, 29, 0.05) 0%, var(--white) 100%);
}

.tier-expert:hover {
    border-color: var(--action-orange-hover);
    box-shadow: 0 8px 24px -4px rgba(246, 81, 29, 0.3);
}

.tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tier-badge-free {
    background: var(--gray-200);
    color: var(--gray-700);
}

.tier-badge-premium {
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    color: var(--dark-green);
    box-shadow: 0 4px 12px -2px rgba(1, 249, 196, 0.4);
}

.tier-badge-expert {
    background: linear-gradient(135deg, var(--action-orange) 0%, var(--action-orange-hover) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px -2px rgba(246, 81, 29, 0.4);
}

.certification-tier h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.tier-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.tier-features {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.tier-features li {
    font-size: 0.8125rem;
    color: var(--gray-700);
    font-weight: 300;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.tier-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--dark-green);
    font-weight: 700;
}

.tier-premium .tier-features li::before {
    color: var(--light-green-darker);
}

.tier-expert .tier-features li::before {
    color: var(--action-orange);
}

.btn-tier {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    border: none;
    cursor: pointer;
    margin-top: auto;
}

.btn-tier-free {
    background: var(--gray-900);
    color: var(--white);
}

.btn-tier-free:hover {
    background: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.btn-tier-premium {
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    color: var(--dark-green);
}

.btn-tier-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(1, 249, 196, 0.5);
}

.btn-tier-expert {
    background: linear-gradient(135deg, var(--action-orange) 0%, var(--action-orange-hover) 100%);
    color: var(--white);
}

.btn-tier-expert:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(246, 81, 29, 0.5);
}

@media (max-width: 768px) {
    .certification-tiers {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .certification-tier {
        padding: 1.5rem;
    }
    
    .tier-badge {
        right: 1rem;
        left: auto;
        transform: none;
    }
}

.document-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-900);
    transition: all 0.3s;
}

.document-link:hover {
    border-color: var(--light-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.document-link-icon {
    width: 40px;
    height: 40px;
    background: var(--light-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-link-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--dark-green);
}

.document-link-text {
    flex: 1;
    font-weight: 300;
    font-size: 0.9375rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 81, 29, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    position: relative;
}

.card:hover {
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    border-color: rgba(246, 81, 29, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-green);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: var(--light-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 300;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-green);
    line-height: 1.2;
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.company-info-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.company-info-item:last-child {
    border-bottom: none;
}

.company-info-label {
    color: var(--gray-500);
    font-size: 0.9375rem;
    font-weight: 300;
}

.company-info-value {
    color: var(--gray-900);
    font-weight: 300;
    text-align: right;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.98);
    color: var(--dark-green);
    padding: 4rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(1, 249, 196, 0.3);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(1, 249, 196, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
}

.welcome-card p {
    margin-bottom: 2.5rem;
    opacity: 0.8;
    font-size: 1.125rem;
    font-weight: 300;
    position: relative;
    color: var(--gray-700);
}

/* Company Profile */
.zefix-search {
    margin-bottom: 2.5rem;
    position: relative;
}

.zefix-search-group {
    display: flex;
    gap: 1rem;
    position: relative;
}

.zefix-search-group input {
    flex: 1;
}

.zefix-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.zefix-autocomplete.active {
    display: block;
}

.zefix-autocomplete-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s;
    user-select: none;
}

.zefix-autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.zefix-autocomplete-item:hover {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-left: 3px solid var(--light-green);
    padding-left: calc(1.25rem - 3px);
}

.zefix-autocomplete-item.loading {
    text-align: center;
    color: var(--gray-500);
    cursor: default;
    padding: 1.5rem;
}

.zefix-autocomplete-item.loading:hover {
    background: white;
    border-left: none;
    padding-left: 1.25rem;
}

.zefix-company-name {
    font-weight: 300;
    color: var(--gray-900);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.zefix-company-name strong {
    font-weight: 700;
}

.zefix-company-details {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.helper-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
    font-weight: 300;
}

/* Shared section headings for questionnaires (centered with lines) */
.ws-title,
.inv-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.ws-title::before,
.ws-title::after,
.inv-section-title::before,
.inv-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-100);
}
.ws-title > span,
.inv-section-title > span {
    position: relative;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 122, 85, 0.12);
    color: var(--dark-green);
}

/* User Profile Dropdown */
.user-profile {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-profile-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.user-profile-name {
    color: var(--white);
    font-weight: 300;
    font-size: 0.9375rem;
}

.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(1, 249, 196, 0.2);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.user-profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-profile-card {
    padding: 1.5rem;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.user-profile-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-profile-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.25rem;
}

.user-profile-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 300;
}

.user-profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-profile-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 300;
}

.user-profile-value {
    font-size: 0.9375rem;
    color: var(--gray-900);
    font-weight: 300;
}

.user-profile-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    color: var(--dark-green);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-profile-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.user-profile-actions a {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.2s;
    font-weight: 300;
}

.user-profile-actions a:hover {
    background: var(--gray-50);
    color: var(--dark-green);
}

.user-profile-actions a:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.user-profile-actions a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-profile-actions a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Settings Page */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 81, 29, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
}

.emoji-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.emoji-suggestions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.emoji-option {
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
}

.emoji-option:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

.role-display {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 300;
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--action-orange);
    border: 1px solid var(--action-orange-hover);
    color: var(--white);
}

.alert-error {
    background: #c53030;
    border: 1px solid #9b2c2c;
    color: var(--white);
}

/* Document Automation Description */
.document-automation-description {
    color: var(--gray-600);
    font-size: 1.0625rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* LEXR Standard Tooltip (display:grid version) */
.lexr-standard-label {
    position: relative;
    cursor: pointer;
    border-bottom: 2px dashed var(--light-green-darker);
    transition: all 0.2s;
    padding-bottom: 1px;
}

.lexr-standard-label:hover {
    color: var(--light-green-darker);
    border-bottom-color: var(--light-green);
}

.lexr-standard-label::after {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--light-green-darker) 100%);
    color: var(--dark-green);
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-left: 0.375rem;
    vertical-align: super;
    line-height: 1;
    transition: all 0.2s;
}

.lexr-standard-label:hover::after {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(1, 249, 196, 0.4);
}

.lexr-standard-tooltip {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                margin 0.4s ease;
    margin-bottom: 0;
}

.lexr-standard-tooltip > .lexr-standard-tooltip-content {
    overflow: hidden;
}

.lexr-standard-tooltip.active {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-bottom: 2rem;
}

.lexr-standard-tooltip-content {
    background: linear-gradient(135deg, rgba(1, 249, 196, 0.08) 0%, rgba(1, 249, 196, 0.03) 100%);
    border: 1px solid rgba(1, 249, 196, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
}

.lexr-standard-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.lexr-standard-tooltip-header strong {
    font-weight: 700;
    color: var(--dark-green);
    font-size: 0.9375rem;
}

.lexr-standard-tooltip-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.lexr-standard-tooltip-close:hover {
    color: var(--gray-700);
}

.lexr-standard-tooltip-content p {
    color: var(--gray-700);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.lexr-standard-tooltip-content p:last-child {
    margin-bottom: 0;
}

/* Dashboard card description consistency */
.section-card-description {
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar, .navbar-app {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .dashboard-container {
        padding: 2rem 1rem;
    }

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

    .zefix-search-group {
        flex-direction: column;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }
}

/* Top-of-screen back link (see templates/trademark_profile.html, class gen-detail-back) */
.gen-detail-back,
a.gen-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    box-sizing: border-box;
}
/* inline-flex above beats the UA [hidden] rule; re-assert hide. */
.gen-detail-back[hidden],
a.gen-detail-back[hidden],
button.gen-detail-back[hidden] {
    display: none;
}
button.gen-detail-back {
    text-align: left;
}
.gen-detail-back:hover,
a.gen-detail-back:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}
.gen-detail-back svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ═══ MODAL (global) ═══ */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);z-index:10000;align-items:center;justify-content:center;opacity:0;transition:opacity .25s ease}
.modal-overlay.open{display:flex;opacity:1}
.modal-box{position:relative;background:#fff;border-radius:16px;padding:2rem;max-width:420px;width:90%;box-shadow:0 20px 60px rgba(0,0,0,.25);text-align:center;transform:scale(.96);transition:transform .25s ease}
.modal-overlay.open .modal-box{transform:scale(1)}
/* Top-right dismiss control. Required on every dismissible popup; omit only on
   forced-choice / blocking dialogs (delete confirms, password setup, progress). */
.modal-close{
    position:absolute;top:.75rem;right:.75rem;z-index:2;
    display:inline-flex;align-items:center;justify-content:center;
    width:32px;height:32px;padding:0;border:none;border-radius:8px;
    background:transparent;color:var(--gray-400);cursor:pointer;
    transition:background .15s,color .15s;
}
/* inline-flex above beats the UA [hidden] rule; re-assert hide. */
.modal-close[hidden]{display:none}
.modal-close:hover{background:var(--gray-100);color:var(--gray-900)}
.modal-close:focus-visible{outline:2px solid var(--dark-green);outline-offset:2px}
.modal-close svg{width:18px;height:18px;flex-shrink:0}
.modal-close--in-header{position:static;margin-left:auto;flex-shrink:0}
.modal-box:has(> .modal-close) > .modal-title,
.modal-box:has(> .modal-close) > .dec-ir-modal-head{padding-right:2.25rem}
.modal-icon{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 1rem}
.modal-icon.warn{background:rgba(246,81,29,.1)}
.modal-icon.danger{background:rgba(239,68,68,.1)}
.modal-icon.success,.modal-icon-success{background:rgba(5,150,105,.12);color:#059669}
.modal-icon.danger{color:var(--red-600)}
.modal-title{font-size:1.125rem;font-weight:700;color:var(--gray-900);margin-bottom:.375rem}
.modal-desc{font-size:.8125rem;color:var(--gray-500);margin-bottom:1.25rem}
.modal-acts{display:flex;gap:.75rem;justify-content:center;margin-top:.5rem}
.modal-acts .btn-leave-stay{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;background:var(--dark-green);color:#fff;border:1px solid var(--dark-green);padding:.5rem 1.25rem;min-height:36px;border-radius:100px;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.modal-acts .btn-leave-stay:hover{background:var(--dark-green-hover)}
.modal-acts .btn-leave-go{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;background:#fff;color:var(--gray-700);border:1px solid var(--gray-300);padding:.5rem 1.25rem;min-height:36px;border-radius:100px;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.modal-acts .btn-leave-go:hover{background:var(--gray-50);border-color:var(--gray-400)}
.modal-acts .btn-leave-danger{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;background:var(--red-600);color:#fff;border:1px solid var(--red-600);padding:.5rem 1.25rem;min-height:36px;border-radius:100px;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s}
.modal-acts .btn-leave-danger:hover{background:var(--red-700)}
/* Form modal: multi-field dialogs (add/edit). Default .modal-box is centered copy; use this when the body is a form. */
.modal-box--form{text-align:left;box-sizing:border-box;max-width:min(520px,calc(100vw - 2rem));min-width:0}
.modal-box--form .modal-title,.modal-box--form .modal-desc{text-align:left}
.modal-box--form .modal-icon{margin-left:0;margin-right:auto}
.modal-box--form .modal-acts{justify-content:flex-end;flex-wrap:wrap}
.modal-box--form input,.modal-box--form select,.modal-box--form textarea{width:100%;max-width:100%;box-sizing:border-box;min-width:0}
.modal-box--form .modal-form-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;min-width:0}
.modal-box--form .modal-form-grid-2>*{min-width:0}

.edit-company-modal{
    max-width:min(640px,calc(100vw - 2rem));
    max-height:calc(100vh - 2rem);
    overflow-y:auto;
}
/* Currency prefix inputs (same pattern as generators .wf-chf). */
.edit-company-modal .wf-chf{
    display:flex;
    border:1px solid var(--gray-300);
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    transition:border-color .2s,box-shadow .2s;
    height:38px;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    min-width:0;
}
.edit-company-modal .wf-chf:focus-within{
    border-color:var(--dark-green);
    box-shadow:0 0 0 3px var(--dark-green-ring);
}
.edit-company-modal .wf-chf-pre{
    padding:0 .75rem;
    background:var(--gray-50);
    font-size:.75rem;
    font-weight:700;
    color:var(--gray-500);
    border-right:1px solid var(--gray-200);
    display:flex;
    align-items:center;
    flex-shrink:0;
}
.edit-company-modal .wf-chf input{
    border:none;
    flex:1;
    min-width:0;
    padding:0 .75rem;
    font-size:.875rem;
    font-weight:300;
    color:var(--gray-900);
    outline:0;
    background:transparent;
    height:100%;
    box-sizing:border-box;
}
.edit-company-modal .wf-chf input:focus{
    outline:none;
    box-shadow:none;
}
.edit-company-modal .ind-form-field textarea{
    width:100%;
    box-sizing:border-box;
    min-width:0;
    padding:.5rem .75rem;
    border:1px solid var(--gray-300);
    border-radius:8px;
    font-size:.875rem;
    font-weight:300;
    color:var(--gray-900);
    background:#fff;
    resize:vertical;
    min-height:4.5rem;
    font-family:inherit;
}
.edit-company-modal .ind-form-field textarea:focus{
    outline:none;
    border-color:var(--dark-green);
    box-shadow:0 0 0 3px var(--dark-green-ring);
}
.edit-company-modal .ind-form-err:not(.hidden){
    display:block;
    margin-top:.25rem;
}
.edit-company-zefix{
    margin:0 0 1.1rem;
}
.edit-company-zefix.hidden{display:none}
.edit-company-zefix .tmp-btn-primary{width:100%;justify-content:flex-start}

/* Primary sync button (Trademark Lifecycle + company Zefix). */
.tmp-btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:0.4rem;
    border-radius:10px;
    font-weight:600;
    font-size:0.82rem;
    padding:0.62rem 0.95rem;
    cursor:pointer;
    transition:transform 120ms ease,box-shadow 120ms ease,background 120ms ease,border-color 120ms ease;
    border:1px solid transparent;
    line-height:1;
    background:linear-gradient(135deg,var(--dark-green) 0%,#0f766e 100%);
    color:#fff;
    box-shadow:0 12px 28px rgba(0,42,36,0.18);
}
.tmp-btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 16px 36px rgba(0,42,36,0.22);
}
.tmp-btn-primary svg{
    flex-shrink:0;
    width:14px;
    height:14px;
}
.edit-company-danger{
    margin-top:1.25rem;
    padding-top:1.25rem;
    border-top:1px solid var(--gray-200);
}
.edit-company-danger-title{
    font-size:.75rem;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:var(--red-600);
    margin-bottom:.35rem;
}
.edit-company-danger-text{
    margin:0 0 .75rem;
    font-size:.8125rem;
    color:var(--gray-600);
    line-height:1.45;
}

/* Type / category pills — generator list, issues, Germany counsel badges. */
.gen-lc-type-chip,
.gen-issue-type,
.gen-issue-admin-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
    white-space: nowrap;
    line-height: 1.2;
    border: none;
}
.gen-lc-type-chip--corporate {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}
.gen-lc-type-chip--contracts {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}
.gen-lc-type-chip--other {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Shared modal form field layout (used in Add Individual, Initiate Incorporation, etc.) */
.ind-form-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;min-width:0}
.ind-form-field{display:flex;flex-direction:column;gap:.375rem;margin-bottom:.75rem;min-width:0}
.ind-form-field label{font-size:.75rem;font-weight:600;color:var(--gray-500);text-transform:uppercase;letter-spacing:.5px;text-align:left}
.ind-form-field input,.ind-form-field select{width:100%;box-sizing:border-box;min-width:0;padding:.5rem .75rem;border:1px solid var(--gray-300);border-radius:8px;font-size:.875rem;font-weight:300;color:var(--gray-900);background:#fff}
.ind-form-field input:focus,.ind-form-field select:focus{outline:none;border-color:var(--dark-green);box-shadow:0 0 0 3px rgba(0,42,36,.06)}
.ind-form-err{color:var(--red-600);font-size:.8125rem;min-height:1.25rem;margin-bottom:.5rem}
@media(max-width:540px){.ind-form-row{grid-template-columns:1fr}}

/* Shared threaded comments component. Used by Projects and generator issues. */
.tk-comment-list {
    --tk-comment-text-gutter:calc(1rem + 28px + 0.625rem);
    padding:.5rem 0;
    flex:1;
    min-height:0;
    overflow-y:auto;
}
.tk-comment-empty { padding:2rem 1.25rem; font-size:.75rem; font-weight:300; color:var(--gray-400); text-align:center; display:flex; flex-direction:column; align-items:center; gap:.5rem; }
.tk-comment-empty svg { width:28px; height:28px; color:var(--gray-200); }
.tk-comment-item { display:flex; gap:.625rem; padding:.625rem 1rem; transition:background .15s; }
.tk-comment-item:hover { background:rgba(0,42,36,.015); }
.tk-comment-item--reply-target {
    position:relative;
    background:transparent;
}
.tk-comment-item--reply-target::before {
    content:'';
    position:absolute;
    left:0;
    top:.5rem;
    bottom:.5rem;
    width:2px;
    border-radius:2px;
    background:var(--dark-green);
    opacity:.55;
}
.tk-comment-avatar { width:28px; height:28px; border-radius:50%; flex-shrink:0; overflow:hidden; margin-top:1px; }
.tk-comment-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.tk-comment-avatar-fallback { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, var(--dark-green), #004d40); color:#fff; font-size:.625rem; font-weight:700; letter-spacing:.025em; }
.tk-comment-body { flex:1; min-width:0; }
.tk-comment-top { display:flex; align-items:flex-start; justify-content:space-between; gap:.5rem; margin-bottom:.125rem; }
.tk-comment-header { display:flex; align-items:baseline; gap:.375rem; flex:1; min-width:0; margin-bottom:0; }
.tk-comment-author { font-size:.6875rem; font-weight:700; color:var(--gray-800); }
.tk-comment-time { font-size:.5625rem; font-weight:400; color:var(--gray-400); }
.tk-comment-text { font-size:.75rem; font-weight:300; color:var(--gray-700); line-height:1.5; word-break:break-word; }
.tk-comment-mention { color:var(--dark-green); font-weight:700; }
.tk-comment-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:.5rem .75rem; flex-shrink:0; margin-top:0; opacity:0; transition:opacity .15s; }
.tk-comment-item:hover .tk-comment-actions { opacity:1; }
.tk-comment-reply-btn { background:none; border:none; font-size:.5625rem; font-weight:600; color:var(--gray-400); cursor:pointer; padding:0;  transition:color .15s; line-height:1.2; }
.tk-comment-reply-btn:hover { color:var(--dark-green); }
.tk-comment-reply-btn.tk-comment-del-btn:hover { color:var(--red-700); }
.tk-comment-thread { margin-left:var(--tk-comment-text-gutter); border-left:2px solid var(--gray-100); }
.tk-comment-thread:has(.tk-comment-reply-landing) { border-left-color:rgba(0,42,36,.18); }
.tk-comment-thread .tk-comment-item { padding:.5rem .75rem; }
.tk-comment-thread .tk-comment-avatar { width:22px; height:22px; }
.tk-comment-thread .tk-comment-avatar-fallback { font-size:.5rem; }
.tk-comment-thread .tk-comment-text { font-size:.6875rem; }
.tk-comment-thread .tk-comment-author { font-size:.625rem; }
.tk-comment-thread .tk-comment-time { font-size:.5rem; }
.tk-comment-thread .tk-comment-top { margin-bottom:.1rem; }
.tk-thread-toggle {
    display:flex;
    align-items:center;
    gap:.4rem;
    width:100%;
    box-sizing:border-box;
    padding:.4rem 1rem .45rem;
    padding-left:var(--tk-comment-text-gutter);
    cursor:pointer;
    border:none;
    background:transparent;
    text-align:left;
    color:var(--gray-700);
    border-radius:6px;
    transition:background .12s,color .12s;
}
.tk-thread-toggle:hover { background:var(--gray-50); color:var(--gray-900); }
.tk-thread-toggle:focus-visible { outline:2px solid var(--dark-green); outline-offset:1px; }
.tk-thread-toggle svg {
    width:11px;
    height:11px;
    flex-shrink:0;
    color:var(--gray-400);
    transition:transform .2s;
}
.tk-thread-toggle.collapsed svg { transform:rotate(-90deg); }
.tk-thread-toggle-faces {
    display:flex;
    align-items:center;
    flex-shrink:0;
    padding-right:.1rem;
}
.tk-thread-toggle-face {
    width:18px;
    height:18px;
    border-radius:50%;
    overflow:hidden;
    flex-shrink:0;
    border:2px solid #fff;
    box-sizing:content-box;
    margin-left:-7px;
    position:relative;
}
.tk-thread-toggle-face:first-child { margin-left:0; }
.tk-thread-toggle-face:nth-child(1) { z-index:1; }
.tk-thread-toggle-face:nth-child(2) { z-index:2; }
.tk-thread-toggle-face:nth-child(3) { z-index:3; }
.tk-thread-toggle-face:nth-child(4) { z-index:4; }
.tk-thread-toggle-face img { width:100%; height:100%; object-fit:cover; display:block; }
.tk-thread-toggle-face-fallback {
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--dark-green),#004d40);
    color:#fff;
    font-size:.45rem;
    font-weight:700;
    letter-spacing:.02em;
}
.tk-thread-toggle-copy {
    flex:1;
    min-width:0;
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:0 .15rem;
    font-size:.6875rem;
    font-weight:600;
    line-height:1.35;
}
.tk-thread-toggle-dot { color:var(--gray-400); font-weight:500; }
.tk-comment-add { padding:.625rem 1rem; border-top:1px solid var(--gray-100); display:flex; gap:.5rem; flex-shrink:0; align-items:center; align-self:stretch; }
.tk-comment-add-avatar { width:26px; height:26px; border-radius:50%; flex-shrink:0; overflow:hidden; }
.tk-comment-add-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.tk-comment-add-avatar-fallback { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, var(--dark-green), #004d40); color:#fff; font-size:.5625rem; font-weight:700; }
.tk-comment-input-wrap { flex:1; min-width:0; display:flex; flex-direction:column; gap:.25rem; position:relative; }
.tk-comment-reply-landing {
    display:flex;
    align-items:flex-start;
    gap:.625rem;
    padding:.55rem .75rem .7rem;
    opacity:.72;
    animation:tk-reply-landing-in .22s ease-out;
}
.tk-comment-reply-landing .tk-comment-avatar,
.tk-comment-reply-landing .sidebar-user-avatar {
    width:22px;
    height:22px;
    opacity:.7;
}
.tk-comment-reply-landing .tk-comment-avatar-fallback,
.tk-comment-reply-landing .sidebar-user-initials {
    font-size:.5rem;
}
.tk-comment-reply-landing-body {
    flex:1;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.75rem;
    min-height:22px;
}
.tk-comment-reply-landing-label {
    font-size:.6875rem;
    font-weight:500;
    color:var(--gray-500);
    letter-spacing:.01em;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.tk-comment-reply-landing-name {
    font-weight:600;
    color:var(--gray-700);
}
.tk-comment-reply-landing-cancel {
    background:none;
    border:none;
    padding:0;
    margin:0;
    font-size:.625rem;
    font-weight:600;
    color:var(--gray-400);
    cursor:pointer;
    flex-shrink:0;
    opacity:0;
    transition:color .15s,opacity .15s;
}
.tk-comment-reply-landing:hover .tk-comment-reply-landing-cancel,
.tk-comment-reply-landing:focus-within .tk-comment-reply-landing-cancel {
    opacity:1;
}
.tk-comment-reply-landing-cancel:hover { color:var(--gray-700); }
@keyframes tk-reply-landing-in {
    from { opacity:0; transform:translateY(2px); }
    to { opacity:.72; transform:none; }
}
.tk-comment-input {
    flex:1;
    width:100%;
    min-width:0;
    border:1px solid var(--gray-200);
    border-radius:8px;
    padding:.5rem .625rem;
    font-size:.75rem;
    font-weight:300;
    box-sizing:border-box;
    resize:vertical;
    min-height:34px;
    max-height:min(70vh,560px);
    line-height:1.4;
    overflow-y:auto;
}
.tk-comment-input:focus { outline:none; border-color:var(--dark-green); box-shadow:0 0 0 2px rgba(0,42,36,.06); }
.tk-comment-send.btn.tk-btn-compact { flex-shrink:0; align-self:center; }
.tk-comment-send.btn.tk-btn-compact:disabled { opacity:.4; cursor:default; }
.tk-mention-drop { display:none; position:absolute; left:0; right:0; bottom:calc(100% + .25rem); z-index:20; background:#fff; border:1px solid var(--gray-200); border-radius:10px; box-shadow:0 14px 36px rgba(15,23,42,.12); padding:.25rem; max-height:220px; overflow-y:auto; }
.tk-mention-drop.open { display:block; }
.tk-mention-opt { width:100%; display:flex; align-items:center; gap:.5rem; border:none; background:transparent; border-radius:8px; padding:.375rem .5rem; cursor:pointer;  font-size:.75rem; font-weight:600; color:var(--gray-800); text-align:left; }
.tk-mention-opt:hover { background:var(--gray-50); color:var(--dark-green); }
.tk-mention-opt .tk-comment-avatar { width:22px; height:22px; }

/* ----- AI prompt inspect modal -----------------------------------------
 *
 * Shared modal opened from the ticket panel and the inbox Respond /
 * Compose modals. Lets a LEXR user read the system prompt + rendered
 * user message that produced an AI draft, diff it against what the
 * lawyer actually sent, and leave structured feedback for prompt
 * iteration. Markup defined in templates/components/ai_prompt_inspect.html;
 * behaviour in static/js/ai_prompt_inspect.js.
 */
.ai-inspect-overlay { position:fixed; inset:0; z-index:9999; background:rgba(15,23,42,.55); display:flex; align-items:center; justify-content:center; padding:1.5rem; }
/* `display:flex` (and `display:grid` etc.) below would otherwise override
 * the `hidden` HTML attribute the JS toggles; pin every flex/grid block
 * back to `display:none` when [hidden] is present so showLoading() /
 * showError() / renderLog() can actually swap panels in and out. */
.ai-inspect-overlay[hidden],
.ai-inspect-content[hidden],
.ai-inspect-loading[hidden],
.ai-inspect-diff-grid[hidden],
.ai-inspect-diff-empty[hidden],
.ai-inspect-error[hidden],
.ai-inspect-launcher[hidden],
.ai-inspect-other-feedback[hidden],
.ai-inspect-section[hidden],
.ai-inspect-feedback-form[hidden] { display:none !important; }
.ai-inspect-section-meta {
    font-family: 'JetBrains Mono','SF Mono',Consolas,monospace;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--gray-500);
    background: #fff;
    padding: .125rem .5rem;
    border-radius: 100px;
    border: 1px solid var(--gray-200);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.ai-inspect-open { overflow:hidden; }
.ai-inspect-modal { background:#fff; border-radius:14px; width:min(960px,100%); max-height:90vh; display:flex; flex-direction:column; box-shadow:0 24px 60px rgba(15,23,42,.25); overflow:hidden; }
.ai-inspect-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1rem 1.25rem; border-bottom:1px solid var(--gray-100); flex-shrink:0; }
.ai-inspect-title-group { display:flex; flex-direction:column; gap:.125rem; min-width:0; }
.ai-inspect-title-group h2 { margin:0; font-size:1rem; font-weight:700; color:var(--gray-900); }
.ai-inspect-meta { font-size:.75rem; color:var(--gray-500); font-weight:500; word-break:break-word; }
.ai-inspect-close { background:transparent; border:none; font-size:1.5rem; line-height:1; color:var(--gray-500); cursor:pointer; padding:.125rem .375rem; border-radius:6px; }
.ai-inspect-close:hover { background:var(--gray-100); color:var(--gray-800); }
.ai-inspect-body { padding:1rem 1.25rem 1.25rem; overflow-y:auto; flex:1; }
.ai-inspect-loading { display:flex; align-items:center; gap:.5rem; padding:2rem; color:var(--gray-500); font-size:.8125rem; }
.ai-inspect-spinner { width:14px; height:14px; border:2px solid var(--gray-200); border-top-color:var(--dark-green); border-radius:50%; animation:ai-inspect-spin 0.8s linear infinite; display:inline-block; }
@keyframes ai-inspect-spin { to { transform:rotate(360deg); } }
.ai-inspect-error { padding:1rem; background:#fee2e2; color:#991b1b; border-radius:8px; font-size:.8125rem; }
.ai-inspect-content { display:flex; flex-direction:column; gap:.75rem; }
.ai-inspect-section { border:1px solid var(--gray-200); border-radius:10px; overflow:hidden; background:#fff; }
.ai-inspect-section > summary { list-style:none; padding:.625rem .875rem; background:var(--gray-50); cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:.75rem; user-select:none; }
.ai-inspect-section > summary::-webkit-details-marker { display:none; }
.ai-inspect-section[open] > summary { border-bottom:1px solid var(--gray-100); }
.ai-inspect-section-title { font-size:.75rem; font-weight:700; color:var(--gray-900); text-transform:uppercase; letter-spacing:.04em; }
.ai-inspect-section-actions { display:flex; align-items:center; gap:.5rem; }
.ai-inspect-copy { font-size:.6875rem; font-weight:700; color:var(--gray-700); background:#fff; border:1px solid var(--gray-300); border-radius:100px; padding:.25rem .625rem; cursor:pointer; }
.ai-inspect-copy:hover { background:var(--gray-100); }
.ai-inspect-pre { margin:0; padding:.75rem .875rem; max-height:320px; overflow:auto; font-family:'JetBrains Mono','SF Mono',Consolas,monospace; font-size:.75rem; line-height:1.5; color:var(--gray-800); white-space:pre-wrap; word-break:break-word; background:#fff; }
.ai-inspect-diff-summary { font-size:.6875rem; font-weight:600; color:var(--gray-600); }
.ai-inspect-diff-grid { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; padding:.5rem; }
.ai-inspect-diff-col { display:flex; flex-direction:column; min-width:0; border:1px solid var(--gray-200); border-radius:8px; overflow:hidden; }
.ai-inspect-diff-label { font-size:.625rem; font-weight:700; color:var(--gray-500); text-transform:uppercase; letter-spacing:.05em; padding:.375rem .625rem; background:var(--gray-50); border-bottom:1px solid var(--gray-100); }
.ai-inspect-diff-col .ai-inspect-pre { max-height:400px; }
.ai-inspect-diff-del { background:#fee2e2; color:#991b1b; text-decoration:line-through; padding:.05rem .15rem; border-radius:3px; }
.ai-inspect-diff-ins { background:#dcfce7; color:#166534; padding:.05rem .15rem; border-radius:3px; }
.ai-inspect-diff-empty { padding:.875rem; color:var(--gray-500); font-size:.8125rem; font-style:italic; text-align:center; }

.ai-inspect-feedback-form { padding:.875rem; display:flex; flex-direction:column; gap:.625rem; }
.ai-inspect-rating-row { display:flex; gap:.375rem; flex-wrap:wrap; }
.ai-inspect-rating { cursor:pointer; }
.ai-inspect-rating input { position:absolute; opacity:0; pointer-events:none; }
.ai-inspect-rating-pill { display:inline-block; padding:.25rem .75rem; border-radius:100px; font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; border:1px solid transparent; background:var(--gray-100); color:var(--gray-700); }
.ai-inspect-rating input:checked + .ai-inspect-rating-pill.ai-inspect-rating-good { background:#dcfce7; color:#166534; border-color:#86efac; }
.ai-inspect-rating input:checked + .ai-inspect-rating-pill.ai-inspect-rating-meh  { background:#fef3c7; color:#92400e; border-color:#fcd34d; }
.ai-inspect-rating input:checked + .ai-inspect-rating-pill.ai-inspect-rating-bad  { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
.ai-inspect-rating-pill.ai-inspect-rating-good { background:#f0fdf4; color:#166534; }
.ai-inspect-rating-pill.ai-inspect-rating-meh  { background:#fffbeb; color:#92400e; }
.ai-inspect-rating-pill.ai-inspect-rating-bad  { background:#fef2f2; color:#991b1b; }
.ai-inspect-tags-row { display:flex; flex-wrap:wrap; gap:.25rem; }
.ai-inspect-tag-chip { display:inline-flex; align-items:center; gap:.25rem; cursor:pointer; }
.ai-inspect-tag-chip input { position:absolute; opacity:0; pointer-events:none; }
.ai-inspect-tag-chip span { display:inline-block; padding:.1875rem .5rem; border-radius:100px; font-size:.6875rem; font-weight:600; background:var(--gray-100); color:var(--gray-700); border:1px solid transparent; }
.ai-inspect-tag-chip input:checked + span { background:rgba(0,42,36,.08); color:var(--dark-green); border-color:rgba(0,42,36,.2); }
.ai-inspect-notes { width:100%; min-height:64px; padding:.5rem .625rem; border:1px solid var(--gray-200); border-radius:8px; font-family:inherit; font-size:.8125rem; resize:vertical; box-sizing:border-box; line-height:1.4; }
.ai-inspect-notes:focus { outline:none; border-color:var(--dark-green); box-shadow:0 0 0 2px rgba(0,42,36,.06); }
.ai-inspect-feedback-actions { display:flex; align-items:center; justify-content:flex-end; gap:.625rem; }
.ai-inspect-feedback-status { font-size:.6875rem; color:var(--gray-500); }
.ai-inspect-feedback-submit { padding:.375rem 1rem; border-radius:100px; background:var(--dark-green); color:#fff; border:none; font-weight:700; font-size:.75rem; cursor:pointer; }
.ai-inspect-feedback-submit:hover { background:#003d33; }

.ai-inspect-other-feedback { padding:.5rem .875rem .875rem; display:flex; flex-direction:column; gap:.375rem; }
.ai-inspect-other-heading { font-size:.6875rem; font-weight:700; color:var(--gray-500); text-transform:uppercase; letter-spacing:.04em; margin-top:.25rem; }
.ai-inspect-other-card { border:1px solid var(--gray-200); border-radius:8px; padding:.5rem .625rem; background:#fff; display:flex; flex-direction:column; gap:.375rem; }
/* Author + rating sit tightly together on the left so the eye doesn't
 * have to track across the whole row; remaining space is left empty
 * rather than padding out via justify-content. */
.ai-inspect-other-head { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.ai-inspect-other-author { font-size:.75rem; font-weight:700; color:var(--gray-800); }
.ai-inspect-other-time { font-size:.625rem; color:var(--gray-400); margin-left:auto; }
.ai-inspect-other-tags { display:flex; flex-wrap:wrap; gap:.25rem; }
.ai-inspect-other-tag { display:inline-block; padding:.0625rem .375rem; border-radius:100px; background:var(--gray-100); color:var(--gray-700); font-size:.625rem; font-weight:600; }
.ai-inspect-other-notes { font-size:.75rem; color:var(--gray-700); white-space:pre-wrap; }
.ai-inspect-other-empty { padding:.75rem .25rem; font-size:.75rem; color:var(--gray-500); font-style:italic; }
/* Inline the rating pill at a smaller size when it sits inside the
 * reviewer card header so it visually pairs with the author. */
.ai-inspect-other-card .ai-inspect-rating-pill { padding:.0625rem .5rem; font-size:.625rem; }

@media (max-width: 720px) {
    .ai-inspect-diff-grid { grid-template-columns:1fr; }
}

/* One-click AI-draft rating row (static/js/ai_draft_rating.js), shown in
 * the inbox + workspace composers next to an AI draft. Quiet inline row —
 * not a banner — so it sits with the other draft actions. */
.ai-rate-host[hidden] { display:none !important; }
.ai-rate-strip { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin:0 0 .35rem; }
.ai-rate-strip-label { font-size:.8125rem; font-weight:600; color:var(--gray-600); }
.ai-rate-strip-pills { display:flex; gap:.25rem; }
.ai-rate-pill { padding:.25rem .75rem; border-radius:var(--radius-pill); font-size:.75rem; font-weight:600; cursor:pointer; border:1px solid var(--gray-200); background:#fff; color:var(--gray-700); transition:background-color .12s ease, color .12s ease, border-color .12s ease; }
.ai-rate-pill:hover { background:var(--gray-50); border-color:var(--gray-300); }
.ai-rate-pill-good.is-active { background:var(--dark-green-tint); color:var(--dark-green); border-color:var(--dark-green-ring); }
.ai-rate-pill-meh.is-active  { background:var(--warning-tint); color:var(--warning); border-color:var(--warning); }
.ai-rate-pill-bad.is-active  { background:var(--red-tint); color:var(--red-700); border-color:var(--red-ring); }
.ai-rate-strip-status { font-size:.75rem; color:var(--gray-500); }
.ai-rate-strip .btn-sm { margin-left:auto; }

/* In-context "Inspect prompt" launcher used by the ticket panel + inbox
 * draft modals. A small text link styled to fit alongside the existing
 * AI-draft block controls. */
.ai-inspect-launcher { display:inline-flex; align-items:center; gap:.25rem; background:transparent; border:none; padding:.125rem .375rem; border-radius:6px; font-size:.6875rem; font-weight:600; color:var(--gray-600); cursor:pointer; text-decoration:none; }
.ai-inspect-launcher:hover { background:var(--gray-100); color:var(--dark-green); }
.ai-inspect-launcher svg { width:12px; height:12px; }

/* Closed-ticket variant: the surrounding draft-status pill is suppressed
 * once a ticket is closed, so the bare launcher needs a little chrome of
 * its own to read as a standalone affordance instead of a stray link. */
.tp-draft-section-closed { margin-bottom:.75rem; }
.tp-draft-section-closed .ai-inspect-launcher {
    width:100%;
    padding:.5rem .75rem;
    border:1px dashed var(--gray-200);
    border-radius:8px;
    background:var(--gray-50);
    justify-content:center;
    color:var(--gray-700);
    font-size:.75rem;
}
.tp-draft-section-closed .ai-inspect-launcher:hover {
    background:rgba(0,42,36,.04);
    border-color:rgba(0,42,36,.2);
    color:var(--dark-green);
}

/* Recipient chip autocomplete dropdown — shared by inbox compose and
 * ticket panel chip inputs. Portalled to document.body and positioned
 * via JS getBoundingClientRect. */
.chip-ac-dropdown {
    position: fixed;
    z-index: 2000;
    min-width: 200px;
    max-width: 420px;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
}
.chip-ac-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.625rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    text-align: left;
    color: var(--gray-700);
    cursor: pointer;
    overflow: hidden;
    transition: background 0.1s;
}
.chip-ac-row:hover,
.chip-ac-row.is-active {
    background: var(--gray-50, #f9fafb);
    color: var(--gray-900);
}
.chip-ac-row-name {
    font-weight: 600;
    color: var(--gray-900);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chip-ac-row-email {
    color: var(--gray-500);
    font-size: 0.6875rem;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* Test company / test account badge (companies, individuals, dashboard) */
.cl-test-badge,
.cl-invited-badge {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 100px;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--warning-tint);
    color: var(--warning);
    margin-left: 0.35rem;
}
.cl-invited-badge {
    background: var(--action-orange-tint);
    color: var(--action-orange);
}

/* List filter drops + tags (companies, generators) */
.co-filters {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}
.filter-tags-bar {
    display: none;
    align-items: center;
    gap: 0;
    margin-top: 0.375rem;
    border-top: 1px solid var(--gray-100);
    padding-top: 0.375rem;
}
.filter-tags-bar.has-tags { display: flex; }
.filter-tags-scroll {
    display: flex;
    gap: 0.25rem;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 1.75rem);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}
.filter-tags-scroll::-webkit-scrollbar { height: 3px; }
.filter-tags-scroll::-webkit-scrollbar-track { background: transparent; }
.filter-tags-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.filter-tags-clear {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    background: var(--white);
    color: var(--gray-400);
    cursor: pointer;
    margin-left: 0.375rem;
    transition: all 0.12s;
    padding: 0;
}
.filter-tags-clear:hover {
    color: var(--red-500);
    border-color: var(--red-500);
    background: rgba(239, 68, 68, 0.04);
}
.filter-tags-clear svg { width: 10px; height: 10px; }
.filter-drop { position: relative; }
.filter-drop-btn {
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    min-height: 36px;
    box-sizing: border-box;
}
.filter-drop-btn:hover {
    background: var(--white);
    border-color: var(--gray-300);
    color: var(--gray-700);
}
.filter-drop-btn.has-value {
    background: rgba(0, 42, 36, 0.06);
    color: var(--dark-green);
    border-color: rgba(0, 42, 36, 0.15);
}
.filter-drop-btn svg { width: 10px; height: 10px; flex-shrink: 0; }
.filter-drop-count {
    font-size: 0.5625rem;
    font-weight: 700;
    background: var(--dark-green);
    color: white;
    border-radius: 100px;
    min-width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}
.filter-drop-flags {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.filter-drop-flags .gen-lc-flag-icon,
.filter-tag-flag .gen-lc-flag-icon {
    width: 16px;
    height: 12px;
    display: block;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}
.filter-drop-flags .gen-lc-flag-icon--square,
.filter-tag-flag .gen-lc-flag-icon--square {
    width: 12px;
    height: 12px;
}
.filter-tag-flag {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.filter-dropdown {
    position: fixed;
    z-index: 9999;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    min-width: 180px;
    max-height: 240px;
    overflow-y: auto;
}
.filter-dropdown::-webkit-scrollbar { width: 4px; }
.filter-dropdown::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.filter-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--gray-700);
    transition: background 0.1s;
    user-select: none;
}
.filter-opt:hover { background: var(--gray-50); }
.filter-opt-check {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1.5px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.12s;
    background: var(--white);
}
.filter-opt.selected .filter-opt-check {
    background: var(--dark-green);
    border-color: var(--dark-green);
}
.filter-opt.selected .filter-opt-check svg { opacity: 1; }
.filter-opt-check svg {
    width: 9px;
    height: 9px;
    stroke: white;
    stroke-width: 2.5;
    opacity: 0;
}
.filter-opt-label { flex: 1; font-weight: 500; }
.filter-opt-count {
    font-size: 0.625rem;
    color: var(--gray-400);
    font-weight: 400;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--dark-green);
    background: rgba(0, 42, 36, 0.06);
    border: 1px solid rgba(0, 42, 36, 0.12);
    border-radius: 100px;
    padding: 0.125rem 0.375rem 0.125rem 0.5rem;
    cursor: default;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-tag-x {
    cursor: pointer;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.12s;
}
.filter-tag-x:hover { background: rgba(0, 42, 36, 0.12); }
.filter-tag-x svg { width: 8px; height: 8px; }

/* ── Shared registry / Zefix diff modal (trademark sync + company edit) ── */
/* Briefly glow form inputs that were just refreshed from the registry, so
   the user can visually verify which fields changed without scrolling
   through the whole form. */
@keyframes tmpJustSynced {
    0%   { background-color: rgba(16, 185, 129, 0.20); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
    100% { background-color: transparent;             box-shadow: 0 0 0 0   rgba(16, 185, 129, 0);    }
}

.tmp-just-synced {
    animation: tmpJustSynced 1.6s ease-out;
}

/* Diff modal (registry inspect / sync results) */
.tmp-diff-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    /* Symmetric rem padding so the modal's max-height calc is predictable.
       Total reserved viewport height: 2rem (top) + 2rem (bottom) = 4rem. */
    padding: 2rem 1rem;
    z-index: 10050;
    opacity: 0;
    transition: opacity 180ms ease;
}

.tmp-diff-modal-overlay.open {
    opacity: 1;
}

.tmp-diff-modal {
    background: #fff;
    width: min(680px, 94vw);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Fill the overlay slot (2rem + 2rem vertical padding). A definite height
       lets .tmp-diff-scroll (flex: 1; min-height: 0; overflow-y: auto) form a
       real scrollport between header and footer. */
    height: calc(100vh - 4rem);
    height: calc(100dvh - 4rem);
    max-height: calc(100vh - 4rem);
    max-height: calc(100dvh - 4rem);
    min-height: 0;
    transform: translateY(8px) scale(0.99);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Open: no transform on the modal shell. transform + overflow on the same
   element often breaks wheel / trackpad scrolling inside the diff (WebKit). */
.tmp-diff-modal-overlay.open .tmp-diff-modal {
    transform: none;
}

.tmp-diff-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.35rem 0.9rem;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.tmp-diff-kicker {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f766e;
    margin-bottom: 0.3rem;
}

.tmp-diff-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
}

.tmp-diff-close {
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tmp-diff-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* Scrollport only: keep overflow off the inner flex column (details + lists)
   so scroll height is computed reliably across browsers. */
.tmp-diff-scroll {
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}

.tmp-diff-body {
    padding: 1rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tmp-diff-loading {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.tmp-diff-error {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--red-700);
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.16);
}

.tmp-diff-banner {
    padding: 0.7rem 0.95rem;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.tmp-diff-banner.success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.18);
}

.tmp-diff-banner.info {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.18);
}

.tmp-diff-banner.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.22);
}

.tmp-diff-match {
    color: var(--gray-500);
    font-size: 0.82rem;
}

.tmp-diff-group {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
}

/* Hide the native disclosure triangle on <details>/<summary> so we can
   render our own chevron consistently across browsers. */
.tmp-diff-group > summary {
    list-style: none;
}
.tmp-diff-group > summary::-webkit-details-marker {
    display: none;
}

.tmp-diff-group-head {
    padding: 0.7rem 0.95rem;
    background: var(--gray-50);
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    transition: background 120ms ease;
}

.tmp-diff-group[open] > .tmp-diff-group-head {
    border-bottom-color: var(--gray-100);
}

.tmp-diff-group-head:focus-visible {
    outline: 2px solid var(--ag-blue, #3b82f6);
    outline-offset: -2px;
}

.tmp-diff-group-chevron {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 160ms ease;
}

.tmp-diff-group[open] > .tmp-diff-group-head .tmp-diff-group-chevron {
    transform: rotate(90deg);
}

.tmp-diff-group-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.tmp-diff-group-titleline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.tmp-diff-group-text strong {
    font-size: 0.86rem;
    color: var(--gray-900);
}

/* Same pill pattern as Companies / Individuals / Trademark Lifecycle list topbars
   (.cl-topbar-count, .tm-topbar-count). */
.tmp-diff-group-count {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    background: rgba(0, 42, 36, 0.06);
    color: var(--dark-green);
    flex-shrink: 0;
    line-height: 1;
}

.tmp-diff-group-hint {
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.35;
}

.tmp-diff-group-added > .tmp-diff-group-head     { background: rgba(16, 185, 129, 0.08); }
.tmp-diff-group-updated > .tmp-diff-group-head   { background: rgba(59, 130, 246, 0.06); }
.tmp-diff-group-unchanged > .tmp-diff-group-head { background: var(--gray-50); }
.tmp-diff-group-missing > .tmp-diff-group-head   { background: rgba(148, 163, 184, 0.08); }

.tmp-diff-group-added > .tmp-diff-group-head:hover {
    background: rgba(16, 185, 129, 0.14);
}

.tmp-diff-group-updated > .tmp-diff-group-head:hover {
    background: rgba(59, 130, 246, 0.12);
}

.tmp-diff-group-unchanged > .tmp-diff-group-head:hover {
    background: var(--gray-100);
}

.tmp-diff-group-missing > .tmp-diff-group-head:hover {
    background: rgba(148, 163, 184, 0.15);
}

.tmp-diff-list {
    list-style: none;
    margin: 0;
    padding: 0;
    /* Lists grow with content; .tmp-diff-scroll is the scrollport. */
}

.tmp-diff-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1.45fr);
    gap: 0.85rem;
    padding: 0.55rem 0.95rem;
    align-items: baseline;
    font-size: 0.85rem;
    min-height: 2.1rem;
    border-top: 1px solid var(--gray-100);
}

.tmp-diff-row:first-of-type {
    border-top: none;
}

.tmp-diff-list .tmp-diff-row {
    list-style: none;
}

.tmp-diff-label {
    color: var(--gray-500);
    font-weight: 600;
}

.tmp-diff-value {
    color: var(--gray-900);
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-weight: 600;
    word-break: break-word;
}

.tmp-diff-row-added .tmp-diff-after {
    color: #047857;
}

.tmp-diff-row-updated .tmp-diff-before {
    color: var(--gray-500);
    text-decoration: line-through;
    text-decoration-color: rgba(107, 114, 128, 0.4);
    font-weight: 500;
}

.tmp-diff-row-updated .tmp-diff-after {
    color: #1d4ed8;
}

.tmp-diff-arrow {
    color: var(--gray-400);
    font-weight: 700;
}

.tmp-diff-row-missing .tmp-diff-missing-value {
    color: var(--gray-400);
    font-weight: 500;
    font-style: italic;
}

.tmp-diff-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    flex-shrink: 0;
}

