:root {
    --office-bg: #050815;
    --office-panel: rgba(8, 14, 28, 0.82);
    --office-panel-strong: rgba(12, 20, 38, 0.94);
    --office-line: rgba(96, 229, 255, 0.22);
    --office-line-hot: rgba(168, 117, 255, 0.42);
    --office-cyan: #63f3ff;
    --office-purple: #a875ff;
    --office-green: #55f6b5;
    --office-text: #f4fbff;
    --office-muted: #a8b9cc;
    --office-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--office-bg);
}

body {
    background: var(--office-bg);
    color: var(--office-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
}

body::before,
body::after {
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
}

body::before {
    background:
        radial-gradient(circle at 18% 12%, rgba(99, 243, 255, 0.13), transparent 26%),
        radial-gradient(circle at 82% 8%, rgba(168, 117, 255, 0.12), transparent 26%),
        linear-gradient(135deg, #050815 0%, #07111f 48%, #050715 100%);
    z-index: -3;
}

body::after {
    background:
        linear-gradient(rgba(99, 243, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 243, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), transparent 92%);
    z-index: -2;
}

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

button {
    color: inherit;
    font: inherit;
}

.office-shell {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.office-loader {
    align-items: center;
    background: #02040a;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    inset: 0;
    justify-content: center;
    position: fixed;
    transition: opacity 0.55s ease, visibility 0.55s ease;
    z-index: 50;
}

.office-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-core {
    height: 8rem;
    position: relative;
    width: 8rem;
}

.loader-core span {
    border: 1px solid transparent;
    border-radius: 50%;
    inset: 0;
    position: absolute;
}

.loader-core span:nth-child(1) {
    animation: orbit 1.8s linear infinite;
    border-top-color: var(--office-cyan);
    box-shadow: 0 0 32px rgba(99, 243, 255, 0.45);
}

.loader-core span:nth-child(2) {
    animation: orbit 2.4s linear infinite reverse;
    border-right-color: var(--office-purple);
    inset: 1rem;
}

.loader-core span:nth-child(3) {
    animation: pulseCore 1.6s ease-in-out infinite;
    background: radial-gradient(circle, var(--office-cyan), rgba(99, 243, 255, 0.1) 42%, transparent 68%);
    inset: 2.6rem;
}

.office-loader p {
    color: var(--office-muted);
    letter-spacing: 0.18em;
    margin: 0;
    text-transform: uppercase;
}

.office-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 3vw, 2.5rem);
    position: relative;
    z-index: 5;
}

.office-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.8rem;
    min-width: 0;
}

