:root {
    --bg: #f4f7fb;
    --bg-deep: #0f172a;
    --bg-header: rgba(15, 23, 42, 0.9);
    --surface: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --surface-soft: #f8fafc;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --text: #0f172a;
    --text-soft: #475569;
    --text-faint: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.08);
    --secondary: #475569;
    --secondary-hover: #334155;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #059669;
    --warning: #d97706;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.14);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --container: 1180px;
    --header-height: 66px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 20%),
        linear-gradient(180deg, #eef4ff 0%, #f8fafc 30%, #f8fafc 100%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

strong {
    font-weight: 700;
}

code {
    background: #e2e8f0;
    color: #0f172a;
    padding: 0.16rem 0.38rem;
    border-radius: 8px;
    font-size: 0.92em;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.page-shell {
    padding: 14px 0 34px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-shell {
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    position: relative;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand:hover {
    color: #ffffff;
    opacity: 0.95;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
}

.brand-text {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0;
    cursor: pointer;
    justify-self: end;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.94rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-account {
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 5px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    flex-shrink: 0;
}

.nav-account-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.nav-account-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.nav-account-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.nav-account-name {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-account-role {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    white-space: nowrap;
}

.site-footer {
    margin-top: 42px;
    padding: 24px 0 34px;
    background: linear-gradient(180deg, #111827, #0b1120);
    color: #dbe4f0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
}

.hero,
.card,
.form-card,
.stats-grid > .stat-card,
.route-meta .box,
.ride-card,
.table-wrap,
.group-logo-preview-card,
.group-logo-form-card,
.group-dropdown {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero,
.card,
.form-card,
.ride-card {
    border-radius: var(--radius-lg);
}

.hero,
.card,
.form-card {
    padding: 20px 22px;
    margin-bottom: 18px;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.03)),
        rgba(255, 255, 255, 0.88);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 65%);
    pointer-events: none;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #0b1220;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(1.9rem, 2vw + 0.9rem, 2.5rem);
    margin-bottom: 0.65rem;
}

h2 {
    font-size: clamp(1.25rem, 1vw + 1rem, 1.7rem);
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.08rem;
    margin-bottom: 0.6rem;
}

.hero h1 {
    margin-bottom: 0.55rem;
}

.hero p:last-child,
.card p:last-child,
.form-card p:last-child {
    margin-bottom: 0;
}

p {
    margin: 0 0 0.9rem;
    color: var(--text-soft);
}

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

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    margin-bottom: 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.alert.success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.alert.error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.grid-2,
.grid-3,
.stats-grid,
.route-meta,
.group-logo-page,
.ride-info-grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-meta {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
}

.stats-grid > .stat-card,
.route-meta .box {
    padding: 18px;
    border-radius: var(--radius-md);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #2563eb, #06b6d4);
}

.stat-number {
    margin-top: 8px;
    color: #0b1220;
    font-size: clamp(1.7rem, 2vw + 0.9rem, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea,
input[type="file"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    margin-bottom: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-solid);
    color: var(--text);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    min-height: 124px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

input[readonly] {
    background: #f8fafc;
    color: var(--text-soft);
}

.help {
    margin-top: -6px;
    margin-bottom: 15px;
    font-size: 0.92rem;
    color: var(--text-faint);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button:hover,
.btn:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-hover), #2563eb);
    transform: translateY(-1px);
    text-decoration: none;
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #334155, #475569);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.18);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1f2937, #334155);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ef4444);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.2);
}

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

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

.actions-row form {
    margin: 0;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge.pending {
    color: #9a5b06;
    background: #fff7ed;
    border: 1px solid #fdba74;
}

.badge.approved {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #86efac;
}

.badge.rejected {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.list {
    display: grid;
    gap: 14px;
}

.ride-card {
    padding: 18px;
}

.ride-card p:last-child {
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 14px 13px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 250, 252, 0.98);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.route-meta .box strong {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

#map {
    width: 100%;
    height: clamp(300px, 54vh, 560px);
    border-radius: 20px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08)),
        #e2e8f0;
    border: 1px solid rgba(203, 213, 225, 0.85);
}

.nav-group-logo,
.nav-user-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.nav-group-logo-fallback,
.nav-user-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.nav-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.group-logo-page {
    grid-template-columns: 320px 1fr;
    align-items: start;
}

.group-logo-preview-card,
.group-logo-form-card {
    padding: 20px;
    border-radius: 20px;
}

.group-logo-preview {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.group-logo-preview-fallback {
    display: grid;
    place-items: center;
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin: 0;
}

.group-hero {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 18px;
    align-items: center;
}

.group-hero-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-hero-logo {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.group-hero-logo-fallback {
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.group-hero-content {
    min-width: 0;
}

.ride-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.ride-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ride-group-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: #ffffff;
    flex-shrink: 0;
}

.ride-group-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.ride-group-chip-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ride-group-chip-meta strong {
    color: #0f172a;
    word-break: break-word;
}

.ride-group-chip-label,
.ride-info-label {
    color: #64748b;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ride-date-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.ride-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 13px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.table-group-cell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.table-group-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: #ffffff;
    flex-shrink: 0;
}

.table-group-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.table-group-meta {
    min-width: 0;
}

.group-dropdown-list {
    display: grid;
    gap: 14px;
}

.group-dropdown {
    border-radius: 22px;
    overflow: hidden;
}

.group-dropdown-summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    user-select: none;
}

.group-dropdown-summary::-webkit-details-marker {
    display: none;
}

.group-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.group-dropdown-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.group-dropdown-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: #ffffff;
    flex-shrink: 0;
}

.group-dropdown-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.group-dropdown-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.group-dropdown-meta strong {
    color: #0f172a;
    font-size: 1.03rem;
    word-break: break-word;
}

.group-dropdown-meta span {
    color: #64748b;
    font-size: 0.9rem;
}

.group-dropdown-arrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    flex-shrink: 0;
}

.group-dropdown-arrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid #2563eb;
    border-bottom: 2px solid #2563eb;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
    margin-top: -3px;
}

.group-dropdown[open] .group-dropdown-arrow::before {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.group-dropdown-content {
    padding: 0 18px 18px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 1180px) {
    .nav a {
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .nav-account-role {
        display: none;
    }
}

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

@media (max-width: 960px) {
    :root {
        --header-height: 62px;
    }

    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-panel {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
        border-radius: 18px;
        border: 1px solid rgba(226, 232, 240, 0.72);
        background: rgba(15, 23, 42, 0.97);
        box-shadow: var(--shadow-lg);
    }

    body.nav-open .nav-panel {
        display: flex;
    }

    body.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav a {
        justify-content: flex-start;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
    }

    .nav-account {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        padding: 10px 12px;
    }

    .nav-account-role {
        display: block;
    }

    .page-shell {
        padding-top: 12px;
    }

    .grid-2,
    .grid-3,
    .stats-grid,
    .route-meta,
    .group-logo-page,
    .ride-info-grid {
        grid-template-columns: 1fr;
    }

    .group-hero {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .group-hero-logo-wrap {
        justify-content: flex-start;
    }

    .group-hero-logo {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .ride-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .ride-date-pill {
        align-self: flex-start;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-row a,
    .actions-row button,
    .actions-row form,
    .btn {
        width: 100%;
    }

    .inline-form {
        display: flex;
        width: 100%;
    }

    .group-dropdown-summary {
        padding: 15px 16px;
    }

    .group-dropdown-content {
        padding: 0 16px 16px;
    }

    .group-dropdown-logo {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    #map {
        height: min(52vh, 420px);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 18px));
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 0.82rem;
    }

    .brand-text {
        font-size: 0.92rem;
    }

    .hero,
    .card,
    .form-card,
    .ride-card {
        padding: 17px;
        border-radius: 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .nav-account-logo,
    .table-group-logo {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .ride-group-logo {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .group-dropdown-head {
        align-items: flex-start;
    }

    .table-wrap {
        border-radius: 18px;
    }

    table {
        min-width: 680px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
.route-meta {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ride-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.rides-overview {
    display: grid;
    gap: 16px;
}

.ride-overview-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.ride-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ride-overview-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ride-overview-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(203, 213, 225, 0.85);
    flex-shrink: 0;
}

.ride-overview-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.ride-overview-brand-meta {
    min-width: 0;
}

.ride-overview-brand-meta h3 {
    margin: 2px 0 0;
    font-size: 1.1rem;
    color: #0f172a;
    word-break: break-word;
}

.ride-overview-group {
    display: inline-block;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ride-overview-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.ride-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ride-overview-item {
    padding: 12px 13px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    min-width: 0;
}

.ride-overview-item-wide {
    grid-column: span 2;
}

.ride-overview-label {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ride-overview-item div {
    color: #0f172a;
    word-break: break-word;
}

.ride-overview-actions {
    margin-top: 4px;
}

@media (max-width: 1200px) {
    .ride-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

    .ride-overview-item-wide {
        grid-column: span 2;
    }

    .ride-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ride-overview-date {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    .ride-overview-card {
        padding: 16px;
    }

    .ride-overview-grid {
        grid-template-columns: 1fr;
    }

    .ride-overview-item-wide {
        grid-column: span 1;
    }

    .ride-overview-logo {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
}