html.pf-fw-root,
html.pf-fw-root body.pf-fw-body {
    height: auto;
    min-height: 100%;
    overflow: auto;
}

.pf-fw-body {
    margin: 0;
    color: var(--pf-text);
}

.pf-fw-page-wrapper {
    padding: 12px 12px 28px;
}

.pf-fw-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 8px;
}

.pf-fw-title {
    font-family: var(--pf-font-bold);
    font-weight: 400;
    color: var(--pf-text-strong);
}

.pf-fw-title .fas,
.pf-fw-toolbar .btn .fas {
    margin-right: 4px;
}

.pf-fw-toolbar .form-group-inline,
.pf-fw-module-toggle,
.pf-fw-card-head label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--pf-text-muted);
    font-family: var(--pf-font-bold);
    font-size: var(--pf-size-body);
    font-weight: 400;
}

.pf-fw-toolbar select.form-control {
    width: auto;
    min-width: 148px;
    display: inline-block;
}

.pf-fw-toolbar select.pf-map-select {
    min-width: 196px;
}

body.pf-fw-theme-celestial #pf-fw-map {
    background: #121417;
}

.pf-fw-pilot,
.pf-fw-status {
    color: var(--pf-text-muted);
    font-size: 12px;
}

.pf-fw-status {
    margin-left: 0;
}

.pf-fw-module-toggle input {
    margin: 0;
}

#pf-fw-map {
    grid-area: map;
    position: relative;
    width: 100%;
    height: calc(100vh - 96px);
    min-height: 360px;
    max-height: none;
    background: var(--pf-bg-canvas);
}

#pf-fw-territory {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#pf-fw-area-a {
    grid-area: area1;
}

#pf-fw-area-c {
    grid-area: area3;
}

#pf-fw-area-b {
    grid-area: area2;
}

#pf-fw-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    border: 0;
    z-index: 1;
    background: transparent;
    touch-action: none;
}

.pf-fw-page-wrapper .row + .row {
    margin-top: 15px;
}

#pf-fw-system-detail-dock {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 12px;
}

.pf-fw-card {
    background: var(--pf-bg-raised);
    border: 1px solid var(--pf-border-subtle);
    border-radius: var(--pf-radius);
    padding: 10px 12px 12px;
    min-width: 0;
}

.pf-fw-card[hidden] {
    display: none !important;
}

.pf-fw-card h2,
.pf-fw-card-head h2 {
    margin: 0 0 8px;
    font-size: var(--pf-size-title);
    font-family: var(--pf-font-bold);
    font-weight: 400;
    color: var(--pf-text-strong);
}

.pf-fw-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.pf-fw-card-head h2 {
    margin: 0;
}

.pf-fw-card-head select.form-control {
    width: auto;
    min-width: 120px;
    display: inline-block;
}

.pf-fw-card-body {
    color: var(--pf-text);
    font-size: var(--pf-size-body);
    line-height: 1.45;
}

.pf-fw-name {
    margin: 0 0 4px;
    font-size: var(--pf-size-name);
    font-family: var(--pf-font-bold);
    font-weight: 400;
    color: var(--pf-text-strong);
}

.pf-fw-here-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--pf-radius);
    background: #1a5276;
    color: #d6eaf8;
    font-size: var(--pf-size-caption);
    font-family: var(--pf-font-bold);
    font-weight: 400;
    vertical-align: 2px;
}

.pf-fw-meta,
.pf-fw-place {
    margin: 0 0 6px;
    color: var(--pf-text-muted);
}

.pf-fw-bar {
    height: 8px;
    margin: 6px 0;
    overflow: hidden;
    background: #0c0e11;
    border: 1px solid var(--pf-bg-hover);
    border-radius: var(--pf-radius-pill);
}

.pf-fw-bar > span {
    display: block;
    height: 100%;
    background: var(--pf-status-border-frontline);
}

.pf-fw-bar.is-vulnerable > span {
    background: var(--pf-band-wh-border);
}

.pf-fw-vp {
    margin: 0;
}

.pf-fw-heat-note,
.pf-fw-heat-peak {
    color: var(--pf-text-muted);
    font-size: 11px;
}

.pf-fw-heat-grid {
    display: grid;
    grid-template-columns: 28px repeat(24, minmax(0, 1fr));
    gap: 1px;
    margin-top: 6px;
}

.pf-fw-heat-label,
.pf-fw-heat-hour {
    color: var(--pf-text-faint);
    font-size: var(--pf-size-micro);
    line-height: 12px;
    text-align: right;
    padding-right: 3px;
}

.pf-fw-heat-hour {
    text-align: center;
    padding: 0;
}

.pf-fw-heat-cell {
    display: block;
    height: 12px;
    border-radius: 1px;
    background: #1b2326;
}

