:root {
    --bg: #05090c;
    --bg-raised: rgba(8, 19, 24, 0.92);
    --bg-soft: rgba(13, 33, 39, 0.78);
    --border: rgba(0, 229, 255, 0.22);
    --border-strong: rgba(0, 229, 255, 0.52);
    --cyan: #00e5ff;
    --blue: #2979ff;
    --green: #45f5a1;
    --yellow: #f8d66d;
    --red: #ff5b6e;
    --orange: #ff9f43;
    --text: #e7fbff;
    --muted: #9fb3bc;
    --muted-2: #67808a;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
    --radius: 8px;
    --brand-font: "VT323", monospace;
    --ui-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--ui-font);
    background: var(--bg);
    overflow-x: hidden;
}

::selection {
    color: #001014;
    background: var(--green);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 9, 12, 0.56), rgba(3, 9, 12, 0.95)),
        url("https://dreamplayz.com/assets/images/bg.jpg") center / cover no-repeat;
    transform: scale(1.03);
    z-index: -3;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
    pointer-events: none;
    z-index: -2;
}

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

button {
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

a {
    color: inherit;
}

#ambientCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.55;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--cyan);
    font-family: var(--brand-font);
    font-size: 1.22rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(460px, 100%);
    padding: 34px;
    background: linear-gradient(180deg, rgba(8, 24, 30, 0.96), rgba(4, 11, 15, 0.96));
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 42px rgba(0, 229, 255, 0.16);
}

.brand-lockup,
.sidebar-brand,
.topbar,
.topbar-actions,
.view-toolbar,
.toolbar-actions,
.filter-row,
.panel-heading,
.server-card-header,
.pagination-row,
.modal-actions,
.auth-note,
.field-grid {
    display: flex;
    align-items: center;
}

.brand-lockup {
    gap: 16px;
    margin-bottom: 30px;
}

.brand-lockup img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.55));
}

.brand-lockup h1,
.topbar h1,
.view-toolbar h2,
.ops-hero h2 {
    margin: 0;
}

.brand-lockup h1 {
    font-family: var(--brand-font);
    font-size: 2.75rem;
    line-height: 0.9;
}

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

.login-form label,
.form-grid label,
.field-label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.36);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.13);
}

.primary-action,
.ghost-action,
.compact-action,
.icon-button,
.danger-action {
    border: 0;
    border-radius: var(--radius);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 800;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
    text-decoration: none;
}

.primary-action:disabled,
.ghost-action:disabled,
.compact-action:disabled,
.icon-button:disabled,
.danger-action:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
}

.primary-action {
    padding: 0 18px;
    color: #001014;
    background: linear-gradient(180deg, var(--cyan), #00bcd7);
    box-shadow: 0 8px 0 #006d80, 0 16px 28px rgba(0, 0, 0, 0.25);
}

.primary-action:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #006d80, 0 10px 18px rgba(0, 0, 0, 0.25);
}

.primary-action:hover {
    filter: brightness(1.06);
}

.ghost-action,
.compact-action,
.icon-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ghost-action {
    padding: 0 14px;
}

.compact-action {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.82rem;
}

.danger-action {
    min-height: 34px;
    padding: 0 12px;
    color: #fff;
    background: rgba(255, 91, 110, 0.16);
    border: 1px solid rgba(255, 91, 110, 0.45);
}

.ghost-action:hover,
.compact-action:hover,
.icon-button:hover {
    border-color: var(--border-strong);
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.08);
}

.icon-button {
    width: 42px;
    height: 42px;
    padding: 0;
}

.form-error {
    min-height: 20px;
    margin: 0;
    color: var(--red);
    font-size: 0.88rem;
}

