:root {
    --bg: #07090d;
    --bg-2: #0d1118;
    --panel: rgba(13, 17, 24, 0.9);
    --panel-strong: rgba(18, 24, 34, 0.96);
    --text: #edf5f8;
    --text-dim: #9aa9b2;
    --muted: #65727c;
    --accent: #35d4e8;
    --accent-2: #63e6a7;
    --warning: #f7b955;
    --danger: #ff6b7a;
    --border: rgba(120, 216, 230, 0.18);
    --border-strong: rgba(120, 216, 230, 0.42);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    --header-h: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(53, 212, 232, 0.16), transparent 34rem),
        radial-gradient(circle at 78% 18%, rgba(99, 230, 167, 0.12), transparent 28rem),
        linear-gradient(135deg, var(--bg), #050609 65%, #0b0d12);
    color: var(--text);
    overflow-x: hidden;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 50%, rgba(0, 0, 0, 0.08) 50%),
        linear-gradient(90deg, rgba(53, 212, 232, 0.03), rgba(99, 230, 167, 0.02), rgba(247, 185, 85, 0.03));
    background-size: 100% 4px, 4px 100%;
    opacity: 0.32;
}

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

button {
    border: 0;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

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

.text-orbitron {
    font-family: "Segoe UI", Inter, "Noto Sans SC", sans-serif;
    letter-spacing: 0;
}

#matrix-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.24;
}

.navbar-v9 {
    position: fixed;
    inset: 0 0 auto;
    height: var(--header-h);
    z-index: 5000;
    display: flex;
    align-items: center;
    background: rgba(7, 9, 13, 0.86);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand-v9 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
}

.brand-main {
    letter-spacing: 2px;
}

.brand-accent {
    padding: 2px 7px;
    color: #051014;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    animation: badgePulse 2400ms ease-in-out infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--accent);
    background: rgba(53, 212, 232, 0.08);
    border-color: var(--border);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-select {
    min-height: 36px;
    max-width: 72px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.burger span {
    width: 19px;
    height: 2px;
    background: var(--accent);
    border-radius: 99px;
}

.page {
    display: none;
    min-height: 100vh;
    padding: calc(var(--header-h) + 44px) 0 78px;
}

.page.active {
    display: block;
    animation: pageIn 260ms ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-layout {
    display: grid;
    justify-items: center;
    text-align: center;
    padding-top: 36px;
}

.version-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 18px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(53, 212, 232, 0.06);
    font-size: 0.72rem;
    font-weight: 900;
}

.hero-title {
    max-width: 900px;
    margin: 0;
    white-space: pre-line;
    font-size: clamp(2.15rem, 7vw, 5rem);
    line-height: 1.03;
    font-weight: 900;
    text-shadow: 0 0 28px rgba(53, 212, 232, 0.12);
    animation: heroRise 520ms ease both;
}

.hero-copy {
    max-width: 760px;
    margin: 24px auto 0;
    color: var(--text-dim);
    font-size: clamp(0.96rem, 2vw, 1.1rem);
    animation: heroRise 620ms ease both;
}

.hero-actions,
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.btn-main,
.btn-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    padding: 11px 20px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn-main {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #041114;
    box-shadow: 0 12px 28px rgba(53, 212, 232, 0.18);
}

.btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(53, 212, 232, 0.26);
}

.btn-outline {
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(53, 212, 232, 0.08);
}

.disabled-link {
    pointer-events: auto;
    opacity: 0.58;
}

.btn-main:disabled,
.btn-outline:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.compact {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.78rem;
}

.full {
    width: 100%;
}

.glass-v9 {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(18, 24, 34, 0.94), rgba(9, 12, 18, 0.9));
    box-shadow: var(--shadow);
}

.stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 52px;
}

.stat-card {
    min-height: 152px;
    padding: 24px;
    text-align: left;
    border-left: 3px solid var(--accent);
}

.stat-card:nth-child(2) {
    border-left-color: var(--accent-2);
}

.stat-card:nth-child(3) {
    border-left-color: var(--warning);
}