.pf-fw-heat-cell.is-now {
    outline: 1px solid var(--pf-text-strong);
    outline-offset: -1px;
}

.pf-fw-heat-error {
    color: var(--pf-status-border-frontline);
}

@media (max-width: 767px) {
    .pf-fw-page-wrapper {
        padding: 8px 8px 20px;
    }

    .pf-fw-toolbar .form-group-inline,
    .pf-fw-toolbar select.form-control {
        width: 100%;
        min-width: 0;
    }

    .pf-fw-status {
        margin-left: 0;
        width: 100%;
    }

    #pf-fw-system-detail-dock {
        grid-template-columns: 1fr;
    }
}

.pf-newmap-area .pf-lp-module {
    color: var(--pf-text);
}

.pf-lp-module .pf-module-head h5 .fa-coins {
    margin-right: 6px;
    color: var(--pf-rally);
}

.pf-lp-body {
    min-width: 0;
    user-select: text;
}

.pf-fw-advisor-title .fa-crosshairs {
    margin-right: 6px;
}

.pf-fw-advisor-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 6px;
}

.pf-fw-advisor-tools select.form-control {
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.pf-fw-advisor-badge {
    color: var(--pf-text-muted);
    font-size: var(--pf-size-caption);
}

.pf-fw-advisor-body {
    min-width: 0;
    user-select: text;
}

.pf-fw-advisor-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.pf-fw-advisor-status,
.pf-fw-advisor-reason,
.pf-fw-advisor-note,
.pf-fw-advisor-meta {
    margin: 0 0 6px;
}

.pf-fw-advisor-status,
.pf-fw-advisor-note,
.pf-fw-advisor-meta {
    color: var(--pf-text-muted);
    font-size: var(--pf-size-caption);
}

.pf-fw-advisor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-fw-advisor-card {
    padding: 8px;
    background: var(--pf-bg-raised);
    border: 1px solid var(--pf-border-subtle);
    border-left: 4px solid var(--pf-advisor-color, #9b59b6);
    border-radius: var(--pf-radius);
}

.pf-fw-advisor-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.pf-fw-advisor-name {
    color: var(--pf-text-strong);
}

.pf-fw-advisor-chip,
.pf-fw-advisor-tier {
    color: var(--pf-text-muted);
    font-size: var(--pf-size-caption);
}

.pf-fw-advisor-reason {
    color: var(--pf-text);
}

.pf-fw-advisor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pf-fw-advisor-note:empty {
    display: none;
}

.pf-lp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.pf-lp-controls label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0;
    color: var(--pf-text-muted);
    font-size: 11px;
    font-weight: 700;
    min-width: 0;
}

.pf-lp-controls .form-control {
    width: 100%;
    min-width: 0;
    color: #e6e8eb;
    background: #12161b;
    border-color: #2c343c;
}

.pf-lp-have-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-lp-have-row span,
.pf-lp-have-row {
    color: #c5ccd1;
    font-size: 12px;
    font-weight: 700;
}

.pf-lp-payout {
    margin: 0 0 6px;
    color: var(--pf-text-strong);
    font-size: 12px;
    font-weight: 700;
}

.pf-lp-status,
.pf-lp-empty {
    margin: 0 0 8px;
    color: var(--pf-text-muted);
    font-size: 12px;
}

.pf-lp-status.is-error,
.pf-lp-error {
    margin: 0 0 8px;
    color: var(--pf-status-border-frontline);
    font-size: 12px;
}

.pf-lp-scroll {
    max-height: 440px;
    overflow: auto;
    border: 1px solid var(--pf-bg-hover);
    border-radius: 3px;
}

.pf-lp-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.pf-lp-table th,
.pf-lp-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--pf-bg-hover);
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.pf-lp-table th:first-child,
.pf-lp-table td:first-child {
    text-align: left;
    white-space: normal;
}

.pf-lp-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #1a1f24;
}

.pf-lp-table th button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #c5ccd1;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pf-lp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.pf-lp-item img {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    background: #0c0e11;
}

.pf-lp-name {
    color: var(--pf-text-strong);
    font-weight: 700;
}

.pf-lp-sub,
.pf-lp-buy {
    color: var(--pf-text-faint);
    font-size: 11px;
    font-weight: 600;
}

.pf-lp-rate {
    font-weight: 700;
}

.pf-lp-rate.is-high {
    color: #3dd68c;
}

.pf-lp-rate.is-mid {
    color: var(--pf-rally);
}

.pf-lp-rate.is-low {
    color: var(--pf-text-faint);
}

.pf-lp-sell {
    color: #e6e8eb;
    font-weight: 700;
}

@media (max-width: 767px) {
    .pf-lp-controls label {
        flex: 1 1 140px;
    }

    .pf-lp-scroll {
        max-height: 320px;
    }
}