.auth-note {
    gap: 9px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.86rem;
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: rgba(1, 8, 11, 0.88);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-brand {
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}

.sidebar-brand strong {
    display: block;
    color: var(--cyan);
    font-family: var(--brand-font);
    font-size: 2rem;
    line-height: 0.86;
}

.sidebar-brand small,
.user-chip small,
.metric-card small,
.server-meta,
.muted {
    color: var(--muted);
}

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

.nav-item {
    position: relative;
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 750;
    text-align: left;
}

.nav-item i {
    width: 18px;
    color: var(--muted);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--border);
    color: var(--cyan);
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 16px rgba(69, 245, 161, 0.5);
}

.nav-item.active i {
    color: var(--cyan);
}

.sidebar-status {
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(69, 245, 161, 0.28);
    border-radius: var(--radius);
    background: rgba(69, 245, 161, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green);
    font-weight: 800;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    justify-content: space-between;
    gap: 18px;
    min-height: 84px;
    padding: 16px 26px;
    background: rgba(1, 8, 11, 0.78);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.topbar h1 {
    font-size: 1.45rem;
}

.topbar-actions {
    gap: 12px;
}

.mobile-menu-button {
    display: none;
}

.user-chip {
    min-height: 46px;
    padding: 6px 12px 6px 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-chip > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: #001014;
    background: var(--cyan);
    font-weight: 900;
}

.user-chip strong,
.user-chip small {
    display: block;
    line-height: 1.2;
}

.content {
    padding: 26px;
    min-width: 0;
    isolation: isolate;
}

.view {
    display: none;
}

.view.active-view {
    display: block;
    animation: view-in 180ms ease both;
}

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

.ops-hero {
    min-height: 190px;
    margin-bottom: 20px;
    padding: 26px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(0, 229, 255, 0.14), rgba(41, 121, 255, 0.05)),
        rgba(0, 0, 0, 0.38);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
}

.ops-hero h2 {
    max-width: 840px;
    font-family: var(--brand-font);
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    line-height: 0.95;
}

.hero-ip {
    min-width: 236px;
    padding: 15px;
    border: 1px solid rgba(69, 245, 161, 0.38);
    border-radius: var(--radius);
    background: rgba(69, 245, 161, 0.09);
}

.hero-ip span {
    color: var(--green);
    font-size: 0.74rem;
    font-weight: 900;
}

.hero-ip strong {
    display: block;
    margin-top: 4px;
    font-size: 1.05rem;
}

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

.metric-grid.compact {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
}

.metric-card,
.panel,
.table-panel,
.server-card,
.ptero-card,
.plan-server-tile {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-raised);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.metric-card::before,
.panel::before,
.server-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0.65;
}

.metric-card {
    min-height: 128px;
    padding: 17px;
    background:
        linear-gradient(145deg, rgba(0, 229, 255, 0.07), rgba(69, 245, 161, 0.02)),
        var(--bg-raised);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.metric-card:hover,
.server-card:hover,
.panel:hover,
.plan-server-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(69, 245, 161, 0.35);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.metric-card-2::before {
    background: linear-gradient(90deg, var(--green), transparent);
}

.metric-card-3::before {
    background: linear-gradient(90deg, var(--yellow), transparent);
}

.metric-card-4::before {
    background: linear-gradient(90deg, var(--orange), transparent);
}

.metric-card i {
    color: var(--cyan);
}

.metric-card strong {
    display: block;
    margin-top: 13px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1;
}

.metric-card small {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
}

.dashboard-grid,
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

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

.span-2 {
    grid-column: span 2;
}

.panel {
    padding: 20px;
}

.panel,
.server-card,
.ptero-card,
.plan-server-tile {
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.panel,
.metric-card,
.server-card,
.ptero-card,
.plan-server-tile,
.table-panel,
.profile-panel,
.timeline-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 180px;
}

.panel h3 {
    margin: 0 0 16px;
}

.panel-heading {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.server-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.server-card {
    padding: 16px;
}

.server-card.state-online,
.server-card.state-running,
.ptero-card.state-running {
    border-color: rgba(69, 245, 161, 0.32);
}

.server-card.state-offline,
.ptero-card.state-offline,
.ptero-card.state-stopped,
.ptero-card.state-unknown {
    border-color: rgba(255, 91, 110, 0.28);
}

.ptero-card.state-starting,
.ptero-card.state-stopping {
    border-color: rgba(248, 214, 109, 0.32);
}

.ptero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.ptero-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(12, 34, 40, 0.94), rgba(5, 14, 18, 0.94)),
        var(--bg-raised);
}