.stat-card p {
    margin: 0 0 12px;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.72rem;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.talent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.talent-card {
    min-height: 276px;
    display: grid;
    gap: 16px;
    padding: 20px;
    overflow: hidden;
    position: relative;
    animation: cardIn 360ms ease both;
}

.talent-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warning));
}

.talent-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 42%, transparent 58%);
    transform: translateX(-120%);
    transition: transform 600ms ease;
}

.talent-card:hover::after {
    transform: translateX(120%);
}

.talent-status {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
}

.talent-persona {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: #0b141a;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 24px rgba(53, 212, 232, 0.12), 0 0 22px rgba(53, 212, 232, 0.08);
}

.agent-avatar::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: avatarSpin 4.8s linear infinite;
}

.agent-avatar::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent-2);
    box-shadow: 0 0 16px var(--accent-2);
    transform: translate(13px, -13px);
}

.agent-avatar span {
    position: relative;
    z-index: 1;
}

.agent-avatar.aegis {
    background: radial-gradient(circle at 50% 25%, rgba(99, 230, 167, 0.35), transparent 36%), linear-gradient(135deg, #0b141a, #102622);
}

.agent-avatar.pulse {
    background: radial-gradient(circle, rgba(53, 212, 232, 0.44), transparent 42%), linear-gradient(135deg, #08141f, #180d25);
}

.agent-avatar.orbit {
    background: conic-gradient(from 120deg, rgba(53, 212, 232, 0.45), rgba(247, 185, 85, 0.3), rgba(99, 230, 167, 0.42), rgba(53, 212, 232, 0.45));
}

.agent-avatar.prism {
    background: linear-gradient(135deg, rgba(255, 107, 122, 0.34), rgba(53, 212, 232, 0.28), rgba(99, 230, 167, 0.22)), #0b141a;
}

.talent-card h3 {
    margin: 0;
    font-size: 1rem;
}

.talent-card p {
    margin: 4px 0 0;
    color: var(--text-dim);
    font-size: 0.86rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-list span {
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.74rem;
    overflow-wrap: anywhere;
}

.talent-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.talent-rate {
    color: var(--warning);
    font-weight: 900;
}

.news-feed {
    display: grid;
    gap: 14px;
    max-width: 860px;
}

.news-item {
    width: 100%;
    padding: 18px 20px;
    border-left: 3px solid var(--accent);
    text-align: left;
}

.news-item:nth-child(2n) {
    border-left-color: var(--accent-2);
}

.news-button {
    display: grid;
    gap: 10px;
    color: inherit;
    cursor: pointer;
}

.news-button:hover {
    border-color: var(--border-strong);
    background: linear-gradient(180deg, rgba(24, 34, 46, 0.96), rgba(10, 15, 22, 0.94));
}

.news-meta {
    margin: 0 0 6px;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.news-item h3 {
    margin: 0;
    font-size: 1rem;
}

.news-summary {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.news-open {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 20px;
}

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

.panel {
    min-height: 430px;
    padding: 22px;
}

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

.panel-header h3 {
    margin: 0;
    font-size: 0.98rem;
}

.panel-header span {
    color: var(--warning);
    font-size: 0.75rem;
    font-weight: 900;
}

.chart-wrap {
    height: 340px;
}

#mainChart {
    width: 100%;
    height: 100%;
}

.sys-logs {
    height: 340px;
    overflow: auto;
    color: var(--text-dim);
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 0.82rem;
}

.log-row {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-time {
    color: var(--accent);
}

.modal-v9 {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
}

.modal-v9.open {
    display: flex;
}

.modal-content-v9 {
    width: min(100%, 500px);
    max-height: min(720px, calc(100vh - 36px));
    overflow: auto;
    position: relative;
    padding: 34px;
    border-color: var(--border-strong);
    animation: modalLift 180ms ease both;
}

.modal-wide {
    width: min(100%, 620px);
}

#registry-modal .modal-wide {
    width: min(100%, 780px);
}

.modal-news {
    width: min(100%, 760px);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-close:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.modal-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--accent);
    background: rgba(53, 212, 232, 0.08);
    font-size: 0.78rem;
    font-weight: 900;
    animation: badgePulse 2200ms ease-in-out infinite;
}

.modal-content-v9 h3 {
    margin: 0 0 10px;
}

.modal-desc {
    margin: 0 0 20px;
    color: var(--text-dim);
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    padding: 13px 14px;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    padding: 13px 14px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--warning);
    outline-offset: 2px;
}

.form-status {
    min-height: 22px;
    margin: 8px 0 14px;
    color: var(--warning);
    font-size: 0.82rem;
}

.test-access {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px;
    color: var(--text-dim);
    font-size: 0.84rem;
}

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

.registry-form-grid label {
    display: grid;
    gap: 7px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 900;
}

.registry-form-wide {
    grid-column: 1 / -1;
}

.step-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.step-ball {
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 900;
}

.step-ball.active {
    color: #061014;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.reg-step-box {
    display: none;
}

.reg-step-box.active {
    display: block;
}

.progress-container {
    height: 6px;
    margin: 16px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 100ms linear;
}

.assigned-id {
    display: block;
    margin: 24px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
    font-family: "Cascadia Mono", Consolas, monospace;
    overflow-wrap: anywhere;
}

.registry-result-card {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(99, 230, 167, 0.08);
    color: var(--text-dim);
}

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

.sla-content {
    min-height: 260px;
    max-height: 360px;
    margin-top: 18px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.28);
    padding: 18px;
    color: var(--text-dim);
}

.sla-content p {
    margin: 0 0 12px;
}

.news-detail-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 900;
}

