/* ====================================================
   IAmSurfer - Design System
   Palette: Indigo-800 (#3730a3), modern/premium
   Inspired by Instagram / TikTok aesthetics
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────── */
:root {
    --brand: #3730a3;
    /* indigo-800 */
    --brand-mid: #4338ca;
    /* indigo-700 */
    --brand-light: #6366f1;
    /* indigo-500 */
    --brand-faint: #f1f3f5;
    /* cinza neutro claro (antes indigo-50) — sem fundo azul */
    --brand-hover: #312e81;
    /* indigo-900 */

    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: #e5e7eb;
    --border-hover: #d1d5db;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --gradient: linear-gradient(135deg, #3730a3 0%, #6366f1 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(55, 48, 163, .12);
    --shadow-lg: 0 8px 32px rgba(55, 48, 163, .18);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 100px;
}

/* ─── Reset / Base ──────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-light);
    text-decoration: none;
}

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

/* ─── Navbar ─────────────────────────────────────── */
.navbar {
    background: var(--brand) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
    padding: 0 0;
    min-height: 60px;
    box-shadow: 0 2px 12px rgba(55, 48, 163, .25);
}

.navbar .container {
    min-height: 60px;
    align-items: center;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand i {
    font-size: 1.3rem;
    color: #a5b4fc;
}

/* Centraliza verticalmente cada item (o <li>) na altura da barra, senão o
   link encosta no topo quando a linha fica mais alta (avatar/busca). */
.navbar .nav-item {
    display: flex;
    align-items: center;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, .82) !important;
    font-size: .875rem;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;   /* impede que o texto (ex.: "Novo Post") quebre em 2 linhas */
}

/* No desktop (barra expandida) os itens não podem quebrar pra fora da barra */
@media (min-width: 1400px) {
    .navbar .nav-link { padding: 6px 9px !important; }
    .navbar .navbar-nav { flex-wrap: nowrap; }
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255, 255, 255, .12);
    color: #fff !important;
}

.navbar .nav-link i {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Search bar inside navbar */
.navbar .form-control {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: .85rem;
    padding: 6px 16px;
    width: 160px;
    min-width: 0;
    transition: background .2s, border-color .2s;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, .55);
}

.navbar .form-control:focus {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .45);
    box-shadow: none;
    outline: none;
    color: #fff;
}

.navbar .btn-outline-light {
    border-radius: var(--radius-pill);
    font-size: .82rem;
    font-weight: 600;
    padding: 5px 16px;
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}

.navbar .btn-outline-light:hover {
    background: rgba(255, 255, 255, .18);
}

/* Avatar in navbar */
.navbar img.rounded-circle {
    border: 2px solid rgba(255, 255, 255, .35);
}

/* Notification badge */
.navbar .badge.bg-danger {
    font-size: .65rem;
}

/* Dropdown menus */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    font-size: .875rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .12s;
}

.dropdown-item:hover {
    background: var(--brand-faint);
    color: var(--brand);
}

.dropdown-item i {
    color: var(--text-secondary);
    font-size: .95rem;
}

.dropdown-divider {
    margin: 4px 0;
    border-color: var(--border);
}

/* ─── Cards ──────────────────────────────────────── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: .92rem;
    padding: 14px 18px;
    color: var(--text-primary);
}

.card-body {
    padding: 18px;
}

.card-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 12px 18px;
    font-size: .875rem;
}

/* ─── Post Card (feed) ───────────────────────────── */
.post-card {
    border-radius: var(--radius-lg) !important;
    transition: box-shadow .2s;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-card .post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
}

.post-card .post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-faint);
}

.post-card .post-username {
    font-weight: 700;
    font-size: .92rem;
    color: var(--text-primary);
}

.post-card .post-time {
    font-size: .78rem;
    color: var(--text-muted);
}

.post-card .post-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.post-card .post-actions {
    display: flex;
    gap: 16px;
    padding: 12px 16px 8px;
}

.post-card .post-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 0;
    transition: color .15s;
}

.post-card .post-action-btn:hover {
    color: var(--brand);
}

.post-card .post-action-btn.liked {
    color: #ef4444;
}

.post-card .post-action-btn i {
    font-size: 1.2rem;
}

.post-card .post-caption {
    padding: 4px 16px 14px;
    font-size: .9rem;
    line-height: 1.5;
}

.post-card .post-caption strong {
    font-weight: 700;
    margin-right: 4px;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .875rem;
    padding: 8px 20px;
    transition: all .18s;
    border: none;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: 0 4px 12px rgba(55, 48, 163, .3);
    color: #fff;
}

.btn-secondary {
    background: var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline-primary {
    border: 1.5px solid var(--brand) !important;
    color: var(--brand) !important;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--brand);
    color: #fff !important;
}

.btn-follow {
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 6px 22px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.btn-follow:hover {
    opacity: .88;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 5px 14px;
    font-size: .82rem;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 1rem;
}

/* Full-width button */
.btn.d-grid,
.d-grid .btn {
    border-radius: var(--radius-md);
}

/* ─── Forms ──────────────────────────────────────── */
.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    padding: 10px 14px;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
    outline: none;
}

