:root {
    --bg: #0d1320;
    --bg-soft: #131d31;
    --panel: rgba(15, 23, 42, 0.9);
    --panel-strong: #111a2d;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5edf9;
    --muted: #96a5bf;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --success: #1fb97a;
    --danger: #f87171;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(2, 8, 23, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 30%),
        var(--bg);
}

body.nav-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3 {
    font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
}

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

p,
h1,
h2,
h3,
a,
span,
strong,
td,
th,
label,
button {
    overflow-wrap: break-word;
    word-break: normal;
}

.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;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.brand {
    font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.button,
button,
input,
select,
textarea {
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: var(--bg);
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.button--compact {
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
}

.button--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.danger-button {
    border-color: rgba(248, 113, 113, 0.45);
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.button-row > * {
    min-width: 0;
}

.document-links {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
}

.document-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.06);
    color: var(--text);
    font-size: 0.82rem;
}

.public-frame {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 2rem;
}

.public-nav {
    display: flex;
    gap: 1.1rem;
    align-items: center;
    color: var(--muted);
}

.public-main {
    display: grid;
    gap: 1.5rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1.5rem;
    align-items: stretch;
}

.hero__content,
.hero__stats,
.panel,
.auth-card,
.table-card,
.metric-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(19, 29, 49, 0.95), rgba(11, 18, 31, 0.95));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero__content {
    padding: 2.75rem;
}

.hero__content h1 {
    font-size: clamp(2.3rem, 5vw, 4.4rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero__lead {
    font-size: 1.05rem;
    max-width: 52ch;
}

.hero__actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.7rem;
}

.hero__stats {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.metric-card {
    padding: 1.4rem;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.88rem;
}

.metric-card strong {
    display: block;
    margin-top: 0.55rem;
    font-size: 2.1rem;
    color: var(--text);
}

.feature-grid,
.card-grid,
.stats-grid {
    display: grid;
    gap: 1.2rem;
}

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

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

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

.card-grid--wide {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.panel {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.panel h2 {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.panel h3 {
    font-size: 1.05rem;
    color: var(--text);
}

.panel--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.panel__topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.panel__actions {
    display: grid;
    gap: 0.75rem;
    justify-items: end;
}

.panel--notice {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.92));
}

.empty-state {
    text-align: left;
    justify-items: start;
}

.tag-row,
.topbar__meta,
.sidebar__foot {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--text);
    font-size: 0.82rem;
}

.pill--soft {
    background: var(--accent-soft);
    border-color: rgba(245, 158, 11, 0.24);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    background: rgba(31, 185, 122, 0.12);
    border: 1px solid rgba(31, 185, 122, 0.28);
    color: #d9ffef;
    font-size: 0.82rem;
    font-weight: 700;
}

.verified-badge::before {
    content: "\2713";
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: rgba(31, 185, 122, 0.22);
    font-size: 0.76rem;
}

.verified-badge--soft {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.24);
    color: #ffe6b4;
}

.verified-badge--soft::before {
    background: rgba(245, 158, 11, 0.22);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    position: relative;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: grid;
    align-content: space-between;
    padding: 1.5rem;
    background: rgba(9, 14, 24, 0.96);
    border-right: 1px solid var(--line);
}

.app-shell__overlay {
    position: fixed;
    inset: 0;
    z-index: 15;
    border: 0;
    background: rgba(2, 8, 23, 0.64);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.sidebar__brand,
.sidebar__nav {
    display: grid;
    gap: 1rem;
}

.sidebar__brand p {
    font-size: 0.94rem;
}

.sidebar__nav a {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
    border-color: var(--line);
    background: rgba(148, 163, 184, 0.06);
    color: var(--text);
}

.app-shell__main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    background: rgba(245, 158, 11, 0.16);
    border-bottom: 1px solid rgba(245, 158, 11, 0.28);
}

.impersonation-banner span {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    backdrop-filter: blur(16px);
    background: rgba(13, 19, 32, 0.82);
    border-bottom: 1px solid var(--line);
}

.topbar h1 {
    font-size: clamp(1.45rem, 2.6vw, 1.85rem);
}

.page-wrap {
    padding: 1.4rem;
    display: grid;
    gap: 1.2rem;
    min-width: 0;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.page-head h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.page-head__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-stack,
.list-stack {
    display: grid;
    gap: 1.2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.summary-item {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.45);
}

.summary-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.summary-item strong {
    display: block;
    color: var(--text);
    line-height: 1.45;
}

.helper-copy {
    font-size: 0.9rem;
}

.alert {
    padding: 1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.alert--success {
    background: rgba(31, 185, 122, 0.12);
    border-color: rgba(31, 185, 122, 0.24);
}

.alert--error {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.24);
}

.alert__stack {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.65rem;
    color: var(--muted);
}

.auth-shell {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.auth-card {
    width: min(520px, 100%);
    padding: 2rem;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.form-panel,
.form-grid {
    display: grid;
    gap: 1rem;
}

.form-panel {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(19, 29, 49, 0.95), rgba(11, 18, 31, 0.95));
}

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

.field {
    display: grid;
    gap: 0.55rem;
}

.field span {
    color: var(--text);
    font-size: 0.93rem;
}

.field small {
    color: var(--danger);
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(10, 16, 28, 0.8);
    color: var(--text);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

textarea {
    resize: vertical;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.85fr)) auto;
    gap: 0.8rem;
    align-items: end;
}

.list-card,
.message-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(8, 12, 22, 0.5);
    display: grid;
    gap: 0.45rem;
}

.list-card--split {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.list-card > *,
.list-card--split > *,
.panel > *,
.page-head > * {
    min-width: 0;
}

.inline-badge-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.table td,
.table th,
.table td *,
.table th * {
    word-break: normal;
    overflow-wrap: break-word;
}

.company-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.45);
}

.company-identity__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.65rem;
}

.document-list {
    display: grid;
    gap: 0.75rem;
}

.document-list__item {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.45);
    display: grid;
    gap: 0.35rem;
}

.message-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
}

.inline-note {
    color: var(--muted);
}

.inline-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-action-group {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form--stack {
    display: grid;
    width: 100%;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(10, 16, 28, 0.62);
    color: var(--muted);
}

.checkbox-pill input {
    width: auto;
    margin: 0;
}

.checkbox-pill--block {
    align-items: flex-start;
    max-width: 100%;
}

.checkbox-pill--block span {
    display: grid;
    gap: 0.25rem;
}

.checkbox-pill--block small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.permission-sections {
    display: grid;
    gap: 1rem;
}

.permission-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.42);
}

.permission-card > div:first-child {
    display: grid;
    gap: 0.25rem;
}

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

.permission-card span {
    color: var(--muted);
}

.chat-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.chat-shell__sidebar,
.chat-shell__thread {
    min-height: 100%;
}

.conversation-list {
    display: grid;
    gap: 0.75rem;
}

.conversation-list__item {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.42);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.conversation-list__item:hover,
.conversation-list__item.is-active {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-1px);
}

.conversation-list__item strong,
.conversation-list__item small {
    color: var(--text);
}

.conversation-list__item span {
    color: var(--muted);
    line-height: 1.5;
}

.chat-thread__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--line);
}

.chat-thread__messages {
    display: grid;
    gap: 0.9rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.chat-bubble {
    display: grid;
    gap: 0.45rem;
    max-width: min(100%, 760px);
    padding: 1rem 1.1rem;
    border-radius: 22px 22px 22px 10px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.56);
}

.chat-bubble--own {
    justify-self: end;
    border-radius: 22px 22px 10px 22px;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.26);
}

.chat-bubble__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.84rem;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 1.2rem;
    align-items: start;
}

.application-feed {
    display: grid;
    gap: 1rem;
}

.applicant-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(8, 12, 22, 0.48);
}

.applicant-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    flex-wrap: wrap;
}

.applicant-card__meta {
    display: grid;
    gap: 0.35rem;
}

.applicant-card__meta strong {
    color: var(--text);
    font-size: 1.05rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.detail-item {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.25rem;
}

.detail-item span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.note-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 0.4rem;
}

.workspace-column {
    display: grid;
    gap: 1rem;
}

.table-card {
    overflow: auto;
    min-width: 0;
    padding: 0.4rem;
}

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

.table th,
.table td {
    text-align: left;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(148, 163, 184, 0.04);
}

