body.page-app {
    background: #eef3f8;
}

body.page-showcase-preview {
    overscroll-behavior: contain;
}

.app-shell {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 220ms ease;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 1.1rem;
    min-height: 100vh;
    padding: 1.2rem 1rem 1.35rem;
    background: #13212f;
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    transition:
        padding 220ms ease,
        transform 160ms ease;
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    position: relative;
    padding-right: 2.9rem;
}

.app-sidebar .brand-mark {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}

.app-sidebar-inline-toggle {
    position: absolute;
    --sidebar-toggle-offset-y: -50%;
    --sidebar-toggle-offset-x: 0px;
    right: 0;
    top: 50%;
    transform: translateY(var(--sidebar-toggle-offset-y)) translateX(var(--sidebar-toggle-offset-x));
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.app-sidebar-inline-toggle__icon-stack {
    position: relative;
    width: 1.2rem;
    height: 1.2rem;
    display: grid;
    place-items: center;
}

.app-sidebar-inline-toggle__icon {
    grid-area: 1 / 1;
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.app-sidebar-inline-toggle .material-symbols-outlined {
    font-size: 1.08rem;
}

.app-sidebar-inline-toggle__icon--hover {
    opacity: 0;
    transform: translateX(5px) scale(0.92);
}

.app-sidebar-inline-toggle:hover,
.app-sidebar-inline-toggle:focus-visible {
    --sidebar-toggle-offset-x: -1px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(142, 197, 255, 0.42);
    color: #ffffff;
}

.app-sidebar-inline-toggle:hover .app-sidebar-inline-toggle__icon--base,
.app-sidebar-inline-toggle:focus-visible .app-sidebar-inline-toggle__icon--base {
    opacity: 0;
    transform: translateX(-5px) scale(0.92);
}

.app-sidebar-inline-toggle:hover .app-sidebar-inline-toggle__icon--hover,
.app-sidebar-inline-toggle:focus-visible .app-sidebar-inline-toggle__icon--hover {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.app-sidebar-inline-toggle.is-collapsed {
    background: rgba(142, 197, 255, 0.14);
    border-color: rgba(142, 197, 255, 0.34);
    color: #8ec5ff;
}

.app-sidebar-workspace {
    padding: 0 0.2rem 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

.app-sidebar-workspace strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.96rem;
}

.app-sidebar-workspace span {
    display: block;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.55;
}

.app-sidebar-nav {
    display: grid;
    gap: 0.28rem;
}

.app-sidebar-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.78);
}

.sidebar-inline-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.56);
    transition: color 160ms ease;
}

.sidebar-inline-icon.material-symbols-outlined {
    font-size: 1.15rem;
}

.app-sidebar-nav a.is-active,
.app-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-sidebar-nav a.is-disabled,
.app-sidebar-nav a.is-disabled:hover {
    cursor: default;
    opacity: 0.54;
    pointer-events: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    box-shadow: none;
}

.app-sidebar-nav a.is-active .sidebar-inline-icon,
.app-sidebar-nav a:hover .sidebar-inline-icon {
    color: #8ec5ff;
}

.app-sidebar-nav a.is-disabled .sidebar-inline-icon,
.app-sidebar-nav a.is-disabled:hover .sidebar-inline-icon {
    color: rgba(255, 255, 255, 0.42);
}

.app-sidebar-nav a.is-active {
    box-shadow: inset 3px 0 0 #8ec5ff;
}

.sidebar-section {
    display: grid;
    gap: 0.65rem;
    padding: 0.25rem 0 0.2rem;
}

