/*
Theme Name: The Ark Command Deck
Theme URI: https://redservermgmt.com
Author: Redrum316
Description: Dark sci-fi tactical 3D command deck theme for The Ark // Redrum Gaming & Network Hub.
Version: 2.0.0
Text Domain: ark-command-theme
*/

:root {
    --bg-deep: #05070d;
    --bg-panel: rgba(12, 18, 30, 0.80);
    --bg-card: rgba(15, 23, 38, 0.78);
    --bg-card-hover: rgba(21, 32, 54, 0.92);
    --border-subtle: rgba(148, 163, 184, 0.15);
    --border-glow: rgba(56, 189, 248, 0.42);
    --redrum: #ef4444;
    --redrum-dark: #b91c1c;
    --redrum-glow: rgba(239, 68, 68, 0.32);
    --cyan: #38bdf8;
    --cyan-glow: rgba(56, 189, 248, 0.24);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.28);
    --violet: #a855f7;
    --amber: #f59e0b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --font-display: 'Rajdhani', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 7px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
    color: var(--text-main);
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 80% 50% at 15% -10%, rgba(239, 68, 68, 0.15), transparent 60%),
        radial-gradient(ellipse 70% 45% at 85% 0%, rgba(56, 189, 248, 0.12), transparent 55%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 3D Perspective Canvas Layer */
#ark-3d-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

main.ark-container,
footer.ark-footer {
    position: relative;
    z-index: 2;
}

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

.ark-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sticky Command Header */
.ark-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 7, 13, 0.82);
    border-bottom: 1px solid var(--border-subtle);
}

body.admin-bar .ark-header {
    top: 32px;
}

.ark-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.ark-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ark-emblem {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.45));
}

.ark-emblem:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.65));
}

.ark-emblem svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ark-brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.05;
}

.ark-brand-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

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

.ark-nav a {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
}

.ark-nav a:hover {
    color: var(--text-main);
    background: rgba(56, 189, 248, 0.1);
}

.ark-auth-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ark-fx-btn {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    cursor: pointer;
    transition: all 0.18s ease;
}

.ark-fx-btn.is-off {
    border-color: var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-dim);
}

.ark-clearance-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ark-clearance-pill.tier-member {
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--cyan);
    background: rgba(56, 189, 248, 0.1);
}

.ark-clearance-pill.tier-admin {
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
}

/* Buttons */
.ark-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.83rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(30, 41, 59, 0.72);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.ark-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(148, 163, 184, 0.38);
    transform: translateY(-1px);
}

.ark-btn:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.ark-btn-primary {
    background: linear-gradient(135deg, var(--redrum), var(--redrum-dark));
    border-color: rgba(248, 113, 113, 0.45);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
    color: #fff;
}

.ark-btn-primary:hover {
    background: linear-gradient(135deg, #f87171, var(--redrum));
    border-color: rgba(252, 165, 165, 0.65);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.ark-btn-cyan {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.44);
    color: #7dd3fc;
}

.ark-btn-cyan:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: var(--cyan);
    color: #fff;
}

.ark-btn-wake {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.48);
    color: #fcd34d;
}

.ark-btn-wake:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: var(--amber);
    color: #fff;
}

.ark-btn-sm {
    padding: 6px 11px;
    font-size: 0.77rem;
}

/* Hero Section & 5-Card Telemetry HUD */
.ark-hero {
    padding: 44px 0 24px;
}

.ark-hero-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ark-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cyan);
    margin-bottom: 10px;
}

.ark-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 12px var(--emerald);
    animation: arkPulse 2s infinite;
}

@keyframes arkPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.55; }
}

.ark-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
    line-height: 1.05;
}

.ark-hero h1 span {
    background: linear-gradient(90deg, #f87171, #ef4444, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ark-hero p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 680px;
}

.ark-sync-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

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

.ark-hud-card {
    background: var(--bg-panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
}

.ark-hud-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--cyan);
    opacity: 0.75;
}

.ark-hud-card.accent-emerald::before { background: var(--emerald); }
.ark-hud-card.accent-redrum::before { background: var(--redrum); }
.ark-hud-card.accent-amber::before { background: var(--amber); }
.ark-hud-card.accent-violet::before { background: var(--violet); }

.ark-hud-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.ark-hud-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
}

.ark-hud-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 3px;
}

/* Squad Game Night Countdown & RSVP Banner */
.ark-gamenight-banner {
    margin-top: 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(15, 23, 42, 0.88) 45%, rgba(56, 189, 248, 0.12));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.ark-gn-left {
    flex: 1;
    min-width: 260px;
}

.ark-gn-kicker {
    font-family: var(--font-mono);
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ark-gn-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 3px 0 4px;
    color: #fff;
}

