/* ============================================
   Dashboard Sidebar Layout
   ============================================ */

:root {
    --navbar-height: 80px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 60px;
}

/* --- Body class overrides for logged-in & dashboard --- */
/* Hide old account-box dropdown — replaced by header-user-trigger */
body.logged-in .navbar .account-box {
    display: none !important;
}

/* Keep buttos-box visible on small screens when logged in (contains user trigger) */
body.logged-in header .buttos-box {
    display: flex !important;
    margin-right: 0 !important;
}

body.is-dashboard-page .block-profile-tabs > .container > .content > .tab-button {
    display: none !important;
}

body.is-dashboard-page .block-profile-tabs > .container > .content > .my-races-subtabs {
    display: none !important;
}

/* --- Dashboard Layout Wrapper --- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
    position: relative;
    background-color: #f8f9fa;
    padding-top: var(--navbar-height);
}

/* --- Sidebar --- */
.dashboard-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    z-index: 100;
    transition: none;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* Sidebar Header — hidden on desktop */
.sidebar-header {
    display: none;
}

.sidebar-close,
.sidebar-expand {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover,
.sidebar-expand:hover {
    background: #f3f4f6;
    color: #04132D;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    user-select: none;
}

.nav-heading svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
}

.nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-items li {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 24px 7px 54px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background-color: #f3f4f6;
    color: #04132D;
}

.nav-item.active {
    background-color: #f0fdf4;
    color: #04132D;
    font-weight: 600;
    border-left-color: #96ff94;
}

.nav-item.is-coming-soon {
    color: #9ca3af;
    cursor: pointer;
}

.nav-item.is-coming-soon:hover {
    background-color: #f9fafb;
    color: #9ca3af;
}

.badge-coming-soon {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #92400e;
    background-color: #fef3c7;
    border-radius: 10px;
    margin-left: auto;
    white-space: nowrap;
}

/* --- Sidebar Bottom --- */
.sidebar-bottom {
    border-top: 1px solid #e5e7eb;
    padding: 16px 20px;
    margin-top: auto;
}

.sidebar-bottom-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background-color: #f3f4f6;
    color: #04132D;
}

.sidebar-link.active {
    background-color: #f0fdf4;
    color: #04132D;
    font-weight: 600;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-logout {
    color: #dc2626;
}

.sidebar-logout:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background-color: #f9fafb;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #e5e7eb;
}

.sidebar-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 15px;
    font-weight: 800;
    color: #04132D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-username {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Sidebar Overlay (mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 999;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: all;
}

/* --- Dashboard Main Content --- */
.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 0;
}

/* Keep banner-profile inside main */
.dashboard-main .banner-profile {
    margin-bottom: 0;
}

/* --- Dashboard Panels --- */
.dashboard-panel {
    display: none;
}

.dashboard-panel.active {
    display: block;
}

/* Runner Passport Panel */
.runner-passport-content {
    max-width: 900px;
}

.runner-passport-content .watchlist-title {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.runner-passport-welcome {
    margin-bottom: 32px;
}

.runner-passport-welcome h2 {
    font-size: 28px;
    font-weight: 700;
    color: #04132D;
    margin: 0 0 8px;
    font-family: "Inter", "Manrope", sans-serif;
    font-stretch: normal;
    letter-spacing: normal;
    line-height: 1.3;
}

.runner-passport-welcome p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Coming Soon Panel */
.coming-soon-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    max-width: 500px;
    margin: 0 auto;
}

.coming-soon-panel .coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.coming-soon-panel .coming-soon-icon svg {
    width: 40px;
    height: 40px;
    color: #d97706;
}

.coming-soon-panel h3 {
    font-family: "Inter", "Manrope", sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #04132D;
    margin: 0 0 12px;
}

.coming-soon-panel p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* --- Account page content wrapper --- */
.dashboard-account-wrapper {
    max-width: 900px;
}

/* ============================================
   Responsive — Tablet & Mobile
   ============================================ */