.sidebar-section-title {
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-bookmarks {
    display: grid;
    gap: 0.35rem;
}

.sidebar-bookmark-link {
    padding: 0.72rem 1rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.76);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-bookmark-link.is-active,
.sidebar-bookmark-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-empty,
.sidebar-more {
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.84rem;
}

.app-shell-main {
    display: grid;
    grid-template-rows: auto 1fr;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1.5rem 2rem 0;
}

.app-header h1 {
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.app-header-description {
    margin-top: 0.45rem;
    color: var(--text-soft);
}

.app-header-meta,
.breadcrumbs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-header-meta {
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
}

.app-header-meta .material-symbols-outlined,
.sidebar-toggle .material-symbols-outlined {
    font-size: 1rem;
}

.breadcrumbs a {
    color: var(--text-soft);
}

.app-content {
    padding: 1.5rem 2rem 2rem;
}

.app-content-body {
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.integration-callout-slot {
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.integration-callout {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    min-height: 108px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #c2c6d6;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(20, 28, 37, 0.06);
    font-family: "Noto Sans JP", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.integration-callout__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #ecf4ff;
    color: #0051ae;
    display: flex;
    align-items: center;
    justify-content: center;
}

.integration-callout__icon .material-symbols-outlined {
    font-size: 24px;
}

.integration-callout__content {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.integration-callout__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.integration-callout__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: #d8e0eb;
    color: #5b636d;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.05em;
}

.integration-callout__title {
    margin: 0;
    color: #141c25;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.01em;
}

.integration-callout__description {
    max-width: 720px;
    margin: 0;
    color: #424753;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.integration-callout__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    align-self: center;
    gap: 8px;
}

.integration-callout__button {
    height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
}

.integration-callout__button:active {
    opacity: 0.7;
}

.integration-callout__button--github {
    width: 172px;
    background: #24292f;
    color: #ffffff;
    border-color: #24292f;
}

.integration-callout__button--github:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.integration-callout__github-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.integration-callout__button--backlog {
    background: #ffffff;
    color: #0f766e;
    border-color: #2bbbad;
}

.integration-callout__button--backlog:hover {
    background: #f0fdfb;
    color: #0f766e;
}

.integration-callout__button--backlog .material-symbols-outlined {
    font-size: 18px;
}

.integration-callout__backlog-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 172px;
    height: 40px;
    padding: 6px 10px;
    border: 1px solid rgba(47, 194, 162, 0.36);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fffd 100%);
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
    line-height: 0;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.integration-callout__backlog-link:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f2fffb 100%);
    border-color: rgba(47, 194, 162, 0.5);
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.integration-callout__backlog-link:active {
    background: linear-gradient(180deg, #f7fffc 0%, #effdf8 100%);
    border-color: rgba(47, 194, 162, 0.56);
    box-shadow: inset 0 1px 2px rgba(15, 118, 110, 0.1);
    transform: translateY(1px);
}

.integration-callout__backlog-link:focus-visible {
    outline: 2px solid rgba(47, 194, 162, 0.32);
    outline-offset: 2px;
}

.integration-callout__backlog-logo {
    display: block;
    width: 132px;
    max-width: 100%;
    height: auto;
}

.integration-callout__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.empty-state-actions {
    margin-top: 1.25rem;
}

.summary-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(214, 224, 234, 0.75);
    border-radius: var(--radius-sm);
    background: rgba(244, 247, 250, 0.92);
}

.inline-alert.inline-alert-error {
    border-color: rgba(193, 39, 45, 0.2);
    background: rgba(193, 39, 45, 0.08);
    color: #7f1720;
}

.panel-muted {
    background: rgba(244, 247, 250, 0.92);
}

.code-block {
    margin: 0.75rem 0 0;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    border-radius: 14px;
    background: #13212f;
    color: #f8fbff;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.manual-branch-form textarea {
    min-height: 280px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.button-stack {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
}

.button.is-disabled {
    pointer-events: none;
    opacity: 0.62;
}

.log-metadata {
    display: block;
    max-width: 520px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
    color: var(--text-soft);
}

.panel {
    border-radius: 20px;
}

.stat-panel strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.dashboard-state-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.55rem 1.6rem;
    border-color: rgba(190, 203, 220, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 252, 0.96));
}

.dashboard-state-banner.is-conflict {
    border-color: rgba(189, 70, 70, 0.28);
    background: linear-gradient(135deg, rgba(255, 248, 248, 0.98), rgba(255, 240, 240, 0.95));
}

.dashboard-state-banner.is-stale {
    border-color: rgba(168, 103, 18, 0.22);
    background: linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(255, 246, 230, 0.94));
}

