:root {
    --bg-header: rgba(15, 23, 42, 0.94);
    --bg-footer-start: #111827;
    --bg-footer-end: #0b1120;

    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --surface-soft: #f8fafc;

    --line: #e2e8f0;
    --line-strong: #cbd5e1;

    --text: #0f172a;
    --text-soft: #475569;
    --text-faint: #64748b;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --secondary: #475569;
    --secondary-hover: #334155;

    --danger: #dc2626;
    --danger-hover: #b91c1c;

    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.12);

    --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.16);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

*,
*::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: #f8fafc;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url("../images/site-bg.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 1;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(248, 250, 252, 0.68);
}

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;
}

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

p:last-child {
    margin-bottom: 0;
}

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;
}

.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;
}

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;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
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);
}

select[multiple] {
    min-height: 180px;
    padding-top: 10px;
    padding-bottom: 10px;
}

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

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

.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;
}

.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(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

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

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    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);
}

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);
}

.hero,
.card,
.form-card,
.stats-grid > .stat-card,
.route-meta .box,
.ride-card,
.group-logo-preview-card,
.group-logo-form-card,
.group-dropdown,
.ride-overview-card,
.event-card,
.member-card,
.album-card {
    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,
.ride-overview-card,
.event-card,
.member-card,
.album-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;
}

.hero-home-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: center;
}

.hero-home-banner-wrap {
    min-height: 240px;
}

.hero-home-banner {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    background: #ffffff;
}

.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;
}

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

.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);
}

.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 {
    padding: 18px;
}

.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-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-group-chip-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.ride-group-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--success-soft);
    border: 1px solid rgba(5, 150, 105, 0.18);
    color: #047857;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.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(auto-fit, minmax(150px, 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);
}

.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);
}

.rides-overview {
    display: grid;
    gap: 16px;
}

.ride-overview-card {
    padding: 18px;
}

.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;
}

.events-grid {
    display: grid;
    gap: 16px;
}

.event-card {
    padding: 18px;
}

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

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

.event-card-logo {
    display: block;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border-radius: 18px;
    object-fit: cover;
    object-position: center;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.85);
    flex-shrink: 0;
    overflow: hidden;
}

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

.event-card-brand-meta {
    min-width: 0;
}

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

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

.event-card-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;
}

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

.event-meta-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;
}

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

.event-meta-item div {
    color: #0f172a;
    word-break: break-word;
}

.group-members-grid {
    display: grid;
    gap: 16px;
}

.member-card {
    padding: 18px;
}

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

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

.member-group-section {
    margin-top: 14px;
}

.attendance-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.attendance-member {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 700;
}

.attendance-member-current {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.18);
    color: #047857;
}

.attendance-member-secondary {
    background: rgba(51, 65, 85, 0.08);
    border-color: rgba(51, 65, 85, 0.12);
    color: #334155;
}

.site-banner-preview {
    width: 100%;
    max-width: 720px;
    min-height: 220px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

#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);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.album-card {
    overflow: hidden;
}

.album-card-cover-link {
    display: block;
    color: inherit;
}

.album-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f8fafc;
}

.album-cover-placeholder {
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.album-card-body {
    padding: 16px;
}

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

.album-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.album-photo-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.album-photo-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    box-shadow: none;
}

.album-photo-trigger:hover,
.album-photo-trigger:focus {
    transform: none;
    background: transparent;
    box-shadow: none;
}

.album-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.lightbox.is-open {
    display: block;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox-dialog {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 1200px);
    max-height: 90vh;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 36px);
    width: auto;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.lightbox-close:hover {
    background: #0f172a;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
    z-index: 2;
}

.lightbox-nav:hover {
    background: #0f172a;
}

.lightbox-nav:disabled {
    opacity: 0.45;
    cursor: default;
}

.lightbox-nav-prev {
    left: 14px;
}

.lightbox-nav-next {
    right: 14px;
}

body.has-sidebar {
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 92px;
}

body.has-sidebar.sidebar-collapsed {
    --sidebar-width: var(--sidebar-width-collapsed);
}

.app-shell {
    min-height: 100vh;
}

.site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 1100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 17, 32, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.16);
    transition: width 0.22s ease, transform 0.22s ease;
    overflow: hidden;
}

.site-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    gap: 16px;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

.sidebar-brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    flex-shrink: 0;
}

