:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
    --green: #22c55e;
    --yellow: #eab308;
    --orange: #f97316;
    --red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar h1 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar h1 svg {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--primary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

 a.card,
 a.card:visited {
     color: var(--text-primary);
 }

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="datetime-local"],
select {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

input[type="datetime-local"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-dark);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 0.5rem;
    z-index: 1;
}

.timeline-container {
    margin-top: 1rem;
}

.timeline-chart {
    height: 150px;
    width: 100%;
    cursor: crosshair;
}

.slider-wrapper {
    padding-left: 40px;
    padding-right: 50px;
    margin-top: 0;
}

.timeline-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    outline: none;
}

.timeline-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.current-time {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-secondary);
    min-width: 180px;
}

.legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.green { background: var(--green); }
.legend-color.yellow { background: var(--yellow); }
.legend-color.orange { background: var(--orange); }
.legend-color.red { background: var(--red); }

.tooltip-custom {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 0.5rem;
}

.leaflet-popup-tip {
    background: var(--bg-card);
}

.station-popup {
    min-width: 150px;
}

.station-popup h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.station-popup .db-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.station-popup .db-value.green { color: var(--green); }
.station-popup .db-value.yellow { color: var(--yellow); }
.station-popup .db-value.orange { color: var(--orange); }
.station-popup .db-value.red { color: var(--red); }

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .form-group {
        width: 100%;
    }
    
    input[type="datetime-local"],
    select {
        width: 100%;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header svg {
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form input {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

/* Users Table */
.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.users-table th,
.users-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.users-table thead th {
    border-bottom: 2px solid var(--border);
}

.users-table tbody td {
    border-bottom: 1px solid var(--border);
}

.users-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

.users-table input,
.users-table select {
    height: 34px;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    box-sizing: border-box;
    vertical-align: middle;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 0.375rem;
}
.users-table input[type="email"],
.users-table input[type="password"] {
    width: 100%;
    min-width: 100px;
}
.users-table input[type="checkbox"] {
    height: auto;
    width: auto;
}

.users-table .actions {
    white-space: nowrap;
}
.users-table .actions .btn {
    margin-right: 0.25rem;
}

.users-table .actions input[type="password"] {
    width: 120px;
}

.btn-small {
    height: 34px;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    box-sizing: border-box;
}

.btn-danger {
    background: var(--red);
    border-color: var(--red);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.user-form {
    margin-bottom: 0;
}

/* Speed Control */
.speed-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speed-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.speed-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.speed-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 35px;
}

/* Live Data Button */
.btn-live {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    position: relative;
}

.btn-live:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-live.active {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse-live 1.5s ease-in-out infinite;
}

.btn-live.active .live-indicator {
    background: #4ade80;
    animation: pulse-live-active 1s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes pulse-live-active {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.live-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.live-status.connected {
    color: #4ade80;
}

.live-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.live-status.connected .status-dot {
    background: #4ade80;
    animation: pulse-live-active 1s ease-in-out infinite;
}

/* Station Status Grid */
.station-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.station-status-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    padding-bottom: 0;
    background: var(--bg-dark);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.station-status-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.station-status-left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.station-status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.station-status-info {
    display: flex;
    flex-direction: column;
}

.station-status-db {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.station-status-item.online .station-status-db {
    color: #4ade80;
    font-weight: 600;
}

.station-status-item.online .station-status-indicator {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    animation: pulse-live-active 1.5s ease-in-out infinite;
}

.station-status-item.offline .station-status-indicator {
    background: #6b7280;
}

.station-status-info {
    flex: 1;
    min-width: 0;
}

.station-status-name {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-status-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.station-status-item.online .station-db {
    color: #4ade80;
    font-weight: 600;
}

.station-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    width: fit-content;
}

.station-status-item.online .station-status-badge {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.station-status-item.offline .station-status-badge {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.station-sparkline {
    width: 100%;
    height: 40px;
    margin-top: 1rem;
    margin-bottom: 10px;
}

/* Map dB Labels */
.db-label {
    background: transparent;
    border: none;
}

.db-label-text {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.db-label-text.green { color: #4ade80; }
.db-label-text.yellow { color: #facc15; }
.db-label-text.orange { color: #fb923c; }
.db-label-text.red { color: #f87171; }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Responsive Styles */
@media (max-width: 900px) {
    .navbar {
        padding: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .nav-links a {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    .navbar {
        position: relative;
    }
    
    .container {
        padding: 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Timeline controls mobile */
    .timeline-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .timeline-controls > * {
        flex-shrink: 0;
    }
    
    #currentTime {
        font-size: 0.75rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Controls (date pickers etc) */
    .controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-group {
        width: 100%;
    }
    
    input[type="datetime-local"],
    select {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Station status grid */
    .station-status-grid {
        grid-template-columns: 1fr;
    }
    
    .station-status-item {
        max-width: 100%;
        overflow: hidden;
    }
    
    .station-status-name {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Map container */
    #map {
        height: 50vh !important;
        min-height: 300px;
    }
    
    /* Graph container */
    .chart-wrapper {
        height: 300px !important;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
    }
    
    /* Admin tables */
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    /* Play button and speed slider */
    .play-btn {
        width: 36px;
        height: 36px;
    }
    
    #speedSlider {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .navbar h1 {
        font-size: 1.25rem;
    }
    
    .timeline-chart {
        height: 120px;
    }
    
    .timeline-controls {
        justify-content: space-between;
    }
    
    #currentTime {
        max-width: 100px;
        font-size: 0.7rem;
    }
    
    .station-status-item {
        padding: 1rem;
    }
    
    .station-sparkline {
        height: 30px;
    }
    
    /* Hide some less important buttons on very small screens */
    #resetZoom {
        display: none;
    }
}

/* ── Global dark-theme form inputs ───────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"] {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="file"] {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    width: 100%;
}

input[type="file"]::file-selector-button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-right: 0.75rem;
    font-family: inherit;
    font-size: 0.8rem;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Shared form utilities (profile & admin pages) ───── */
.profile-input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.profile-input:disabled {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.profile-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

.profile-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.profile-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
}

.profile-label .required { color: var(--red); margin-left: 2px; }

.profile-label .hint {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.8;
}

.profile-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

.profile-actions {
    padding-top: 0.25rem;
}

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.toggle-knob {
    width: 44px;
    height: 24px;
    appearance: none;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-knob:checked { background: var(--primary); }

.toggle-knob::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.toggle-knob:checked::after { left: 23px; }

.toggle-text-main {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-text-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* Station subscription grid */
.stations-help {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.station-mute-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.station-mute-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.875rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
}

.station-mute-item:hover { border-color: var(--primary); }

.station-mute-item.is-subscribed {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.station-mute-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.subscribed-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Dark-theme status badges (admin pages) */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-update  { background: rgba(37, 99, 235, 0.2);  color: #93c5fd; }
.badge-restart { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.badge-reboot  { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-none    { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.version-current { font-weight: 600; color: var(--green); }
.version-unknown { color: var(--text-secondary); font-style: italic; }

select.version-select {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.375rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 0.375rem;
    font-family: inherit;
}

.deploy-all-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.actions-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .profile-grid-2,
    .profile-grid-3,
    .profile-grid-4 { grid-template-columns: 1fr; }
}