.dashboard-state-banner.is-available {
    border-color: rgba(29, 127, 95, 0.22);
    background: linear-gradient(135deg, rgba(248, 253, 251, 0.98), rgba(239, 248, 244, 0.95));
}

.repository-state-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem 1.45rem;
    border-color: rgba(190, 203, 220, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 252, 0.96));
}

.repository-state-banner.is-conflict {
    border-color: rgba(189, 70, 70, 0.28);
    background: linear-gradient(135deg, rgba(255, 248, 248, 0.98), rgba(255, 240, 240, 0.95));
}

.repository-state-banner.is-stale {
    border-color: rgba(168, 103, 18, 0.22);
    background: linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(255, 246, 230, 0.94));
}

.repository-state-banner.is-available {
    border-color: rgba(29, 127, 95, 0.22);
    background: linear-gradient(135deg, rgba(248, 253, 251, 0.98), rgba(239, 248, 244, 0.95));
}

.repository-state-copy h2 {
    margin-bottom: 0.28rem;
    font-size: 1.84rem;
}

.repository-state-copy p {
    margin-bottom: 0.25rem;
}

.repository-state-actions {
    justify-self: end;
}

.repository-summary-strip {
    display: flex;
    gap: 1rem 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.95rem 1.15rem;
}

.repository-summary-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
}

.repository-summary-label {
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.repository-summary-value {
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.repository-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.repository-step-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(214, 224, 234, 0.85);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.repository-step-card.is-current {
    border-color: rgba(168, 103, 18, 0.24);
    background: rgba(255, 250, 241, 0.96);
}

.repository-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.06);
    color: var(--text);
    font-weight: 700;
}

.repository-step-copy {
    display: grid;
    gap: 0.35rem;
}

.repository-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.repository-empty-state {
    display: grid;
    justify-items: start;
    gap: 0.65rem;
    padding: 1.15rem 1.2rem;
}

.repository-empty-visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.05);
    color: var(--text-soft);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.repository-empty-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dashboard-state-copy h2 {
    margin-bottom: 0.35rem;
    font-size: 1.7rem;
}

.dashboard-state-copy p:last-child {
    margin-bottom: 0;
}

.dashboard-state-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-self: end;
}

.button-backlog {
    border-color: #2f7cf6;
    background: #2f7cf6;
    color: #fff;
}

.button-git {
    border-color: #f05133;
    background: #f05133;
    color: #fff;
}

.dashboard-kpi-grid {
    align-items: stretch;
}

.dashboard-kpi-card {
    display: grid;
    gap: 0.55rem;
    min-height: 220px;
}

.dashboard-kpi-card strong {
    font-size: 3rem;
}

.dashboard-kpi-card.is-available {
    border-color: rgba(29, 127, 95, 0.22);
}

.dashboard-kpi-card.is-stale {
    border-color: rgba(168, 103, 18, 0.24);
    background: rgba(255, 248, 235, 0.88);
}

.dashboard-kpi-card.is-conflict {
    border-color: rgba(189, 70, 70, 0.3);
    background: rgba(255, 243, 243, 0.94);
}

.dashboard-kpi-critical {
    box-shadow: 0 20px 40px rgba(159, 69, 69, 0.14);
}

.dashboard-kpi-critical strong {
    font-size: 3.5rem;
    color: #9f4545;
}

