.sidebar {
    height: calc(100% - 56px);
    width: 310px;
    position: fixed;
    z-index: 1;
    top: 56px;
    left: 0;
    background-color: #ffffff;
    border-right: 1px solid #e8eaf0;
    box-shadow: 2px 0 12px rgba(102, 126, 234, 0.08);
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    /* Mobile: smooth slide-in transition */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* ── Mobile close button (hidden on desktop, shown via mobile.css) ── */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f0f0f8;
    border: 1px solid #e0e0f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #4a5568;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
}

.sidebar-close-btn:hover {
    background: #e53e3e;
    color: white;
    border-color: transparent;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* ── Welcome / tips panel ── */
.sidebar-welcome {
    margin: 8px 10px 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(102,126,234,0.07) 0%, rgba(118,75,162,0.07) 100%);
    border: 1px solid rgba(102,126,234,0.14);
    border-radius: 12px;
}

.sidebar-welcome h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 0.02em;
}

.sidebar-welcome ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-welcome ul li {
    font-size: 12px;
    color: #4a5568;
    line-height: 1.45;
    display: flex;
    gap: 7px;
    align-items: flex-start;
}

.sidebar-welcome ul li span.tip-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.3;
}

.sidebar-welcome ul li span.tip-pin-icon {
    display: inline-flex;
    align-items: flex-end;
    width: 24px;
    justify-content: center;
}

.sidebar-welcome ul li span.tip-pin-icon-pair {
    width: 32px;
    gap: 2px;
}

/* ── Bottom bar with add-missing button ── */
.sidebar-bottom {
    padding: 10px 10px 12px;
    border-top: 1px solid #f0f0f8;
    background: #ffffff;
    flex-shrink: 0;
}

/* ── Brand strip at top ── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 16px 16px;
    border-bottom: 1px solid #f0f0f8;
    margin-bottom: 8px;
    text-decoration: none;
}

.sidebar-brand img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* User Info Section */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(102,126,234,0.06) 0%, rgba(118,75,162,0.06) 100%);
    margin: 0 10px 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(102,126,234,0.12);
    position: relative;
}

.user-avatar {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102,126,234,0.3);
}

.user-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    border: 2px solid rgba(102,126,234,0.3);
}

.user-details {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 11px;
    color: #718096;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #667eea;
    transition: color 0.2s ease;
    font-size: 18px;
    text-decoration: none;
}

.settings-icon:hover { color: #764ba2; }

/* User action buttons */
.user-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    flex-shrink: 0;
}

.user-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f0f0f8;
    border: 1px solid #e0e0f0;
    border-radius: 50%;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.user-action-btn:hover {
    transform: scale(1.1);
}

.user-action-btn.settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.user-action-btn.settings-btn:hover {
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.user-action-btn.logout-btn {
    background: #fff0f0;
    color: #e53e3e;
    border-color: #fed7d7;
}

.user-action-btn.logout-btn:hover {
    background: #e53e3e;
    color: white;
    border-color: transparent;
}

.icon-svg {
    width: 14px;
    height: 14px;
}

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

/* Auth Buttons Section */
.auth-buttons {
    padding: 4px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-login {
    display: block;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102,126,234,0.4);
}

.btn-register {
    display: block;
    padding: 9px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-register:hover {
    background: rgba(102,126,234,0.08);
    transform: translateY(-1px);
}

/* Sidebar nav */
.sidebar ul {
    list-style-type: none;
    margin: 8px 0 0 0;
    padding: 0 10px;
    border-top: 1px solid #f0f0f8;
    padding-top: 10px;
}

.sidebar li { margin: 2px 0; }

.sidebar li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.sidebar li a:hover {
    background-color: rgba(102,126,234,0.08);
    color: #667eea;
}

.sidebar li a i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Logout button */
.logout-button {
    width: 100%;
    background: none;
    border: none;
    color: #4a5568;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.logout-button:hover {
    background-color: #fff0f0;
    color: #e53e3e;
}

.logout-button i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.sidebar li form { margin: 0; }

/* POI Details Section */
.poi-details {
    margin: 8px 10px 16px 10px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.poi-details-header {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f0f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    border-radius: 12px 12px 0 0;
}

.poi-details-header h3 {
    margin: 0;
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
}

.close-poi-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.close-poi-btn:hover {
    background-color: rgba(0,0,0,0.06);
    color: #4a5568;
}

.poi-details-content { padding: 14px; }

.poi-details-content p {
    margin: 8px 0;
    font-size: 13px;
    color: #718096;
}

.poi-rating-display {
    margin: 10px 0;
    padding: 8px 10px;
    background: #f7f8fc;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
}

.poi-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f8;
}

.poi-action-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}

.poi-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102,126,234,0.35);
}

.poi-action-btn.bookmarked {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237,137,54,0.3);
}

.poi-action-btn.bookmarked:hover {
    box-shadow: 0 4px 14px rgba(237,137,54,0.4);
}

.poi-action-btn.btn-report {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    box-shadow: none;
}

.poi-action-btn.btn-report:hover {
    background: #e53e3e;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(229,62,62,0.3);
}

.poi-action-btn.btn-edit {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #c6f6d5;
    box-shadow: none;
}

