/* System page styles */

/* System map */
.sys-map {
    padding: 1.5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.sys-map svg {
    width: 100%;
    height: 800px;
    display: block;
    border: 1px solid hsl(var(--border));
    background: #1a1e2a;
}

.sys-map .poi-marker {
    cursor: default;
    transition: opacity 0.15s;
}

.sys-map .poi-marker:hover {
    opacity: 0.8;
}

.sys-map a.gate-link {
    cursor: pointer;
}

.sys-map a.gate-link:hover .gate-label {
    text-decoration: underline;
}

.sys-map .poi-marker:hover .poi-label {
    font-weight: 600;
}

.sys-map .map-label {
    font-family: var(--font-sans);
    font-size: 10px;
    fill: #d8dee9;
}

.sys-map .gate-label {
    font-family: var(--font-sans);
    font-size: 9px;
    fill: hsl(var(--smui-frost-2));
}

.sys-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    flex-wrap: wrap;
}

.sys-name {
    font-size: var(--text-hero);
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-top: 0.25rem;
}

.sys-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.sys-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sys-meta-item .stat {
    font-size: 18px;
}

/* Security level colors */
.security-high { color: hsl(var(--smui-green)); }
.security-med  { color: hsl(var(--smui-yellow)); }
.security-low  { color: hsl(var(--smui-red)); }
.security-label {
    font-size: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    vertical-align: middle;
}

/* Sections */
.sys-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.sys-section:last-child {
    border-bottom: none;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-head h3 {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Resource groups */
.resource-group {
    margin-bottom: 1.5rem;
}

.resource-group:last-child {
    margin-bottom: 0;
}

.resource-group h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Richness bar */
.richness-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-ui);
}

.richness-bar::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 6px;
    background: hsl(var(--muted));
    position: relative;
}

.richness-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 6px;
    width: calc(60px * var(--r) / 100);
    background: hsl(var(--smui-frost-2));
}

/* Simpler richness bar using background gradient */
.richness-bar {
    position: relative;
}

.richness-bar::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 6px;
    background: linear-gradient(
        to right,
        hsl(var(--smui-frost-2)) var(--r),
        hsl(var(--muted)) var(--r)
    );
}

/* Base cards */
.base-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 1.25rem;
}

.base-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.base-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.base-stats {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.base-desc {
    font-size: var(--text-ui);
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    margin-bottom: 1rem;
}

.base-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Services */
.service-list {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.service-tag {
    font-size: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2rem 0.5rem;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
}

.service-tag.available {
    color: hsl(var(--smui-green));
    border-color: hsl(var(--smui-green));
}

.service-tag.unavailable {
    color: hsl(var(--smui-red));
    border-color: hsl(var(--smui-red));
    opacity: 0.6;
}

/* Facility table */
.facility-table {
    margin-top: 0.4rem;
}

.facility-table td:last-child {
    text-align: center;
    font-weight: 500;
}

/* Empire TOC */
.empire-toc {
    padding: 1rem 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
}

.empire-toc .label {
    display: block;
    margin-bottom: 0.5rem;
}

.empire-toc-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.empire-toc-link {
    padding: 0.35rem 0.75rem;
    border: 1px solid;
    font-size: var(--text-ui);
    text-decoration: none;
    transition: opacity 0.15s;
}

.empire-toc-link:hover {
    opacity: 0.8;
}

/* Empire sections */
.empire-section {
    scroll-margin-top: 1rem;
}

.empire-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.empire-map-panel {
    background: #0a0e18;
    border: 1px solid hsl(var(--border));
    padding: 0.5rem;
}

.empire-map-svg {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

.empire-sys-dot {
    cursor: pointer;
    transition: opacity 0.15s;
}

.empire-sys-dot:hover {
    opacity: 0.8;
}

.empire-sys-label {
    font-family: var(--font-sans);
    font-size: 14px;
    pointer-events: none;
}

/* Site footer (duplicated here since system pages load this) */
.site-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: var(--text-label);
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.5px;
    border-top: 1px solid hsl(var(--border));
    margin-top: 3rem;
}

/* Pathfinder Jump Routes */
.jumpmap-link {
    display: inline-block;
    padding: 10px 14px;
    font-weight: 600;
}
.jumpmap-graphics {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}
.jumpmap-figure {
    margin: 0;
    text-align: center;
    max-width: 480px;
    flex: 1 1 360px;
}
.jumpmap-figure svg {
    width: 100%;
    height: auto;
    background: hsl(222 14% 9%);
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
}
.jumpmap-figure figcaption {
    font-size: var(--text-label);
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}
.jump-label { font-size: 11px; font-family: var(--font-sans); }
.jm-direct { color: #f5f7fa; font-weight: 600; }
.jm-blocked { color: #7a8290; }

/* Sortable table headers (jump pages load system.css, not items.css) */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: hsl(var(--primary)); }
.sort-arrow { margin-left: 4px; font-size: 10px; }

/* Section label header bar (defined in items.css, mirrored here for jump pages) */
.section-label {
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: hsl(var(--muted-foreground));
  padding: 0.5rem 0.75rem;
  background: hsl(var(--smui-surface-2));
  border-bottom: 1px solid hsl(var(--border));
}