.dashboard-kpi-details {
    display: grid;
    gap: 0.3rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.dashboard-kpi-action {
    margin-top: auto;
    padding-top: 0.3rem;
}

.dashboard-actions-panel {
    padding-block: 1.25rem;
}

.dashboard-actions-panel .panel-head {
    margin-bottom: 0.8rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-actions .inline-form {
    margin-bottom: 0;
}

.dashboard-lower-grid {
    align-items: start;
}

.dashboard-side-stack {
    display: grid;
    gap: 1.25rem;
}

.dashboard-empty-compact {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 1.05rem;
}

.dashboard-empty-compact p {
    margin: 0;
}

.dashboard-repository-list,
.dashboard-installation-list,
.dashboard-guide-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-repository-row,
.dashboard-installation-row,
.dashboard-guide-step {
    display: grid;
    gap: 0.85rem;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(214, 224, 234, 0.75);
}

.dashboard-repository-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.9fr) auto;
}

.dashboard-installation-row {
    grid-template-columns: minmax(0, 1.05fr) minmax(200px, 1fr) auto;
}

.dashboard-guide-step {
    grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-repository-row:last-child,
.dashboard-installation-row:last-child,
.dashboard-guide-step:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-repository-copy,
.dashboard-installation-copy,
.dashboard-installation-status,
.dashboard-repository-status,
.dashboard-guide-copy,
.dashboard-guide-meta {
    display: grid;
    gap: 0.35rem;
}

.dashboard-repository-status,
.dashboard-guide-meta {
    justify-items: start;
}

.dashboard-repository-action,
.dashboard-installation-action {
    justify-self: end;
}

.dashboard-event-list small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-soft);
}

@media (max-width: 980px) {
    .repository-state-banner,
    .repository-steps,
    .dashboard-state-banner,
    .dashboard-repository-row,
    .dashboard-installation-row,
    .dashboard-guide-step {
        grid-template-columns: 1fr;
    }

    .repository-state-actions,
    .dashboard-state-actions,
    .dashboard-repository-action,
    .dashboard-installation-action {
        justify-self: start;
    }

    .repository-summary-strip {
        display: grid;
        gap: 0.55rem;
    }
}

.stack-list {
    list-style: none;
    padding-left: 0;
}

.stack-list li {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(214, 224, 234, 0.75);
}

.stack-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.stack-list span {
    display: block;
    color: var(--accent-strong);
    font-weight: 600;
}

.form-stack {
    display: grid;
    gap: 0.25rem;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

@media (min-width: 981px) {
    html.is-app-sidebar-collapsed .app-shell {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    html.is-app-sidebar-collapsed .app-sidebar {
        padding-inline: 0.8rem;
    }

    html.is-app-sidebar-collapsed .app-sidebar .brand-mark {
        display: none;
    }

    html.is-app-sidebar-collapsed .app-sidebar-workspace .eyebrow,
    html.is-app-sidebar-collapsed .app-sidebar-workspace strong,
    html.is-app-sidebar-collapsed .app-sidebar-nav a > span:last-child {
        display: none;
    }

    html.is-app-sidebar-collapsed .app-sidebar-workspace {
        display: none;
    }

    html.is-app-sidebar-collapsed .app-sidebar-nav a {
        justify-content: center;
        padding-inline: 0.8rem;
    }

    html.is-app-sidebar-collapsed .app-sidebar-head {
        justify-content: center;
        padding-right: 0;
    }

    html.is-app-sidebar-collapsed .app-sidebar-inline-toggle {
        position: relative;
        top: auto;
        right: auto;
        --sidebar-toggle-offset-y: 0px;
    }
}

.project-table .action-col,
.branch-table .toggle-col {
    width: 72px;
    text-align: right;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: rgba(232, 242, 255, 0.34);
}

.table-link {
    color: var(--text);
    font-weight: 700;
}

.table-link:hover {
    color: var(--accent-strong);
}

.table-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    color: var(--accent);
    font-weight: 600;
}

.project-detail-shell {
    display: grid;
    gap: 1.5rem;
}

.project-hero {
    display: grid;
    gap: 1.4rem;
}

.project-hero-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.project-title-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.project-title-row h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
    margin-top: 0.9rem;
    color: var(--text-soft);
}