.poi-action-btn.btn-edit:hover {
    background: #38a169;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(56,161,105,0.3);
}

.poi-action-btn.btn-secondary {
    background: #f7f8fc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.poi-action-btn.btn-secondary:hover {
    background: #edf2f7;
    box-shadow: none;
    transform: none;
}

.poi-action-btn.btn-search {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

.poi-action-btn.btn-search:hover {
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

/* Quick action icon buttons: bookmark, search, rate */
.poi-quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.poi-icon-btn {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102,126,234,0.25);
    transition: all 0.2s ease;
}

.poi-icon-btn svg {
    pointer-events: none;
}

.poi-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102,126,234,0.35);
}

.poi-icon-btn.bookmarked {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237,137,54,0.3);
}

.poi-icon-btn.bookmarked:hover {
    box-shadow: 0 4px 14px rgba(237,137,54,0.4);
}

.poi-icon-btn.bookmarked .icon-heart {
    fill: currentColor;
}

.poi-icon-btn.btn-search {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

.poi-icon-btn.btn-search:hover {
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

.poi-icon-btn.btn-rate {
    background: linear-gradient(135deg, #f6ad55 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(246,173,85,0.3);
}

.poi-icon-btn.btn-rate:hover {
    box-shadow: 0 4px 14px rgba(246,173,85,0.4);
}

/* Tooltip shown on hover for icon-only buttons */
.poi-icon-btn[data-tooltip]::after,
.poi-icon-btn[data-tooltip]::before {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    position: absolute;
    left: 50%;
}

.poi-icon-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 9px);
    transform: translateX(-50%) translateY(4px);
    background: #2d3748;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 6px;
    z-index: 20;
}

.poi-icon-btn[data-tooltip]::before {
    content: '';
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: #2d3748;
    z-index: 20;
}

.poi-icon-btn[data-tooltip]:hover::after,
.poi-icon-btn[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.add-to-trip-section {
    margin-bottom: 8px;
}

.add-to-trip-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #2d3748;
    background: #f7f8fc;
    cursor: pointer;
}

.add-to-trip-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.poi-action-btn.btn-trip {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 8px rgba(72,187,120,0.25);
}

.poi-action-btn.btn-trip:hover {
    box-shadow: 0 4px 14px rgba(72,187,120,0.35);
}

.poi-action-btn.btn-trip:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.rating-section {
    margin-top: 10px;
}

.rating-section span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #718096;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 28px;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.star:hover,
.star.active { color: #f6ad55; }

/* Review form */
.review-form {
    margin-top: 14px;
    padding: 14px;
    background: #f7f8fc;
    border-radius: 8px;
    border: 1px solid #e8eaf0;
}

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.star-rating-form {
    display: flex;
    gap: 5px;
}

.star-form {
    font-size: 28px;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.star-form:hover,
.star-form.active { color: #f6ad55; }

.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-actions {
    display: flex;
    gap: 8px;
}

.form-actions button { flex: 1; }

#poi-image-container img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px 0;
}

/* Category pills */
.poi-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 0 4px 0;
}

.poi-category-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* POI info sections */
.poi-info-section {
    margin: 8px 0;
    background: #f7f8fc;
    border-radius: 8px;
    border: 1px solid #e8eaf0;
    overflow: hidden;
}

.poi-info-section-title {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #667eea;
    background: rgba(102,126,234,0.06);
    border-bottom: 1px solid #e8eaf0;
}

.poi-info-section-body {
    padding: 8px 10px;
    font-size: 12px;
    color: #4a5568;
    line-height: 1.55;
}

.poi-hours-text {
    white-space: pre-line;
    font-size: 11px;
}

/* External rating */
.poi-rating-external-content { padding: 8px 10px; }

.poi-rating-stars {
    font-size: 18px;
    color: #f6ad55;
    letter-spacing: 1px;
    line-height: 1.2;
}

.poi-rating-numbers {
    font-size: 13px;
    color: #2d3748;
    margin-top: 2px;
}

.poi-rating-numbers strong {
    font-size: 15px;
    color: #1a202c;
}

.poi-rating-count {
    color: #a0aec0;
    font-size: 11px;
}

/* ── Mobile navigation links inside sidebar ── */
.sidebar-mobile-nav {
    display: none; /* Hidden on desktop */
    margin: 0 10px 12px 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.sidebar-mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #4a5568;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.08);
    transition: background 0.2s, color 0.2s;
    gap: 8px;
}

.sidebar-mobile-nav-link:last-child {
    border-bottom: none;
}

.sidebar-mobile-nav-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
}

@media (max-width: 768px) {
    .sidebar-mobile-nav {
        display: block;
    }
}

/* Add Missing Place Button */
.add-missing-place-btn {
    width: 100%;
    padding: 9px 16px;
    background: rgba(102,126,234,0.07);
    color: #667eea;
    border: 1.5px solid rgba(102,126,234,0.25);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-missing-place-btn:hover {
    background: rgba(102,126,234,0.14);
    border-color: rgba(102,126,234,0.45);
    transform: translateY(-1px);
}

.add-missing-place-btn:active { transform: translateY(0); }