.input-group-text {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control:focus {
    border-left: none;
}

.form-label {
    font-weight: 600;
    font-size: .84rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ─── Auth Pages ─────────────────────────────────── */
.auth-wrapper {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 0 16px 20px;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 360px;
    overflow: hidden;
}

.wide-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

/* ─── Admin Dashboard Cards ─────────────────────── */
.stat-card {
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card .card-body {
    padding: 2rem 1.5rem;
    z-index: 1;
    position: relative;
}

.stat-card .display-4 {
    font-weight: 800;
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.stat-card .card-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(4px);
}

.stat-card .card-footer a {
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.stat-card .card-footer a:hover {
    opacity: 1;
}

.stat-card .card-footer i {
    font-size: 0.9rem;
}

.auth-header {
    background: var(--gradient);
    padding: 20px 16px 16px;
    text-align: center;
    color: #fff;
}

.auth-header .brand-logo {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.auth-header .brand-logo i {
    font-size: 1.6rem;
    color: #fff;
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: .875rem;
    opacity: .82;
    margin: 0;
}

.auth-body {
    padding: 18px 20px 16px;
}

.auth-footer {
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    text-align: center;
    font-size: .875rem;
    color: var(--text-secondary);
    background: var(--bg);
}

.auth-footer a {
    color: var(--brand);
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--brand-hover);
}

/* ─── Profile ─────────────────────────────────────── */
.profile-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brand-faint);
    box-shadow: 0 0 0 4px var(--brand-faint);
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.profile-stat-item {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.photo-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.photo-grid-item:hover img {
    transform: scale(1.05);
}

/* ─── Explore ─────────────────────────────────────── */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

/* ─── Instagram-style Profile ────────────────────── */
.ig-profile {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 8px 4px 28px;
    flex-wrap: wrap;
}

.ig-profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px var(--border), var(--shadow-md);
    flex-shrink: 0;
}

.ig-profile-info {
    flex: 1;
    min-width: 260px;
}

.ig-profile-toprow {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ig-profile-username {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -.3px;
}

.ig-profile-stats {
    display: flex;
    gap: 36px;
    margin-bottom: 18px;
}

.ig-profile-stat {
    font-size: .95rem;
    color: var(--text-secondary);
}

.ig-profile-stat strong {
    color: var(--text-primary);
    font-weight: 700;
}

.ig-profile-bio {
    font-size: .92rem;
    color: var(--text-primary);
    line-height: 1.5;
    max-width: 480px;
}

.ig-profile-bio .display-name {
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.ig-profile-bio .meta {
    color: var(--text-muted);
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

/* Tabs above the grid */
.ig-tabs {
    display: flex;
    justify-content: center;
    gap: 48px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.ig-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 16px 4px;
    margin-top: -1px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 2px solid transparent;
}

.ig-tab.active {
    color: var(--text-primary);
    border-top-color: var(--text-primary);
}

/* Square media grid w/ hover overlay */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 4px;
}

.ig-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg);
    display: block;
}

.ig-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.ig-grid-item:hover img {
    transform: scale(1.04);
}

/* Text-only post tile */
.ig-grid-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.4;
}

.ig-grid-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: rgba(17, 24, 39, .45);
    color: #fff;
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s ease;
}

.ig-grid-item:hover .ig-grid-overlay {
    opacity: 1;
}

.ig-grid-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ig-grid-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    font-size: 1rem;
}

/* ─── Admin Panel ────────────────────────────────── */
.sidebar {
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    margin-top: 12px;
}

.sidebar .position-sticky {
    top: 76px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    margin-bottom: 2px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background .12s, color .12s;
}

.sidebar .nav-link:hover {
    background: var(--brand-faint);
    color: var(--brand);
}

.sidebar .nav-link.active {
    background: var(--bg);
    color: var(--text-primary);
}

.sidebar .nav-link.active i {
    color: var(--text-primary);
}

.sidebar .nav-link i {
    color: var(--text-muted);
}

/* Admin content heading */
.admin-content h1.h2,
main h1.h2 {
    font-weight: 800;
    letter-spacing: -.5px;
    font-size: 1.6rem;
    color: var(--text-primary);
}

/* Admin filter pills */
.filter-tabs {
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    border-radius: var(--radius-md) !important;
}

.nav-pills .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .85rem;
}

.nav-pills .nav-link.active {
    background: var(--text-primary) !important;
    color: #fff;
}

/* Admin tables */
.table {
    font-size: .88rem;
}

.table thead th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .5px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.table td,
.table th {
    vertical-align: middle;
    border-color: var(--border);
}

.table-hover tbody tr:hover {
    background: var(--brand-faint);
}

/* Status badge (admin users) */
.status-badge {
    border-radius: var(--radius-pill) !important;
}