.ptero-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    opacity: 0.9;
}

.ptero-card:hover {
    border-color: rgba(69, 245, 161, 0.42);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24), 0 0 26px rgba(0, 229, 255, 0.08);
}

.server-card-header {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.server-card h4,
.ptero-card h4 {
    margin: 0;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.status-online {
    color: var(--green);
    background: rgba(69, 245, 161, 0.1);
}

.status-running,
.status-starting {
    color: var(--green);
    background: rgba(69, 245, 161, 0.1);
}

.status-offline,
.status-banned,
.status-ban,
.status-ip_banned,
.status-blacklisted,
.status-suspended,
.status-stopping,
.status-unknown,
.status-disabled {
    color: var(--red);
    background: rgba(255, 91, 110, 0.1);
}

.status-maintenance,
.status-muted,
.status-mute,
.status-warning,
.status-silent,
.status-support {
    color: var(--yellow);
    background: rgba(248, 214, 109, 0.1);
}

.status-active,
.status-admin,
.status-owner,
.status-moderator,
.status-kick,
.status-expired,
.status-seen {
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.1);
}

.bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.bar-track.slim {
    height: 5px;
    margin-top: 10px;
}

.bar-fill {
    height: 100%;
    width: var(--value, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), var(--green));
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.stat-row strong {
    color: var(--text);
}

.ptero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.ptero-facts span {
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.18);
}

.ptero-facts strong,
.ptero-facts small {
    display: block;
}

.ptero-facts strong {
    font-size: 1.05rem;
}

.ptero-facts small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.ptero-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 14px;
}

.ptero-actions .compact-action {
    width: auto;
    padding: 0 11px;
}

.server-control-filters {
    align-items: stretch;
}

.control-meters,
.control-resource-strip {
    display: grid;
    gap: 10px;
}

.control-meters {
    margin-top: 12px;
}

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

.resource-meter {
    padding: 11px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.2);
}

.resource-meter > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.resource-meter span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.resource-meter i {
    color: var(--cyan);
}

.resource-meter strong {
    color: var(--text);
    font-size: 0.88rem;
    text-align: right;
}

.live-console-shell {
    display: grid;
    gap: 14px;
}

.live-console-output {
    min-height: 460px;
    max-height: 58vh;
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(69, 245, 161, 0.2);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.46);
    color: #d9fff2;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