.sidebar-brand-text {
    color: #ffffff;
    font-size: 1rem;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.sidebar-collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
}

.sidebar-collapse-icon::before {
    content: "<<";
    font-size: 0.78rem;
    letter-spacing: -0.08em;
}

.sidebar-collapse-text {
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-section {
    display: grid;
    gap: 6px;
}

.sidebar-section-title {
    margin: 12px 10px 6px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 10px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(1px);
}

.sidebar-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-link-badge {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    text-transform: uppercase;
}

.sidebar-link-text {
    white-space: nowrap;
}

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-account-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

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

.sidebar-account-meta {
    min-width: 0;
}

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

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

.app-main-wrap {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.22s ease;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 64px;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-topbar-brand {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-topbar-brand:hover {
    color: #ffffff;
}

.sidebar-mobile-btn {
    display: none;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.sidebar-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.sidebar-mobile-btn span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: #ffffff;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-main {
    flex: 1 0 auto;
}

.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
}

.site-footer {
    margin-top: auto;
    padding: 18px 0 24px;
    background: linear-gradient(180deg, var(--bg-footer-start), var(--bg-footer-end));
    color: #dbe4f0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

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

body.has-sidebar.sidebar-collapsed .sidebar-brand-text,
body.has-sidebar.sidebar-collapsed .sidebar-link-text,
body.has-sidebar.sidebar-collapsed .sidebar-section-title,
body.has-sidebar.sidebar-collapsed .sidebar-account-meta,
body.has-sidebar.sidebar-collapsed .sidebar-collapse-text {
    display: none;
}

body.has-sidebar.sidebar-collapsed .sidebar-brand-row {
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
}

body.has-sidebar.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

body.has-sidebar.sidebar-collapsed .sidebar-collapse-btn {
    justify-content: center;
    padding: 0;
}

body.has-sidebar.sidebar-collapsed .sidebar-collapse-icon::before {
    content: ">>";
}

body.has-sidebar.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0;
}

body.has-sidebar.sidebar-collapsed .sidebar-account {
    justify-content: center;
    padding: 10px;
}

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

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

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

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

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

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

@media (max-width: 980px) {
    body.has-sidebar,
    body.has-sidebar.sidebar-collapsed {
        --sidebar-width: 280px;
    }

    .site-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .app-main-wrap {
        margin-left: 0;
    }

    .app-topbar {
        display: flex;
    }

    .sidebar-mobile-btn {
        display: inline-flex;
    }

    .sidebar-collapse-btn {
        display: none;
    }

    body.sidebar-mobile-open .site-sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .page-shell,
    .footer-inner {
        width: min(1280px, calc(100% - 22px));
    }

    .grid-2,
    .grid-3,
    .stats-grid,
    .group-logo-page,
    .ride-info-grid,
    .ride-overview-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,
    .ride-overview-head,
    .event-card-head,
    .member-card-head,
    .album-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ride-date-pill,
    .ride-overview-date,
    .event-card-date,
    .member-count-badge {
        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%;
    }

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

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

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

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

    .hero-home-inner {
        grid-template-columns: 1fr;
    }

    .hero-home-banner-wrap,
    .hero-home-banner {
        min-height: 220px;
    }

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

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

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

@media (max-width: 768px) {
    body::before,
    body::after {
        display: none;
    }

    body {
        background: #f8fafc;
    }
}

@media (max-width: 640px) {
    .page-shell,
    .footer-inner {
        width: min(1280px, calc(100% - 18px));
    }

    .site-sidebar-inner {
        padding: 16px 12px;
    }

    .sidebar-brand-mark {
        width: 40px;
        height: 40px;
    }

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

    h1 {
        font-size: 1.75rem;
    }

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

    table {
        min-width: 680px;
    }

    .event-card-logo {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        max-width: 46px !important;
        max-height: 46px !important;
        border-radius: 14px;
    }

    .event-meta-grid,
    .albums-grid,
    .album-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-dialog {
        width: min(96vw, 96vw);
        padding: 14px;
        border-radius: 18px;
    }

    .lightbox-image {
        max-height: calc(88vh - 28px);
        border-radius: 12px;
    }

    .lightbox-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        min-height: 44px;
        font-size: 1.7rem;
    }

    .lightbox-nav-prev {
        left: 8px;
    }

    .lightbox-nav-next {
        right: 8px;
    }

    .site-footer {
        padding: 16px 0 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}