/* ============================================================
   Viajantes — CSS
   ============================================================ */

:root {
    --bg:           #f8f9fb;
    --bg-card:      #ffffff;
    --bg-nav:       #ffffff;
    --border:       #e5e7eb;
    --border-hover: #d1d5db;
    --text:         #111827;
    --text-2:       #4b5563;
    --text-3:       #9ca3af;
    --primary:      #6366f1;
    --primary-dark: #4f46e5;
    --primary-light:#eef2ff;
    --success:      #10b981;
    --success-light:#d1fae5;
    --danger:       #ef4444;
    --danger-light: #fee2e2;
    --pink:         #ec4899;
    --pink-light:   #fce7f3;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow:       0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 24px rgba(0,0,0,.12);
    --radius:       10px;
    --radius-sm:    6px;
    --font:         'Inter', system-ui, sans-serif;
    --font-serif:   'Playfair Display', Georgia, serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: .25rem;
    flex: 1;
}
.nav-link {
    padding: .375rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-2);
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.nav-link:hover  { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--primary-light); color: var(--primary); }

/* ── Notification badge ───────────────────────────────────── */
.nav-badge {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    margin-left: .25rem;
    vertical-align: middle;
    animation: badgePop .25s ease;
}
.nav-badge.show { display: inline-block; }
@keyframes badgePop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.nav-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.nav-username { font-size: .875rem; font-weight: 500; color: var(--text-2); }
.notification-menu { position: relative; }
.admin-menu { position: relative; display: flex; align-items: center; }
.admin-menu-btn { border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.admin-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    overflow: hidden;
}
.admin-dropdown.open { display: block; }
.admin-dropdown a { display: block; padding: .7rem .9rem; font-size: .86rem; color: var(--text-2); }
.admin-dropdown a:hover { background: var(--bg); color: var(--text); }
.notification-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notification-btn:hover { background: var(--bg); color: var(--text); }
.notification-btn svg { width: 18px; height: 18px; }
.notification-badge { position: absolute; top: -7px; right: -7px; margin-left: 0; }
.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    width: 360px;
    max-width: calc(100vw - 2rem);
    max-height: 70vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 220;
}
.notification-dropdown.open { display: block; }
.notification-title {
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.notification-list {
    max-height: calc(70vh - 48px);
    overflow-y: auto;
}
.notification-item {
    display: block;
    position: relative;
    padding: .875rem 1rem .875rem 1.65rem;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg); }
.notification-item.unread { background: #f8fbff; }
.notification-dot {
    position: absolute;
    left: .75rem;
    top: 1.1rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
}
.notification-item-title {
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
}
.notification-item-body,
.notification-item-meta {
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    margin-top: .2rem;
    overflow: hidden;
}
.notification-item-meta {
    color: var(--text-3);
    font-size: .78rem;
    -webkit-line-clamp: 1;
}
.notification-empty {
    color: var(--text-2);
    padding: 1rem;
    text-align: center;
}
.nav-mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .375rem; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-mobile-menu { display: none; flex-direction: column; padding: .75rem 1.5rem 1rem; border-top: 1px solid var(--border); gap: .25rem; }
.nav-mobile-menu a { padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-2); }
.nav-mobile-menu a:hover { background: var(--bg); color: var(--text); }
.nav-mobile-menu.open { display: flex; }
.mobile-admin-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text-2);
    cursor: pointer;
    text-align: left;
}
.mobile-admin-toggle:hover { background: var(--bg); color: var(--text); }
.mobile-admin-toggle span { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.mobile-admin-menu { display: none; flex-direction: column; margin-left: .75rem; padding-left: .5rem; border-left: 2px solid var(--border); }
.mobile-admin-menu.open { display: flex; }
.mobile-admin-menu a { font-size: .86rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.main-content { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.section { margin-bottom: 3rem; }
.section-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-title { font-size: 1.75rem; font-weight: 700; }
.section-sub   { color: var(--text-2); font-size: .95rem; margin-top: .25rem; }

.page-header { margin-bottom: 2rem; }
.page-title  { font-size: 2rem; font-weight: 700; }
.page-sub    { color: var(--text-2); margin-top: .375rem; }

/* ── Grid ───────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } .nav-links { display: none; } .nav-user .nav-username,.nav-user > .btn { display: none; } .nav-mobile-toggle { display: flex; } }

/* Discover search */
.discover-search-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 2rem;
}
.discover-search-panel .search-bar {
    margin-bottom: .75rem;
}
.advanced-search {
    display: none;
    border-top: 1px solid var(--border);
    margin-top: .85rem;
    padding-top: 1rem;
}
.advanced-search.open { display: block; }
.advanced-search-actions {
    display: flex;
    justify-content: flex-end;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), var(--shadow);
}
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: .375rem; }
.card-subtitle { font-size: .875rem; color: var(--text-2); margin-bottom: .75rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; }