/* ─── Nav Tabs (spot detail, etc) ────────────────── */
.nav-tabs {
    border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .88rem;
    padding: 12px 16px;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--border-hover);
    color: var(--text-primary);
}

.nav-tabs .nav-link.active {
    color: var(--brand);
    background: transparent;
    border-bottom: 2px solid var(--brand);
}

/* Breadcrumb */
.breadcrumb {
    font-size: .82rem;
}

.breadcrumb a {
    color: var(--brand-light);
}

/* ─── Coesão de paleta (overrides) ───────────────── */
/* Unifica o azul padrão do Bootstrap com o indigo da marca */
.text-primary {
    color: var(--brand) !important;
}

.text-purple {
    color: var(--brand) !important;
}

/* Mantém success/danger num único tom em todo o app */
.text-success {
    color: #15803d !important;
}

.text-danger {
    color: #b91c1c !important;
}

/* Remove a "corzinha" colorida na margem dos cards do admin */
.stat-card {
    border-left-width: 0 !important;
}

/* ─── Trips ──────────────────────────────────────── */
.trip-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.trip-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.trip-status.scheduled { background: var(--brand-faint); color: var(--brand); }
.trip-status.ongoing   { background: var(--text-primary); color: #fff; }
.trip-status.completed { background: #f1f5f9; color: #64748b; }
.trip-status.cancelled { background: #fef2f2; color: #b91c1c; }

.trip-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 14px;
    background: var(--surface);
    transition: box-shadow .2s, transform .2s;
    text-decoration: none;
}

.trip-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.trip-route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-secondary);
    margin: 6px 0;
}

.trip-route .arrow {
    color: var(--brand-light);
}

/* ─── Lightbox de imagem (image-system.js) ───────── */
.image-modal {
    display: none;                 /* escondido por padrão — só abre via JS */
    position: fixed;
    inset: 0;
    z-index: 2000;                 /* acima da navbar (sticky-top = 1020) */
    background: rgba(0, 0, 0, .9);
    overflow: auto;
}

.image-modal .modal-content {
    position: relative;
    background: transparent;
    border: none;
    width: auto;
    max-width: 94vw;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: none;
}

.image-modal .modal-image {
    display: block;
    margin: 0 auto;
    max-width: 94vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 10px;
}

.image-modal .close {
    position: absolute;
    top: -44px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .9;
}

.image-modal .close:hover {
    opacity: 1;
}

.image-modal .image-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.image-modal .nav-btn {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    cursor: pointer;
}

.image-modal .nav-btn:hover {
    background: rgba(255, 255, 255, .3);
}

.image-modal .image-counter {
    color: #fff;
    font-size: .85rem;
}

.image-modal .image-info {
    color: #fff;
    text-align: center;
    margin-top: 8px;
}

/* ─── Gamificação (patente) ──────────────────────── */
.patente-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--brand-faint);
    color: var(--brand);
    font-weight: 700;
    font-size: .7rem;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    line-height: 1.5;
    white-space: nowrap;
}

.patente-badge.lg {
    font-size: .8rem;
    padding: 4px 12px;
}

.patente-progress {
    height: 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.patente-progress > span {
    display: block;
    height: 100%;
    background: var(--text-primary);
    border-radius: var(--radius-pill);
    transition: width .4s ease;
}

/* Selo de papel (fotógrafo, negócio, atleta, influencer) — pílula preenchida */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-primary);
    color: #fff;
    font-weight: 700;
    font-size: .68rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    line-height: 1.5;
    white-space: nowrap;
}

.role-badge.lg {
    font-size: .78rem;
    padding: 4px 12px;
}

/* ─── Forecast (previsão de surf) ────────────────── */
.fc-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 18px;
}

.fc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.fc-current {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: var(--brand-faint);
}

.fc-metric {
    display: flex;
    flex-direction: column;
}

.fc-metric .val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -.5px;
    line-height: 1.1;
}