@media (max-width: 991px) {
    /* Sidebar: Fixed, collapsed by default (icon strip) */
    .dashboard-sidebar {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
        min-width: var(--sidebar-collapsed-width);
        height: calc(100vh - var(--navbar-height));
        z-index: 1000;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        box-shadow: none;
    }

    /* Expanded state */
    .dashboard-sidebar.open {
        width: var(--sidebar-width);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    /* Main content offset for collapsed sidebar */
    .dashboard-main {
        margin-left: var(--sidebar-collapsed-width);
    }

    /* --- Sidebar Header: visible on mobile --- */
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 0;
        min-height: 48px;
        flex-shrink: 0;
    }

    /* Collapsed: show expand (hamburger), hide close (X) */
    .dashboard-sidebar:not(.open) .sidebar-expand {
        display: flex;
    }
    .dashboard-sidebar:not(.open) .sidebar-close {
        display: none;
    }

    /* Expanded: hide expand, show close */
    .dashboard-sidebar.open .sidebar-expand {
        display: none;
    }
    .dashboard-sidebar.open .sidebar-close {
        display: flex;
    }
    .dashboard-sidebar.open .sidebar-header {
        justify-content: flex-end;
        padding: 8px 12px;
        border-bottom: 1px solid #e5e7eb;
        min-height: 36px;
    }

    .dashboard-sidebar.open .sidebar-close {
        padding: 4px;
    }

    .dashboard-sidebar.open .sidebar-close svg {
        width: 18px;
        height: 18px;
    }

    /* === COLLAPSED STATE: Hide text, show icons only === */
    .dashboard-sidebar:not(.open) .nav-heading span {
        display: none;
    }
    .dashboard-sidebar:not(.open) .nav-items {
        display: none;
    }
    .dashboard-sidebar:not(.open) .sidebar-link-text {
        display: none;
    }
    .dashboard-sidebar:not(.open) .sidebar-user-info {
        display: none;
    }
    .dashboard-sidebar:not(.open) .badge-coming-soon {
        display: none;
    }

    /* Center heading icons in collapsed state */
    .dashboard-sidebar:not(.open) .nav-heading {
        justify-content: center;
        padding: 14px 0;
        cursor: pointer;
    }
    .dashboard-sidebar:not(.open) .nav-heading svg {
        width: 22px;
        height: 22px;
        opacity: 0.7;
    }
    .dashboard-sidebar:not(.open) .nav-heading:hover svg {
        opacity: 1;
    }

    /* Center bottom section in collapsed state */
    .dashboard-sidebar:not(.open) .sidebar-bottom {
        padding: 8px 0;
    }
    .dashboard-sidebar:not(.open) .sidebar-bottom-links {
        margin-bottom: 8px;
    }
    .dashboard-sidebar:not(.open) .sidebar-link {
        justify-content: center;
        padding: 10px 0;
        border-radius: 0;
    }

    /* Center avatar in collapsed state */
    .dashboard-sidebar:not(.open) .sidebar-user {
        justify-content: center;
        padding: 8px 0;
        background: transparent;
    }
    .dashboard-sidebar:not(.open) .sidebar-avatar {
        width: 32px;
        height: 32px;
    }

    /* === EXPANDED STATE: Full nav with text === */
    .dashboard-sidebar.open .nav-item {
        font-size: 15px;
        padding-top: 6px;
        padding-bottom: 6px;
        padding-left: 54px;
        padding-right: 24px;
    }

    body.is-dashboard-page .block-profile-tabs > .container > .content {
        padding: 20px 16px 30px;
    }
}

@media (max-width: 575px) {
    body.is-dashboard-page .block-profile-tabs > .container > .content {
        padding: 16px 12px 24px;
    }
}

/* ============================================
   Override existing styles for dashboard
   ============================================ */

body.is-dashboard-page .block-profile-tabs {
    padding: 0;
}

body.is-dashboard-page .block-profile-tabs > .container {
    max-width: 100%;
    padding: 0;
}

body.is-dashboard-page .block-profile-tabs > .container > .content {
    max-width: 100%;
    padding: 24px 30px 40px;
}