.brand-orb {
    background:
        radial-gradient(circle, #ffffff 0 14%, transparent 15%),
        radial-gradient(circle, transparent 0 36%, var(--office-cyan) 37% 46%, transparent 47%),
        radial-gradient(circle, rgba(99, 243, 255, 0.3), transparent 68%);
    border-radius: 50%;
    box-shadow: 0 0 22px rgba(99, 243, 255, 0.55);
    flex: 0 0 auto;
    height: 2.6rem;
    width: 2.6rem;
}

.office-brand strong,
.office-brand small {
    display: block;
}

.office-brand strong {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.office-brand small {
    color: var(--office-muted);
    font-size: 0.76rem;
    margin-top: 0.16rem;
}

.office-nav {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.office-nav a {
    border: 1px solid rgba(99, 243, 255, 0.2);
    border-radius: 999px;
    color: #d9f9ff;
    font-size: 0.78rem;
    padding: 0.58rem 0.85rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.office-nav a:hover,
.office-nav a:focus {
    background: rgba(99, 243, 255, 0.08);
    border-color: rgba(99, 243, 255, 0.62);
}

.office-main {
    padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem;
}

.office-hero {
    animation: zoomIn 0.65s ease 0.2s both;
    padding: 1rem 0 1.1rem;
}

.eyebrow,
.panel-kicker {
    color: var(--office-cyan);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.office-hero h1 {
    color: var(--office-text);
    font-size: clamp(2rem, 5.8vw, 4.7rem);
    line-height: 0.98;
    margin: 0;
    text-shadow:
        0 0 18px rgba(99, 243, 255, 0.42),
        0 0 55px rgba(168, 117, 255, 0.24);
}

.office-workspace {
    animation: stageRise 0.75s ease 0.35s both;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
}

.office-map-panel,
.office-dashboard .dashboard-card {
    background: var(--office-panel);
    border: 1px solid var(--office-line);
    border-radius: var(--office-radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    position: relative;
}

.office-map-panel::before,
.office-dashboard .dashboard-card::before {
    background: linear-gradient(90deg, transparent, rgba(99, 243, 255, 0.48), transparent);
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

.map-statusbar {
    align-items: center;
    border-bottom: 1px solid rgba(99, 243, 255, 0.16);
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    min-height: 3.1rem;
    padding: 0.75rem 0.9rem;
}

.map-statusbar span {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--office-muted);
    font-size: 0.76rem;
    padding: 0.4rem 0.65rem;
}

.map-statusbar strong {
    color: var(--office-cyan);
}

.office-canvas {
    aspect-ratio: 1500 / 880;
    background: #111827;
    cursor: crosshair;
    display: block;
    image-rendering: pixelated;
    max-height: calc(100vh - 230px);
    min-height: 420px;
    width: 100%;
}

.mobile-controls {
    border-top: 1px solid rgba(99, 243, 255, 0.16);
    display: none;
    gap: 0.55rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.7rem;
}

.mobile-controls button {
    background: rgba(99, 243, 255, 0.08);
    border: 1px solid rgba(99, 243, 255, 0.26);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.15rem;
    min-height: 2.75rem;
}

.mobile-controls button:active {
    background: rgba(168, 117, 255, 0.18);
    border-color: rgba(168, 117, 255, 0.55);
}

.office-dashboard {
    display: grid;
    gap: 1rem;
    grid-auto-rows: min-content;
}

.dashboard-card {
    padding: 1rem;
}

.dashboard-card h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.1;
    margin: 0 0 0.9rem;
}

.dashboard-card dl {
    display: grid;
    gap: 0.7rem;
    margin: 0;
}

.dashboard-card dl div,
.future-note,
.agent-list button,
.activity-log p {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--office-radius);
}

.dashboard-card dl div {
    padding: 0.78rem;
}

.dashboard-card dt {
    color: var(--office-cyan);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.dashboard-card dd {
    color: #dcebf6;
    line-height: 1.45;
    margin: 0;
}

.future-note {
    color: #dcebf6;
    line-height: 1.45;
    margin-top: 0.75rem;
    padding: 0.78rem;
}

.agent-list {
    display: grid;
    gap: 0.5rem;
}

.agent-list button {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.75rem;
    text-align: left;
}

.agent-list button.is-active {
    border-color: rgba(168, 117, 255, 0.68);
    box-shadow: 0 0 18px rgba(168, 117, 255, 0.16);
}

.agent-list strong {
    color: #ffffff;
    font-size: 0.86rem;
}

.agent-list span {
    color: var(--office-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.activity-log {
    display: grid;
    gap: 0.5rem;
    max-height: 16rem;
    overflow: auto;
    padding-right: 0.15rem;
}

.activity-log p {
    color: var(--office-muted);
    font-size: 0.76rem;
    line-height: 1.4;
    margin: 0;
    padding: 0.58rem 0.65rem;
}

.activity-log time {
    color: var(--office-cyan);
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
}

@keyframes orbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseCore {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes zoomIn {
    from {
        filter: blur(8px);
        opacity: 0;
        transform: scale(0.97) translateY(18px);
    }

    to {
        filter: blur(0);
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes stageRise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 1180px) {
    .office-workspace {
        grid-template-columns: 1fr;
    }

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

@media screen and (max-width: 860px) {
    .office-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .office-nav {
        flex-wrap: wrap;
        width: 100%;
    }

    .office-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .office-canvas {
        max-height: none;
        min-height: 360px;
    }

    .mobile-controls {
        display: grid;
    }

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

@media screen and (max-width: 560px) {
    .office-loader p {
        font-size: 0.68rem;
        padding: 0 1rem;
        text-align: center;
    }

    .office-main {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .office-hero {
        padding-top: 0.8rem;
    }

    .map-statusbar {
        align-items: stretch;
        flex-direction: column;
    }

    .map-statusbar span {
        text-align: center;
    }

    .office-canvas {
        min-height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