.console-line {
    min-height: 1.1em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.console-line.system {
    color: var(--cyan);
}

.console-line.command {
    color: var(--yellow);
}

.console-line.stats {
    color: var(--green);
}

.live-console-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.view-toolbar {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.view-toolbar h2 {
    font-size: 1.55rem;
}

.toolbar-actions {
    gap: 10px;
}

.analytics-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cache-note {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(0, 229, 255, 0.06);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.filter-row {
    gap: 12px;
    margin-bottom: 14px;
}

.search-field {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.search-field i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
}

.search-field input {
    padding-left: 38px;
}

.table-panel {
    overflow-x: auto;
    scrollbar-color: rgba(0, 229, 255, 0.5) rgba(255, 255, 255, 0.05);
}

th,
td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

th {
    color: var(--cyan);
    font-size: 0.78rem;
    text-transform: uppercase;
    background: rgba(0, 229, 255, 0.035);
}

td {
    color: #d8edf2;
    font-size: 0.9rem;
}

tbody tr:hover {
    background: rgba(0, 229, 255, 0.045);
}

.actions-col {
    text-align: right;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.row-actions button {
    width: 34px;
    height: 34px;
    border-radius: 7px;
}

.player-name {
    display: grid;
    gap: 3px;
}

.player-name strong {
    color: var(--text);
}

.player-name small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.pagination-row {
    justify-content: flex-end;
    gap: 9px;
    margin-top: 14px;
}

.chart {
    min-height: 260px;
    display: grid;
    align-items: end;
    grid-auto-flow: column;
    grid-auto-columns: minmax(34px, 1fr);
    gap: 10px;
    overflow-x: auto;
}

.chart.wide {
    grid-auto-columns: minmax(120px, 1fr);
}

.chart-bar {
    min-width: 34px;
    display: grid;
    gap: 8px;
    align-items: end;
    text-align: center;
}

.chart-bar span {
    min-height: 10px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.13);
}

.chart-bar small {
    color: var(--muted);
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list,
.timeline-list {
    display: grid;
    gap: 10px;
}

.plan-native-card {
    background:
        linear-gradient(145deg, rgba(0, 229, 255, 0.08), rgba(248, 214, 109, 0.045)),
        var(--bg-raised);
}

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

.plan-stat-grid .metric-card {
    min-height: 118px;
}

.plan-line-chart {
    min-height: 290px;
    display: grid;
    align-content: stretch;
    gap: 12px;
}

.plan-chart-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.plan-chart-head strong {
    color: var(--green);
    font-size: clamp(2rem, 5vw, 3.35rem);
    line-height: 0.9;
}

.plan-chart-head small {
    color: var(--muted);
    text-align: right;
}

.plan-line-chart svg {
    width: 100%;
    min-height: 220px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(0, 229, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px),
        rgba(0, 0, 0, 0.18);
    background-size: 34px 34px;
}

.mini-bars {
    min-height: 210px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(28px, 1fr);
    align-items: end;
    gap: 8px;
    overflow-x: auto;
}

.mini-bar {
    display: grid;
    align-items: end;
    gap: 8px;
    text-align: center;
}

.mini-bar span {
    min-height: 8px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--green), var(--yellow));
    box-shadow: 0 0 18px rgba(69, 245, 161, 0.12);
}

.mini-bar small {
    color: var(--muted);
    font-size: 0.72rem;
}

.insight-list {
    display: grid;
    gap: 10px;
}

.insight-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.insight-item span,
.insight-item small {
    color: var(--muted);
}

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

.plan-server-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.plan-server-tile {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.plan-server-tile.state-online {
    border-color: rgba(69, 245, 161, 0.34);
}

.plan-server-tile.state-offline {
    border-color: rgba(255, 91, 110, 0.30);
}

.plan-server-tile h4 {
    margin: 10px 0 4px;
    font-size: 1.05rem;
}

.plan-server-tile small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.plan-sparkline {
    width: 100%;
    min-height: 70px;
    color: var(--cyan);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.16);
}

.plan-server-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.plan-server-facts span {
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.plan-server-facts strong,
.plan-server-facts small {
    display: block;
}

.plan-server-facts small {
    color: var(--muted);
    font-size: 0.72rem;
}

.plan-frame-shell {
    min-height: calc(100vh - 190px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.34);
    box-shadow: var(--shadow);
}

.plan-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 190px);
    min-height: 720px;
    border: 0;
    background: #05090c;
}

.rank-row,
.timeline-item {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.rank-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.rank-number {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #001014;
    background: var(--cyan);
    border-radius: 6px;
    font-weight: 900;
}

.timeline-list.full {
    max-width: 1000px;
}

.timeline-item strong,
.timeline-item small {
    display: block;
}

.timeline-item small {
    margin-top: 4px;
    color: var(--muted);
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.server-grid > .empty-state,
.ptero-grid > .empty-state,
.metric-grid > .empty-state,
.analytics-grid > .empty-state {
    grid-column: 1 / -1;
}

.skeleton-card,
.skeleton-row,
.skeleton-bar span,
.skeleton-text,
.skeleton-line,
.skeleton-pill {
    position: relative;
    overflow: hidden;
}

.skeleton-card::after,
.skeleton-row::after,
.skeleton-bar span::after,
.skeleton-text::after,
.skeleton-line::after,
.skeleton-pill::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    animation: shimmer 1.25s infinite;
}

.skeleton-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.skeleton-row {
    min-height: 54px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(90px, 0.35fr);
    align-items: center;
    gap: 12px;
}

.skeleton-pill {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.09);
}

.skeleton-text,
.skeleton-line {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.skeleton-text.wide {
    width: min(190px, 86%);
    height: 18px;
}

.skeleton-line {
    width: 100%;
}

.skeleton-bar span {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.skeleton-bar small {
    min-height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.modal-root.active {
    display: flex;
}

.modal-dialog {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: rgba(5, 15, 19, 0.98);
    box-shadow: var(--shadow);
}

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

.modal-dialog h3 {
    margin: 0 0 18px;
}

.profile-shell {
    display: grid;
    gap: 18px;
}

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

.profile-heading h3 {
    margin-bottom: 6px;
    font-size: 1.8rem;
}

.profile-heading small,
.profile-history-item small,
.punishment-item small {
    color: var(--muted);
}

.profile-status,
.punishment-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

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

.control-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.18);
}

.control-detail-actions .danger-action {
    height: 40px;
}

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

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

.profile-metric,
.profile-panel,
.punishment-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.profile-metric {
    min-height: 94px;
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.profile-metric i,
.profile-metric span {
    color: var(--muted);
}

.profile-metric strong {
    color: var(--text);
}

.profile-panel {
    padding: 14px;
}

.profile-panel.full {
    min-width: 0;
}

.profile-panel h4 {
    margin: 0 0 12px;
}

.profile-list,
.punishment-list {
    display: grid;
    gap: 10px;
}

.profile-history-item,
.punishment-item {
    padding: 12px;
}

.profile-history-item strong,
.punishment-item strong {
    display: block;
    overflow-wrap: anywhere;
}

.punishment-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.punishment-item.active {
    border-color: rgba(255, 91, 110, 0.35);
}

.punishment-item > span {
    color: var(--muted-2);
    font-weight: 800;
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

.modal-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    display: grid;
    gap: 10px;
}

.toast {
    width: min(380px, calc(100vw - 36px));
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(6, 16, 20, 0.96);
    box-shadow: var(--shadow);
}

.toast.error {
    border-color: rgba(255, 91, 110, 0.5);
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 84vw);
        z-index: 90;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .metric-grid,
    .dashboard-grid,
    .analytics-grid,
    .ptero-grid,
    .plan-stat-grid,
    .plan-server-matrix,
    .control-resource-strip,
    .control-metric-grid,
    .control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .topbar,
    .view-toolbar,
    .filter-row,
    .ops-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .content {
        padding: 16px;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .metric-grid,
    .metric-grid.compact,
    .dashboard-grid,
    .analytics-grid,
    .ptero-grid,
    .plan-stat-grid,
    .plan-server-matrix,
    .control-resource-strip,
    .control-metric-grid,
    .control-grid,
    .form-grid,
    .profile-metrics,
    .profile-grid {
        grid-template-columns: 1fr;
    }

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

    .skeleton-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .skeleton-row .skeleton-text:last-child {
        grid-column: 2;
    }

    .live-console-output {
        min-height: 320px;
    }

    .plan-frame,
    .plan-frame-shell {
        min-height: 640px;
    }

    .insight-item,
    .plan-chart-head {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .profile-heading,
    .punishment-item {
        grid-template-columns: 1fr;
    }

    .profile-heading {
        flex-direction: column;
    }

    .profile-status,
    .punishment-title {
        justify-content: flex-start;
    }

    .hero-ip {
        min-width: 0;
    }

    .ghost-action span,
    .primary-action span {
        display: inline;
    }
}

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