.card-badge-row { position: relative; }
.card-img-wrap { position: relative; }
.card-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 50%, transparent 100%); }
.card-img-text { position: absolute; bottom: .75rem; left: .75rem; right: .75rem; color: #fff; }
.card-img-text h3 { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.2; }
.card-img-text p  { font-size: .8rem; opacity: .9; margin-top: .25rem; }
.card-img-top-badge { position: absolute; top: .75rem; left: .75rem; }

/* ── Card header strips ─────────────────────────────────────── */
.card-strip {
    padding: .5rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
}
.card-strip-match { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.card-strip-like  { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #9d174d; }
.card-strip-label { display: flex; align-items: center; gap: .375rem; font-weight: 600; }
.card-strip-date  { color: var(--text-3); font-size: .75rem; }

/* ── Traveler row ───────────────────────────────────────────── */
.traveler-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.avatar {
    width: 48px; height: 48px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .9rem; color: var(--primary);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-match { border-color: rgba(16,185,129,.4); }
.avatar-like  { border-color: rgba(236,72,153,.3); }
.profile-avatar-link,
.profile-name-link {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}
.profile-avatar-link { display: inline-flex; flex-shrink: 0; border-radius: 999px; }
.profile-name-link:hover { color: var(--primary); text-decoration: underline; }
.profile-avatar-link:hover .avatar { border-color: var(--primary); }
.traveler-info h4 { font-size: 1rem; font-weight: 600; }
.traveler-info p  { font-size: .8rem; color: var(--text-2); }
.rating-summary { display: inline-flex; align-items: center; gap: .3rem; color: #b45309; font-size: .78rem; font-weight: 700; margin-top: .15rem; }
.rating-summary .rating-stars { letter-spacing: 0; color: #f59e0b; }
.rating-summary.empty { color: var(--text-3); font-weight: 500; }
.user-badge-row { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.user-badge { display: inline-flex; align-items: center; gap: .2rem; border-radius: 999px; padding: .12rem .45rem; font-size: .68rem; font-weight: 800; letter-spacing: 0; border: 1px solid var(--border); }
.user-badge-specialist { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.user-badge-moderator { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.user-badge-default { background: var(--bg); color: var(--text-2); }
.trip-count-summary { margin-top: .1rem; color: var(--text-3); font-size: .72rem; line-height: 1.25; }
.rating-picker { display: flex; gap: .25rem; margin: .5rem 0 1rem; }
.rating-star-btn { border: 0; background: transparent; color: #d1d5db; font-size: 2rem; line-height: 1; cursor: pointer; padding: .15rem; }
.rating-star-btn.active, .rating-star-btn:hover { color: #f59e0b; }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600;
    white-space: nowrap;
}
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-success  { background: var(--success-light); color: #065f46; }
.badge-gray     { background: #f3f4f6; color: var(--text-2); }
.badge-pink     { background: var(--pink-light); color: #9d174d; }
.badge-white    { background: rgba(255,255,255,.9); color: var(--text); }

.badge-row { display: flex; flex-wrap: wrap; gap: .375rem; margin: .5rem 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .5rem 1.25rem; border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 600;
    cursor: pointer; border: none; transition: background .15s, opacity .15s, transform .1s;
    white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover  { background: #059669; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { background: #dc2626; }
.btn-pink     { background: linear-gradient(135deg, var(--pink), #a855f7); color: #fff; }
.btn-pink:hover     { opacity: .9; }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover  { background: var(--bg); border-color: var(--border-hover); }
.btn-ghost    { background: transparent; color: var(--text-2); }
.btn-ghost:hover    { background: var(--bg); color: var(--text); }
.btn-sm  { padding: .35rem .875rem; font-size: .8rem; }
.btn-lg  { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; border-radius: var(--radius-sm); }

/* ── Form ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; color: var(--text); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: .5rem .75rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .9rem; font-family: inherit; color: var(--text);
    background: var(--bg-card); transition: border-color .15s;
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.form-input.is-invalid, .form-select.is-invalid, .form-textarea.is-invalid { border-color: var(--danger); background: #fff7f7; }
.form-input.is-invalid:focus, .form-select.is-invalid:focus, .form-textarea.is-invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,.14); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: .78rem; color: var(--text-3); margin-top: .25rem; }
.form-error-msg { font-size: .78rem; color: var(--danger); margin-top: .25rem; }
.form-error-summary { border: 1px solid #fca5a5; background: var(--danger-light); color: #991b1b; border-radius: var(--radius-sm); padding: .625rem .75rem; font-size: .84rem; font-weight: 500; margin: -.25rem 0 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 200;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--radius);
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-3); line-height: 1; }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

.public-profile-modal { max-width: 560px; }
.public-profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}
.public-profile-head h3 { font-size: 1.15rem; font-weight: 800; }
.public-profile-head p { color: var(--text-2); font-size: .88rem; margin-top: .15rem; }
.public-profile-bio {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    padding: .6rem .75rem;
    margin-bottom: .75rem;
}
.public-profile-bio span {
    display: block;
    color: var(--text-3);
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: .15rem;
    text-transform: uppercase;
}
.public-profile-bio p {
    color: var(--text-2);
    font-size: .84rem;
    line-height: 1.4;
    white-space: pre-wrap;
}
.public-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.public-profile-info {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .5rem .6rem;
    background: var(--bg);
}
.public-profile-info-wide { grid-column: 1 / -1; }
.public-profile-info span {
    display: block;
    color: var(--text-3);
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: .2rem;
    text-transform: uppercase;
}
.public-profile-info strong {
    color: var(--text);
    font-size: .84rem;
    font-weight: 700;
}
.public-profile-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.public-profile-tags em {
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-style: normal;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .42rem;
}
@media (max-width: 520px) {
    .public-profile-head { align-items: flex-start; }
    .public-profile-grid { grid-template-columns: 1fr; }
}

/* ── Alert ──────────────────────────────────────────────────── */
.alert {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1.25rem; border-radius: var(--radius-sm);
    font-size: .875rem; margin: 1rem 1.5rem 0;
}
.alert button { background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: .6; }
.alert-error   { background: var(--danger-light); color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #6ee7b7; }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; }
.toast {
    padding: .75rem 1.25rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: slideIn .25s ease; max-width: 320px;
}
.toast-success { background: #fff; border: 1.5px solid #6ee7b7; color: #065f46; }
.toast-error   { background: #fff; border: 1.5px solid #fca5a5; color: #991b1b; }
.toast-info    { background: #fff; border: 1.5px solid #a5b4fc; color: var(--primary-dark); }
@keyframes slideIn { from { transform: translateX(110%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs-bar { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
    padding: .5rem 1.25rem; font-size: .875rem; font-weight: 500;
    border: none; background: none; cursor: pointer; color: var(--text-2);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Search bar ─────────────────────────────────────────────── */
.search-bar { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 920px; }
.search-bar .form-input { flex: 1; }
.search-bar .form-select { min-width: 180px; width: auto; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #7c3aed 100%);
    color: #fff; padding: 5rem 1.5rem 4rem;
    text-align: center;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero-sub { font-size: 1.1rem; opacity: .85; max-width: 520px; margin: 0 auto 2.5rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-comandalike {
    position: relative;
    overflow: hidden;
    padding: 4rem 1.5rem 3.5rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(236,72,153,.35), transparent 24%),
        radial-gradient(circle at 82% 12%, rgba(16,185,129,.28), transparent 22%),
        linear-gradient(135deg, #121826 0%, #261447 52%, #071b2c 100%);
}
.hero-comandalike::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 92px;
    background: linear-gradient(to top, rgba(0,0,0,.34), transparent);
    pointer-events: none;
}
.hero-comandalike .hero-content {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
    gap: 2rem;
    align-items: center;
    text-align: left;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    color: #a7f3d0;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .85rem;
}
.hero-comandalike .hero-title {
    font-family: var(--font);
    font-size: clamp(2.7rem, 7vw, 5.25rem);
    font-weight: 900;
    margin-bottom: .85rem;
}
.hero-comandalike .hero-sub {
    margin: 0 0 1.75rem;
    max-width: 560px;
    color: rgba(255,255,255,.86);
}
.hero-login-btn {
    background: #fff;
    color: #111827;
    box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.hero-login-btn:hover { background: #f9fafb; }
.hero-visual {
    min-height: 300px;
    position: relative;
}
.club-lights {
    position: absolute;
    inset: 8% 0 auto;
    height: 170px;
    background:
        linear-gradient(72deg, transparent 0 24%, rgba(236,72,153,.18) 24% 29%, transparent 29%),
        linear-gradient(112deg, transparent 0 56%, rgba(34,211,238,.18) 56% 61%, transparent 61%);
}
.radar-card {
    position: relative;
    width: min(390px, 100%);
    min-height: 300px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(15,23,42,.72);
    box-shadow: 0 28px 70px rgba(0,0,0,.36);
    overflow: hidden;
}
.radar-rings {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,.2), rgba(16,185,129,.04) 56%, transparent 57%);
}
.radar-rings span {
    position: absolute;
    inset: 50%;
    border: 1px solid rgba(167,243,208,.34);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.radar-rings span:nth-child(1) { width: 70px; height: 70px; }
.radar-rings span:nth-child(2) { width: 140px; height: 140px; }
.radar-rings span:nth-child(3) { width: 210px; height: 210px; }
.radar-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ec4899;
    box-shadow: 0 0 0 6px rgba(236,72,153,.16);
}
.radar-dot-one { left: 70%; top: 30%; }
.radar-dot-two { left: 34%; top: 68%; background: #22d3ee; box-shadow: 0 0 0 6px rgba(34,211,238,.16); }
.radar-dot-three { left: 52%; top: 48%; background: #a7f3d0; box-shadow: 0 0 0 6px rgba(167,243,208,.16); }
.tab-ticket {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 178px;
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    box-shadow: 0 18px 42px rgba(0,0,0,.3);
}
.tab-ticket strong,
.tab-ticket small { display: block; }
.tab-ticket strong { font-size: 1rem; }
.tab-ticket small { color: var(--text-2); font-size: .72rem; margin: .18rem 0 .8rem; }
.mini-qr {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 86px;
}
.mini-qr span {
    aspect-ratio: 1;
    background: #111827;
    border-radius: 2px;
}
.mini-qr span:nth-child(3n),
.mini-qr span:nth-child(5),
.mini-qr span:nth-child(10) { background: #d1d5db; }
@media (max-width: 760px) {
    .hero-comandalike { padding-top: 3rem; }
    .hero-comandalike .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-comandalike .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-visual { min-height: 230px; }
    .radar-card { margin: 0 auto; min-height: 240px; }
    .radar-rings { transform: scale(.78); transform-origin: top left; }
    .tab-ticket { right: 16px; bottom: 16px; }
}

/* ── Landing auth forms ─────────────────────────────────────── */
.landing-wrap { max-width: 440px; margin: 2.5rem auto; padding: 0 1.5rem; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.auth-remember { display: flex; align-items: center; gap: .5rem; margin: -.25rem 0 1rem; font-size: .85rem; color: var(--text-2); cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; accent-color: var(--primary); }
.auth-separator { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.auth-separator::before, .auth-separator::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.auth-social { display: grid; gap: .65rem; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--text-2); }
.empty-icon  { width: 56px; height: 56px; margin: 0 auto 1rem; opacity: .3; }
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: .375rem; color: var(--text); }
.empty-desc  { font-size: .9rem; }

/* ── Meta row ────────────────────────────────────────────────── */
.meta-row { display: flex; align-items: center; gap: .375rem; font-size: .825rem; color: var(--text-2); }
.meta-row svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Chat ───────────────────────────────────────────────────── */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - 60px); }
.chat-sidebar { border-right: 1px solid var(--border); overflow-y: auto; background: var(--bg-card); }
.chat-sidebar-header { padding: 1.25rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1rem; }
.chat-match-item { display: flex; align-items: center; gap: .75rem; padding: .875rem 1.25rem; cursor: pointer; transition: background .15s; border-bottom: 1px solid var(--border); }
.chat-match-item:hover  { background: var(--bg); }
.chat-match-item.active { background: var(--primary-light); }
.chat-match-info h4  { font-size: .9rem; font-weight: 600; }
.chat-match-info p   { font-size: .78rem; color: var(--text-2); }
.chat-main    { display: flex; flex-direction: column; background: var(--bg); min-height: 0; }
.chat-header  { padding: 1rem 1.5rem; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.chat-header h3 { font-weight: 600; }
.chat-header .btn { margin-left: auto; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.chat-block-notice { margin: 0 1.5rem; padding: .7rem .9rem; border: 1px solid #fca5a5; background: var(--danger-light); color: #991b1b; border-radius: var(--radius-sm); font-size: .85rem; }
.chat-input-area.blocked { opacity: .55; pointer-events: none; }
.msg { max-width: 68%; }
.msg-mine    { align-self: flex-end; }
.msg-theirs  { align-self: flex-start; }
.msg-bubble  { padding: .625rem 1rem; border-radius: var(--radius); font-size: .9rem; line-height: 1.5; }
.msg-mine   .msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 2px; }
.msg-theirs .msg-bubble { background: var(--bg-card); border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.msg-highlight .msg-bubble { box-shadow: 0 0 0 3px var(--primary-light), var(--shadow); }
.msg-time { font-size: .7rem; color: var(--text-3); margin-top: .25rem; text-align: right; }
.msg-theirs .msg-time { text-align: left; }
.chat-input-area { padding: 1rem 1.5rem; background: var(--bg-card); border-top: 1px solid var(--border); display: flex; gap: .75rem; flex-shrink: 0; }
.chat-input-area input { flex: 1; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-2); }
@media (max-width: 640px) { .chat-layout { grid-template-columns: 1fr; } .chat-sidebar { display: none; } .chat-sidebar.show { display: block; height: auto; border-right: none; border-bottom: 1px solid var(--border); } }

/* Gallery */
.gallery-page { width: 100%; }
.gallery-shell { max-width: 520px; margin: 0 auto; }
.gallery-header { align-items: center; }
.gallery-feed { display: flex; flex-direction: column; gap: 1.5rem; }
.gallery-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.gallery-post-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem .875rem;
}
.gallery-author { margin-bottom: 0; }
.avatar-gallery { width: 38px; height: 38px; font-size: .85rem; }
.avatar-comment { width: 28px; height: 28px; font-size: .7rem; }
.gallery-more { position: relative; }
.icon-btn {
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    padding: .25rem .45rem;
}
.gallery-more-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 20;
    overflow: hidden;
}
.gallery-more-menu.open { display: block; }
.gallery-more-menu button {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: .75rem .875rem;
    text-align: left;
    color: var(--text);
}
.gallery-more-menu button:hover { background: var(--bg); }
.gallery-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #111827;
}
.gallery-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-body { padding: .75rem .875rem 0; }
.gallery-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .5rem;
    font-size: .88rem;
    font-weight: 600;
}
.gallery-like-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0;
    color: var(--text);
}
.gallery-like-btn.active { color: #ef4444; }
.gallery-caption {
    font-size: .9rem;
    line-height: 1.45;
    margin-bottom: .45rem;
    white-space: pre-wrap;
}
.mention,
.gallery-mentions {
    color: var(--primary);
    font-weight: 600;
}
.gallery-mentions {
    font-size: .8rem;
    margin-bottom: .5rem;
}
.gallery-comments { display: flex; flex-direction: column; gap: .55rem; }
.gallery-comment {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .86rem;
}
.gallery-comment.reply { margin-left: 2rem; }
.gallery-comment-main { flex: 1; min-width: 0; }
.gallery-comment-main p { line-height: 1.4; margin-bottom: .15rem; word-break: break-word; }
.gallery-comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    color: var(--text-3);
    font-size: .75rem;
    margin-bottom: .25rem;
}
.gallery-comment-actions button {
    border: 0;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}
.gallery-replies { display: flex; flex-direction: column; gap: .45rem; margin-top: .45rem; }
.gallery-comment-form {
    display: flex;
    align-items: center;
    gap: .5rem;
    border-top: 1px solid var(--border);
    margin: .65rem -.875rem 0;
    padding: .65rem .875rem;
}
.gallery-reply-form {
    border-top: 0;
    margin: .25rem 0 .4rem;
    padding: 0;
}
.gallery-comment-form input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: .9rem;
}
.gallery-comment-form button {
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}
.gallery-preview {
    display: none;
    aspect-ratio: 4 / 5;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1rem;
}
.gallery-preview.show,
.gallery-preview:has(img) { display: block; }
.gallery-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
    .gallery-shell { max-width: 100%; }
    .gallery-header { align-items: flex-start; }
}

/* ── Profile ─────────────────────────────────────────────────── */
.profile-wrap { max-width: 640px; margin: 0 auto; }
.profile-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; }
.profile-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.profile-avatar-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.profile-avatar-row .avatar img { width: 100%; height: 100%; object-fit: cover; }
.upload-progress { display: none; margin-top: .6rem; }
.upload-progress.show { display: block; }
.upload-progress-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.upload-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .15s ease; }
.upload-progress small { display: block; margin-top: .3rem; font-size: .78rem; color: var(--text-2); }
.check-inline { display: inline-flex; align-items: center; gap: .45rem; margin-top: .55rem; font-size: .84rem; color: var(--text-2); }
.tag-check-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-check span {
    display: inline-flex;
    align-items: center;
    padding: .35rem .7rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
}
.tag-check input:checked + span { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
@media (max-width: 480px) { .profile-avatar-row { align-items: flex-start; flex-direction: column; } }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.admin-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.admin-inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0 1.25rem; }
.admin-inline-form .form-input, .admin-inline-form .form-select { width: auto; min-width: 180px; }
.admin-order-input { max-width: 90px; }
.admin-table-wrap { overflow-x: auto; }
.admin-tag-row { min-width: 260px; }
.admin-tag-row .tag-check span { padding: .28rem .55rem; font-size: .76rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: .6rem; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { font-size: .78rem; color: var(--text-2); font-weight: 700; }
.admin-table .form-input, .admin-table .form-select { min-width: 160px; }
.admin-chat-context { display: flex; flex-direction: column; gap: .75rem; }
.admin-message { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; background: var(--bg); }
.admin-message small { display: block; margin-top: .15rem; color: var(--text-3); font-size: .75rem; }
.admin-message p { margin-top: .5rem; font-size: .9rem; color: var(--text-2); }

/* ── Trip card status pill ───────────────────────────────────── */
.status-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.status-intended { background: #eff6ff; color: #1d4ed8; }
.status-confirmed { background: var(--success-light); color: #065f46; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); background: var(--bg-card); margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; font-size: .8rem; color: var(--text-3); }
