:root {
    --bg: #f4f5ef;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --panel: #111111;
    --text: #161616;
    --muted: #5f645d;
    --line: rgba(17, 17, 17, 0.12);
    --lime: #c4ef17;
    --lime-strong: #b2dd09;
    --lime-deep: #8fb400;
    --danger: #c74141;
    --shadow: 0 24px 60px rgba(17, 17, 17, 0.14);

    --pico-font-family: "Segoe UI", Tahoma, sans-serif;
    --pico-background-color: #f8f9f1;
    --pico-color: #161616;
    --pico-muted-color: #5f645d;
    --pico-card-background-color: #ffffff;
    --pico-card-border-color: rgba(17, 17, 17, 0.08);
    --pico-form-element-background-color: #fafbf6;
    --pico-form-element-border-color: rgba(17, 17, 17, 0.16);
    --pico-form-element-color: #161616;
    --pico-form-element-placeholder-color: #7b8178;
    --pico-primary: #141414;
    --pico-primary-background: #c4ef17;
    --pico-primary-border: #c4ef17;
    --pico-primary-hover-background: #b2dd09;
    --pico-primary-hover-border: #b2dd09;
    --pico-primary-focus: rgba(196, 239, 23, 0.24);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(196, 239, 23, 0.4), transparent 25%),
        linear-gradient(135deg, #f8f9f1 0%, #eef0e6 100%);
}

body {
    min-height: 100vh;
}

.login-body,
.app-body {
    background:
        radial-gradient(circle at top right, rgba(196, 239, 23, 0.3), transparent 24%),
        linear-gradient(135deg, #f8f9f1 0%, #edf0e3 100%);
}

.dashboard-body {
    background:
        radial-gradient(circle at top right, rgba(196, 239, 23, 0.34), transparent 28%),
        linear-gradient(135deg, #fafbf5 0%, #eef1e5 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-shell,
.docs-shell,
.app-shell {
    min-height: 100vh;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 0.98fr) minmax(340px, 0.72fr);
}

.login-character-panel,
.login-copy-panel {
    padding: 44px 48px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-copy-panel::before {
    content: "";
    position: absolute;
    inset: 24px 24px auto auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(196, 239, 23, 0.25);
    filter: blur(10px);
}

.brand-mark,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.08);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-kicker {
    margin: 28px 0 0;
    color: var(--lime-deep);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-title {
    margin: 18px 0 20px;
    max-width: 520px;
    font-size: clamp(42px, 6vw, 88px);
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--text);
}

.brand-copy,
.brand-note,
.layer-card strong,
.layer-card span,
.login-card p,
.login-hint,
.user-badge span,
.hero-card p,
.docs-link small {
    line-height: 1.5;
}

.brand-copy {
    max-width: 380px;
    font-size: 18px;
    color: var(--muted);
}

.brand-copy-block {
    position: relative;
    z-index: 2;
    max-width: 460px;
}

.brand-character {
    position: relative;
    width: min(100%, 520px);
    height: min(82vh, 900px);
    min-height: 620px;
    margin: 0 auto;
}

.brand-character::after {
    content: "";
    position: absolute;
    inset: auto 12% 8px 12%;
    height: 28px;
    background: rgba(17, 17, 17, 0.12);
    filter: blur(18px);
    border-radius: 50%;
}

.brand-character-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.92));
    border-left: 1px solid rgba(17, 17, 17, 0.08);
}

.login-card {
    width: min(460px, 100%);
    padding: 32px;
    border-radius: 28px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    border: 1px solid rgba(17, 17, 17, 0.08);
}

.login-card-header h2,
.docs-topbar h1 {
    margin: 12px 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1;
    color: var(--text);
}

.login-card-header p,
.hero-card p,
.docs-link small,
.docs-link span,
.user-badge span {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.field > span {
    color: var(--text);
}

.field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: #fafbf6;
    outline: none;
    color: var(--text);
    box-shadow: none;
}

.field input:focus {
    border-color: var(--lime-deep);
    box-shadow: 0 0 0 4px rgba(196, 239, 23, 0.22);
}

.field input::placeholder {
    color: #7b8178;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--lime), var(--lime-strong));
    color: #141414;
    box-shadow: 0 18px 36px rgba(178, 221, 9, 0.32);
}

.btn-secondary {
    padding: 12px 16px;
    background: rgba(17, 17, 17, 0.92);
    color: #ffffff;
}

.btn-ghost {
    padding: 12px 16px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.login-form .btn-primary,
.login-form button[type="submit"] {
    width: 100%;
    margin: 0;
}

.alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
}

.alert-error {
    background: rgba(199, 65, 65, 0.1);
    color: var(--danger);
    border: 1px solid rgba(199, 65, 65, 0.24);
}

.alert-success {
    background: rgba(143, 180, 0, 0.12);
    color: #4d6200;
    border: 1px solid rgba(143, 180, 0, 0.24);
}

.login-hint {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    color: var(--muted);
}

.login-hint code {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f1f4df;
    color: #141414;
    font-weight: 800;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
    padding: 24px 18px;
    background: rgba(17, 17, 17, 0.95);
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 6px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-brand-copy {
    display: grid;
    gap: 3px;
}

.app-sidebar-brand-copy strong {
    font-size: 15px;
}

.app-sidebar-brand-copy span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

.app-sidebar-nav {
    display: grid;
    gap: 10px;
}

.app-nav-link {
    display: block;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
}

.app-nav-link span,
.app-nav-link small {
    display: block;
}

.app-nav-link span {
    color: #ffffff;
    font-weight: 700;
}

.app-nav-link small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
}