.fc-metric .val small {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.fc-metric .lbl {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

.fc-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 18px;
}

.fc-day {
    flex: 1 0 88px;
    min-width: 88px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
}

.fc-day .d {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.fc-day .wv {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.fc-day .sub {
    font-size: .72rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* Seta de direção (swell / vento) */
.fc-arrow {
    display: inline-block;
    line-height: 1;
    color: var(--brand-light);
    transition: transform .2s;
}

.fc-arrow.wind {
    color: var(--text-secondary);
}

/* Rating de tamanho (0-5) */
.fc-rating {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.fc-rating .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.fc-rating .dot.on {
    background: var(--text-primary);
}

/* Gráfico horário */
.fc-chart {
    position: relative;
    height: 190px;
    margin: 6px 18px 4px;
}

/* Condição do vento */
.fc-cond {
    display: inline-block;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    margin-top: 4px;
}
.fc-cond.offshore { background: #dcfce7; color: #15803d; }
.fc-cond.glassy   { background: var(--brand-faint); color: var(--brand); }
.fc-cond.cross    { background: #fef3c7; color: #b45309; }
.fc-cond.onshore  { background: #fee2e2; color: #b91c1c; }

/* Dia clicável + detalhe horário */
.fc-day.clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.fc-day.clickable:hover { border-color: var(--brand-light); }
.fc-day.active { border-color: var(--brand); background: var(--brand-faint); }

.fc-detail {
    margin: 0 18px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.fc-detail table { width: 100%; font-size: .8rem; margin: 0; }
.fc-detail th, .fc-detail td { padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--border); }
.fc-detail thead th { background: var(--bg); font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.fc-detail tr:last-child td { border-bottom: none; }

/* ─── Direct Messages ────────────────────────────── */
.dm-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dm-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
    text-decoration: none;
}

.dm-row:last-child {
    border-bottom: none;
}

.dm-row:hover {
    background: var(--brand-faint);
}

.dm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.dm-name {
    font-weight: 700;
    font-size: .92rem;
    color: var(--text-primary);
}

.dm-preview {
    font-size: .83rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-preview.unread {
    color: var(--text-primary);
    font-weight: 600;
}

.dm-time {
    font-size: .72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dm-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-light);
    flex-shrink: 0;
}

/* Chat thread */
.chat-window {
    height: 60vh;
    min-height: 380px;
    overflow-y: auto;
    padding: 18px;
    background: var(--bg);
}

.chat-line {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-line.mine {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 72%;
    padding: 9px 14px;
    border-radius: 18px;
    font-size: .9rem;
    line-height: 1.4;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.chat-line.mine .chat-bubble {
    background: var(--text-primary);
    color: #fff;
    border: none;
}

.chat-meta {
    font-size: .68rem;
    opacity: .7;
    display: block;
    margin-top: 4px;
}

.chat-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ─── Comments (post detail) ─────────────────────── */
.comment-row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.comment-row:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-bubble {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 700;
    font-size: .85rem;
    color: var(--text-primary);
}

.comment-time {
    font-size: .72rem;
    color: var(--text-muted);
    margin-left: 6px;
}

.comment-text {
    font-size: .9rem;
    color: var(--text-primary);
    margin: 2px 0 0;
    word-wrap: break-word;
}

/* ─── Sidebar ─────────────────────────────────────── */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
}

.sidebar-card h6 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Suggested user row */
.suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.suggest-item:last-child {
    margin-bottom: 0;
}

.suggest-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.suggest-name {
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-primary);
}

.suggest-meta {
    font-size: .76rem;
    color: var(--text-muted);
}

.suggest-follow {
    margin-left: auto;
    font-size: .78rem;
    font-weight: 700;
    color: var(--brand-light);
    cursor: pointer;
}

.suggest-follow:hover {
    color: var(--brand);
}

/* ─── Suggested surfers carousel (mobile) ─────────── */
.suggest-carousel {
    margin-bottom: 1.5rem;
}

.suggest-carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.suggest-carousel-head h6 {
    font-weight: 700;
    font-size: .92rem;
    margin: 0;
    color: var(--text-primary);
}

.suggest-carousel-head a {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
}

.suggest-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.suggest-track::-webkit-scrollbar {
    display: none;
}

.suggest-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 148px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.suggest-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-faint);
    margin-bottom: 8px;
}

.suggest-card-name {
    font-weight: 700;
    font-size: .85rem;
    color: var(--text-primary);
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-card-meta {
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-card-follow {
    margin-top: auto;
    width: 100%;
    font-size: .8rem;
    font-weight: 700;
    padding: 6px 0;
    border-radius: var(--radius-pill);
    text-decoration: none;
}

/* ─── Cards de Previsão e Picos no feed (carrossel) ─── */
.feed-carousel { margin-bottom: 1.25rem; }

/* Card de previsão (compacto) */
.fc-mini-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: box-shadow .15s ease, transform .15s ease;
}
.fc-mini-card:hover { box-shadow: 0 6px 18px rgba(17, 24, 39, .10); transform: translateY(-2px); }
.fc-mini-quality {
    align-self: flex-start;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand);
    background: var(--brand-faint);
    border-radius: 100px;
    padding: 3px 10px;
    margin-bottom: 8px;
}
.fc-mini-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-mini-loc {
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-mini-stats { display: flex; flex-direction: column; gap: 4px; }
.fc-mini-stat { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }

/* Card de pico com mini-mapa */
.spotmap-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}
.spotmap-card:hover { box-shadow: 0 6px 18px rgba(17, 24, 39, .10); transform: translateY(-2px); }
.spotmap-link { text-decoration: none; display: block; }
.spotmap-mini { height: 130px; width: 100%; background: var(--bg); }
.spotmap-body { padding: 12px 14px; }
.spotmap-name {
    font-weight: 700;
    font-size: .92rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotmap-loc { font-size: .74rem; color: var(--text-muted); margin: 2px 0 8px; }
.spotmap-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spotmap-tag {
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 3px 9px;
    border-radius: 100px;
    background: var(--brand-faint);
    color: var(--text-primary);
}

/* Surfistas — grade de cards da página /surfistas */
.surfers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.surfer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.surfer-card .avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand-faint); }
.surfer-card .name { font-weight: 700; font-size: .92rem; color: var(--text-primary); text-decoration: none; }
.surfer-card .meta { font-size: .72rem; color: var(--text-muted); }

/* ─── Placeholder de mídia em processamento (fila async) ─── */
.post-media-processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 600;
}

.post-media-processing.failed {
    color: #b91c1c;
}

/* ─── Alerts ──────────────────────────────────────── */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    padding: 12px 16px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef9c3;
    color: #854d0e;
}

.alert-info {
    background: var(--brand-faint);
    color: var(--brand);
}

/* ─── Badges ──────────────────────────────────────── */
.badge {
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .72rem;
}

.bg-primary {
    background-color: var(--brand) !important;
}

/* ─── Pagination ─────────────────────────────────── */
.pagination .page-link {
    color: var(--brand);
    border-color: var(--border);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    font-size: .85rem;
}

.pagination .page-item.active .page-link {
    background: var(--text-primary);
    border-color: var(--text-primary);
}

/* ─── Footer ─────────────────────────────────────── */
footer.bg-light {
    background: var(--surface) !important;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .82rem;
}

/* ─── Utilities ──────────────────────────────────── */
.text-brand {
    color: var(--brand) !important;
}

.bg-brand {
    background-color: var(--brand) !important;
}

.surf-gradient {
    background: var(--surface);
}

/* Smooth fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fade-in {
    animation: fadeIn .25s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

/* ─── Responsive ─────────────────────────────────── */

/* Navbar recolhida (abaixo de xxl): busca e menus ocupam o espaço direito */
@media (max-width: 1399.98px) {
    .navbar .form-control {
        width: 100%;
    }

    .navbar form.d-flex {
        width: 100%;
    }

    /* No menu recolhido, os dropdowns fluem inline (acordeão) em vez de flutuar
       posicionados pelo Popper — assim nada (ex.: "Sair") sai da tela. */
    .navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
        float: none;
        width: 100% !important;
        max-width: 100%;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: .25rem;
    }

    /* itens do menu recolhido alinhados à esquerda (não centralizados) */
    .navbar .nav-item {
        align-items: stretch;
    }
}

/* Tablet e abaixo */
@media (max-width: 768px) {
    .profile-stats {
        gap: 16px;
    }

    .photo-grid,
    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }

    /* Tabelas rolam na horizontal em vez de estourar o layout */
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .fc-chart {
        height: 170px;
    }

    .card-body {
        padding: 16px;
    }

    /* Tabs do detalhe do pico rolam se não couberem */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

/* Celular */
@media (max-width: 576px) {
    body {
        font-size: 14.5px;
    }

    /* Perfil estilo Instagram: empilha e centraliza */
    .ig-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding-bottom: 20px;
    }

    .ig-profile-avatar {
        width: 104px;
        height: 104px;
    }

    .ig-profile-info {
        min-width: 0;
        width: 100%;
    }

    .ig-profile-toprow {
        justify-content: center;
        gap: 12px;
    }

    .ig-profile-username {
        font-size: 1.3rem;
    }

    .ig-profile-stats {
        justify-content: center;
        gap: 24px;
    }

    .ig-profile-bio {
        margin: 0 auto;
    }

    .ig-tabs {
        gap: 24px;
    }

    .ig-grid {
        gap: 3px;
    }

    /* Previsão mais compacta */
    .fc-current {
        gap: 16px;
        padding: 14px;
    }

    .fc-metric .val {
        font-size: 1.18rem;
    }

    .fc-chart {
        height: 155px;
        margin: 6px 12px 4px;
    }

    .fc-head,
    .fc-current {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Caronas: hero e cards com menos respiro */
    .trip-card {
        padding: 14px;
    }

    /* Comentários / DM um pouco mais justos */
    .comment-row {
        padding: 12px 0;
    }
}

/* Telas grandes: o conteúdo já é limitado pelo .container (máx. 1320px no
   xxl) e pelas colunas centralizadas (mx-auto), então fica centrado e legível
   sem esticar demais. */

/* ═══════════════════════════════════════════════════════════════
   IG-STYLE REFRESH 2026 — fonte moderna, polimento global e auth
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Acentos extra (sutis) para gradientes/anéis de story */
    --accent: #8b5cf6;          /* violet-500 */
    --accent-2: #06b6d4;        /* cyan-500 (usado só em detalhes) */
    --gradient-brand: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-story: linear-gradient(135deg, #f59e0b, #ef4444 45%, #ec4899 90%);
    --ring-focus: 0 0 0 4px rgba(99, 102, 241, .16);
    --shadow-soft: 0 2px 8px rgba(17, 24, 39, .05), 0 8px 24px rgba(17, 24, 39, .06);
}

/* Fonte moderna global (Plus Jakarta Sans c/ Inter de fallback) */
body,
.authx-body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, .navbar-brand, .fw-bold {
    letter-spacing: -0.02em;
}

/* Botão primário global: gradiente + lift (Instagram-like) */
.btn-primary {
    background: var(--gradient-brand) !important;
    border: none !important;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35) !important;
    filter: saturate(1.08);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Inputs globais um pouco mais macios */
.form-control {
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.form-control:focus {
    box-shadow: var(--ring-focus);
}

/* Cards com hover sutil */
.card {
    transition: box-shadow .2s ease, transform .2s ease;
}

/* ─── Story ring (usado no feed/perfil) ───────────────────────── */
.story-ring {
    padding: 2.5px;
    border-radius: 50%;
    background: var(--gradient-story);
    display: inline-block;
    line-height: 0;
}

.story-ring img {
    border: 2.5px solid #fff;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.story-ring.seen {
    background: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH IMERSIVO (.authx) — login / cadastro full-screen
   ═══════════════════════════════════════════════════════════════ */

.authx-body {
    margin: 0;
    background: var(--surface);
}

.authx {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ── Painel visual (esquerda) ── */
.authx-visual {
    position: relative;
    overflow: hidden;
    background: var(--gradient-brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px clamp(40px, 6vw, 88px);
}

.authx-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .55;
    pointer-events: none;
    animation: authxFloat 14s ease-in-out infinite;
}

.authx-orb-1 {
    width: 360px;
    height: 360px;
    background: #a78bfa;
    top: -80px;
    right: -60px;
}

.authx-orb-2 {
    width: 300px;
    height: 300px;
    background: #38bdf8;
    bottom: 40px;
    left: -70px;
    animation-delay: -6s;
}

@keyframes authxFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(18px, -22px); }
}

.authx-visual-inner {
    position: relative;
    z-index: 2;
    max-width: 460px;
}

.authx-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 40px;
}

.authx-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
}

.authx-hero {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.04;
    margin: 0 0 18px;
    letter-spacing: -0.03em;
}

.authx-sub {
    font-size: 1.02rem;
    line-height: 1.6;
    opacity: .9;
    margin: 0 0 32px;
    max-width: 420px;
}

.authx-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.authx-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .96rem;
    font-weight: 500;
}