.project-tab-nav {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(214, 224, 234, 0.75);
}

.project-tab {
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    color: var(--text-soft);
    font-weight: 600;
}

.project-tab.is-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.branch-panel {
    display: grid;
    gap: 1.25rem;
}

.branch-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 0.85fr) auto auto;
    gap: 1rem;
    align-items: end;
}

.branch-filter-checks {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-soft);
}

.checkbox-row input {
    width: 16px;
    height: 16px;
}

.branch-filter-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.branch-group.has-conflict > .branch-row {
    background: rgba(189, 70, 70, 0.05);
}

.branch-row {
    cursor: pointer;
}

.branch-row:hover {
    background: rgba(232, 242, 255, 0.28);
}

.branch-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.branch-toggle[aria-expanded="true"] .branch-toggle-icon,
.branch-row[aria-expanded="true"] .branch-toggle-icon {
    transform: rotate(180deg);
}

.branch-toggle-icon {
    transition: transform 160ms ease;
}

.branch-details-row td {
    background: rgba(245, 248, 252, 0.75);
}

.branch-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.branch-detail-head strong {
    display: block;
    margin-bottom: 0.2rem;
}

.branch-files-grid,
.conflict-branch-list {
    display: grid;
    gap: 0.85rem;
}

.branch-file-item,
.conflict-branch-card {
    border: 1px solid rgba(214, 224, 234, 0.8);
    border-radius: 14px;
    background: #fff;
}

.branch-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
}

.branch-file-item.is-conflict {
    border-left: 4px solid #cc6f6f;
    background: rgba(251, 241, 241, 0.92);
}

.branch-file-main {
    display: grid;
    gap: 0.45rem;
}

.branch-file-main strong {
    word-break: break-word;
}

.branch-file-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.branch-file-time {
    color: var(--text-soft);
    font-size: 0.9rem;
    white-space: nowrap;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.26rem 0.55rem;
    border-radius: 999px;
    background: rgba(23, 114, 208, 0.1);
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 700;
}

.mini-badge.is-conflict,
.status-badge.is-conflict {
    background: rgba(189, 70, 70, 0.12);
    color: #9f4545;
}

.mini-badge.is-added {
    background: rgba(29, 127, 95, 0.12);
    color: var(--success);
}

.mini-badge.is-removed {
    background: rgba(168, 103, 18, 0.12);
    color: var(--warning);
}

.status-badge.is-stale {
    background: rgba(168, 103, 18, 0.12);
    color: var(--warning);
}

.empty-state,
.empty-inline {
    padding: 1.25rem;
    border: 1px dashed rgba(214, 224, 234, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text-soft);
}

.empty-state h3 {
    margin-bottom: 0.55rem;
    color: var(--text);
}

.conflict-branch-card {
    padding: 1rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.nav-actions .inline-form,
.app-header-meta .inline-form {
    margin-bottom: 0;
}

.inline-form select {
    min-width: 7rem;
}

.button-small {
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    font-size: 0.92rem;
}

.page-workspace .app-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.5rem 2rem 2rem;
    min-width: 0;
    min-height: 0;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, 90vw);
        transform: translateX(-100%);
        transition: transform 160ms ease;
        z-index: 20;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-header,
    .app-content {
        padding-inline: 1rem;
    }

    .project-hero-main,
    .branch-file-item,
    .branch-filter-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .branch-detail-head {
        align-items: flex-start;
    }

    .branch-filter-bar {
        display: grid;
    }

    .branch-filter-actions {
        justify-content: flex-start;
    }

    .integration-callout {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-callout__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        align-self: stretch;
    }

    .integration-callout__button {
        width: 100%;
    }

    .integration-callout__backlog-link {
        width: 100%;
        padding-inline: 12px;
    }

    .integration-callout__backlog-logo {
        width: 140px;
    }
}