.nav-toggle {
    display: none;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    padding: 0.8rem 1rem;
}

@media (max-width: 1100px) {
    .card-grid,
    .feature-grid,
    .stats-grid,
    .hero,
    .card-grid--wide,
    .workspace-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 320px);
        transform: translateX(-102%);
        transition: transform 0.24s ease;
        z-index: 20;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    body.nav-open .app-shell__overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .topbar {
        padding-left: 1rem;
        padding-right: 1rem;
        align-items: flex-start;
    }

    .impersonation-banner {
        padding: 0.9rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .page-wrap {
        padding: 1rem;
    }

    .panel--row {
        flex-direction: column;
    }

    .panel__actions {
        width: 100%;
        justify-items: start;
    }

    .list-card--split,
    .company-identity {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hero,
    .feature-grid,
    .card-grid,
    .card-grid--wide,
    .chat-shell,
    .workspace-grid,
    .stats-grid,
    .detail-grid,
    .form-grid--two,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .public-header,
    .topbar,
    .message-card__meta,
    .chat-thread__header,
    .chat-bubble__meta,
    .applicant-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__content {
        padding: 2rem 1.5rem;
    }

    .panel,
    .form-panel,
    .table-card,
    .auth-card {
        padding: 1.15rem;
    }

    .auth-links,
    .button-row,
    .topbar__meta {
        width: 100%;
    }

    .button,
    .button--ghost {
        width: auto;
        max-width: 100%;
    }

    .page-head__actions,
    .page-head__actions .button,
    .page-head__actions a,
    .button-row > .button,
    .button-row > a,
    .topbar__meta form,
    .topbar__meta .button,
    .inline-form .button,
    .inline-form .button--ghost,
    .list-card .button,
    .list-card a.button,
    .form-grid > .button,
    .form-grid > .button--ghost,
    .inline-action-group .button,
    .inline-action-group form,
    .inline-action-group form .button {
        width: 100%;
    }

    .inline-form {
        display: grid;
        width: 100%;
    }

    .table-card {
        overflow: visible;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .table {
        min-width: 0;
        display: block;
    }

    .table thead {
        display: none;
    }

    .table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .table tr {
        display: grid;
        gap: 0.7rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(19, 29, 49, 0.95), rgba(11, 18, 31, 0.95));
        box-shadow: var(--shadow);
    }

    .table td {
        display: grid;
        grid-template-columns: minmax(112px, 42%) 1fr;
        gap: 0.75rem;
        align-items: start;
        padding: 0;
        border: 0;
    }

    .table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .table td .pill {
        justify-self: start;
    }

    .inline-action-group,
    .inline-action-group form {
        width: 100%;
    }

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

    .chat-thread__messages {
        max-height: none;
    }
}

@media (max-width: 540px) {
    .public-frame {
        padding: 1rem 0.85rem 2rem;
    }

    .hero__content {
        padding: 1.5rem 1.15rem;
    }

    .hero__content h1 {
        font-size: 2rem;
    }

    .panel,
    .form-panel,
    .auth-card {
        padding: 1rem;
    }

    .public-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .checkbox-grid {
        display: grid;
    }

    .table td {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* 2026 workspace theme refresh */
:root {
    --bg: #f4f7fb;
    --bg-soft: #eef3ff;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --panel-soft: #f8fbff;
    --line: #dbe4f2;
    --line-strong: #c7d4eb;
    --text: #111a36;
    --muted: #667595;
    --brand: #2c4dd8;
    --accent: #f6a300;
    --accent-soft: rgba(246, 163, 0, 0.14);
    --success: #1f8f5f;
    --danger: #d9485f;
    --radius: 28px;
    --shadow: 0 24px 48px rgba(35, 63, 136, 0.08);
    --shadow-soft: 0 14px 28px rgba(29, 53, 123, 0.06);
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(44, 77, 216, 0.08), transparent 30%),
        radial-gradient(circle at bottom left, rgba(246, 163, 0, 0.08), transparent 32%),
        linear-gradient(180deg, #f9fbff 0%, #f2f6fc 100%);
}

body.app-body {
    background:
        radial-gradient(circle at top right, rgba(44, 77, 216, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
}

body.public-body {
    background:
        radial-gradient(circle at top right, rgba(44, 77, 216, 0.1), transparent 24%),
        linear-gradient(180deg, #fbfcff 0%, #f3f6fc 100%);
}

h1,
h2,
h3,
.brand {
    font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.04em;
}

p {
    color: var(--muted);
}

a {
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--brand);
    font-size: 1.55rem;
    font-weight: 800;
}

.brand::before {
    content: "\26A1";
    display: inline-grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), #4966e4);
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 16px 28px rgba(44, 77, 216, 0.2);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(44, 77, 216, 0.08);
    color: var(--brand);
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
}

.eyebrow::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(246, 163, 0, 0.12);
}

.button {
    border-color: rgba(44, 77, 216, 0.24);
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #4966e4);
    box-shadow: 0 18px 30px rgba(44, 77, 216, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(44, 77, 216, 0.2);
}

.button--ghost {
    background: #ffffff;
    color: var(--text);
    border-color: var(--line);
    box-shadow: none;
}

.button--ghost:hover {
    background: rgba(44, 77, 216, 0.04);
    box-shadow: none;
}

.danger-button {
    border-color: rgba(217, 72, 95, 0.25);
    background: linear-gradient(135deg, #ef5466, #d9485f);
    color: #fff;
}

.document-links a {
    border-color: var(--line);
    background: #fff;
    color: var(--brand);
    font-weight: 600;
}

.public-frame {
    max-width: 1320px;
    padding: 1.15rem 1.4rem 3.25rem;
}

.public-header {
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.public-nav {
    gap: 1rem;
}

.public-nav a:not(.button) {
    color: var(--muted);
    font-weight: 600;
}

.hero__content,
.hero__stats,
.panel,
.auth-card,
.table-card,
.metric-card,
.form-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.hero__content,
.hero__stats,
.panel,
.auth-card,
.table-card,
.metric-card,
.form-panel {
    border-radius: var(--radius);
}

.metric-card span {
    color: #7382a2;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.metric-card strong {
    color: var(--brand);
}

.panel {
    padding: 1.45rem;
}

.panel--notice {
    background: linear-gradient(135deg, rgba(44, 77, 216, 0.08), rgba(246, 163, 0, 0.06));
    border-color: rgba(44, 77, 216, 0.16);
}

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

.sidebar {
    padding: 1.25rem;
    background: linear-gradient(180deg, #eef3ff 0%, #f9fbff 100%);
    border-right: 1px solid var(--line);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.75);
}

.sidebar__brand {
    padding: 1.15rem;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.sidebar__brand p {
    color: var(--muted);
}

.sidebar__nav {
    gap: 0.65rem;
}

.sidebar__nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: #3d4f78;
    font-weight: 600;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
    border-color: rgba(44, 77, 216, 0.12);
    background: linear-gradient(135deg, rgba(44, 77, 216, 0.08), rgba(246, 163, 0, 0.08));
    color: var(--text);
    box-shadow: 0 10px 20px rgba(44, 77, 216, 0.07);
}

.sidebar__foot {
    padding: 0.95rem;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    align-items: flex-start;
}

.sidebar-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.sidebar-user strong {
    display: block;
}

.sidebar-user span {
    color: var(--muted);
    font-size: 0.86rem;
}

.topbar {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(199, 212, 235, 0.9);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 24px rgba(22, 40, 89, 0.04);
}

.topbar__title {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.topbar__meta {
    gap: 0.9rem;
}

.topbar__user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 20px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.topbar__user strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
}

.topbar__user span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

.topbar__avatar,
.sidebar-user__avatar,
.staff-card__avatar {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), #6b84ee);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(44, 77, 216, 0.18);
}

.page-wrap {
    padding: 1.6rem;
    gap: 1.25rem;
}

.page-head {
    align-items: center;
}

.page-head h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.15rem);
}

.summary-item,
.list-card,
.message-card,
.company-identity,
.document-list__item,
.conversation-list__item,
.chat-bubble,
.applicant-card,
.detail-item,
.note-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.list-card strong,
.detail-item strong,
.conversation-list__item strong,
.panel h3 {
    color: var(--text);
    word-break: break-word;
}

.summary-item span,
.detail-item span,
.message-card__meta,
.chat-bubble__meta,
.conversation-list__item span,
.document-list__item span {
    color: #6f7f9f;
}

.pill {
    background: rgba(44, 77, 216, 0.08);
    border-color: rgba(44, 77, 216, 0.12);
    color: var(--brand);
    font-weight: 600;
}

.pill--soft {
    background: rgba(246, 163, 0, 0.12);
    border-color: rgba(246, 163, 0, 0.2);
    color: #b86f00;
}

.verified-badge {
    background: rgba(44, 77, 216, 0.1);
    border-color: rgba(44, 77, 216, 0.16);
    color: var(--brand);
}

.verified-badge::before {
    background: rgba(44, 77, 216, 0.15);
}

.alert {
    border-radius: 20px;
    background: #fff;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line-strong);
    color: var(--text);
    border-radius: 16px;
    box-shadow: inset 0 1px 2px rgba(12, 24, 60, 0.03);
}

input::placeholder,
textarea::placeholder {
    color: #95a2bf;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(44, 77, 216, 0.45);
    box-shadow: 0 0 0 4px rgba(44, 77, 216, 0.1);
}

.field span {
    color: #22335f;
    font-weight: 600;
}

.field--checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
}

.field--checkbox input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.field--checkbox span {
    margin: 0;
}

.inline-note,
.helper-copy {
    color: var(--muted);
}

.checkbox-grid {
    gap: 0.65rem;
}

.checkbox-grid--soft {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkbox-pill {
    padding: 0.75rem 0.95rem;
    border-radius: 16px;
    border-color: var(--line);
    background: #fff;
    color: var(--text);
}

.checkbox-pill input {
    accent-color: var(--brand);
}

.permission-groups {
    display: grid;
    gap: 1rem;
}

.permission-group {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel-soft);
    overflow: hidden;
}

.permission-group[open] {
    box-shadow: var(--shadow-soft);
}

.permission-group summary {
    list-style: none;
    cursor: pointer;
}

.permission-group summary::-webkit-details-marker {
    display: none;
}

.permission-group__summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.2rem;
}

.permission-group__meta {
    display: grid;
    gap: 0.3rem;
}

.permission-group__meta strong {
    font-size: 1rem;
    color: var(--text);
}

.permission-group__meta span {
    color: var(--muted);
    line-height: 1.6;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(44, 77, 216, 0.1);
    border: 1px solid rgba(44, 77, 216, 0.12);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.permission-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    padding: 0 1.2rem 1.2rem;
}

.permission-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.permission-option:hover {
    border-color: rgba(44, 77, 216, 0.22);
    box-shadow: 0 10px 18px rgba(44, 77, 216, 0.06);
    transform: translateY(-1px);
}

.permission-option input {
    width: auto;
    margin-top: 0.2rem;
    accent-color: var(--brand);
}

.permission-option__copy {
    display: grid;
    gap: 0.25rem;
}

.permission-option__copy strong {
    font-size: 0.93rem;
    color: var(--text);
}

.permission-option__copy small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.section-divider {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-divider h3 {
    font-size: 1.18rem;
}

.staff-directory {
    display: grid;
    gap: 1rem;
}

.staff-card {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.staff-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
}

.staff-card__identity {
    display: grid;
    gap: 0.2rem;
}

.staff-card__identity strong {
    font-size: 1rem;
}

.staff-card__identity span,
.staff-card__identity small {
    color: var(--muted);
}

.staff-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.access-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.access-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: #31456f;
    font-size: 0.82rem;
    font-weight: 600;
}

.access-pill--muted {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
}

.kv-cluster {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.kv-cluster span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.table-card {
    padding: 0.5rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.table {
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 0.65rem;
}

.table th {
    padding: 0 0.85rem 0.45rem;
    color: #7382a2;
    font-size: 0.74rem;
}

.table td {
    padding: 1rem 0.85rem;
    border: 0;
    background: #fff;
    vertical-align: top;
}

.table td:first-child {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.table td:last-child {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.table tbody tr {
    box-shadow: var(--shadow-soft);
}

.table tbody tr:hover {
    background: transparent;
}

.table-access {
    display: grid;
    gap: 0.2rem;
    min-width: 180px;
}

.table-access strong {
    font-size: 0.92rem;
    color: var(--text);
}

.table-access span {
    color: var(--muted);
    line-height: 1.55;
}

.chat-shell,
.workspace-grid {
    gap: 1.25rem;
}

.chat-bubble {
    background: #fff;
    border-radius: 22px;
}

.chat-bubble--own {
    background: rgba(44, 77, 216, 0.08);
    border-color: rgba(44, 77, 216, 0.14);
}

.conversation-list__item:hover,
.conversation-list__item.is-active {
    border-color: rgba(44, 77, 216, 0.22);
    background: rgba(44, 77, 216, 0.06);
}

.company-identity__logo {
    border-color: var(--line);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(44, 77, 216, 0.04);
}

.document-list__item,
.note-card {
    background: #fff;
}

.nav-toggle {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
}

.impersonation-banner {
    background: linear-gradient(135deg, rgba(246, 163, 0, 0.14), rgba(44, 77, 216, 0.1));
    border-bottom: 1px solid rgba(246, 163, 0, 0.18);
}

.impersonation-banner span {
    color: #4a5d82;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .permission-option-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .topbar__title {
        align-items: flex-start;
    }

    .topbar__meta {
        width: 100%;
        justify-content: space-between;
    }

    .sidebar {
        background: #f7faff;
    }
}

@media (max-width: 720px) {
    .permission-group__summary,
    .staff-card__head,
    .section-divider,
    .topbar__meta {
        display: grid;
        grid-template-columns: 1fr;
    }

    .staff-card__stats {
        justify-content: flex-start;
    }

    .topbar__user {
        width: 100%;
    }

    .table tr {
        background: #fff;
        border: 1px solid var(--line);
        box-shadow: var(--shadow-soft);
    }

    .table td {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .table td:first-child,
    .table td:last-child {
        border-radius: 0;
    }
}

@media (max-width: 540px) {
    .public-header {
        gap: 1rem;
    }

    .public-nav {
        justify-content: flex-start;
    }

    .permission-group__summary {
        padding: 1rem;
    }

    .permission-option-grid {
        padding: 0 1rem 1rem;
    }

    .staff-card {
        padding: 1rem;
    }
}

/* Marketing homepage template */
.button--accent {
    background: linear-gradient(135deg, #f6a300, #ffb41d);
    border-color: rgba(246, 163, 0, 0.18);
    box-shadow: 0 18px 30px rgba(246, 163, 0, 0.24);
}

.button--accent:hover {
    box-shadow: 0 20px 34px rgba(246, 163, 0, 0.28);
}

.public-body--home {
    background:
        radial-gradient(circle at top right, rgba(44, 77, 216, 0.11), transparent 24%),
        linear-gradient(180deg, #fbfcff 0%, #f4f7fd 100%);
}

.public-frame--home {
    max-width: 1400px;
    padding-top: 1.25rem;
    padding-bottom: 0;
}

.public-header--home {
    padding: 1rem 1.25rem;
    margin-bottom: 1.9rem;
}

.public-header__cluster {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex: 1;
    justify-content: flex-end;
}

.public-nav--home {
    justify-content: center;
    flex: 1;
}

.public-nav--home a,
.public-nav--actions a:not(.button) {
    color: #617395;
    font-weight: 600;
}

.public-nav--actions {
    gap: 0.8rem;
}

.public-main--home {
    gap: 0;
}

.landing-hero,
.landing-section,
.landing-cta-shell {
    width: 100%;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2rem 0 4.2rem;
}

.landing-hero__content {
    padding: 1rem 0 1rem 0.6rem;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(44, 77, 216, 0.24);
    background: rgba(44, 77, 216, 0.06);
    color: var(--brand);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.landing-badge::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--brand);
}

.landing-title {
    display: grid;
    gap: 0;
    margin-top: 1.5rem;
    font-size: clamp(3.65rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.landing-title__dark {
    color: #131c38;
}

/* Popup banner manager */
body.dashboard-popup-open {
    overflow: hidden;
}

.promo-banner-list {
    display: grid;
    gap: 1rem;
}

.promo-banner-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.promo-banner-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.promo-banner-card__copy {
    display: grid;
    gap: 0.35rem;
}

.promo-banner-card__copy strong {
    font-size: 1rem;
    color: var(--text);
}

.promo-banner-card__thumb,
.promo-banner-upload-preview img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fff;
}

.promo-banner-upload-preview {
    padding: 0.35rem;
    width: fit-content;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.promo-banner-upload-preview img {
    width: min(100%, 280px);
    height: auto;
    min-height: 140px;
}

.dashboard-popup {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

body.dashboard-popup-open .dashboard-popup {
    display: flex;
}

.dashboard-popup.is-hidden {
    display: none !important;
}

.dashboard-popup__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(17, 26, 54, 0.64);
}

.dashboard-popup__dialog {
    position: relative;
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    border-radius: 32px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 32px 80px rgba(17, 26, 54, 0.28);
}

.dashboard-popup__dialog--simple {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
}

.dashboard-popup__media {
    padding: 1rem;
    background: linear-gradient(160deg, rgba(44, 77, 216, 0.12), rgba(246, 163, 0, 0.08));
}

.dashboard-popup__media img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    border-radius: 24px;
}

.dashboard-popup__content {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.dashboard-popup__copy {
    display: grid;
    gap: 0.7rem;
}

.dashboard-popup__copy h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    color: var(--text);
}

.dashboard-popup__copy p {
    color: var(--muted);
    line-height: 1.75;
}

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

.dashboard-popup__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 900px) {
    .dashboard-popup {
        padding: 0.9rem;
    }

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

    .dashboard-popup__media img {
        min-height: 220px;
    }
}

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

    .promo-banner-card__thumb {
        width: 100%;
        height: 160px;
    }

    .dashboard-popup__content {
        padding: 1.15rem;
    }

    .dashboard-popup__close {
        top: 0.75rem;
        right: 0.75rem;
    }
}

.landing-title__blue {
    color: var(--brand);
}

.landing-title__accent {
    color: var(--accent);
}

.landing-copy {
    max-width: 16ch;
    margin-top: 2rem;
    font-size: 1.18rem;
    line-height: 1.65;
    color: #6d7d9d;
}

.landing-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2rem;
}

.landing-actions--center {
    justify-content: center;
}

.landing-button {
    min-width: 14rem;
    min-height: 5rem;
    border-radius: 22px;
    font-size: 1.08rem;
    font-weight: 700;
}

.landing-button::after {
    content: "\2192";
    margin-left: 0.8rem;
    font-size: 1.2rem;
}

.landing-button--ghost {
    color: #1a2543;
}

.landing-button--ghost::after,
.landing-actions--center .landing-button::after {
    content: "";
    margin: 0;
}

.landing-proof {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2.8rem;
}

.landing-proof p {
    color: #6b7a99;
    font-size: 1.04rem;
}

.landing-proof strong {
    color: #131c38;
}

.landing-proof__avatars {
    display: flex;
    align-items: center;
}

.landing-proof__avatars img,
.landing-proof__avatars span {
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 999px;
    border: 4px solid #f8fbff;
    object-fit: cover;
    margin-left: -0.4rem;
    box-shadow: 0 8px 18px rgba(27, 46, 92, 0.08);
}

.landing-proof__avatars img:first-child {
    margin-left: 0;
}

.landing-proof__avatars span {
    display: inline-grid;
    place-items: center;
    background: #eef3fb;
    color: #62718f;
    font-weight: 700;
    font-size: 1rem;
}

.landing-hero__visual {
    position: relative;
}

.landing-hero__glow {
    position: absolute;
    inset: 10% 5% 0 auto;
    width: 80%;
    height: 78%;
    background: radial-gradient(circle, rgba(246, 163, 0, 0.14), transparent 65%);
    filter: blur(18px);
    z-index: 0;
}

.landing-hero__visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 28px;
    box-shadow: 0 30px 55px rgba(48, 72, 142, 0.12);
}

.landing-section {
    padding: 4.8rem 0;
}

.landing-section--intro {
    text-align: center;
}

.landing-section__heading {
    max-width: 880px;
    margin: 0 auto 2.8rem;
}

.landing-section__heading--center {
    text-align: center;
}

.landing-section__heading h2,
.landing-cta h2,
.landing-band__content h2 {
    font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(2.65rem, 5vw, 4rem);
    letter-spacing: -0.05em;
    color: #141d39;
}

.landing-section__heading p,
.landing-cta p {
    margin-top: 1.1rem;
    font-size: 1.18rem;
    line-height: 1.7;
    color: #7382a2;
}

.landing-problem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    max-width: 1180px;
    margin: 0 auto;
}

.landing-problem-card {
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.landing-problem-card h3 {
    margin-top: 2rem;
    font-size: 1.85rem;
    color: #141d39;
}

.landing-problem-card p {
    margin-top: 1.05rem;
    font-size: 1.06rem;
    color: #7382a2;
    line-height: 1.75;
}

.landing-icon {
    display: inline-grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 22px;
    font-size: 1.5rem;
}

.landing-icon svg {
    width: 2rem;
    height: 2rem;
}

.landing-icon--blue {
    background: rgba(44, 77, 216, 0.08);
    color: var(--brand);
}

.landing-icon--gold {
    background: rgba(246, 163, 0, 0.1);
    color: var(--accent);
}

.landing-icon--blue-soft {
    background: rgba(44, 77, 216, 0.08);
    color: #526add;
}

.landing-section--journey {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.journey-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8rem;
    margin-top: 4.5rem;
}

.journey-track__line {
    position: absolute;
    top: 2.5rem;
    left: 3.5rem;
    right: 3.5rem;
    height: 2px;
    background: #d6deeb;
}

.journey-step {
    position: relative;
    text-align: center;
    padding-top: 4.2rem;
}

.journey-step__number {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: inline-grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    border: 3px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(44, 77, 216, 0.08);
}

.journey-step h3 {
    font-size: 1.9rem;
    color: #141d39;
}

.journey-step p {
    margin-top: 1rem;
    color: #7382a2;
    line-height: 1.7;
    font-size: 1.02rem;
}

.landing-band-shell {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: linear-gradient(90deg, #2e4bc2 0%, #3f5fc7 100%);
}

.landing-band {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5.2rem 1.4rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
    gap: 2.2rem;
    align-items: center;
}

.landing-band__content h2 {
    color: #fff;
    max-width: 12ch;
}

.landing-band__features {
    display: grid;
    gap: 1.9rem;
    margin-top: 2.4rem;
}

.landing-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.landing-feature__icon {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.landing-feature__icon svg {
    width: 1.85rem;
    height: 1.85rem;
}

.landing-feature h3 {
    color: #fff;
    font-size: 1.8rem;
}

.landing-feature p {
    margin-top: 0.65rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.04rem;
    line-height: 1.7;
}

.landing-band__card {
    padding: 2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(9, 23, 75, 0.16);
}

.match-card {
    padding: 2rem;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(18, 37, 88, 0.1);
}

.match-card__head,
.match-card__role {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.match-card__head h3 {
    font-size: 1.95rem;
    color: #141d39;
}

.match-card__score {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(246, 163, 0, 0.14);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
}

.match-card__role {
    justify-content: flex-start;
    margin-top: 2rem;
}

.match-card__logo {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 18px;
    background: #eef3ff;
    color: var(--brand);
    font-weight: 800;
    font-size: 1.6rem;
}

.match-card__role strong {
    display: block;
    font-size: 1.75rem;
    color: #141d39;
}

.match-card__role span {
    display: block;
    margin-top: 0.35rem;
    color: #6b7a99;
    font-size: 1.05rem;
}

.match-card__list {
    display: grid;
    gap: 1rem;
    margin: 2rem 0 2.2rem;
    padding: 0;
    list-style: none;
}

.match-card__list li {
    position: relative;
    padding-left: 2rem;
    color: #617395;
    font-size: 1.06rem;
}

.match-card__list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: -0.08rem;
    color: var(--accent);
    font-weight: 700;
}

.match-card__button {
    width: 100%;
    min-height: 4.4rem;
    border-radius: 18px;
    font-size: 1.08rem;
}

.landing-cta-shell {
    padding: 5.8rem 0;
}

.landing-cta {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4.2rem 2rem;
    border-radius: 36px;
    background: #fff;
    text-align: center;
    box-shadow: 0 28px 60px rgba(36, 63, 134, 0.1);
    position: relative;
    overflow: hidden;
}

.landing-cta::after {
    content: "";
    position: absolute;
    right: 10%;
    top: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(246, 163, 0, 0.18), transparent 70%);
    filter: blur(5px);
    pointer-events: none;
}

.landing-note {
    margin-top: 1.6rem;
    padding: 0.9rem 1.2rem;
    border-radius: 18px;
    background: rgba(44, 77, 216, 0.06);
    color: #536686;
    font-size: 0.95rem;
}

.landing-footer-shell {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 3.6rem 1.4rem 3rem;
    border-top: 1px solid #dde5f0;
    background: #f8fbff;
}

.landing-footer {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
}

.landing-footer__brand p {
    max-width: 22ch;
    margin-top: 1.5rem;
    font-size: 1.12rem;
    line-height: 1.7;
    color: #70809f;
}

.landing-footer__socials {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.landing-footer__socials a {
    display: inline-grid;
    place-items: center;
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 999px;
    background: #eef3fb;
    color: #617395;
    font-weight: 700;
}

.landing-footer__socials svg {
    width: 1.25rem;
    height: 1.25rem;
}

.landing-footer__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.landing-footer__links h3 {
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    color: #141d39;
}

.landing-footer__links a,
.landing-footer__bottom a {
    display: block;
    margin-bottom: 1rem;
    color: #70809f;
    font-size: 1.05rem;
}

.landing-footer__bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #dde5f0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-footer__bottom p {
    color: #7a89a5;
}

.landing-footer__bottom div {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 1200px) {
    .landing-hero,
    .landing-band {
        grid-template-columns: 1fr;
    }

    .landing-hero__content,
    .landing-band__content {
        max-width: 920px;
    }

    .landing-copy {
        max-width: 32ch;
    }

    .landing-band__content h2 {
        max-width: 100%;
    }
}

@media (max-width: 960px) {
    .public-header--home,
    .public-header__cluster {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-nav--home {
        justify-content: flex-start;
    }

    .landing-problem-grid,
    .landing-footer__links,
    .journey-track {
        grid-template-columns: 1fr 1fr;
    }

    .journey-track__line {
        display: none;
    }

    .journey-step {
        padding-top: 5rem;
    }
}

@media (max-width: 720px) {
    .public-frame--home {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .public-nav--home,
    .public-nav--actions,
    .landing-actions,
    .landing-proof,
    .match-card__head,
    .match-card__role,
    .landing-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-nav--actions .button,
    .landing-actions .button,
    .match-card__button {
        width: 100%;
    }

    .landing-hero {
        gap: 2rem;
        padding-top: 1rem;
    }

    .landing-title {
        font-size: clamp(2.8rem, 15vw, 4.1rem);
    }

    .landing-copy,
    .landing-section__heading p,
    .landing-footer__brand p {
        max-width: 100%;
    }

    .landing-problem-grid,
    .landing-footer__links,
    .journey-track {
        grid-template-columns: 1fr;
    }

    .landing-band,
    .landing-footer-shell {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .landing-band__card,
    .landing-cta {
        padding: 1.35rem;
    }

    .match-card {
        padding: 1.35rem;
    }

    .journey-step h3,
    .landing-feature h3,
    .match-card__head h3 {
        font-size: 1.45rem;
    }
}

/* Homepage refinement */
.brand::before {
    content: "";
    font-size: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Crect width='44' height='44' rx='14' fill='%232c4dd8'/%3E%3Cpath d='M24.6 8.5 14.9 24.1h7l-2.5 11.4 9.7-15.6h-7.1L24.6 8.5Z' fill='%23ffffff'/%3E%3C/svg%3E")
        center/cover no-repeat;
}

.public-frame--home {
    max-width: 1280px;
    padding-top: 1rem;
}

.public-header--home {
    padding: 0.85rem 1.05rem;
    margin-bottom: 1.35rem;
    border-radius: 24px;
}

.public-nav--home a,
.public-nav--actions a:not(.button) {
    font-size: 0.98rem;
}

.landing-hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.84fr);
    gap: 1.8rem;
    padding: 1.2rem 0 3.2rem;
}

.landing-hero__content {
    padding: 0.25rem 0 0.25rem 0.3rem;
}

.landing-badge {
    padding: 0.42rem 0.82rem;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
}

.landing-badge::before {
    width: 0.55rem;
    height: 0.55rem;
}

.landing-title {
    margin-top: 1.15rem;
    font-size: clamp(3rem, 5.6vw, 4.9rem);
    line-height: 0.96;
}

.landing-copy {
    max-width: 34rem;
    margin-top: 1.35rem;
    font-size: 1rem;
    line-height: 1.7;
}

.landing-actions {
    margin-top: 1.4rem;
    gap: 0.9rem;
}

.landing-button {
    min-width: 12.5rem;
    min-height: 3.6rem;
    border-radius: 18px;
    font-size: 0.98rem;
    padding: 0 1.35rem;
}

.landing-button::after,
.landing-button--ghost::after,
.landing-actions--center .landing-button::after {
    content: none;
}

.landing-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.landing-proof__stat {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.landing-proof__stat strong {
    display: block;
    font-size: 1rem;
    color: #182340;
}

.landing-proof__stat span {
    display: block;
    margin-top: 0.35rem;
    color: #6d7d9d;
    font-size: 0.88rem;
    line-height: 1.55;
}

.landing-hero__visual {
    max-width: 560px;
    justify-self: end;
}

.landing-hero__glow {
    inset: auto 0 -2rem auto;
    width: 82%;
    height: 35%;
    background: radial-gradient(circle, rgba(246, 163, 0, 0.18), transparent 70%);
    filter: blur(14px);
}

.landing-hero__visual img {
    aspect-ratio: 1.32 / 1;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 22px 44px rgba(48, 72, 142, 0.12);
}

.landing-section {
    padding: 3.8rem 0;
}

.landing-section__heading {
    max-width: 780px;
    margin-bottom: 2.2rem;
}

.landing-section__heading h2,
.landing-cta h2,
.landing-band__content h2 {
    font-size: clamp(2.25rem, 4vw, 3.4rem);
}

.landing-section__heading p,
.landing-cta p {
    margin-top: 0.9rem;
    font-size: 1rem;
    line-height: 1.7;
}

.landing-problem-grid {
    gap: 1.25rem;
    max-width: 1160px;
}

.landing-problem-card {
    padding: 1.55rem;
    border-radius: 24px;
}

.landing-problem-card__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(44, 77, 216, 0.08);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.landing-problem-card h3 {
    margin-top: 1.25rem;
    font-size: 1.35rem;
}

.landing-problem-card p {
    margin-top: 0.75rem;
    font-size: 0.96rem;
    line-height: 1.7;
}

.landing-section--journey {
    padding-top: 4.6rem;
    padding-bottom: 4.8rem;
}

.journey-track {
    gap: 1.2rem;
    margin-top: 3rem;
}

.journey-track__line {
    top: 1.9rem;
    left: 3.2rem;
    right: 3.2rem;
}

.journey-step {
    padding-top: 4.5rem;
}

.journey-step__number {
    width: 3.9rem;
    height: 3.9rem;
    font-size: 1.4rem;
    border-width: 2px;
}

.journey-step h3 {
    font-size: 1.45rem;
}

.journey-step p {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.65;
}

.landing-band {
    max-width: 1280px;
    padding: 4.2rem 1.3rem;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
    gap: 1.8rem;
}

.landing-band__content h2 {
    max-width: 10ch;
}

.landing-band__features {
    gap: 1.35rem;
    margin-top: 1.9rem;
}

.landing-feature {
    gap: 1rem;
}

.landing-feature__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.landing-feature h3 {
    font-size: 1.28rem;
}

.landing-feature p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.65;
}

.landing-band__card {
    padding: 1.25rem;
    border-radius: 24px;
}

.platform-card {
    padding: 1.5rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(18, 37, 88, 0.1);
}

.platform-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.platform-card__head h3 {
    font-size: 1.45rem;
    color: #141d39;
}

.platform-card__head span {
    display: inline-flex;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    background: rgba(246, 163, 0, 0.14);
    color: #b26d02;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.platform-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.25rem;
}

.platform-card__item {
    padding: 1rem;
    border-radius: 18px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.platform-card__item strong {
    display: block;
    font-size: 0.96rem;
    color: #141d39;
}

.platform-card__item span {
    display: block;
    margin-top: 0.35rem;
    color: #6d7d9d;
    font-size: 0.88rem;
    line-height: 1.55;
}

.platform-card__button {
    width: 100%;
    min-height: 3.7rem;
    margin-top: 1.25rem;
    border-radius: 16px;
    font-size: 0.98rem;
}

.landing-cta-shell {
    padding: 4.5rem 0;
}

.landing-cta {
    max-width: 980px;
    padding: 3.1rem 1.6rem;
    border-radius: 30px;
}

.landing-cta::after {
    width: 180px;
    height: 180px;
}

.landing-footer-shell {
    padding: 3rem 1.3rem 2.6rem;
}

.landing-footer {
    max-width: 1280px;
    gap: 2rem;
}

.landing-footer__brand p {
    max-width: 28rem;
    margin-top: 1rem;
    font-size: 1rem;
}

.landing-footer__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.landing-footer__contacts a {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: #eef3fb;
    color: #60718f;
    font-size: 0.92rem;
    font-weight: 600;
}

.landing-footer__links h3 {
    margin-bottom: 0.95rem;
    font-size: 1.05rem;
}

.landing-footer__links a,
.landing-footer__bottom a {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.landing-footer__bottom {
    max-width: 1280px;
    margin-top: 2.2rem;
}

@media (max-width: 1080px) {
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-hero__visual {
        max-width: 100%;
        justify-self: stretch;
    }

    .landing-proof,
    .platform-card__grid {
        grid-template-columns: 1fr;
    }

    .landing-band {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .landing-problem-grid,
    .journey-track,
    .landing-footer__links {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .landing-title {
        font-size: clamp(2.45rem, 13vw, 3.7rem);
    }

    .landing-proof,
    .landing-problem-grid,
    .journey-track,
    .landing-footer__links,
    .platform-card__grid {
        grid-template-columns: 1fr;
    }

    .platform-card__head,
    .landing-footer__contacts {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Homepage stability fixes */
.landing-problem-card {
    min-height: 0;
}

.landing-problem-card h3 {
    margin-top: 1rem;
}

.landing-section--journey .landing-section__heading {
    margin-bottom: 1.6rem;
}

.journey-track__line {
    display: none !important;
}

.journey-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0;
}

.journey-step {
    position: static;
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.journey-step__number {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0.42rem 0.72rem;
    border: 0;
    border-radius: 999px;
    background: rgba(44, 77, 216, 0.08);
    box-shadow: none;
    font-size: 0.82rem;
    line-height: 1;
}

.journey-step h3 {
    margin-top: 1rem;
}

.platform-card {
    display: grid;
    gap: 1rem;
    background: #fff;
}

.platform-card__head {
    align-items: flex-start;
}

.platform-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.platform-card__item {
    display: grid;
    gap: 0.38rem;
    background: #f7f9ff;
}

.landing-band__card {
    padding: 1rem;
}

@media (max-width: 960px) {
    .public-header--home {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.8rem 0.95rem;
    }

    .public-header__cluster {
        display: flex;
        flex: 0 0 auto;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
    }

    .public-nav--home {
        display: none;
    }

    .public-nav--actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.7rem;
    }

    .landing-hero {
        padding: 1rem 0 2.5rem;
        gap: 1.4rem;
    }

    .landing-title {
        font-size: clamp(2.6rem, 8vw, 4rem);
    }

    .landing-copy {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .public-header--home {
        border-radius: 20px;
    }

    .brand {
        gap: 0.65rem;
        font-size: 1.2rem;
    }

    .brand::before {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 12px;
    }

    .public-nav--actions {
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .public-nav--actions .button {
        width: auto !important;
        min-height: 2.8rem;
        padding: 0.72rem 1rem;
    }

    .landing-hero {
        gap: 1.1rem;
        padding: 0.85rem 0 2rem;
    }

    .landing-hero__content {
        padding: 0;
    }

    .landing-title {
        font-size: clamp(2.3rem, 12vw, 3.55rem);
        line-height: 0.98;
    }

    .landing-copy {
        font-size: 0.97rem;
    }

    .landing-actions {
        flex-direction: row !important;
        align-items: stretch;
    }

    .landing-actions .button {
        width: auto !important;
        flex: 1 1 220px;
        min-width: 0;
    }

    .landing-proof {
        grid-template-columns: 1fr;
    }

    .journey-track,
    .platform-card__grid {
        grid-template-columns: 1fr;
    }

    .platform-card__head {
        display: grid;
        gap: 0.75rem;
    }
}

@media (max-width: 540px) {
    .landing-actions .button,
    .public-nav--actions .button {
        flex-basis: 100%;
    }
}

/* Public mobile menu */
body.public-menu-open {
    overflow: hidden;
}

.public-menu-toggle {
    display: none;
    width: 3rem;
    height: 3rem;
    padding: 0;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    cursor: pointer;
}

.public-menu-toggle span {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 999px;
    background: #1b2950;
}

.public-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    background: rgba(12, 22, 51, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.public-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 60;
    width: min(88vw, 340px);
    height: 100vh;
    padding: 1.2rem;
    background: #fff;
    box-shadow: -18px 0 40px rgba(21, 39, 92, 0.16);
    transform: translateX(104%);
    transition: transform 0.24s ease;
    display: grid;
    align-content: start;
    gap: 1.1rem;
}

.public-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.public-mobile-menu__close {
    border: 0;
    background: transparent;
    color: #62718f;
    font-weight: 700;
    cursor: pointer;
}

.public-mobile-menu__nav,
.public-mobile-menu__actions {
    display: grid;
    gap: 0.65rem;
}

.public-mobile-menu__nav a,
.public-mobile-menu__actions a:not(.button) {
    display: block;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    color: #435576;
    font-weight: 600;
    background: #f7f9ff;
}

.public-mobile-menu__actions .button {
    width: 100%;
}

body.public-menu-open .public-menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.public-menu-open .public-mobile-menu {
    transform: translateX(0);
}

@media (max-width: 960px) {
    .public-menu-toggle {
        display: inline-flex;
    }

    .public-header__cluster {
        display: none !important;
    }
}

/* Global responsive hardening */
.auth-shell {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.auth-card {
    width: min(100%, 560px);
    margin: 0 auto;
    border-radius: 26px;
}

.form-panel {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.auth-links {
    align-items: flex-start;
}

.auth-links span,
.auth-links a {
    line-height: 1.6;
}

.page-head,
.panel,
.form-panel,
.auth-card,
.table-card,
.list-card,
.applicant-card,
.note-card,
.message-card {
    min-width: 0;
}

.panel,
.form-panel,
.auth-card,
.metric-card {
    overflow: hidden;
}

.public-header {
    gap: 1rem;
    flex-wrap: wrap;
}

.public-nav {
    flex-wrap: wrap;
}

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

    .card-grid,
    .card-grid--wide,
    .workspace-grid,
    .chat-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .public-frame {
        padding: 1rem 0.95rem 2rem;
    }

    .public-header {
        padding: 0.85rem 1rem;
        border-radius: 22px;
    }

    .page-wrap {
        padding: 0.95rem;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .company-identity,
    .list-card--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .auth-shell {
        padding: 1rem 0 2rem;
    }

    .auth-card,
    .form-panel,
    .panel,
    .metric-card {
        border-radius: 22px;
    }

    .auth-card {
        padding: 1.2rem;
    }

    .auth-card h2 {
        font-size: 1.55rem;
        line-height: 1.2;
    }

    .auth-links {
        display: grid;
        gap: 0.6rem;
    }

    .auth-links a,
    .auth-links span {
        font-size: 0.95rem;
    }

    .form-grid--two,
    .filter-bar,
    .summary-grid,
    .detail-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .button-row,
    .inline-action-group,
    .tag-row,
    .topbar__meta,
    .page-head__actions {
        width: 100%;
    }

    .button-row > .button,
    .button-row > a,
    .inline-action-group .button,
    .inline-action-group a,
    .inline-action-group form,
    .inline-action-group form .button,
    .page-head__actions .button,
    .page-head__actions a {
        width: 100%;
    }

    .public-header {
        align-items: center;
    }

    .public-nav {
        width: 100%;
        gap: 0.7rem;
    }

    .public-nav a:not(.button) {
        font-size: 0.94rem;
    }

    .table tr {
        padding: 0.95rem;
    }

    .table td {
        gap: 0.45rem;
    }
}

@media (max-width: 540px) {
    .public-frame {
        padding: 0.85rem 0.75rem 1.6rem;
    }

    .public-header {
        padding: 0.8rem 0.85rem;
    }

    .brand {
        font-size: 1.1rem;
    }

    .brand::before {
        width: 2.15rem;
        height: 2.15rem;
    }

    .auth-card,
    .form-panel,
    .panel {
        padding: 1rem;
    }

    input,
    select,
    textarea {
        padding: 0.82rem 0.9rem;
    }

    .landing-actions .button,
    .public-nav--actions .button,
    .button-row > .button,
    .button-row > a {
        flex-basis: 100%;
    }
}

/* Authenticated workspace mobile stabilization */
.app-body .app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
}

.app-body .app-shell__main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
}

.app-body .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1.25rem;
}

.app-body .sidebar__brand,
.app-body .sidebar__foot {
    width: 100%;
}

.app-body .sidebar__nav {
    display: grid;
    align-content: start;
    gap: 0.65rem;
}

.app-body .sidebar-user > div,
.app-body .topbar__title > div,
.app-body .topbar__user > div {
    min-width: 0;
}

.app-body .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.app-body .topbar__title {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.app-body .topbar__title h1 {
    margin: 0;
    line-height: 1.1;
}

.app-body .topbar__meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-left: auto;
    min-width: 0;
}

.app-body .topbar__user {
    max-width: 100%;
}

.app-body .page-wrap {
    width: 100%;
    min-width: 0;
    max-width: 1520px;
    margin: 0 auto;
}

.app-body .nav-toggle {
    display: none;
    width: 3rem;
    height: 3rem;
    padding: 0;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    border-radius: 16px;
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
}

.app-body .nav-toggle span[aria-hidden="true"] {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 999px;
    background: #1b2950;
}

@media (max-width: 1100px) {
    .app-body .app-shell {
        grid-template-columns: 288px minmax(0, 1fr);
    }

    .app-body .card-grid,
    .app-body .card-grid--wide,
    .app-body .workspace-grid,
    .app-body .chat-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-body .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-body .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: min(86vw, 320px);
        height: 100vh;
        transform: translateX(-104%);
        transition: transform 0.24s ease;
        box-shadow: 18px 0 40px rgba(18, 37, 84, 0.16);
    }

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

    .app-body .app-shell__overlay {
        z-index: 50;
    }

    body.app-body.nav-open .app-shell__overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .app-body .nav-toggle {
        display: inline-flex;
    }

    .app-body .topbar {
        padding: 1rem;
    }

    .app-body .topbar__meta {
        justify-content: flex-end;
    }

    .app-body .page-wrap {
        padding: 1rem;
    }
}

@media (max-width: 720px) {
    .app-body .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
    }

    .app-body .topbar__title {
        align-items: center;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .app-body .topbar__meta {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        margin-left: auto;
    }

    .app-body .topbar__user,
    .app-body .topbar__meta form,
    .app-body .topbar__meta form .button {
        width: auto;
    }

    .app-body .sidebar__brand p {
        display: none;
    }

    .app-body .page-head {
        align-items: flex-start;
    }
}

/* Messenger-style chat workspace */
.field--compact {
    align-content: start;
}

.app-body .chat-shell {
    display: grid;
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    min-height: clamp(620px, calc(100vh - 240px), 820px);
}

.app-body .chat-shell__sidebar,
.app-body .chat-shell__thread {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.app-body .chat-shell__sidebar {
    grid-template-rows: auto 1fr;
    gap: 0.95rem;
}

.app-body .chat-shell__thread {
    grid-template-rows: auto 1fr auto;
    gap: 0.95rem;
}

.chat-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid var(--line);
}

.chat-pane-head h3 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.app-body .conversation-list {
    display: grid;
    align-content: start;
    gap: 0.6rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.1rem;
}

.app-body .conversation-list__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem;
    padding: 0.9rem 0.95rem;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px solid var(--line);
    transform: none;
}

.app-body .conversation-list__item:hover,
.app-body .conversation-list__item.is-active {
    border-color: rgba(44, 77, 216, 0.18);
    background: linear-gradient(135deg, rgba(44, 77, 216, 0.08), rgba(246, 163, 0, 0.06));
    box-shadow: 0 10px 22px rgba(44, 77, 216, 0.08);
}

.conversation-list__avatar {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), #6b84ee);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(44, 77, 216, 0.16);
}

.conversation-list__body {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.conversation-list__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.conversation-list__row strong {
    font-size: 0.96rem;
    line-height: 1.35;
    color: var(--text);
}

.conversation-list__row small {
    flex: 0 0 auto;
    color: #7080a0;
    font-size: 0.76rem;
    white-space: nowrap;
}

.conversation-list__body span {
    color: #51617e;
    line-height: 1.5;
}

.conversation-list__meta {
    color: var(--muted);
    font-size: 0.79rem;
}

.app-body .chat-thread__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.chat-thread__identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.chat-thread__identity > div {
    min-width: 0;
}

.chat-thread__avatar {
    flex: 0 0 auto;
}

.chat-thread__back {
    display: none;
    flex: 0 0 auto;
}

.chat-empty {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.65rem;
    min-height: 100%;
    padding: 0.5rem 0;
}

.app-body .chat-thread__messages {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding-right: 0.2rem;
    padding-bottom: 0.2rem;
    scroll-behavior: smooth;
}

.app-body .chat-bubble {
    display: grid;
    gap: 0.45rem;
    width: fit-content;
    max-width: min(82%, 760px);
    padding: 1rem 1.1rem;
    border-radius: 24px 24px 24px 10px;
    background: #f8fbff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(36, 62, 132, 0.06);
}

.app-body .chat-bubble--own {
    align-self: flex-end;
    border-radius: 24px 24px 10px 24px;
    background: linear-gradient(135deg, rgba(44, 77, 216, 0.1), rgba(246, 163, 0, 0.09));
    border-color: rgba(44, 77, 216, 0.14);
}

.chat-bubble__subject {
    font-size: 0.98rem;
    line-height: 1.35;
    color: var(--text);
}

.chat-bubble__content {
    color: #455575;
    line-height: 1.65;
}

.chat-composer {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--line);
}

.chat-composer__grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
}

.chat-composer__field textarea {
    min-height: 120px;
    resize: vertical;
}

.chat-composer__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .app-body .chat-shell {
        grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
        min-height: clamp(600px, calc(100vh - 220px), 760px);
    }
}

@media (max-width: 900px) {
    .app-body .chat-shell {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 220px);
    }

    .app-body .chat-shell__sidebar,
    .app-body .chat-shell__thread {
        min-height: calc(100vh - 220px);
    }

    .app-body .chat-shell:not(.chat-shell--thread-active) .chat-shell__thread {
        display: none;
    }

    .app-body .chat-shell.chat-shell--thread-active .chat-shell__sidebar {
        display: none;
    }

    .chat-thread__back {
        display: inline-flex;
    }

    .chat-composer__grid {
        grid-template-columns: 1fr;
    }

    .app-body .chat-bubble {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .app-body .chat-shell {
        min-height: calc(100vh - 200px);
    }

    .app-body .chat-shell__sidebar,
    .app-body .chat-shell__thread {
        min-height: calc(100vh - 200px);
        padding: 1rem;
    }

    .chat-pane-head,
    .app-body .chat-thread__header,
    .chat-thread__identity,
    .chat-composer__actions,
    .conversation-list__row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .chat-thread__identity {
        align-items: start;
    }

    .conversation-list__row small {
        white-space: normal;
    }

    .chat-composer__actions .button {
        width: 100%;
    }
}

/* Workspace polish v2 */
.brand::before {
    content: "";
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96) 0 14%, transparent 15%),
        linear-gradient(135deg, var(--brand), #5b74ee);
    box-shadow: 0 16px 28px rgba(44, 77, 216, 0.18);
}

body.app-body {
    background:
        radial-gradient(circle at top right, rgba(44, 77, 216, 0.07), transparent 20%),
        linear-gradient(180deg, #f4f7fb 0%, #edf2f8 100%);
}

.app-body .panel,
.app-body .metric-card,
.app-body .list-card,
.app-body .table-card,
.app-body .company-identity,
.app-body .detail-item,
.app-body .note-card,
.app-body .summary-item,
.app-body .message-card,
.app-body .applicant-card,
.app-body .conversation-list__item,
.app-body .chat-shell__sidebar,
.app-body .chat-shell__thread {
    border-radius: 22px;
    border-color: #d8e2ef;
    box-shadow: 0 10px 24px rgba(25, 42, 84, 0.06);
}

.app-body .page-wrap {
    padding: 1.4rem;
    gap: 1.1rem;
}

.admin-management-stack {
    gap: 1rem;
}

.admin-management-panel {
    gap: 1rem;
}

.admin-management-panel .table-card {
    overflow-x: auto;
}

.admin-management-panel .list-stack {
    gap: 0.9rem;
}

.admin-management-panel .list-card--split {
    align-items: flex-start;
}

.admin-management-panel .button-row {
    justify-content: flex-start;
}

.app-body .page-head {
    gap: 0.8rem;
    align-items: flex-end;
}

.app-body .page-head h2 {
    font-size: clamp(1.45rem, 2.3vw, 1.95rem);
    line-height: 1.08;
}

.app-body .sidebar {
    background: linear-gradient(180deg, #0e172a 0%, #121d32 100%);
    border-right: 0;
    box-shadow: none;
}

.app-body .sidebar__brand,
.app-body .sidebar__foot {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.sidebar__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(226, 234, 248, 0.72);
}

.app-body .sidebar__brand .brand,
.app-body .sidebar-user strong,
.app-body .sidebar__nav a.active,
.app-body .sidebar__nav a:hover {
    color: #ffffff;
}

.app-body .sidebar__brand p,
.app-body .sidebar-user span,
.app-body .sidebar__nav a {
    color: rgba(197, 208, 228, 0.84);
}

.app-body .sidebar .brand::before {
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96) 0 14%, transparent 15%),
        linear-gradient(135deg, #3d64ef, #6e87ff);
    box-shadow: none;
}

.app-body .sidebar__nav a {
    min-height: 46px;
    border: 1px solid transparent;
    background: transparent;
}

.app-body .sidebar__nav a:hover,
.app-body .sidebar__nav a.active {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.app-body .topbar {
    padding: 1rem 1.35rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(216, 226, 239, 0.9);
    box-shadow: 0 8px 20px rgba(23, 39, 82, 0.04);
}

.app-body .topbar__user {
    background: #f6f9ff;
    border-color: #dde6f2;
}

.app-body .topbar__avatar,
.app-body .sidebar-user__avatar,
.app-body .staff-card__avatar,
.account-summary__avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #2c4dd8, #6982f4);
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}

.app-body .metric-card strong {
    color: #1d3bb9;
}

.app-body .nav-toggle {
    border-color: #d8e2ef;
    box-shadow: none;
}

.app-body .nav-toggle span[aria-hidden="true"] {
    background: #263761;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.account-side {
    display: grid;
    gap: 1rem;
}

.account-summary {
    gap: 1rem;
}

.account-summary__identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.account-summary__identity h3 {
    font-size: 1.25rem;
    line-height: 1.15;
}

.account-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.account-summary__item {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: #f7faff;
    border: 1px solid #dde6f2;
}

.account-summary__item span {
    color: #7382a2;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-summary__item strong {
    color: var(--text);
    line-height: 1.45;
}

.app-body .chat-shell__sidebar {
    background: #f9fbff;
}

.app-body .chat-thread__header,
.app-body .chat-composer {
    background: inherit;
}

.app-body .chat-thread__messages {
    padding-top: 0.2rem;
}

.app-body .chat-bubble__meta span,
.app-body .conversation-list__meta {
    color: #7a89a7;
}

.app-body .chat-bubble__content,
.app-body .conversation-list__body span {
    color: #495a79;
}

@media (max-width: 1100px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 1360px) {
    .app-body .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-body .card-grid--wide,
    .app-body .workspace-grid,
    .app-body .chat-shell {
        grid-template-columns: 1fr;
    }

    .app-body .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-body .page-head {
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .app-body .topbar {
        padding: 0.95rem 1rem;
    }

    .app-body .sidebar {
        background: linear-gradient(180deg, #0e172a 0%, #121d32 100%);
    }
}

@media (max-width: 720px) {
    .app-body .page-wrap {
        padding: 1rem;
    }

    .app-body .stats-grid,
    .app-body .card-grid,
    .app-body .card-grid--wide,
    .app-body .workspace-grid,
    .app-body .filter-bar,
    .app-body .form-grid--two,
    .app-body .summary-grid,
    .app-body .detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-management-panel .table-card {
        overflow: visible;
    }

    .admin-management-panel .list-card--split,
    .admin-management-panel .button-row {
        display: grid;
        width: 100%;
    }

    .admin-management-panel .button-row > .button,
    .admin-management-panel .button-row > a {
        width: 100%;
    }

    .account-summary__grid {
        grid-template-columns: 1fr;
    }

    .account-summary__identity {
        align-items: flex-start;
    }
}

/* Compact authenticated topbar on mobile */
@media (max-width: 720px) {
    .app-body .topbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        column-gap: 0.65rem;
        row-gap: 0;
        padding: 0.8rem 0.85rem;
    }

    .app-body .topbar__title {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center;
        gap: 0.6rem;
    }

    .app-body .topbar__title .eyebrow {
        display: none;
    }

    .app-body .topbar__title h1 {
        font-size: 1.25rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-body .topbar__meta {
        width: auto;
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.45rem;
        flex: 0 0 auto;
    }

    .app-body .topbar__user {
        width: auto;
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        gap: 0;
    }

    .app-body .topbar__user > div {
        display: none;
    }

    .app-body .topbar__avatar,
    .app-body .topbar__avatar--image {
        width: 2.15rem;
        height: 2.15rem;
        border-radius: 999px;
    }

    .app-body .topbar__meta .topbar__signout-form,
    .app-body .topbar__meta .topbar__signout-form .topbar__signout-btn {
        display: none;
        width: auto;
    }

    .app-body .topbar__signout-btn {
        min-height: 2.05rem;
        padding: 0.42rem 0.72rem;
        border-radius: 999px;
        white-space: nowrap;
        font-size: 0.82rem;
        line-height: 1;
        box-shadow: none;
    }
}

/* Brand logo upload support */
.brand--has-logo::before {
    display: none !important;
    content: none !important;
}

.brand__logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    object-fit: contain;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    flex: 0 0 auto;
}

.brand--has-logo {
    gap: 0.62rem;
}

.company-identity__logo--site {
    width: min(220px, 100%);
    height: 70px;
    border-radius: 14px;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 720px) {
    .brand__logo {
        width: 2.15rem;
        height: 2.15rem;
        border-radius: 0.58rem;
    }
}

/* Homepage mobile footer fit fix */
@media (max-width: 720px) {
    .landing-footer {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.6rem;
    }

    .landing-footer__brand,
    .landing-footer__links {
        min-width: 0;
    }

    .landing-footer__brand p {
        max-width: 100%;
        margin-top: 0.9rem;
        font-size: 0.96rem;
        line-height: 1.7;
    }

    .landing-footer__links {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.35rem;
    }

    .landing-footer__links > div {
        min-width: 0;
    }

    .landing-footer__links h3 {
        margin-bottom: 0.7rem;
    }

    .landing-footer__links a,
    .landing-footer__bottom a {
        font-size: 0.95rem;
        line-height: 1.55;
        word-break: break-word;
    }

    .landing-footer__contacts {
        width: 100%;
        gap: 0.7rem;
    }

    .landing-footer__contacts a {
        width: 100%;
        justify-content: flex-start;
    }

    .landing-footer__bottom {
        margin-top: 1.8rem;
        gap: 0.8rem;
    }

    .landing-footer__bottom div {
        width: 100%;
        gap: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .landing-footer-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .landing-cta {
        padding: 1.2rem;
        border-radius: 24px;
    }

    .landing-actions {
        flex-direction: column !important;
        align-items: stretch;
    }

    .landing-actions .button {
        width: 100% !important;
        flex: 1 1 auto;
    }
}