.authx-feat-ic {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.authx-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 120px;
    z-index: 1;
}

/* ── Painel do formulário (direita) ── */
.authx-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--surface);
    overflow-y: auto;
    min-width: 0;
}

.authx-card {
    width: 100%;
    max-width: 380px;
    animation: authxUp .5s cubic-bezier(.21, 1, .35, 1) both;
}

@keyframes authxUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.authx-logo-mobile {
    display: none;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 28px;
}

.authx-logo-mobile img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.authx-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.authx-muted {
    color: var(--text-secondary);
    font-size: .95rem;
    margin: 0 0 26px;
}

.authx-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Campo com floating label + ícone */
.authx-field {
    position: relative;
}

.authx-field input {
    width: 100%;
    height: 58px;
    padding: 18px 46px 4px 44px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text-primary);
    font-size: .98rem;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.authx-field input:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: var(--ring-focus);
}

.authx-field label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .98rem;
    pointer-events: none;
    transition: all .15s ease;
}

.authx-field input:focus + label,
.authx-field input:not(:placeholder-shown) + label {
    top: 13px;
    transform: none;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand);
}

.authx-field-ic {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.05rem;
    z-index: 1;
}

.authx-field input:focus ~ .authx-field-ic {
    color: var(--brand);
}

.authx-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}