.app-nav-link.active {
    background: linear-gradient(135deg, rgba(196, 239, 23, 0.95), rgba(178, 221, 9, 0.92));
}

.app-nav-link.active span,
.app-nav-link.active small {
    color: #141414;
}

.app-nav-link.disabled {
    opacity: 0.48;
    cursor: default;
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 22px 28px 20px;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(18px);
}

.app-topbar-copy {
    display: grid;
    gap: 10px;
    max-width: 720px;
}

.app-topbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.app-topbar-kicker {
    color: #4f564c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.05);
    color: #2f342d;
    font-size: 12px;
    font-weight: 700;
}

.app-topbar-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime-deep);
    box-shadow: 0 0 0 4px rgba(196, 239, 23, 0.16);
}

.app-topbar-copy h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 0.98;
    color: var(--text);
    font-weight: 800;
}

.app-topbar-subtitle {
    margin: 0;
    color: #697164;
    font-size: 14px;
    line-height: 1.5;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.app-topbar-user {
    padding: 4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
}

.app-content {
    padding: 24px;
}

.docs-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
}

.dashboard-kicker {
    margin: 0 0 6px;
    color: var(--lime-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero-copy h2,
.dashboard-card h3 {
    margin: 0;
    color: var(--text);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(260px, 420px);
    align-items: center;
    gap: 28px;
    padding: 26px 28px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: var(--shadow);
}

.dashboard-hero-copy h2 {
    margin-top: 12px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 0.95;
}

.dashboard-hero-copy p,
.dashboard-card p {
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-hero-art {
    display: flex;
    justify-content: center;
}

.dashboard-piper {
    width: min(100%, 340px);
    height: auto;
    object-fit: contain;
}

.dashboard-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    margin-top: 12px;
    font-size: 26px;
    line-height: 1.05;
}

.inline-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--lime-deep);
    font-weight: 800;
}

.docs-sidebar {
    padding: 20px;
    background: rgba(17, 17, 17, 0.95);
    color: #ffffff;
    border-radius: 24px;
}

.docs-nav {
    display: grid;
    gap: 10px;
}

.docs-link {
    display: block;
    padding: 14px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
}

.docs-link span {
    display: block;
    color: #ffffff;
    font-weight: 700;
}

.docs-link.active {
    background: linear-gradient(135deg, rgba(196, 239, 23, 0.95), rgba(178, 221, 9, 0.92));
    border-color: rgba(17, 17, 17, 0.08);
}

.docs-link.active span,
.docs-link.active small {
    color: #141414;
}

.docs-main {
    min-width: 0;
}