.news-detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.news-detail-meta div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.news-detail-meta dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
}

.news-detail-meta dd {
    margin: 0;
    color: var(--text);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.news-detail-summary {
    margin: 0 0 18px;
    padding: 14px;
    border-left: 3px solid var(--warning);
    border-radius: 6px;
    background: rgba(247, 185, 85, 0.08);
    color: var(--text);
}

.news-detail-body {
    display: grid;
    gap: 12px;
    color: var(--text-dim);
}

.news-detail-body p {
    margin: 0;
}

.ledger-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow: auto;
}

.ledger-item {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    text-align: left;
}

.ledger-item strong {
    color: var(--text);
}

.ledger-item span {
    color: var(--text-dim);
    font-size: 0.78rem;
}

button.ledger-item {
    cursor: pointer;
}

button.ledger-item:hover {
    border-color: var(--border-strong);
    background: rgba(53, 212, 232, 0.08);
}

.ledger-item em {
    color: var(--accent);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 900;
}

.empty-state {
    color: var(--muted);
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 6px;
}

.workbench-agent-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.workbench-agent-card > div:last-child {
    display: grid;
    gap: 4px;
}

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

.workbench-agent-card span {
    color: var(--text-dim);
    font-size: 0.84rem;
}

.workbench-stream {
    min-height: 220px;
    max-height: 320px;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 10px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}

.workbench-line {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
}

.workbench-line.user {
    color: var(--text);
    background: rgba(53, 212, 232, 0.1);
}

.workbench-line.agent {
    color: var(--text);
    border-left: 3px solid var(--accent-2);
    background: rgba(99, 230, 167, 0.08);
}

.workbench-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 14px;
}

#toast-container {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(440px, calc(100% - 32px));
    transform: translateX(-50%);
}

.toast {
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: rgba(13, 17, 24, 0.96);
    box-shadow: var(--shadow);
    color: var(--text);
    animation: toastIn 180ms ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroRise {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalLift {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(53, 212, 232, 0);
    }
    50% {
        box-shadow: 0 0 24px rgba(53, 212, 232, 0.24);
    }
}

@keyframes avatarSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

body.rtl {
    direction: rtl;
}

body.rtl .stat-card,
body.rtl .news-item {
    border-left: 0;
    border-right: 3px solid var(--accent);
}

@media (max-width: 920px) {
    .icon-button {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--panel-strong);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-item {
        justify-content: flex-start;
        min-height: 46px;
    }

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

    .panel {
        min-height: 360px;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .brand-main {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-actions {
        gap: 7px;
    }

    .compact {
        max-width: 108px;
        padding-inline: 10px;
        font-size: 0.72rem;
    }

    .hero-actions,
    .modal-actions,
    .talent-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .news-detail-meta {
        grid-template-columns: 1fr;
    }

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

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

    .modal-content-v9 {
        padding: 28px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