.authx-eye:hover {
    background: var(--brand-faint);
    color: var(--brand);
}

.authx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -2px 0 2px;
}

.authx-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.authx-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
    cursor: pointer;
}

.authx-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: var(--gradient-brand);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    margin-top: 4px;
}

.authx-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .38);
    filter: saturate(1.08);
}

.authx-btn:active {
    transform: translateY(0);
}

.authx-btn-sm {
    width: auto;
    height: auto;
    padding: 9px 20px;
    font-size: .9rem;
    border-radius: 11px;
}

.authx-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
}

.authx-divider::before,
.authx-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.authx-foot {
    text-align: center;
    font-size: .92rem;
    color: var(--text-secondary);
    margin: 0;
}

.authx-foot a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.authx-foot a:hover {
    text-decoration: underline;
}

/* Alertas dentro do auth */
.authx-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.authx-alert-danger,
.authx-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.authx-alert-success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.authx-alert-info,
.authx-alert-warning {
    background: var(--brand-faint);
    color: var(--brand);
    border-color: #c7d2fe;
}

/* ── Responsivo: some o painel visual no mobile ── */
@media (max-width: 991px) {
    .authx-body {
        overflow-x: hidden;
    }

    .authx {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .authx-visual {
        display: none;
    }

    .authx-logo-mobile {
        display: inline-flex;
    }

    .authx-panel {
        min-height: 100vh;
        align-items: flex-start;
        padding: 52px 20px 32px;
    }

    .authx-card {
        max-width: 100%;
    }
}


/* ═══════════════════════════════════════════════════════════════
   NAVBAR BRANCA ESTILO INSTAGRAM + BOTTOM NAV MOBILE
   ═══════════════════════════════════════════════════════════════ */

.navbar {
    background: rgba(255, 255, 255, .9) !important;
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 rgba(17, 24, 39, .03);
}

.navbar-brand {
    color: var(--text-primary) !important;
}

.navbar-brand i {
    color: var(--brand);
}

.navbar-toggler {
    color: var(--brand) !important;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
}

.navbar .nav-link i {
    font-size: 1.15rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: var(--brand-faint);
    color: var(--brand) !important;
}

/* Busca */
.navbar .form-control {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.navbar .form-control::placeholder {
    color: var(--text-muted);
}

.navbar .form-control:focus {
    background: #fff;
    border-color: var(--brand-light);
    box-shadow: var(--ring-focus);
    color: var(--text-primary);
}

.navbar .btn-outline-light {
    border-color: var(--border);
    color: var(--text-secondary);
    background: var(--bg);
}

.navbar .btn-outline-light:hover {
    background: var(--brand-faint);
    color: var(--brand);
    border-color: var(--brand-light);
}

.navbar img.rounded-circle {
    border: 2px solid var(--border) !important;
}

/* "Entrar" e "Cadastrar" quando deslogado */
.navbar .nav-link[href*="login"] {
    color: var(--text-primary) !important;
}

/* ── Top bar (mobile, estilo Instagram) ── */
.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1031;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    padding-top: env(safe-area-inset-top, 0);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
}

.mtb-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.mtb-brand img { object-fit: contain; }

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

.mtb-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.35rem;
    text-decoration: none;
    transition: background .15s, transform .15s;
}