.ark-gn-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ark-gn-roster {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.ark-roster-chip {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.ark-gn-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ark-countdown {
    display: flex;
    gap: 8px;
}

.ark-cd-box {
    background: rgba(5, 7, 13, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 54px;
    text-align: center;
}

.ark-cd-num {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1.1;
}

.ark-cd-lbl {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* Section Headers */
.ark-section {
    padding: 32px 0;
}

.ark-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ark-section-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ark-section-title::before {
    content: '';
    width: 8px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--redrum), var(--cyan));
    display: inline-block;
}

/* Controls & Filter Tabs */
.ark-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ark-tabs {
    display: inline-flex;
    background: rgba(12, 18, 30, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 3px;
    flex-wrap: wrap;
}

.ark-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.79rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.ark-tab.active {
    background: rgba(56, 189, 248, 0.2);
    color: #fff;
}

.ark-search {
    background: rgba(12, 18, 30, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 7px 12px;
    font-size: 0.84rem;
    min-width: 210px;
}

.ark-search:focus {
    outline: none;
    border-color: var(--cyan);
}

/* Game Server Grid & Rich Cards */
.ark-servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.ark-server-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.ark-server-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.52);
}

.ark-server-card.is-online {
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.1);
}

.ark-server-card.is-sleeping {
    border-color: rgba(168, 85, 247, 0.42);
    box-shadow: 0 10px 28px rgba(168, 85, 247, 0.08);
}

.ark-server-card.is-starting {
    border-color: rgba(245, 158, 11, 0.48);
}

.ark-card-banner {
    height: 142px;
    position: relative;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
}

.ark-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.08);
    transition: transform 0.35s ease;
}

.ark-server-card.is-standby .ark-card-banner img {
    filter: grayscale(0.38) brightness(0.75);
}

.ark-server-card:hover .ark-card-banner img {
    transform: scale(1.05);
}

.ark-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 7, 13, 0.12) 0%, rgba(12, 18, 30, 0.94) 100%);
}

.ark-status-badge {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.ark-status-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-online {
    background: rgba(6, 78, 59, 0.88);
    border: 1px solid rgba(16, 185, 129, 0.65);
    color: #6ee7b7;
}
.status-online .dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-sleeping {
    background: rgba(59, 7, 100, 0.86);
    border: 1px solid rgba(168, 85, 247, 0.65);
    color: #e9d5ff;
}
.status-sleeping .dot {
    background: #c084fc;
    box-shadow: 0 0 8px #c084fc;
}

.status-starting {
    background: rgba(120, 53, 15, 0.88);
    border: 1px solid rgba(245, 158, 11, 0.65);
    color: #fcd34d;
}
.status-starting .dot {
    background: #f59e0b;
    animation: arkPulse 1.2s infinite;
}

.status-standby, .status-offline {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}
.status-standby .dot, .status-offline .dot {
    background: #64748b;
}

.ark-card-top-right {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 2;
    display: flex;
    gap: 5px;
    align-items: center;
}

.ark-node-chip,
.ark-tier-chip {
    font-family: var(--font-mono);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.ark-node-chip {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

.ark-node-chip.node-megatron {
    border-color: rgba(168, 85, 247, 0.5);
    color: #d8b4fe;
}

.ark-tier-chip {
    background: rgba(56, 189, 248, 0.22);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #bae6fd;
}

.ark-tier-chip.tier-admin {
    background: rgba(239, 68, 68, 0.24);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fecaca;
}

.ark-card-heading {
    position: absolute;
    bottom: 10px;
    left: 16px;
    right: 16px;
    z-index: 2;
}

.ark-card-game {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ark-mod-pill {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.36);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.61rem;
    color: #e0f2fe;
}

.ark-card-title {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 700;
    margin: 2px 0 0;
    line-height: 1.15;
    color: #fff;
}

.ark-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.ark-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.ark-metric-box {
    background: rgba(5, 7, 13, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 11px;
}

.ark-metric-label {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.ark-metric-val {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 2px;
}

.ark-resource-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--text-muted);
    padding: 0 2px;
}

/* 24-Hour Uptime & Peak Sparkbar */
.ark-history-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ark-history-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--text-dim);
}

.ark-history-bars {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    height: 7px;
}

.ark-hbar {
    border-radius: 2px;
    background: rgba(100, 116, 139, 0.25);
}
.ark-hbar.st-online { background: rgba(16, 185, 129, 0.85); }
.ark-hbar.st-sleeping { background: rgba(168, 85, 247, 0.75); }
.ark-hbar.st-starting { background: rgba(245, 158, 11, 0.8); }
.ark-hbar.st-standby { background: rgba(148, 163, 184, 0.25); }

.ark-addr-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(5, 7, 13, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #cbd5e1;
}

.ark-addr-bar code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ark-copy-btn {
    border: none;
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.ark-copy-btn:hover {
    background: rgba(56, 189, 248, 0.3);
    color: #fff;
}

.ark-card-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ark-card-actions .ark-btn {
    flex: 1;
}

/* Voice Comms Deck */
.ark-comms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.ark-comm-card {
    background: linear-gradient(145deg, rgba(15, 23, 38, 0.88), rgba(10, 15, 26, 0.92));
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.ark-comm-info h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 4px 0;
    letter-spacing: 0.05em;
}

.ark-comm-meta {
    font-family: var(--font-mono);
    font-size: 0.77rem;
    color: var(--text-muted);
}

/* Portals Grid & Favorites */
.ark-portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(282px, 1fr));
    gap: 15px;
}

