:root {
    --lh-bg: #f6f7f9;
    --lh-surface: #ffffff;
    --lh-surface-raised: #ffffff;
    --lh-surface-muted: #f1f4f8;
    --lh-border: #d4dbe6;
    --lh-border-soft: #e6eaf0;
    --lh-text: #172033;
    --lh-text-muted: #5d6879;
    --lh-text-soft: #8893a3;
    --lh-accent: #d97706;
    --lh-accent-strong: #b45309;
    --lh-info: #1d4ed8;
    --lh-success: #047857;
    --lh-warning: #a16207;
    --lh-danger: #be123c;
    --lh-info-bg: rgba(29, 78, 216, 0.08);
    --lh-success-bg: rgba(4, 120, 87, 0.09);
    --lh-warning-bg: rgba(217, 119, 6, 0.12);
    --lh-danger-bg: rgba(190, 18, 60, 0.09);
    --lh-code-bg: #0b1220;
    --lh-radius: 8px;
    --lh-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --lh-focus: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.fi-body {
    background: var(--lh-bg);
}

.fi-main {
    padding-bottom: 72px;
}

.lh-page {
    max-width: 100%;
    min-width: 0;
    color: var(--lh-text);
    font-feature-settings: "tnum";
}

.lh-page,
.lh-page *,
.lh-page *::before,
.lh-page *::after,
.lh-public-page,
.lh-public-page *,
.lh-public-page *::before,
.lh-public-page *::after,
.lh-ops-dock,
.lh-ops-dock *,
.lh-ops-dock *::before,
.lh-ops-dock *::after {
    box-sizing: border-box;
}

.lh-stack {
    display: grid;
    gap: 18px;
}

.lh-stat-grid {
    display: grid;
    max-width: 100%;
    min-width: 0;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lh-split {
    display: grid;
    max-width: 100%;
    min-width: 0;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
}

.lh-card,
.lh-section {
    background: var(--lh-surface-raised);
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    box-shadow: var(--lh-shadow);
}

.lh-card {
    max-width: 100%;
    min-width: 0;
    min-height: 108px;
    padding: 16px;
}

.lh-section {
    max-width: 100%;
    min-width: 0;
    padding: 18px;
}

.lh-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.lh-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.lh-section-desc {
    margin: 6px 0 0;
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.lh-kicker {
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.3;
}

.lh-metric {
    display: block;
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.lh-meta {
    margin-top: 8px;
    color: var(--lh-text-muted);
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.lh-status-success {
    color: var(--lh-success);
}

.lh-status-warning {
    color: var(--lh-warning);
}

.lh-status-danger {
    color: var(--lh-danger);
}

.lh-status-muted {
    color: var(--lh-text-muted);
}

.lh-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--lh-border-soft);
    background: var(--lh-surface-muted);
    color: var(--lh-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.lh-pill-success {
    border-color: rgba(4, 120, 87, 0.22);
    background: var(--lh-success-bg);
    color: var(--lh-success);
}

.lh-pill-warning {
    border-color: rgba(180, 83, 9, 0.26);
    background: var(--lh-warning-bg);
    color: var(--lh-warning);
}

.lh-pill-danger {
    border-color: rgba(190, 18, 60, 0.22);
    background: var(--lh-danger-bg);
    color: var(--lh-danger);
}

.lh-pill-muted {
    color: var(--lh-text-muted);
}

.lh-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.lh-page :where(.fi-btn) {
    border-radius: 7px;
    font-weight: 650;
    box-shadow: none;
}

.lh-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lh-button-primary {
    background: var(--lh-accent);
    color: #ffffff;
}

.lh-button-primary:hover {
    background: var(--lh-accent-strong);
    color: #ffffff;
}

.lh-button-secondary {
    border-color: var(--lh-border-soft);
    background: var(--lh-surface);
    color: var(--lh-text);
}

.lh-button-secondary:hover {
    border-color: var(--lh-border);
    color: var(--lh-info);
}

.lh-request-note {
    margin-top: 10px;
    color: var(--lh-warning);
    font-size: 13px;
    line-height: 1.5;
}

.lh-alert {
    padding: 14px 16px;
    border: 1px solid rgba(180, 83, 9, 0.28);
    border-radius: var(--lh-radius);
    background: var(--lh-warning-bg);
    color: #7c2d12;
    font-size: 13px;
    line-height: 1.5;
}

.lh-alert-title {
    font-weight: 650;
}

.lh-alert-warning {
    border-color: rgba(180, 83, 9, 0.28);
    background: var(--lh-warning-bg);
    color: #7c2d12;
}

.lh-alert-info {
    border-color: rgba(29, 78, 216, 0.18);
    background: var(--lh-info-bg);
    color: #1e3a8a;
}

.lh-alert-danger {
    border-color: rgba(190, 18, 60, 0.22);
    background: var(--lh-danger-bg);
    color: #881337;
}

.lh-alert .lh-log {
    min-height: 120px;
    max-height: 260px;
    margin-top: 12px;
}

:where(.fi-no-notification, .fi-notification) {
    border-radius: var(--lh-radius);
    border-color: var(--lh-border-soft);
    box-shadow: var(--lh-shadow);
}

:where(.fi-no-notification-title, .fi-notification-title) {
    color: var(--lh-text);
    font-weight: 700;
}

:where(.fi-no-notification-body, .fi-notification-body) {
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.lh-commit-list {
    display: grid;
    gap: 10px;
}

.lh-commit {
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    padding: 12px;
}

.lh-commit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lh-code,
.lh-commit-sha {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.lh-commit-sha {
    font-size: 13px;
    font-weight: 700;
}

.lh-commit-time {
    color: var(--lh-text-soft);
    font-size: 12px;
    white-space: nowrap;
}

.lh-commit-subject {
    margin-top: 6px;
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.lh-empty {
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.lh-data-list {
    display: grid;
    gap: 0;
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    overflow: hidden;
}

.lh-data-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 13px 15px;
    background: var(--lh-surface);
    border-top: 1px solid var(--lh-border-soft);
}

.lh-data-row:first-child {
    border-top: 0;
}

.lh-data-label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.lh-data-note {
    margin-top: 4px;
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.lh-steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lh-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
}

.lh-step-index {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--lh-border-soft);
    background: var(--lh-surface);
    color: var(--lh-info);
    font-size: 12px;
    font-weight: 700;
}

.lh-step-title {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

.lh-step-desc {
    margin-top: 4px;
    color: var(--lh-text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.lh-log {
    width: 100%;
    min-height: 320px;
    max-height: 520px;
    margin: 0;
    overflow: auto;
    padding: 16px;
    border-radius: var(--lh-radius);
    background: var(--lh-code-bg);
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.lh-form-grid {
    display: grid;
    max-width: 100%;
    min-width: 0;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lh-field {
    display: grid;
    gap: 7px;
    align-content: start;
}

.lh-label {
    color: var(--lh-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.lh-help {
    margin: 0;
    color: var(--lh-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.lh-input,
.lh-select,
.lh-textarea {
    width: 100%;
    border: 1px solid var(--lh-border);
    border-radius: 7px;
    background: var(--lh-surface);
    color: var(--lh-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lh-input,
.lh-select {
    min-height: 40px;
    padding: 0 11px;
}

.lh-textarea {
    min-height: 116px;
    resize: vertical;
    padding: 10px 11px;
}

.lh-input:focus,
.lh-select:focus,
.lh-textarea:focus {
    border-color: var(--lh-info);
    box-shadow: var(--lh-focus);
}

.lh-checkbox-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    padding: 13px 15px;
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    background: var(--lh-surface);
}

.lh-checkbox {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--lh-accent);
}

.lh-checkbox-row strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.lh-checkbox-row small {
    display: block;
    margin-top: 4px;
    color: var(--lh-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.lh-access-log-list {
    display: grid;
    gap: 10px;
}

.lh-access-log-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
    gap: 12px 18px;
    padding: 12px;
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    background: var(--lh-surface);
}

.lh-access-log-main {
    min-width: 0;
}

.lh-access-log-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lh-access-log-time {
    color: var(--lh-text-soft);
    font-size: 12px;
}

.lh-access-log-reason {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.lh-access-log-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.lh-access-log-meta span,
.lh-access-log-details span {
    display: block;
    color: var(--lh-text-soft);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.lh-access-log-meta strong,
.lh-access-log-details strong {
    display: block;
    margin-top: 4px;
    color: var(--lh-text);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.lh-access-log-details {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--lh-border-soft);
}

.lh-access-log-details summary {
    grid-column: 1 / -1;
    width: max-content;
    color: var(--lh-text-muted);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.lh-access-log-details summary:hover {
    color: var(--lh-info);
}

.lh-access-log-details[open] summary {
    margin-bottom: 10px;
}

.lh-access-log-details[open] {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lh-access-log-detail-wide {
    grid-column: 1 / -1;
}

.lh-public-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: var(--lh-bg);
    color: var(--lh-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lh-public-shell {
    width: min(560px, calc(100vw - 32px));
    display: grid;
    gap: 18px;
}

.lh-public-brand {
    color: var(--lh-text-muted);
    font-size: 13px;
    font-weight: 750;
}

.lh-public-card {
    padding: 22px;
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    background: var(--lh-surface-raised);
    box-shadow: var(--lh-shadow);
}

.lh-public-title {
    margin: 0;
    color: var(--lh-text);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.35;
}

.lh-public-desc {
    margin: 8px 0 0;
    color: var(--lh-text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.lh-public-actions {
    margin-top: 18px;
}

.lh-ops-dock {
    position: fixed;
    right: 16px;
    bottom: 14px;
    left: 16px;
    z-index: 40;
    pointer-events: none;
}

.lh-ops-dock-inner {
    display: flex;
    width: min(1160px, 100%);
    min-height: 42px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    border: 1px solid var(--lh-border-soft);
    border-radius: var(--lh-radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
}

.lh-ops-dock-group,
.lh-ops-dock-links {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.lh-ops-dock-brand {
    color: var(--lh-text);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.lh-ops-dock-item {
    color: var(--lh-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    white-space: nowrap;
}

.lh-ops-dock-link {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--lh-border-soft);
    border-radius: 7px;
    background: var(--lh-surface);
    color: var(--lh-text-muted);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.lh-ops-dock-link:hover {
    border-color: var(--lh-accent);
    color: var(--lh-accent);
}

@media (max-width: 1100px) {
    .lh-stat-grid,
    .lh-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lh-ops-dock-inner {
        display: grid;
        justify-content: stretch;
    }

    .lh-ops-dock-group,
    .lh-ops-dock-links {
        overflow-x: auto;
    }
}

@media (max-width: 720px) {
    .lh-stat-grid,
    .lh-split {
        grid-template-columns: 1fr;
    }

    .lh-section-header {
        display: grid;
    }

    .lh-toolbar {
        justify-content: flex-start;
    }

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

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

    .lh-access-log-item,
    .lh-access-log-meta,
    .lh-access-log-details[open] {
        grid-template-columns: 1fr;
    }

    .lh-ops-dock {
        right: 10px;
        bottom: 10px;
        left: 10px;
    }
}

.dark {
    --lh-bg: #0f172a;
    --lh-surface: #111827;
    --lh-surface-raised: #111827;
    --lh-surface-muted: #172033;
    --lh-border: rgba(148, 163, 184, 0.28);
    --lh-border-soft: rgba(148, 163, 184, 0.18);
    --lh-text: #f8fafc;
    --lh-text-muted: #a8b3c4;
    --lh-text-soft: #7d8898;
    --lh-info-bg: rgba(96, 165, 250, 0.12);
    --lh-success-bg: rgba(16, 185, 129, 0.12);
    --lh-warning-bg: rgba(245, 158, 11, 0.14);
    --lh-danger-bg: rgba(244, 63, 94, 0.12);
    --lh-code-bg: #020617;
}

.dark .lh-ops-dock-inner {
    background: rgba(17, 24, 39, 0.94);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.dark .lh-alert {
    color: #fde68a;
}

.dark .lh-alert-warning {
    color: #fde68a;
}

.dark .lh-alert-info {
    color: #bfdbfe;
}

.dark .lh-alert-danger {
    color: #fecdd3;
}