.mtb-btn:active { transform: scale(.9); }

.mtb-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1.5px solid #fff;
}

/* ── Bottom tabbar (mobile) ── */
.mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 60px;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mtab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color .15s, transform .15s;
}

.mtab-label {
    max-width: 100%;
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mtab:active {
    transform: scale(.92);
}

.mtab.active {
    color: var(--brand);
}

.mtab-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.mtab.active .mtab-avatar {
    border-color: var(--brand);
}

/* Espaço pro conteúdo não ficar atrás das barras no mobile */
@media (max-width: 991px) {
    body {
        padding-bottom: 64px;
    }

    footer.bg-light {
        margin-bottom: 60px;
    }
}

/* Coração curtido colorido em qualquer contexto (feed, post, etc.) */
.post-action-btn.liked, .like-button.liked { color: #ef4444 !important; }

/* ── Toasts (mensagens flash) — substituem os alerts nativos do Bootstrap ── */
.toast-stack {
    position: fixed;
    top: 74px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 360px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}
.toastx {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .12);
    font-size: .9rem;
    color: var(--text-primary);
    animation: toastx-in .25s ease;
}
.toastx.hide { animation: toastx-out .25s ease forwards; }
.toastx-ic { font-size: 1.15rem; flex-shrink: 0; color: var(--brand); }
.toastx-msg { flex: 1; line-height: 1.35; }
.toastx-close {
    background: none; border: none; padding: 0 2px;
    font-size: 1.2rem; line-height: 1; color: var(--text-muted); cursor: pointer;
}
.toastx-close:hover { color: var(--text-primary); }
.toastx-success { border-left-color: #16a34a; }
.toastx-success .toastx-ic { color: #16a34a; }
.toastx-danger, .toastx-error { border-left-color: #dc2626; }
.toastx-danger .toastx-ic, .toastx-error .toastx-ic { color: #dc2626; }
.toastx-warning { border-left-color: #d97706; }
.toastx-warning .toastx-ic { color: #d97706; }
.toastx-info, .toastx-message { border-left-color: var(--brand); }
@keyframes toastx-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes toastx-out { to { opacity: 0; transform: translateX(24px); } }
@media (max-width: 575.98px) {
    .toast-stack { top: auto; bottom: 74px; left: 12px; right: 12px; width: auto; }
}

/* Dropdown de notificações (sininho) */
.notif-menu {
    width: 320px;
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    overflow-y: auto;
}
.notif-menu .dropdown-item { white-space: normal; }

/* Item de notificação compacto e alinhado (preview no sininho) */
.notif-menu .notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
}
.notif-menu .notif-item .dm-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.notif-menu .notif-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.notif-menu .notif-msg {
    font-size: .85rem;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-menu .notif-item.unread .notif-msg { font-weight: 600; }
.notif-menu .notif-time {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Indigo só na LOGO e nos BOTÕES: neutraliza textos/ícones de destaque ── */
.text-brand, .text-primary { color: var(--text-primary) !important; }
.text-info { color: var(--text-secondary) !important; }
.navbar .nav-link.active, .navbar .nav-link.active i,
.navbar .nav-link:hover, .navbar .nav-link:hover i { color: var(--text-primary) !important; }
.dropdown-item:hover { color: var(--text-primary) !important; }
.sidebar .nav-link:hover { color: var(--text-primary) !important; }
.patente-badge { background: var(--bg) !important; color: var(--text-secondary) !important; }

/* ═══════════════════════════════════════════════════════════════
   SEM FUNDO AZUL/INDIGO — superfícies viram BRANCO (texto escuro)
   e botões/realces viram PRETO (texto branco). Nenhum fundo indigo.
   ═══════════════════════════════════════════════════════════════ */

/* Botões de destaque: preto sólido (era gradiente indigo) */
.btn-primary,
.btn-follow,
.authx-btn,
.btn-submit {
    background: var(--text-primary) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
}

.btn-primary:hover,
.btn-follow:hover,
.authx-btn:hover,
.btn-submit:hover {
    background: #000 !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .25) !important;
    filter: none !important;
}

.btn-outline-primary {
    border-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
}

.btn-outline-primary:hover {
    background: var(--text-primary) !important;
    color: #fff !important;
}

/* Badges/realces utilitários: preto/cinza em vez de indigo/azul */
.bg-primary,
.bg-brand { background-color: var(--text-primary) !important; color: #fff !important; }
.bg-info  { background-color: var(--text-secondary) !important; color: #fff !important; }
.card.bg-primary,
.card.bg-info { color: #fff !important; }

/* Cards de estatística do admin: branco c/ texto escuro (era gradiente) */
.stat-card {
    background: var(--surface) !important;
    background-image: none !important;
    border: 1px solid var(--border) !important;
}
.stat-card::before { display: none !important; }
.stat-card .display-4 { color: var(--text-primary) !important; text-shadow: none !important; }
.stat-card h5 { color: var(--text-secondary) !important; }
.stat-card .card-footer {
    background: var(--bg) !important;
    border-top: 1px solid var(--border) !important;
}
.stat-card .card-footer a,
.stat-card .card-footer i { color: var(--text-primary) !important; }

/* Cabeçalho dos cards de auth: branco, texto escuro (era gradiente) */
.auth-header {
    background: var(--surface) !important;
    background-image: none !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border);
}
.auth-header .brand-logo { background: var(--bg) !important; }
.auth-header .brand-logo i,
.auth-header h1,
.auth-header p { color: var(--text-primary) !important; opacity: 1; }

/* Painel imersivo do auth (login/cadastro): branco, texto escuro */
.authx-visual {
    background: var(--surface) !important;
    background-image: none !important;
    color: var(--text-primary) !important;
    border-right: 1px solid var(--border);
}
.authx-brand,
.authx-hero { color: var(--text-primary) !important; }
.authx-sub,
.authx-features li { color: var(--text-secondary) !important; }
.authx-orb { display: none !important; }
.authx-feat-ic { background: var(--bg) !important; color: var(--text-primary) !important; }

/* Pontinhos/realces que eram indigo → escuro */
.dm-dot { background: var(--text-primary) !important; }

/* ── Card de gamificação no feed (cadastre pico / convide amigo) ── */
.gami-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
}
.gami-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--text-primary);
    color: #fff;
}
.gami-trophy {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.gami-head-txt h6 { margin: 0; font-weight: 800; font-size: .98rem; }
.gami-head-txt span { font-size: .8rem; opacity: .9; }
.gami-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease;
}
.gami-action:hover { background: var(--brand-faint); }
.gami-ico {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-faint);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.gami-ico-alt { background: rgba(22, 163, 74, .12); color: #16a34a; }
.gami-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gami-txt strong { color: var(--text-primary); font-size: .92rem; font-weight: 700; }
.gami-txt small { color: var(--text-muted); font-size: .78rem; }
.gami-xp {
    flex-shrink: 0;
    font-weight: 800;
    font-size: .8rem;
    color: #16a34a;
    background: rgba(22, 163, 74, .12);
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

/* ── Card "Radar de ondas": seguir picos para alertas de swell ── */
.feed-carousel-sub {
    font-size: .8rem;
    color: var(--text-muted);
    margin: -4px 2px 10px;
}
.alertspot-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.alertspot-body { text-decoration: none; display: block; }
.alertspot-name {
    font-weight: 700; font-size: .9rem; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.alertspot-loc {
    font-size: .74rem; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.js-follow-spot.is-following {
    background: var(--brand-faint) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

/* Arrastar-para-rolar os carrosséis com o mouse (desktop) */
.suggest-track { cursor: grab; }
.suggest-track.is-dragging { cursor: grabbing; user-select: none; }
.suggest-track.is-dragging a { pointer-events: none; }
/* Mini-mapa do card de picos não captura o ponteiro: o arrasto rola o
   carrossel e o clique navega pelo <a> que envolve o card. */
.spotmap-mini { pointer-events: none; }