/* Ensure tab-boxes in dashboard use display:none by default, JS controls visibility */
body.is-dashboard-page .tab-content .tab-box {
    display: none !important;
}

body.is-dashboard-page .tab-content .tab-box.dashboard-visible {
    display: block !important;
}

/* Hide subtab buttons in dashboard - sidebar handles navigation */
body.is-dashboard-page .subtab-buttons {
    display: none !important;
}

/* ============================================
   Account Settings Extras (page-dashboard.php)
   ============================================ */
.account-settings-extras {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 32px;
    max-width: 900px;
}

.account-extras-heading {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-align: left !important;
    color: #04132D;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.account-extras-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.account-extras-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.account-extras-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.account-extras-row .share-btn a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.account-extras-row .share-btn a:hover {
    background-color: #f3f4f6;
    color: #04132D;
    border-color: #9ca3af;
}

.account-extras-row .share-btn a svg.icon {
    width: 16px;
    height: 16px;
}

.account-extras-logout {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
}

.account-extras-logout .logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.account-extras-logout .logout-link:hover {
    background-color: #fef2f2;
    border-color: #dc2626;
}

.account-extras-logout .logout-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* RunDais Passport ID badge in Account page */
.rundais-passport-id-badge {
    display: inline-block;
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    font-weight: 600;
    font-stretch: normal !important;
    letter-spacing: 0.03em;
    color: #04132D;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 3px 10px;
    margin-top: 4px;
    line-height: 1.4;
}

/* Switch toggle override inside account extras */
.account-extras-row .watchlist-title {
    margin-bottom: 0 !important;
}

.account-extras-row .switch-public {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 575px) {
    .account-settings-extras {
        padding: 16px 18px;
    }

    .account-extras-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================
   Mobile Hamburger Menu Auth Items
   ============================================ */
.mobile-menu-auth {
    display: none;
}

@media (max-width: 1200px) {
    .mobile-menu-auth {
        display: block;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
    }

    .mobile-auth-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 14px 28px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-login-btn {
        background-color: #96ff94;
        color: #04132D;
    }

    .mobile-login-btn:hover {
        background-color: #7de87b;
        color: #04132D;
    }

    .mobile-login-btn svg {
        color: #04132D;
    }

    .mobile-dashboard-btn {
        background-color: #96ff94;
        color: #04132D;
    }

    .mobile-dashboard-btn:hover {
        background-color: #7de87b;
        color: #04132D;
    }

    .mobile-dashboard-btn svg {
        stroke: #04132D;
    }
}

/* ============================================
   Dashboard Section Headings
   (For bookmarked pages)
   ============================================ */
.dashboard-section-heading {
    font-family: "Inter", "Manrope", sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    font-stretch: normal !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
    color: #04132D;
    margin: 0;
    padding: 0;
    text-align: center;
}

.dashboard-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.dashboard-section-header .dashboard-section-heading {
    margin-bottom: 0;
}

.dashboard-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #04132D;
    color: #fff;
    border-radius: 8px;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dashboard-browse-btn:hover {
    background: #1a2a4a;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.dashboard-browse-btn svg {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .dashboard-section-heading {
        font-size: 18px !important;
        margin-bottom: 0;
    }

    .dashboard-section-header {
        margin-bottom: 16px;
    }

    .dashboard-browse-btn {
        font-size: 12px;
        padding: 7px 14px;
    }
}

/* ============================================
   Empty Bookmarked State
   ============================================ */
.error-cards {
    text-align: center !important;
    padding: 40px 20px !important;
}

.error-cards .no-posts-heading {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #374151 !important;
    text-align: center !important;
    margin: 0 0 8px 0 !important;
}

.error-cards .no-posts-sub {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 15px !important;
    font-weight: normal !important;
    font-stretch: normal !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    color: #6b7280 !important;
    text-align: center !important;
    margin: 0 !important;
}

/* ============================================
   My Calendar – Empty State
   ============================================ */