.user-badge {
    display: grid;
    gap: 4px;
    min-width: 148px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.user-badge strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.docs-hero {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hero-card,
.markdown-reader {
    border-radius: 24px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 22px;
    background: rgba(255, 255, 255, 0.86);
}

.hero-card.muted {
    background: rgba(17, 17, 17, 0.94);
    color: #ffffff;
}

.hero-card.muted .eyebrow {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.hero-card.muted p {
    color: rgba(255, 255, 255, 0.72);
}

.markdown-reader {
    margin-top: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.95);
}

.markdown-reader pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.65;
}

@media (max-width: 1100px) {
    .login-shell,
    .dashboard-grid,
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .app-shell,
    .docs-layout,
    .stage-board {
        grid-template-columns: 1fr;
    }

    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-topbar-actions {
        flex-wrap: wrap;
        margin-left: 0;
    }

    .login-character-panel,
    .login-copy-panel {
        min-height: auto;
        padding-bottom: 0;
    }

    .brand-title {
        max-width: 640px;
    }

    .brand-copy {
        max-width: 520px;
    }

    .brand-character {
        width: min(100%, 680px);
        height: 680px;
        min-height: 0;
    }

    .docs-sidebar {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 720px) {
    .login-character-panel,
    .login-copy-panel,
    .login-form-panel,
    .app-content,
    .app-topbar,
    .docs-main {
        padding: 20px;
    }

    .login-card {
        padding: 22px;
    }

    .docs-topbar,
    .topbar-actions,
    .docs-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .brand-kicker {
        margin-top: 22px;
    }

    .brand-title {
        font-size: clamp(34px, 12vw, 58px);
    }

    .brand-copy {
        font-size: 16px;
    }

    .brand-character {
        width: 100%;
        height: 520px;
    }
}

/* App shell refinement */
.brand-mark,
.eyebrow,
.login-card,
.field input,
.btn-primary,
.btn-secondary,
.btn-ghost,
.login-hint code,
.app-nav-link,
.docs-sidebar,
.user-badge,
.user-avatar,
.icon-button {
    border-radius: 0;
}

.app-sidebar-brand {
    padding: 6px 6px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-topbar {
    align-items: center;
    min-height: 50px;
    height: 50px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.88);
}

.app-topbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.app-topbar-kicker {
    color: #4b5148;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-topbar-actions {
    gap: 12px;
}

.app-topbar-user {
    padding: 0;
    background: transparent;
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: #ffffff;
    color: var(--text);
    box-shadow: none;
}

.icon-bell {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 16px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
}

.icon-bell::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 12px;
    height: 2px;
    background: currentColor;
    transform: translateX(-50%);
}

.icon-bell::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 4px;
    height: 4px;
    background: currentColor;
    transform: translateX(-50%);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 172px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.user-meta {
    display: grid;
    gap: 2px;
}

.user-meta strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.user-meta span {
    color: var(--muted);
    line-height: 1.3;
}

.btn-logout {
    min-height: 36px;
    padding: 0 14px;
}

.page-intro {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.page-intro h1 {
    margin: 20px 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 0.98;
    color: var(--text);
    font-weight: 800;
}

.page-intro p {
    margin: 0;
    color: #697164;
    font-size: 14px;
    line-height: 1.5;
}

.migrations-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.migrations-stats {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
}

.migration-stat {
    min-width: 120px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.migration-stat strong {
    display: block;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 6px;
}

.migration-stat span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.migration-list {
    display: grid;
    gap: 12px;
}

.migration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.migration-row-main {
    display: grid;
    gap: 4px;
}

.migration-row-main strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.migration-row-main p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.migration-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.migration-badge.is-applied {
    background: rgba(198, 255, 0, 0.18);
    color: #4f6b00;
}

.migration-badge.is-pending {
    background: rgba(22, 29, 37, 0.06);
    color: #232323;
}

.page-intro-projects {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.projects-create-trigger {
    min-width: 170px;
}

.project-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.project-stat-card,
.projects-empty-state,
.projects-table-shell,
.modal-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.project-stat-card {
    padding: 18px 20px;
}

.project-stat-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
}

.project-stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-stat-card small {
    display: block;
    margin-top: 10px;
    color: #697164;
    font-size: 13px;
    line-height: 1.45;
}

.dashboard-page-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-intro-note {
    min-width: 180px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.dashboard-intro-note strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 32px;
    line-height: 1;
    font-weight: 800;
}

.dashboard-intro-note span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-stat-card {
    min-height: 154px;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-panel {
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.dashboard-panel-highlight {
    background:
        radial-gradient(circle at top right, rgba(198, 255, 0, 0.2), transparent 32%),
        rgba(255, 255, 255, 0.94);
}

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

.dashboard-panel-header h2 {
    margin: 12px 0 0;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
}

.dashboard-panel-meta {
    color: #697164;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-empty-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-best-domain {
    display: grid;
    gap: 24px;
}

.dashboard-best-domain-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-best-domain-row strong {
    color: var(--text);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 0.95;
}

.dashboard-best-domain p {
    margin: 12px 0 0;
    color: var(--muted);
}

.dashboard-metric-list,
.dashboard-averages-grid {
    display: grid;
    gap: 14px;
}

.dashboard-metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-averages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-metric-list div,
.dashboard-averages-grid div {
    padding: 16px 18px;
    background: rgba(17, 17, 17, 0.03);
    border: 1px solid rgba(22, 29, 37, 0.06);
}

.dashboard-metric-list dt,
.dashboard-averages-grid dt {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-metric-list dd,
.dashboard-averages-grid dd {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
}

.dashboard-top-list {
    display: grid;
    gap: 12px;
}

.dashboard-top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    background: rgba(17, 17, 17, 0.03);
    border: 1px solid rgba(22, 29, 37, 0.06);
}

.dashboard-top-main {
    display: grid;
    gap: 6px;
}

.dashboard-top-main strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.1;
}

.dashboard-top-main a {
    color: var(--lime-deep);
    font-weight: 700;
}

.dashboard-top-metrics {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    color: #4f574a;
    font-size: 13px;
    font-weight: 700;
}

.projects-table-shell {
    overflow-x: auto;
}

.projects-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.projects-table thead th {
    padding: 16px 18px;
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(22, 29, 37, 0.08);
    background: rgba(17, 17, 17, 0.03);
}

.projects-table thead th.is-active-sort {
    background: rgba(196, 239, 23, 0.18);
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.table-sort-button::after {
    content: "↕";
    font-size: 11px;
    color: rgba(22, 29, 37, 0.45);
}

.table-sort-button.is-active::after {
    color: var(--lime-deep);
}

.table-sort-button.is-active[data-sort-direction="asc"]::after {
    content: "↑";
}

.table-sort-button.is-active[data-sort-direction="desc"]::after {
    content: "↓";
}

.projects-table tbody td {
    padding: 18px;
    vertical-align: top;
    border-bottom: 1px solid rgba(22, 29, 37, 0.08);
    color: var(--text);
    font-weight: 600;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.projects-table tbody tr:hover td {
    background: rgba(196, 239, 23, 0.08);
}

.projects-table tbody td.cell-anomaly {
    position: relative;
}

.projects-table tbody td.cell-anomaly.is-warning {
    background: rgba(255, 184, 77, 0.16);
    color: #8a4f00;
}

.projects-table tbody td.cell-anomaly.is-danger {
    background: rgba(199, 65, 65, 0.14);
    color: #a53030;
}

.projects-table tbody td.cell-anomaly.is-positive {
    background: rgba(196, 239, 23, 0.16);
    color: #5f7400;
}

.projects-table tbody tr:hover td.cell-anomaly.is-warning {
    background: rgba(255, 184, 77, 0.22);
}

.projects-table tbody tr:hover td.cell-anomaly.is-danger {
    background: rgba(199, 65, 65, 0.18);
}

.projects-table tbody tr:hover td.cell-anomaly.is-positive {
    background: rgba(196, 239, 23, 0.22);
}

.projects-table tbody tr:last-child td {
    border-bottom: 0;
}

.projects-table-project {
    min-width: 280px;
}

.projects-table-project strong,
.projects-table-project span,
.projects-table-project small {
    display: block;
}

.table-domain-link {
    color: inherit;
    text-decoration: none;
}

.table-domain-link:hover,
.table-domain-link:focus-visible {
    color: #536a00;
    text-decoration: underline;
}

.project-table-link {
    color: inherit;
}

.project-table-link:hover {
    color: var(--lime-deep);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.btn-table-action {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
}

.btn-danger-ghost {
    border-color: rgba(199, 65, 65, 0.24);
    color: var(--danger);
}

.btn-danger-ghost:hover {
    background: rgba(199, 65, 65, 0.08);
    color: #a53030;
}

.projects-table tr.is-delete-confirm {
    opacity: 0.55;
    transition: opacity 0.16s ease;
}

.projects-table tr.is-delete-loading {
    opacity: 0.35;
}

.projects-table tr.is-delete-confirm .btn-danger-ghost,
.projects-table tr.is-delete-loading .btn-danger-ghost {
    background: rgba(199, 65, 65, 0.08);
    border-color: rgba(199, 65, 65, 0.34);
}

.projects-table-project strong {
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.2;
}

.projects-table-project span,
.projects-table-project small {
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}

.projects-table-project small {
    margin-top: 8px;
    font-size: 12px;
}

.anchor-text-cell {
    position: relative;
    display: inline-block;
    max-width: min(100%, 180px);
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
    cursor: help;
}

.projects-table th.anchor-column,
.projects-table td.anchor-column {
    width: 1%;
    min-width: 180px;
    max-width: 180px;
}

.anchor-text-cell::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    z-index: 30;
    width: max-content;
    min-width: 180px;
    max-width: min(420px, 70vw);
    padding: 10px 12px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 12px;
    background: rgba(22, 29, 37, 0.96);
    box-shadow: 0 18px 34px rgba(17, 17, 17, 0.18);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.anchor-text-cell:hover::after,
.anchor-text-cell:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.anchor-text-cell:focus-visible {
    outline: 2px solid rgba(153, 186, 0, 0.42);
    outline-offset: 4px;
    border-radius: 4px;
}

.anchor-text-empty {
    color: var(--muted);
}

.table-inline-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 2px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table-inline-badge.is-collected {
    background: rgba(196, 239, 23, 0.18);
    color: #536a00;
}

.table-inline-badge.is-info {
    background: rgba(79, 124, 255, 0.12);
    color: #2950b9;
}

.table-date-stack {
    display: inline-grid;
    gap: 4px;
    line-height: 1.2;
}

.table-date-stack strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.table-date-stack small {
    display: block;
    margin-top: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.project-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 34px;
    padding: 0 12px;
    background: rgba(22, 29, 37, 0.08);
    color: #232323;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-status-badge.is-draft {
    background: rgba(22, 29, 37, 0.08);
}

.project-status-badge.is-running,
.project-status-badge.is-active {
    background: rgba(196, 239, 23, 0.22);
    color: #536a00;
}

.project-status-badge.is-completed {
    background: rgba(79, 124, 255, 0.12);
    color: #2950b9;
}

.projects-empty-state {
    padding: 32px;
}

.projects-empty-state h2 {
    margin: 14px 0 10px;
    font-size: 32px;
    line-height: 1;
}

.projects-empty-state p {
    margin: 0 0 22px;
    max-width: 700px;
    color: var(--muted);
    line-height: 1.6;
}

.page-intro-project-detail {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.project-intro-description {
    margin: 14px 0 0;
    max-width: 780px;
    color: var(--muted);
    line-height: 1.6;
}

.page-intro-project-detail > div > p:not(.project-intro-meta) {
    margin: 14px 0 0;
    max-width: 780px;
    color: var(--muted);
    line-height: 1.6;
}

.project-intro-meta {
    margin: 18px 0 0;
    max-width: 1100px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.page-intro-project-detail > div > p:empty {
    display: none;
}

.project-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-detail-actions form {
    margin: 0;
}

.project-detail-layout {
    display: none;
}

.domain-ingest-card,
.project-info-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.domain-ingest-header h2,
.section-heading h2 {
    margin: 12px 0 8px;
    font-size: 22px;
    line-height: 1;
}

.domain-ingest-header p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.domain-ingest-form {
    display: grid;
    gap: 16px;
}

.domain-ingest-actions-inline {
    justify-content: flex-start;
}

.domain-ingest-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: #fafbf6;
    color: var(--text);
    outline: none;
    resize: vertical;
}

.domain-ingest-form textarea:focus {
    border-color: var(--lime-deep);
    box-shadow: 0 0 0 4px rgba(196, 239, 23, 0.22);
}

.domain-ingest-actions {
    display: flex;
    justify-content: flex-end;
}

.project-info-list {
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}

.project-info-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-info-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    line-height: 1.5;
}

.project-domains-section {
    display: grid;
    gap: 14px;
}

.project-domains-section .section-subtitle {
    display: none;
}

.section-subtitle-simplified {
    margin: 12px 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.6;
}

.stage-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stage-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.stage-card.is-current {
    border-color: rgba(196, 239, 23, 0.55);
    background: linear-gradient(180deg, rgba(196, 239, 23, 0.12), rgba(255, 255, 255, 0.96));
}

.stage-card.is-upcoming {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    opacity: 1;
}

.stage-card.is-upcoming::before {
    content: "скоро";
    color: var(--muted);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.stage-card.is-upcoming > * {
    display: none;
}

.stage-card-copy {
    display: grid;
    gap: 8px;
}

.stage-card-copy .eyebrow {
    display: none;
}

.stage-card-copy h3 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    line-height: 1.05;
}

.stage-card-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.stage-card-metrics {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.stage-card-metrics span {
    color: var(--muted);
    font-size: 12px;
}

.stage-card-metrics strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.stage-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stage-card-actions .btn-primary[disabled] {
    display: none;
}

.stage-card-actions .btn-primary,
.stage-card-actions .btn-ghost,
.stage-card.is-upcoming > .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    width: 56px;
    padding-left: 0;
    padding-right: 0;
    font-size: 0;
    line-height: 1;
}

.stage-card-actions .btn-primary::before,
.stage-card-actions .btn-ghost::before,
.stage-card.is-upcoming > .btn-ghost::before {
    font-size: 18px;
    line-height: 1;
}

.stage-card-actions .btn-primary::before {
    content: "▶";
}

.stage-card-actions form .btn-ghost::before {
    content: "↻";
}

.stage-card-actions > .btn-ghost::before,
.stage-card-actions > a.btn-ghost::before {
    content: "⟳";
}

.stage-card.is-upcoming > .btn-ghost::before {
    content: "◌";
}

.stage-run-status {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.stage-run-error {
    color: #b42318;
}

.stage-run-domains {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    word-break: break-word;
}

.stage-run-progress {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.08);
    border-radius: 999px;
}

.stage-run-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--lime), var(--lime-deep));
    border-radius: inherit;
}

.domains-table-toolbar,
.domains-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.domains-table-toolbar-copy {
    display: grid;
    gap: 4px;
}

.domains-table-toolbar-copy strong {
    color: var(--text);
    font-size: 15px;
}

.domains-table-toolbar-copy span,
.domains-table-summary,
.domains-table-page-size span {
    color: var(--muted);
    font-size: 12px;
}

.domains-table-page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.domains-table-search {
    display: inline-grid;
    gap: 6px;
}

.domains-table-toolbar-controls {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.domains-table-page-size select {
    min-width: 78px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #ffffff;
    color: var(--text);
}

.domains-table-search input {
    min-width: 240px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #ffffff;
    color: var(--text);
}

.domains-table-search input:focus {
    border-color: var(--lime-deep);
    box-shadow: 0 0 0 4px rgba(196, 239, 23, 0.16);
    outline: none;
}

.domains-table-pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.domains-table-pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.domains-page-button {
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.domains-page-button.is-active {
    border-color: rgba(196, 239, 23, 0.72);
    background: rgba(196, 239, 23, 0.22);
    color: #536a00;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.projects-table-domains {
    min-width: 860px;
}

.project-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dr-cell {
    width: 84px;
}

.dr-badge {
    --dr-angle: 0deg;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #ffffff 54%, transparent 55%),
        conic-gradient(#7a4fff82 0 var(--dr-angle), rgba(22, 29, 37, 0.12) var(--dr-angle) 360deg);
    box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.14);
}

.dr-badge.is-danger {
    background:
        radial-gradient(circle at center, #ffffff 54%, transparent 55%),
        conic-gradient(#c74141 0 var(--dr-angle), rgba(22, 29, 37, 0.12) var(--dr-angle) 360deg);
    box-shadow: inset 0 0 0 1px rgba(199, 65, 65, 0.14);
}

.dr-badge.is-positive {
    background:
        radial-gradient(circle at center, #ffffff 54%, transparent 55%),
        conic-gradient(var(--lime-deep) 0 var(--dr-angle), rgba(22, 29, 37, 0.12) var(--dr-angle) 360deg);
    box-shadow: inset 0 0 0 1px rgba(153, 186, 0, 0.14);
}

.dr-badge.is-neutral {
    background:
        radial-gradient(circle at center, #ffffff 54%, transparent 55%),
        conic-gradient(#4f7cff 0 var(--dr-angle), rgba(22, 29, 37, 0.12) var(--dr-angle) 360deg);
    box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.14);
}

.dr-badge__value {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.dr-badge-empty {
    background:
        radial-gradient(circle at center, #ffffff 54%, transparent 55%),
        conic-gradient(rgba(22, 29, 37, 0.12) 0 360deg);
}

.dr-badge-large {
    width: 64px;
    height: 64px;
}

.dr-badge-large .dr-badge__value {
    font-size: 18px;
}

.dr-badge-xl {
    width: 84px;
    height: 84px;
}

.dr-badge-xl .dr-badge__value {
    font-size: 24px;
}

.domain-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.domain-hero__main {
    display: grid;
    gap: 10px;
    max-width: 980px;
}

.domain-hero__eyebrow-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.domain-hero__host {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.domain-hero__main h1 {
    margin: 0;
    font-size: 48px;
    line-height: 0.98;
}

.domain-hero__main p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 900px;
}

.domain-hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.domain-hero__badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.domain-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(22, 29, 37, 0.08);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.domain-scoreboard {
    display: grid;
    grid-template-columns: minmax(240px, 1.1fr) repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.domain-scoreboard__hero,
.domain-score-card,
.domain-panel,
.domain-empty-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.04);
}

.domain-scoreboard__hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

.domain-scoreboard__hero-copy {
    display: grid;
    gap: 6px;
}

.domain-scoreboard__hero-copy strong {
    color: var(--text);
    font-size: 32px;
    line-height: 1;
}

.domain-scoreboard__hero-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.domain-score-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
}

.domain-score-card-nav {
    align-content: start;
}

.domain-score-card-nav__actions {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.domain-inline-nav-link {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.domain-inline-nav-link:hover,
.domain-inline-nav-link:focus-visible {
    color: #536a00;
    text-decoration: underline;
}

.domain-inline-nav-link.is-disabled {
    color: var(--muted);
    opacity: 0.72;
    pointer-events: none;
}

.domain-inline-nav-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 34px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.domain-inline-nav-link-arrow:hover,
.domain-inline-nav-link-arrow:focus-visible {
    background: rgba(196, 239, 23, 0.18);
    border-color: rgba(143, 180, 0, 0.28);
    text-decoration: none;
}

.domain-inline-nav-link-arrow.is-disabled {
    background: rgba(17, 17, 17, 0.03);
    border-color: rgba(17, 17, 17, 0.08);
}

.domain-nav-project-button {
    width: 100%;
}

.domain-score-card strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.domain-score-card small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.domain-workspace,
.domain-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.domain-panel {
    padding: 24px;
}

.domain-panel-summary {
    background: linear-gradient(180deg, rgba(196, 239, 23, 0.12), rgba(255, 255, 255, 0.96));
}

.domain-panel-actions {
    grid-column: 1 / -1;
}

.domain-manual-checks-section {
    order: 2;
    margin-top: 18px;
    margin-bottom: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.domain-panel-manual-checks {
    padding: 0;
}

.domain-workbench {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    padding: 22px 24px 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.domain-workbench .domain-panel,
.domain-workbench .domain-empty-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.domain-workbench .projects-table-shell {
    background: transparent;
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: none;
}

.domain-workbench .section-heading {
    gap: 12px;
}

.domain-workbench .section-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
}

.domain-loader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.domain-loader-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    background: rgba(250, 251, 246, 0.92);
    border: 1px solid rgba(22, 29, 37, 0.08);
}

.domain-loader-card strong {
    color: var(--text);
    font-size: 18px;
}

.domain-loader-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.domain-loader-status {
    display: flex;
    align-items: center;
    gap: 10px 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.domain-loader-error {
    color: #b42318;
}

.domain-section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.domain-section-actions form {
    margin: 0;
}

.domain-loader-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.domain-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.domain-summary-block {
    padding: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(22, 29, 37, 0.08);
}

.domain-summary-block p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.domain-check-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--text);
}

.domain-check-list li {
    margin-bottom: 10px;
    line-height: 1.55;
}

.domain-facts-grid {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.domain-facts-grid dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.domain-facts-grid dd {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
}

.domain-sections {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    align-items: start;
    gap: 20px;
    padding-bottom: 8px;
}

.domain-history-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    align-items: end;
    gap: 10px;
    min-height: 180px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

.domain-history-bar {
    display: grid;
    align-items: end;
    justify-items: center;
    gap: 8px;
    min-height: 140px;
}

.domain-history-bar__value {
    width: 100%;
    min-height: 12px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, var(--lime), var(--lime-deep));
}

.domain-history-bar small {
    color: var(--muted);
    font-size: 10px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.domain-empty-card {
    display: grid;
    gap: 8px;
    padding: 16px 0;
}

.domain-empty-card strong {
    color: var(--text);
    font-size: 18px;
}

.domain-empty-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.domain-empty-card-tight {
    padding: 12px 0;
}

.domain-mini-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.domain-mini-stats-classification {
    padding: 14px 16px;
    background: transparent;
    border: 0;
}

.domain-mini-stats-classification span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.03);
}

.domain-mini-stats-classification span.is-danger {
    background: rgba(199, 65, 65, 0.12);
    color: #a53030;
}

.domain-mini-stats-classification span.is-warning {
    background: rgba(255, 184, 77, 0.18);
    color: #9b5a00;
}

.domain-mini-stats-classification span.is-positive {
    background: rgba(196, 239, 23, 0.2);
    color: #5f7400;
}

.domain-mini-stats-classification span.is-danger strong,
.domain-mini-stats-classification span.is-warning strong,
.domain-mini-stats-classification span.is-positive strong {
    color: inherit;
}

.domain-mini-stats span {
    color: var(--muted);
    font-size: 11px;
}

.domain-mini-stats strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.domain-table-actions-row {
    display: none;
}

.refdomain-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.refdomain-spam-badge {
    min-width: 0;
    min-height: 24px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    align-self: center;
    border-color: rgba(199, 65, 65, 0.08);
    box-shadow: none;
}

.domain-refdomains-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.domain-refdomains-footer form {
    margin: 0;
}

.domain-icon-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.domain-icon-button:hover,
.domain-icon-button:focus-visible {
    background: rgba(196, 239, 23, 0.18);
    border-color: rgba(143, 180, 0, 0.28);
    transform: translateY(-1px);
}

.domain-section-note {
    margin: -6px 0 16px;
    color: var(--muted);
    font-size: 12px;
}

.domain-panel-roadmap {
    background: linear-gradient(180deg, rgba(196, 239, 23, 0.1), rgba(255, 255, 255, 0.96));
}

.domain-data-grid {
    grid-template-columns: 1fr;
    grid-column: 1;
    margin-bottom: 0;
    min-width: 0;
}

.domain-data-grid > .domain-panel + .domain-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.domain-workbench .domain-data-grid > .domain-panel + .domain-panel,
.domain-workbench .domain-manual-check-row + .domain-manual-check-row {
    margin-top: 4px;
}

.domain-panel-ai {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-width: 0;
    padding-left: 20px;
    border-left: 1px solid rgba(17, 17, 17, 0.08);
}

.domain-panel:has([data-refdomains-placeholder]) .section-subtitle,
.domain-panel:has([data-refdomains-placeholder]) .domain-refdomains-footer,
.domain-panel-ai > .section-heading {
    display: none;
}

.domain-panel-ai .domain-ai-overview,
.domain-panel-ai .domain-ai-grid {
    display: none;
}

.domain-ai-simple {
    display: grid;
    gap: 16px;
}

.domain-ai-placeholder {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 24px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: linear-gradient(180deg, rgba(242, 243, 245, 0.92), rgba(234, 236, 239, 0.98));
}

.domain-ai-placeholder-refdomains {
    margin-top: 14px;
    min-height: 360px;
}

.domain-ai-placeholder__inner,
.domain-ai-placeholder__loading {
    display: grid;
    justify-items: center;
    gap: 16px;
    text-align: center;
}

.domain-ai-placeholder__label {
    margin: 0;
    color: rgba(17, 17, 17, 0.42);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
}

.domain-ai-placeholder__status {
    margin: -6px 0 0;
    color: rgba(17, 17, 17, 0.56);
    font-size: 12px;
    line-height: 1.4;
    text-transform: lowercase;
}

.domain-ai-placeholder__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(17, 17, 17, 0.14);
    border-top-color: rgba(17, 17, 17, 0.5);
    border-radius: 50%;
    animation: domain-ai-placeholder-spin 0.8s linear infinite;
}

@keyframes domain-ai-placeholder-spin {
    to {
        transform: rotate(360deg);
    }
}

.domain-ai-simple__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 12px;
}

.domain-panel-ai .domain-ai-simple__meta {
    display: none;
}

.domain-refdomains-table {
    min-width: 700px;
}

.domain-refdomains-table thead th {
    padding: 11px 12px;
    font-size: 10px;
}

.domain-refdomains-table tbody td {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.35;
}

.domain-refdomains-table .projects-table-project strong {
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.domain-refdomains-table .projects-table-project span,
.domain-refdomains-table .projects-table-project small {
    font-size: 11px;
}

.domain-refdomains-spam-cell {
    width: 1%;
    min-width: 42px;
    text-align: center;
}

.domain-refdomains-spam-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
}

.domain-refdomains-dr-value {
    display: inline-block;
    min-width: 20px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.domain-refdomains-dr-value.is-danger {
    color: #b42318;
}

.domain-refdomains-dr-value.is-neutral {
    color: #9b5a00;
}

.domain-refdomains-dr-value.is-positive {
    color: #3f6b00;
}

.domain-refdomains-dr-value:not(.is-danger):not(.is-neutral):not(.is-positive) {
    color: var(--muted);
}


.domain-ai-message {
    padding: 18px 20px;
    border: 1px solid rgba(22, 29, 37, 0.08);
    background: rgba(250, 251, 246, 0.92);
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
}

.domain-ai-disavow {
    display: grid;
    gap: 10px;
}

.domain-ai-disavow strong {
    color: var(--text);
}

.domain-ai-disavow pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid rgba(22, 29, 37, 0.08);
    background: #1e2127;
    color: #e9edf3;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.domain-ai-overview {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.domain-ai-overview__main {
    display: grid;
    gap: 12px;
}

.domain-ai-overview__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.domain-ai-overview__summary {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

.domain-ai-overview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 12px;
}

.domain-ai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.domain-ai-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(22, 29, 37, 0.08);
    background: rgba(246, 247, 242, 0.7);
}

.domain-ai-card strong {
    color: var(--text);
}

.domain-ai-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.domain-ai-cluster-list {
    display: grid;
    gap: 12px;
}

.domain-ai-cluster {
    display: grid;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(22, 29, 37, 0.08);
}

.domain-ai-cluster:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.domain-ai-cluster__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.domain-ai-cluster__header strong {
    margin: 0;
}

.domain-ai-cluster__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.domain-ai-cluster__examples span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(196, 239, 23, 0.12);
    color: #617400;
    font-size: 12px;
    font-weight: 600;
}

.domain-ai-error {
    margin-top: 18px;
}

.domain-roadmap-list {
    display: grid;
    gap: 16px;
}

.domain-roadmap-list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.domain-roadmap-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.table-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-status-badge.is-outline {
    background: transparent;
}

.table-status-badge.is-processing {
    background: rgba(22, 29, 37, 0.08);
    color: #2f3640;
}

.table-status-badge.is-processing.is-outline {
    border-color: rgba(22, 29, 37, 0.16);
    background: rgba(255, 255, 255, 0.74);
}

.table-status-badge.is-processing.is-completed {
    background: rgba(196, 239, 23, 0.22);
    color: #536a00;
}

.table-status-badge.is-processing.is-completed.is-outline {
    border-color: rgba(153, 186, 0, 0.34);
    background: rgba(255, 255, 255, 0.88);
    color: #6c8200;
}

.table-status-badge.is-processing.is-pending {
    background: rgba(79, 124, 255, 0.12);
    color: #2950b9;
}

.table-status-badge.is-processing.is-pending.is-outline {
    border-color: rgba(79, 124, 255, 0.28);
    background: rgba(255, 255, 255, 0.88);
    color: #2950b9;
}

.table-status-badge.is-processing.is-running {
    background: rgba(255, 184, 77, 0.18);
    color: #9b5a00;
}

.table-status-badge.is-processing.is-running.is-outline {
    border-color: rgba(255, 184, 77, 0.34);
    background: rgba(255, 255, 255, 0.88);
    color: #9b5a00;
}

.table-status-badge.is-final {
    background: rgba(22, 29, 37, 0.08);
    color: #2f3640;
}

.table-status-badge.is-final.is-passed {
    background: rgba(196, 239, 23, 0.22);
    color: #536a00;
}

.table-status-badge.is-final.is-review {
    background: rgba(255, 184, 77, 0.18);
    color: #9b5a00;
}

.table-status-badge.is-final.is-rejected {
    background: rgba(199, 65, 65, 0.14);
    color: #a53030;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 20px;
}

.settings-card,
.settings-side-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 29, 37, 0.08);
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.06);
}

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

.settings-card-header h2,
.settings-side-card h2 {
    margin: 12px 0 8px;
    font-size: 30px;
    line-height: 1;
}

.settings-card-header p,
.settings-side-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.settings-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 34px;
    padding: 0 12px;
    background: rgba(22, 29, 37, 0.08);
    color: #232323;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-status-badge.is-configured {
    background: rgba(196, 239, 23, 0.22);
    color: #536a00;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.settings-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.settings-hint {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: rgba(17, 17, 17, 0.04);
}

.settings-hint strong {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-hint code {
    display: inline-block;
    width: fit-content;
    padding: 8px 10px;
    background: #f1f4df;
    color: #141414;
    font-weight: 800;
}

.settings-form-actions {
    display: flex;
    justify-content: flex-end;
}

.settings-note-list {
    margin: 18px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: flex-start;
    justify-content: center;
}

.modal-shell.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(17, 17, 17, 0.48);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(640px, calc(100vw - 32px));
    margin: 80px 16px 0;
    padding: 24px;
    background: #ffffff;
    opacity: 1;
}

.modal-card.modal-card-compact {
    width: min(560px, calc(100vw - 32px));
}

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

.modal-card-header h2 {
    margin: 12px 0 8px;
    font-size: 32px;
    line-height: 1;
}

.modal-card-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.modal-close-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.project-create-form {
    display: grid;
    gap: 18px;
}

.project-create-form textarea,
.project-create-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: #fafbf6;
    color: var(--text);
    outline: none;
    resize: vertical;
}

.project-create-form textarea:focus,
.project-create-form select:focus {
    border-color: var(--lime-deep);
    box-shadow: 0 0 0 4px rgba(196, 239, 23, 0.22);
}

.domain-manual-check-form {
    margin-top: 14px;
    grid-template-columns: 1fr;
    gap: 14px;
}

.domain-manual-check-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

.domain-manual-check-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.domain-manual-check-form .settings-form-actions {
    justify-content: flex-end;
    margin-top: 6px;
}

.domain-manual-check-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.domain-manual-check-row + .domain-manual-check-row {
    padding-top: 14px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.domain-manual-check-row__meta {
    display: grid;
    gap: 6px;
    padding-top: 8px;
}

.domain-manual-check-row__title {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.domain-manual-check-row__status {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.domain-manual-check-row__control,
.domain-manual-check-row__note {
    min-width: 0;
}

.domain-manual-check-row__note textarea {
    min-height: 92px;
}

.modal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.columns-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.columns-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(17, 17, 17, 0.1);
    background: #fafbf6;
    color: var(--text);
    cursor: pointer;
}

.columns-picker-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--lime-deep);
}

.columns-picker-option input:disabled {
    cursor: not-allowed;
}

.columns-picker-option:has(input:checked) {
    border-color: rgba(153, 186, 0, 0.34);
    background: rgba(196, 239, 23, 0.12);
}

.columns-picker-option span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

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

body.modal-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .app-topbar {
        height: auto;
        min-height: 50px;
        padding: 12px 20px;
        align-items: flex-start;
    }

    .migrations-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .migration-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page-intro,
    .page-intro-projects,
    .page-intro-project-detail {
        flex-direction: column;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-stats-grid,
    .dashboard-metric-list,
    .dashboard-averages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-top-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-top-metrics {
        justify-content: flex-start;
    }

    .project-detail-actions {
        flex-wrap: wrap;
    }

    .project-detail-layout {
        grid-template-columns: 1fr;
    }

    .domain-hero,
    .domain-workspace,
    .domain-sections,
    .domain-data-grid,
    .domain-ai-grid,
    .domain-summary-grid,
    .domain-facts-grid,
    .domain-manual-check-form,
    .domain-manual-check-row {
        grid-template-columns: 1fr;
    }

    .domain-scoreboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .domain-scoreboard__hero {
        grid-column: 1 / -1;
    }

    .domain-panel-ai {
        grid-column: auto;
        grid-row: auto;
        padding-left: 0;
        padding-top: 18px;
        border-left: 0;
        border-top: 1px solid rgba(17, 17, 17, 0.08);
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }
}

/* Topbar refinement */
.app-topbar {
    justify-content: flex-end;
}

.app-topbar-left {
    flex: 1 1 auto;
}

.app-topbar-date {
    color: #232323;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.icon-button-bell {
    position: relative;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
}

.icon-button-bell .icon-bell {
    color: #8d96a0;
}

.icon-button-bell .icon-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #4f7cff;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
}

