.stations-page {
    overflow-x: hidden;
}

.stations-layout {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.stations-header {
    margin-bottom: 1.25rem;
}

.stations-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.04em;
}

.stations-subtitle {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #8fa3bf;
    max-width: 40rem;
}

.stations-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #2a3a52;
    border-radius: 4px;
    background: rgba(12, 18, 32, 0.85);
}

.stations-search {
    flex: 1 1 14rem;
    min-width: 10rem;
    max-width: 22rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: 4px;
    border: 1px solid #2a3a52;
    background: #0c1220;
    color: #d1dae8;
}

.stations-search:focus {
    outline: none;
    border-color: #f5c518;
}

.stations-count {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7f99;
    margin-left: auto;
}

.stations-filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    width: 100%;
}

.stations-filter-label {
    flex: 0 0 auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6b7f;
    min-width: 4.25rem;
}

.stations-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.stations-filters--alpha .stations-filter-btn {
    min-width: 1.65rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    text-align: center;
}

.stations-filter-btn {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.55rem;
    border-radius: 2px;
    border: 1px solid #2a3a52;
    background: transparent;
    color: #8fa3bf;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.stations-filter-btn:hover {
    border-color: #f5c518;
    color: #f5c518;
}

.stations-filter-btn.is-active {
    background: rgba(245, 197, 24, 0.12);
    border-color: rgba(245, 197, 24, 0.45);
    color: #f5c518;
}

.stations-table-wrap {
    overflow-x: auto;
    border: 1px solid #2a3a52;
    border-radius: 4px;
    background: rgba(20, 28, 46, 0.6);
}

.stations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.stations-table th {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: #6b7f99;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #2a3a52;
    background: rgba(12, 18, 32, 0.9);
    white-space: nowrap;
}

.stations-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(42, 58, 82, 0.65);
    color: #c8d4e8;
    vertical-align: middle;
}

.stations-table tbody tr:hover {
    background: rgba(245, 197, 24, 0.04);
}

.stations-table tbody tr:last-child td {
    border-bottom: none;
}

.stations-cell-name {
    font-weight: 500;
    min-width: 10rem;
}

.stations-name-link {
    color: #e8edf4;
    text-decoration: none;
}

.stations-name-link:hover {
    color: #f5c518;
}

.stations-cell-crs {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    color: #f5c518;
    white-space: nowrap;
}

.stations-cell-num {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    white-space: nowrap;
}

.stations-cell-bool {
    text-align: center;
    width: 4.5rem;
}

.stations-cell-actions {
    text-align: right;
    white-space: nowrap;
}

.stations-operator {
    display: inline-block;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    border: 1px solid color-mix(in srgb, var(--op-colour) 55%, transparent);
    color: var(--op-colour);
    background: color-mix(in srgb, var(--op-colour) 12%, transparent);
}

.stations-bool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
}

.stations-bool--yes {
    color: #8fd4a8;
    background: rgba(60, 184, 120, 0.12);
}

.stations-bool--no {
    color: #5c6b7f;
    background: rgba(92, 107, 127, 0.1);
}

.stations-badge {
    display: inline-block;
    margin-left: 0.35rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    vertical-align: middle;
}

.stations-badge--disused {
    color: #9ca3af;
    border: 1px solid rgba(92, 107, 127, 0.45);
}

.stations-badge--bus {
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.4);
}

.stations-badge--disruption {
    text-decoration: none;
    cursor: pointer;
}

.stations-badge--disruption:hover {
    color: #f5c518;
}

.stations-badge--works {
    color: #f5c518;
    border: 1px solid rgba(245, 197, 24, 0.45);
}

.stations-badge--closed {
    color: #9ca3af;
    border: 1px solid rgba(92, 107, 127, 0.5);
}

.stations-badge--alert {
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.45);
}

.stations-badge--info {
    color: #8fa3bf;
    border: 1px solid rgba(143, 163, 191, 0.35);
}

.stations-map-link {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8fa3bf;
    text-decoration: none;
}

.stations-map-link:hover {
    color: #f5c518;
}

.stations-empty {
    text-align: center;
    color: #6b7f99;
    padding: 2rem !important;
}

.stations-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stations-nav-link {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8fa3bf;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border: 1px solid #2a3a52;
    border-radius: 2px;
}

.stations-nav-link:hover {
    border-color: #f5c518;
    color: #f5c518;
}

@media (max-width: 640px) {
    .stations-table th:nth-child(5),
    .stations-table td:nth-child(5) {
        display: none;
    }
}
