:root {
    --bg: #000;
    --panel: #121212;
    --panel-2: #1a1a1a;
    --text: #fff;
    --muted: #cfcfcf;
    --accent: #0f8a3a; /* primary green */
    --accent-2: #0b6b2d; /* darker green */
    --accent-3: #19b04c; /* lighter hover */
    --border: #2a2a2a;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.topbar {
    background: var(--accent);
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .9rem .25rem .9rem;
    gap: .75rem;
}

.brand {
    font-weight: 700;
    letter-spacing: .2px;
    font-size: 1.1rem;
}

.clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    opacity: .95;
}

.navstrip {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .6rem .6rem .6rem;
}

    .navstrip a {
        flex: 1;
        text-align: center;
        text-decoration: none;
        color: rgba(255,255,255,.95);
        font-weight: 600;
        padding: .65rem .4rem;
        border-radius: .35rem;
    }

        .navstrip a.active {
            background: rgba(0,0,0,.18);
        }

.page {
    padding: 1rem 0 2.5rem 0;
}

.card-panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border);
    border-radius: .5rem;
}

.btn-accent {
    background: var(--accent-2);
    border: 1px solid var(--accent-3);
    color: #fff;
}

    .btn-accent:hover {
        background: var(--accent-3);
        border-color: var(--accent-3);
        color: #fff;
    }

.btn-outline-accent {
    border: 1px solid var(--accent-3);
    color: var(--accent-3);
    background: transparent;
}

    .btn-outline-accent:hover {
        background: var(--accent-3);
        color: #fff;
    }

.form-control, .form-select {
    background: #fff;
}

.label-pill {
    background: #2b2b2b;
    color: #fff;
    border-radius: .35rem 0 0 .35rem;
    padding: .55rem .75rem;
    white-space: nowrap;
}

.input-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: .4rem;
    overflow: hidden;
    border: 1px solid #2b2b2b;
}

    .input-row input {
        border: 0;
        border-radius: 0;
    }

        .input-row input:focus {
            box-shadow: none;
        }

    .input-row .time {
        width: 180px;
        border-left: 1px solid #d9d9d9;
    }

@media (max-width: 576px) {
    .input-row {
        flex-wrap: wrap;
    }

        .input-row .time {
            width: 100%;
            border-left: 0;
            border-top: 1px solid #d9d9d9;
        }

    .label-pill {
        width: 100%;
        border-radius: .35rem .35rem 0 0;
    }
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem 1.2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.service-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

.service-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2px solid var(--accent-3);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    background: #222;
}

.service-label {
    font-weight: 600;
    font-size: .95rem;
    opacity: .95;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 1.25rem 0 .6rem 0;
}

.other-list .list-group-item {
    background: #2a2f31;
    color: #fff;
    border-color: #3b3b3b;
}

.station-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}

.filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .5rem 0 .5rem 0;
}

.filter-btn {
    border: 1px solid var(--accent-3);
    background: transparent;
    color: var(--accent-3);
    padding: .3rem .55rem;
    border-radius: .25rem;
    font-weight: 600;
    font-size: .85rem;
}

    .filter-btn.active {
        background: var(--accent-3);
        color: #fff;
    }

.station-list .list-group-item {
    background: #1c1c1c;
    border-color: #2c2c2c;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.station-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    flex: 0 0 auto;
}

.result-box {
    margin-top: 1rem;
    padding: .85rem;
    border: 1px dashed rgba(25,176,76,.6);
    border-radius: .5rem;
    background: rgba(25,176,76,.08);
}

.muted {
    color: var(--muted);
}


/* ---------- Responsive improvements (mobile + tablet) ---------- */

/* Tablet + small laptop tweaks */
@media (max-width: 992px) {
    .service-grid {
        gap: 1rem;
    }
}

/* Make containers breathe a bit on small devices */
@media (max-width: 768px) {
    .page {
        padding: .75rem 0 2rem 0;
    }

    .brand-row {
        padding: .55rem .75rem .2rem .75rem;
    }

    .brand {
        font-size: 1rem;
    }

    .clock {
        font-size: .95rem;
    }

    .navstrip {
        gap: .4rem;
        padding: .3rem .5rem .55rem .5rem;
    }

        .navstrip a {
            padding: .55rem .35rem;
            font-size: .9rem;
        }

    .service-icon {
        width: 58px;
        height: 58px;
        font-size: 1.45rem;
    }

    .service-label {
        font-size: .9rem;
    }

    .section-title {
        font-size: 1.15rem;
    }
}

/* Stack action buttons and filters nicely on phones */
@media (max-width: 576px) {
    .station-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .station-actions .btn {
            width: 100%;
        }

    .filters {
        gap: .4rem;
    }

        .filters .filter-btn {
            flex: 1 1 calc(50% - .4rem);
            text-align: center;
        }

    /* Prevent long station names from breaking layout */
    .station-list .list-group-item span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .label-pill {
        text-align: center;
    }
}

@media (max-width: 576px) {

    /* Normal (before selection) */
    .station-select-wrap .select2-container .select2-selection--single {
        height: 44px;
    }

    .station-select-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 44px;
    }

    .station-select-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 44px;
    }

    /* After selection -> make it smaller */
    .station-select-wrap.selected .select2-container .select2-selection--single {
        height: 34px;
        font-size: 13px;
    }

    .station-select-wrap.selected .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 34px;
        padding-left: 8px;
        padding-right: 30px;
    }

    .station-select-wrap.selected .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 34px;
    }

    /* Optional: reduce space below the select */
    .station-select-wrap.selected .form-text {
        display: none;
    }