.app-topbar-user {
    border: 0;
    box-shadow: none;
}

.user-badge {
    min-width: auto;
    padding: 0;
    gap: 10px;
    background: transparent;
    border: 0;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #202020, #434343);
    font-size: 15px;
}

.user-meta {
    text-align: right;
}

.user-meta strong {
    font-size: 15px;
}

.user-meta span {
    font-size: 13px;
}

.user-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #232323;
    border-bottom: 2px solid #232323;
    transform: rotate(45deg);
    margin-left: 2px;
}

.btn-logout {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .app-topbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .project-stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats-grid,
    .dashboard-metric-list,
    .dashboard-averages-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        margin-top: 24px;
        padding: 20px;
    }

    .modal-form-actions {
        flex-direction: column-reverse;
    }
}

/* Final topbar avatar and logout overrides */
.app-sidebar-brand {
    gap: 0;
}

.user-avatar {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 30%, rgba(255, 255, 255, 0.34), transparent 22%),
        linear-gradient(135deg, #d6ff1f 0%, #a7da00 100%);
    color: #ffffff;
}

.user-avatar::before,
.user-avatar::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.user-avatar::before {
    left: 6px;
    top: 7px;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    transform: rotate(16deg);
}

.user-avatar::after {
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.14);
    transform: rotate(45deg);
}

.btn-logout {
    background: transparent;
    color: #232323;
    border: 1px solid rgba(17, 17, 17, 0.18);
    box-shadow: none;
}

.btn-logout:hover {
    background: rgba(17, 17, 17, 0.04);
    color: #111111;
}