.planner-coming-soon {
    text-align: center;
    padding: 60px 20px;
    margin-top: 32px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.planner-coming-soon-icon {
    margin-bottom: 20px;
    color: #9ca3af;
}

.planner-coming-soon-heading {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #374151 !important;
    margin: 0 0 10px 0 !important;
}

.planner-coming-soon-text {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 15px !important;
    font-weight: normal !important;
    font-stretch: normal !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
    color: #6b7280 !important;
    max-width: 440px;
    margin: 0 auto !important;
}

/* ============================================
   My Calendar – Month View
   ============================================ */

/* Header: < Month Year > */
.planner-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 0 16px;
}

.planner-cal-title {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #04132D !important;
    margin: 0 !important;
    min-width: 200px;
    text-align: center;
}

.planner-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.planner-cal-nav:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* ── Legend ── */
.planner-cal-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.planner-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.planner-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Color tokens ── */
.planner-dot-club,
.planner-legend-dot.planner-dot-club {
    background: #96ff94;
}

.planner-dot-event,
.planner-legend-dot.planner-dot-event {
    background: #04132D;
}

/* 7-column grid */
.planner-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

/* Day-of-week header row */
.planner-cal-dow {
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.planner-cal-dow > div {
    background: #f9fafb;
    text-align: center;
    padding: 10px 4px;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Calendar body */
.planner-cal-body {
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* Individual day cell */
.planner-cal-cell {
    background: #fff;
    min-height: 90px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    cursor: default;
    transition: background 0.15s;
}

.planner-cal-cell.has-events {
    cursor: pointer;
}

.planner-cal-cell.has-events:hover {
    background: #f8f9fa;
}

.planner-cal-cell.planner-cal-empty {
    background: #fafafa;
}

/* Date number */
.planner-cal-date {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.planner-cal-empty .planner-cal-date {
    color: #d1d5db;
}

.planner-cal-cell.is-today .planner-cal-date {
    background: #04132D;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* ── Desktop chips ── */
.planner-cal-chip {
    display: block;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

/* Run Club chip: green bg, navy text */
.planner-cal-chip.chip-club {
    background: #96ff94;
    color: #04132D;
}

/* Event chip: navy bg, white text (inverse) */
.planner-cal-chip.chip-event {
    background: #04132D;
    color: #fff;
}

.planner-cal-more {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

/* ── Mobile dots (hidden on desktop) ── */
.planner-cal-dots {
    display: none;           /* hidden on desktop */
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}

.planner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Day Detail Panel ── */
.planner-day-detail {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.planner-day-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.planner-day-detail-header span {
    font-family: "roc-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #04132D;
}

.planner-day-detail-header button {
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.planner-day-detail-header button:hover {
    color: #374151;
}

.planner-detail-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.planner-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Detail badge */
.planner-detail-badge {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.detail-type-club .planner-detail-badge {
    background: #96ff94;
    color: #04132D;
}

.detail-type-event .planner-detail-badge {
    background: #04132D;
    color: #fff;
}

.planner-detail-club {
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #04132D !important;
    text-decoration: none !important;
}

.planner-detail-club:hover {
    text-decoration: underline !important;
}

.planner-detail-time,
.planner-detail-loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 13px;
    color: #6b7280;
    width: 100%;
}

.planner-detail-time svg,
.planner-detail-loc svg {
    flex-shrink: 0;
    color: #9ca3af;
}

/* ── Responsive: tablets ── */
@media (max-width: 767px) {
    .planner-cal-title {
        font-size: 18px !important;
        min-width: 160px;
    }

    .planner-cal-dow > div {
        font-size: 10px;
        padding: 8px 2px;
    }

    /* Switch from chips to dots */
    .planner-cal-cell {
        min-height: 56px;
        padding: 4px 3px;
        align-items: center;
    }

    .planner-cal-chip,
    .planner-cal-more {
        display: none !important;
    }

    .planner-cal-dots {
        display: flex;
        justify-content: center;
    }

    .planner-cal-date {
        font-size: 12px;
        text-align: center;
        width: 100%;
    }

    .planner-cal-cell.is-today .planner-cal-date {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .planner-day-detail {
        padding: 16px;
    }

    .planner-detail-club {
        font-size: 14px;
    }

    .planner-detail-time,
    .planner-detail-loc {
        font-size: 12px;
    }

    .planner-cal-legend {
        gap: 14px;
        margin-bottom: 10px;
    }

    .planner-legend-item {
        font-size: 11px;
    }
}

/* ── Small phones ── */
@media (max-width: 480px) {
    .planner-cal-cell {
        min-height: 44px;
        padding: 3px 2px;
    }

    .planner-cal-date {
        font-size: 11px;
    }

    .planner-dot {
        width: 6px;
        height: 6px;
    }

    .planner-cal-cell.is-today .planner-cal-date {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* ============================================
   Deals Info Alert
   ============================================ */
.deals-info-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #f0fff4 0%, #e8fff0 100%);
    border: 1px solid #96ff94;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.deals-info-alert svg {
    flex-shrink: 0;
    color: #16a34a;
    margin-top: 2px;
}

.deals-info-alert strong {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #04132D;
    display: block;
    margin-bottom: 4px;
}

.deals-info-alert p {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 13px;
    color: #374151;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .deals-info-alert {
        padding: 14px 16px;
        gap: 10px;
    }

    .deals-info-alert strong {
        font-size: 13px;
    }

    .deals-info-alert p {
        font-size: 12px;
    }
}

/* ============================================
   Header User Trigger (Logged-in, Face 1)
   ============================================ */
.header-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1002;
    cursor: default;
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.header-user-name {
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 4px;
}

.header-user-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-user-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header-user-hamburger.open span:first-child {
    transform: rotate(-45deg) translate(-4px, 4px);
}

.header-user-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.header-user-hamburger.open span:last-child {
    transform: rotate(45deg) translate(-4px, -4px);
}

/* Hide user name on mobile, show only avatar + hamburger */
@media (max-width: 1200px) {
    .header-user-name {
        display: none;
    }
}

/* When logged in, hide the old navbar toggler — user panel replaces it */
body.logged-in .navbar-toggler {
    display: none !important;
}

/* On mobile when logged in, hide old full-screen nav since user panel has all links */
@media (max-width: 1200px) {
    body.logged-in header .navbar-menu {
        display: none !important;
    }
}

/* Desktop dashboard: hide top nav links — sidebar is the nav */
@media (min-width: 992px) {
    body.is-dashboard-page header .navbar-menu {
        display: none !important;
    }
    body.is-dashboard-page .header-user-trigger {
        display: none !important;
    }
}

/* Mobile dashboard: hide sidebar, use the user panel instead */
@media (max-width: 991px) {
    body.is-dashboard-page .dashboard-sidebar,
    body.is-dashboard-page .sidebar-overlay {
        display: none !important;
    }
    body.is-dashboard-page .dashboard-main {
        margin-left: 0 !important;
    }
}

/* ============================================
   Header User Panel (Slide-out right)
   Panel is rendered at body level (outside header)
   for proper z-index stacking.
   ============================================ */

/* Ensure buttos-box stays visible on small phones when logged in */
body.logged-in header .buttos-box {
    display: flex !important;
    margin-right: 0 !important;
}

/* Desktop dashboard: hide panel (sidebar handles nav) */
@media (min-width: 992px) {
    body.is-dashboard-page .header-user-panel,
    body.is-dashboard-page .header-user-panel-overlay {
        display: none !important;
    }
}

/* --- Panel container --- */
.header-user-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 75vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    border: none;
    font-family: "Inter", "Manrope", sans-serif;
}

.header-user-panel.open {
    transform: translateX(0);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

/* --- Overlay --- */
.header-user-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    transition: background 0.3s ease;
    pointer-events: none;
}

.header-user-panel-overlay.open {
    display: block;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: all;
}

/* --- Inner container --- */
.header-user-panel .header-user-panel-inner {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* --- Panel header (user info + close) --- */
.header-user-panel .hup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.header-user-panel .hup-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

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

.header-user-panel .hup-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-user-panel .hup-user-name {
    font-size: 15px;
    font-weight: 800;
    color: #04132D;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-panel .hup-passport-id {
    font-size: 12px;
    font-weight: 600;
    color: #7a7f88;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.header-user-panel .hup-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user-panel .hup-close:hover {
    background: #f3f4f6;
    color: #04132D;
}

.header-user-panel .hup-close svg {
    width: 18px;
    height: 18px;
}

/* --- Primary link (Dashboard) --- */
.header-user-panel .hup-primary-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #04132D;
    text-decoration: none;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.header-user-panel .hup-primary-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #04132D;
    text-decoration: none;
}

.header-user-panel .hup-primary-link svg {
    flex-shrink: 0;
    color: #6b7280;
    width: 16px;
    height: 16px;
}

/* --- Nav sections --- */
.header-user-panel .hup-nav {
    flex: 1;
}

.header-user-panel .hup-nav-group {
    margin-bottom: 6px;
}

.header-user-panel .hup-nav-heading {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 6px 10px 3px;
    user-select: none;
}

.header-user-panel .hup-nav-link {
    display: block;
    padding: 5px 10px 5px 22px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 5px;
    line-height: 1.4;
    transition: background 0.12s ease;
}

.header-user-panel .hup-nav-link:hover {
    background: #f3f4f6;
    color: #04132D;
    text-decoration: none;
}

/* Browse links — slightly muted */
.header-user-panel .hup-browse-link {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.header-user-panel .hup-browse-link:hover {
    color: #04132D;
    background: #f3f4f6;
}

/* --- Bottom links --- */
.header-user-panel .hup-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.header-user-panel .hup-bottom-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 5px;
    line-height: 1.4;
    transition: background 0.12s ease;
}

.header-user-panel .hup-bottom-link:hover {
    background: #f3f4f6;
    color: #04132D;
    text-decoration: none;
}

.header-user-panel .hup-bottom-link svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.header-user-panel .hup-logout {
    color: #dc2626;
}

.header-user-panel .hup-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* --- Small screen scaling --- */
@media (max-width: 380px) {
    .header-user-panel .header-user-panel-inner {
        padding: 14px 12px;
    }

    .header-user-panel .hup-primary-link {
        font-size: 12px;
        padding: 8px 10px;
    }

    .header-user-panel .hup-nav-heading {
        font-size: 9px;
    }

    .header-user-panel .hup-nav-link {
        font-size: 12px;
        padding: 4px 10px 4px 18px;
    }

    .header-user-panel .hup-bottom-link {
        font-size: 12px;
        padding: 6px 10px;
    }

    .header-user-panel .hup-user-name {
        font-size: 14px;
    }

    .header-user-panel .hup-passport-id {
        font-size: 11px;
    }
}

/* ============================================
   Sidebar — Browse Links (Face 3 Dashboard)
   ============================================ */
.sidebar-browse-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 24px 7px 54px;
    font-family: "Inter", "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-browse-link:hover {
    color: #04132D;
    text-decoration: none;
    background-color: #f3f4f6;
}

.sidebar-browse-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.5;
}

/* --- Mobile: shrink sidebar nav text to fit --- */
@media (max-width: 1200px) {
    .nav-heading {
        font-size: 10px;
        padding: 6px 20px;
        gap: 8px;
    }

    .nav-heading svg {
        width: 15px;
        height: 15px;
    }

    .nav-item {
        font-size: 13px;
        padding: 6px 20px 6px 44px;
    }

    .sidebar-browse-link {
        font-size: 12px;
        padding: 6px 20px 6px 44px;
    }

    .sidebar-link {
        font-size: 13px;
        padding: 8px 10px;
    }

    .sidebar-link svg {
        width: 16px;
        height: 16px;
    }

    .sidebar-user-name {
        font-size: 13px;
    }
}

/* Sidebar Passport ID (replaces @username) */
.sidebar-user-passport {
    font-size: 12px;
    font-weight: 600;
    color: #7a7f88;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