.ark-portal-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 17px 19px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.18s ease;
    position: relative;
    cursor: pointer;
}

.ark-portal-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.ark-portal-card.is-pinned {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(160deg, rgba(245, 158, 11, 0.07), rgba(15, 23, 38, 0.86));
}

.ark-portal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ark-portal-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ark-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}
.ark-health-dot.h-offline {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.ark-health-dot.h-external {
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.ark-portal-badge {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--cyan);
}

.ark-lan-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.ark-pin-btn {
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 2px 5px;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
}
.ark-pin-btn:hover,
.ark-pin-btn.active {
    color: var(--amber);
    transform: scale(1.15);
}

.ark-portal-tier {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    text-transform: uppercase;
    color: var(--text-dim);
}
.ark-portal-tier.tier-member { color: var(--cyan); }
.ark-portal-tier.tier-admin { color: #f87171; }

.ark-portal-card h3 {
    font-family: var(--font-display);
    font-size: 1.22rem;
    margin: 2px 0 0;
    color: #fff;
}

.ark-portal-card p,
.ark-portal-desc {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    min-height: 2.9em;
}

.ark-portal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ark-portal-meta-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.ark-lan-pill {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.ark-lan-pill.smart-route {
    background: rgba(56, 189, 248, 0.1);
    color: var(--cyan);
    border-color: rgba(56, 189, 248, 0.25);
}

.ark-portal-url {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fleet Hardware Grid + Live Netdata Bars */
.ark-fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
    gap: 16px;
}

.ark-fleet-card {
    background: var(--bg-panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ark-fleet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ark-fleet-name {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ark-gauges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(5, 7, 13, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
}

.ark-gauge-top {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.ark-gauge-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.ark-gauge-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--emerald));
    transition: width 0.45s ease;
}

.ark-gauge-fill.is-high {
    background: linear-gradient(90deg, var(--amber), var(--redrum));
}

.ark-spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ark-spec-list strong {
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.71rem;
    text-transform: uppercase;
    display: inline-block;
    min-width: 74px;
}

/* Ark Labs // Roadmap & Community Voting */
.ark-labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.ark-lab-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ark-lab-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 0;
    color: #fff;
}

.ark-lab-card p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    flex: 1;
}

.ark-lab-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.ark-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    cursor: pointer;
    transition: all 0.16s ease;
}

.ark-vote-btn.voted,
.ark-vote-btn:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.6);
    color: #6ee7b7;
}

/* Two-Column Lower Deck & Commander Triage */
.ark-dual-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
}

.ark-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.ark-news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ark-news-item {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.ark-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ark-news-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cyan);
    text-transform: uppercase;
}

.ark-news-item h3 {
    font-family: var(--font-display);
    font-size: 1.22rem;
    margin: 4px 0 6px;
}

.ark-news-item p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Commander Request Triage */
.ark-req-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ark-req-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(5, 7, 13, 0.55);
    border: 1px solid var(--border-subtle);
}

/* Forms */
.ark-form-group {
    margin-bottom: 14px;
}

.ark-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.ark-input, .ark-select, .ark-textarea {
    width: 100%;
    background: rgba(5, 7, 13, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.88rem;
}

.ark-input:focus, .ark-select:focus, .ark-textarea:focus {
    outline: none;
    border-color: var(--cyan);
}

/* Guide / Onboarding Modal */
.ark-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(3, 5, 10, 0.78);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ark-modal-backdrop.open {
    display: flex;
}

.ark-modal {
    background: #0d1424;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

.ark-modal h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    margin: 0 0 10px;
}

.ark-modal pre {
    white-space: pre-wrap;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.65;
    color: #cbd5e1;
    background: rgba(5, 7, 13, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 0 0 16px;
}

/* Toast Notification */
.ark-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--cyan);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: all 0.22s ease;
}

.ark-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.ark-footer {
    margin-top: 48px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-dim);
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 1100px) {
    .ark-hud-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .ark-hud-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ark-dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .ark-hud-grid {
        grid-template-columns: 1fr;
    }
    .ark-nav {
        display: none;
    }
}

/* Portals Section Minimize / Collapse Toggle */
#ark-portals-toggle {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
}
#ark-portals-toggle:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--cyan);
    color: #fff;
}
.ark-portals-collapsed-strip {
    background: rgba(15, 23, 42, 0.65);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}
.ark-portals-collapsed-strip:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--cyan);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
