/* Civic Dreaming - Global Styles */
@import 'parcel-styles.css';

:root {
    --primary-color: #3498db;
    --primary-hover: #1c84ca;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    /* margin-bottom: 0.25rem; */
}

/* Keep the same visual weight when the title is an anchor */
.logo .site-title {
    font-size: 1.5rem;
	font-weight: bold;
    text-decoration: none;
    color: inherit;
}

.logo .tagline {
    font-size: 0.875rem;
    color: var(--text-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-icon-button {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.user-icon-button:hover {
    opacity: 0.7;
}

.user-menu {
    position: relative;
}

.user-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    min-width: 200px;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
}

.user-dropdown a:hover {
    background: var(--bg-light);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn.active {
    background: var(--secondary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Split Layout */
.split-layout {
    display: flex;
    height: calc(100vh - 120px);
    overflow: hidden;
    position: relative;
}

/* Categories Pane (Left Side) */
.categories-pane {
    width: 250px;
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, width 0.3s ease;
    flex-shrink: 0;
}

.categories-pane>* {
    min-width: 250px;
}

.categories-pane.collapsed {
    width: 0;
    transform: translateX(-250px);
}

/* Map Pane (Center - replaces left-pane) */
.map-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    position: relative;
    transition: margin 0.3s ease;
}

.map-pane.categories-collapsed {
    margin-left: 0;
}

.map-pane.policies-collapsed {
    margin-right: 0;
}

.map-pane-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.map-pane-content {
    flex: 1;
    overflow: hidden;
}

/* Policies Pane (Right Side - replaces right-pane) */
.policies-pane {
    width: 250px;
    background: white;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, width 0.3s ease;
    flex-shrink: 0;
}

.policies-pane>* {
    min-width: 250px;
}

.policies-pane.collapsed {
    width: 0;
    transform: translateX(250px);
}

/* Toggle Buttons */
.pane-toggle-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.1rem 0.15rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pane-toggle-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

.pane-toggle-btn.categories-toggle {
    margin-right: auto;
}

.pane-toggle-btn.policies-toggle {
    margin-left: auto;
}

/* Keep backward compatibility */
.left-pane {
    width: calc(100% - 250px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.left-pane-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.left-pane-content {
    flex: 1;
    overflow: hidden;
}

.right-pane {
    width: 250px;
    background: white;
    overflow-y: auto;
}

/* View Toggle */
.view-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-toggle-btn:hover {
    background: var(--bg-light);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.view-filters .control-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.view-filters .control-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.view-filters .control-group select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Mobile Tabs */
.mobile-tabs {
    display: none;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.mobile-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: white;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.mobile-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Policy List Sidebar */
.policy-list-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.policy-filters {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
}

.policy-list-content {
    flex: 1;
    overflow-y: auto;
}

.policy-items {
    display: flex;
    flex-direction: column;
}

.policy-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.policy-item:hover {
    background: var(--bg-light);
}

.policy-item.active {
    background: #e3f2fd;
    border-left: 3px solid var(--primary-color);
}

.policy-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.policy-item-header h3 {
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.policy-votes {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

.policy-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.policy-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-light);
}

.policy-author {
    font-style: italic;
}

.policy-comments {
    color: var(--text-light);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-submitted {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-review {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-active {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-hidden {
    background-color: #F3F4F6;
    color: #6B7280;
}

.status-removed {
    background-color: #FEE2E2;
    color: #991B1B;
}

.status-completed {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-previous-version {
    background-color: #E5E7EB;
    color: #6B7280;
}

.status-default {
    background-color: #E5E7EB;
    color: #374151;
}

/* Status badge in map popup */
.popup-status-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    text-transform: uppercase;
}

.popup-status-badge.status-submitted {
    background-color: #FEF3C7;
    color: #92400E;
}

.popup-status-badge.status-in-review {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.popup-status-badge.status-active {
    background-color: #D1FAE5;
    color: #065F46;
}

/* Category Badges */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    color: #4b5563;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.popup-category-badge {
    display: inline-block;
    color: #4b5563;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

/* Map View */
.map-container-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.map-container {
    width: 100%;
    height: 100%;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.project-popup h3 {
    margin-bottom: 0.5rem;
}

.project-popup p {
    margin-bottom: 1rem;
}

/* Project List */
.project-list-view {
    padding: 2rem 0;
    height: 100%;
    overflow-y: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.loading,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

/* Project Card */
.project-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

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

.project-header h3 {
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-abstract {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.project-author {
    font-size: 0.875rem;
    color: var(--text-light);
}

.anonymous {
    font-style: italic;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: .75rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: .5rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tabs button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tabs button.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.location-picker {
    display: flex;
    gap: 0.5rem;
}

.location-picker input {
    flex: 1;
}

.location-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.875rem;
}

.error-message {
    padding: 0.75rem;
    background: #fee;
    color: var(--danger-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Dream Type Selector */
.dream-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dream-type-option {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    gap: 0.75rem;
}

.dream-type-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.dream-type-option input[type="radio"] {
    display: none;
    width: auto;
    margin-top: 0.25rem;
}

.dream-type-option input[type="radio"]:checked+.option-content {
    color: var(--primary-color);
}

.dream-type-option:has(input:checked) {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.option-content p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Footer */
.app-footer {
    background: var(--bg-light);
    padding: .5rem 0;
    border-top: 1px solid var(--border-color);
}

.app-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {

	.container {
		padding: 0 10px;
	}

    /* Stack layout for mobile */
    .split-layout {
        flex-direction: row;
        height: calc(100vh - 80px);
    }

    /* Dream Type Selector Mobile */
    .dream-type-selector {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.75rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .dream-type-option {
        flex: 0 0 auto;
        scroll-snap-align: start;
        width: auto;
    }

    .option-content {
        width: 40vw;
        flex: none;
    }

    .left-pane,
    .right-pane,
    .map-pane,
    .categories-pane,
    .policies-pane {
        height: 100%;
    }

    .categories-pane,
    .policies-pane {
        width: 250px;
        position: fixed;
        top: 60px;
        bottom: 0;
        z-index: 150;
    }

    .categories-pane {
        left: 0;
    }

    .policies-pane {
        right: 0;
    }

    .left-pane,
    .map-pane {
        border-right: none;
    }

    /* Show toggle buttons on mobile */
    .pane-toggle-btn {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    /* Enable pane collapsing on mobile */
    .categories-pane.collapsed {
        transform: translateX(-100%);
    }

    .policies-pane.collapsed {
        transform: translateX(100%);
    }

    /* Map pane stays full width but shifts when panes open */
    .map-pane {
        width: 100%;
        margin: 0;
        transition: transform 0.3s ease;
    }

    .map-pane:not(.categories-collapsed) {
        transform: translateX(250px);
    }

    .map-pane:not(.policies-collapsed) {
        transform: translateX(-250px);
    }

    .map-pane:not(.categories-collapsed):not(.policies-collapsed) {
        transform: translateX(0);
    }

    /* Other responsive styles */
    .header-content {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .logo h1 {
        font-size: 1.1rem;
        margin: 0;
    }

    .logo .tagline {
        font-size: 0.75rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .btn-primary {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .user-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .view-toggle-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    .view-toggle-btn .btn-text {
        display: none;
    }

    .view-toggle-btn {
        padding: 0.5rem;
        min-width: auto;
    }

    .view-filters {
        flex-direction: row;
        gap: 0.5rem;
        flex: 1;
    }

    .view-filters .control-group {
        flex: 1;
        min-width: 0;
    }

    .view-filters .control-group label {
        display: none;
    }

    .view-filters .control-group select {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.5rem 0.375rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .app-footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Detail Views */
.detail-view {
    width: 100%;
    height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--bg-light);
}

.project-detail-container,
.policy-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.project-detail,
.policy-detail {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.preview-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem 2rem;
    color: #92400e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-warning i {
    font-size: 1.25rem;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-close:hover {
    background: var(--bg-light);
}

.detail-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-right: 100px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.meta-item strong {
    color: var(--text-color);
    margin-right: 0.25rem;
}

.detail-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.detail-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.detail-section p {
    color: var(--text-color);
    line-height: 1.8;
}

.detail-section .highlight {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.agency-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
}

.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.vote-buttons {
    display: flex;
    gap: 1rem;
}

.btn-vote {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-vote:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-vote.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.stats {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
}

/* Mentions Section */
.mentions-section {
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.mentions-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mentions-section h3 {
    margin: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.mention-form {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.mention-form h4 {
    margin-bottom: 1rem;
}

.mention-form .form-group {
    margin-bottom: 1rem;
}

.mention-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.mention-form input[type="text"],
.mention-form input[type="url"],
.mention-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.mention-form input[type="file"] {
    width: 100%;
    padding: 0.5rem;
}

.logo-preview {
    max-width: 150px;
    max-height: 60px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.mentions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mention-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: box-shadow 0.3s;
}

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

.mention-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mention-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.mention-info {
    flex: 1;
}

.mention-source {
    font-weight: 600;
    color: var(--text-color);
}

.mention-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.mention-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-icon:hover {
    opacity: 1;
}

.mention-headline {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.mention-headline a {
    color: var(--primary-color);
    text-decoration: none;
}

.mention-headline a:hover {
    text-decoration: underline;
}

.mention-abstract {
    color: var(--text-light);
    line-height: 1.6;
}

.empty-mentions {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Comments Section */
.comments-section {
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
}

.comment-form button {
    width: 100%;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.comment-content {
    color: var(--text-color);
}

.empty-comments {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.hidden {
    display: none !important;
}

/* Report Issue Button and Modal */
.btn-report {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-report:hover {
    background: var(--danger-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.report-modal .modal-content {
    max-width: 600px;
}

.report-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.report-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--danger-color);
}

.report-modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

.report-modal .btn-close:hover {
    color: var(--text-color);
}

.report-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.report-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--danger-color);
}

.report-info p {
    margin-bottom: 0.5rem;
}

.report-info p:last-child {
    margin-bottom: 0;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    align-self: flex-end;
    font-size: 0.75rem;
    color: var(--text-light);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.success-message {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.error-message {
    background: #fee;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Responsive for detail views */
@media (max-width: 768px) {

    .project-detail-container,
    .policy-detail-container {
        padding: 1rem;
    }

    .detail-header h1 {
        font-size: 1.5rem;
    }

    .detail-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .vote-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .stats {
        width: 100%;
        justify-content: space-around;
    }
}

/* Category Filter Component */
.category-filter {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-filter .view-toggle-wrapper {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.type-filter-section {
    /* margin-bottom: 1rem; */
    /* padding-bottom: 0.75rem; */
    /* border-bottom: 1px solid var(--border-color); */
}

.type-filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}


.type-checkbox-item {
    flex: 1;
    display: flex;
    /* align-items: center;
    justify-content: center; */
    gap: 0.5rem;
    /* 
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px; */
    cursor: pointer;
    transition: all 0.2s;
    /* background: white; */
}

.type-checkbox-item:hover {
    /* background: var(--bg-light); */
}

.type-checkbox-item.active {
    /* background: var(--bg-light);
    border-color: var(--primary-color); */
}

.type-checkbox-item input {
    cursor: pointer;
}

.type-checkbox-item.civic-dreams-btn.active {
    /* background-color: #f0f7ff;
    border-color: #3498db;
    color: #2c3e50; */
}

.type-checkbox-item.esoteria-btn.active {
    /* background-color: #fcf0ff;
    border-color: #9b59b6;
    color: #8e44ad; */
}

.category-list.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}

.category-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.category-filter-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.clear-filters-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.clear-filters-btn:hover {
    opacity: 0.8;
}

.category-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.category-list {
    display: flex;
    flex-direction: column;
    /* gap: 0.5rem; */
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-item:hover {
    background: var(--bg-light);
}

.category-item input[type="checkbox"] {
    cursor: pointer;
}

.category-icon {
    font-size: 1.25rem;
}

.category-name {
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Map Picker Overlay */
.map-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through to map */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.center-pin {
    font-size: 40px;
    margin-bottom: 40px;
    /* Offset so the point of the pin is at center */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 0.5s ease-out;
}

.picker-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    pointer-events: auto;
    /* Re-enable clicks for buttons */
    width: 90%;
    max-width: 300px;
}

.picker-instruction {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.picker-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

@keyframes bounce {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    75% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Photo Upload Controls */
.photo-upload-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.photo-upload-controls button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.selected-file-name {
    padding: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.image-preview-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.image-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.image-preview-container .selected-file-name {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Location Picker Modal */
.location-picker-modal-overlay {
    z-index: 3000;
    /* Higher than other modals */
}

.location-picker-content {
    max-width: 90%;
    width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.picker-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.picker-header h3 {
    margin: 0;
}

.picker-map-container {
    flex: 1;
    position: relative;
    background: #eee;
}

.picker-map {
    width: 100%;
    height: 100%;
}

.picker-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Center pin for modal picker */
.picker-map-container .center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    font-size: 24px;
    z-index: 1000;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Dashboard Location Picker Refinements */
.dashboard-location-picker {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.dashboard-location-picker input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dashboard-map-container {
    height: 350px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.location-edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    align-items: center;
}

.selected-address {
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 10px;
}

.detail-map {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
    z-index: 1;
}

/* Embedded location picker in form */
.embedded-picker-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}


.embedded-picker-map {
    width: 100%;
    height: 100%;
}

.embedded-picker-container .center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 1000;
    pointer-events: none;
    font-size: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}


/* Map Popup Enhancements */
.popup-thumbnail {
    width: 100%;
    height: 120px;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.popup-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.nav-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    padding: 0;
}

.nav-btn:hover {
    background: #e0e0e0;
}

.view-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.view-btn:hover {
    background: var(--primary-hover);
}

/* User Home Page */
.page-container {
    padding-top: 2rem;
    min-height: calc(100vh - 100px);
}

.user-home-header {
    text-align: center;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.user-avatar i {
    font-size: 3rem;
    color: var(--primary-color);
}

.user-info {
    text-align: left;
}

.user-info h2 {
    font-size: 1.25rem;
    margin: 0;
}

.user-info p {
    color: var(--text-light);
    margin: 0;
}

.user-content-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.user-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: transparent;
    border: 1px solid #fee2e2;
    color: var(--danger-color);
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: var(--danger-color);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* User Home Page Styles */
.page-container {
    padding-top: 2rem;
    min-height: calc(100vh - 100px);
}

.user-avatar i {
    font-size: 3rem;
    color: var(--primary-color);
}

.user-info {
    text-align: left;
}

.user-info h2 {
    font-size: 1.25rem;
    margin: 0;
}

.user-info p {
    color: var(--text-light);
    margin: 0;
}

.user-content-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.user-content-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

@media (max-width: 768px) {
	.user-content-tabs .tab-btn {
	    padding: 0.5rem .25rem;
	}
}

.user-content-tabs .tab-btn:hover {
    color: var(--primary-color);
}

.user-content-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.user-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.user-item-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: box-shadow 0.3s;
}

.user-item-card:hover {
    box-shadow: var(--shadow-lg);
}

.user-item-card .item-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.user-item-card h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.item-abstract {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 3rem;
}

.item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: transparent;
    border: 1px solid #fee2e2;
    color: var(--danger-color);
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: var(--danger-color);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Photo Upload Thumbnails */
.thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.thumbnail-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Esoteria Details Swiper */
.detail-image-gallery {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 400px;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.swiper-pagination-bullet-active {
    background: white;
}

/* Esoteria List Row */
.esoteria-section {
    /* width: 100%; */
    /* max-width: 900px; */
    /* Force scrolling on large screens */
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.esoteria-row {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    height: 250px;
    padding-bottom: 15px;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.esoteria-row::-webkit-scrollbar {
    height: 8px;
}

.esoteria-row::-webkit-scrollbar-track {
    background: transparent;
}

.esoteria-row::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.esoteria-list-item {
    height: 100%;
    min-width: 280px;
    display: inline-block;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-color);
}

.esoteria-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.esoteria-list-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}

.esoteria-placeholder {
    height: 100%;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
    white-space: normal;
}

/* Esoteria Popup Overlay */
.esoteria-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.esoteria-list-popup {
    background: white;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.popup-close-btn:hover {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.popup-content {
    display: flex;
    flex-direction: column;
}

.popup-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

.popup-header h3 {
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.badge-esoteria {
    display: inline-block;
    padding: 2px 8px;
    background-color: #8B5CF6;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.popup-body {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Collaboration Fields */
.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-light);
    width: calc(50% - 0.25rem);
}

.checkbox-item:hover {
    background: #e9ecef;
}

.checkbox-item.full-width {
    width: 100%;
}

.section-label {
    width: 100%;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Collaboration Tags */
.collaboration-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-open {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-need {
    background-color: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

/* Project Dashboard Styles */
.project-dashboard {
    min-height: calc(100vh - 60px);
    padding-bottom: 4rem;
}

.dashboard-header {
    background: white;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-identity {
    display: flex;
    gap: 0.5rem;
    padding-left: 1rem;
}

.project-identity .project-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-identity h1 {
    font-size: 1.2rem;
}

.project-dashboard .project-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.version-badge {
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    border: 1px solid var(--border-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .project-identity {
        padding-left: 0;
        width: 100%;
    }

    .project-identity h1 {
        font-size: 1.1rem;
    }

    .dashboard-header .header-actions {
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }

    .dashboard-header .header-actions button {
        width: 100%;
        justify-content: center;
    }

    .project-status {
        align-self: flex-start;
    }
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-card .card-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card Tabs */
.dashboard-card .card-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-card .card-tabs .tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dashboard-card .card-tabs .tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.dashboard-card .card-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.dashboard-card .tab-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-success:hover {
    background: #a7f3d0;
    border-color: #065f46;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid #fee2e2;
}

.btn-outline-danger:hover {
    background: #fee2e2;
    border-color: var(--danger-color);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-style: italic;
}

.empty-state p {
    margin: 0;
}

.w-100 {
    width: 100%;
}


/* Project Assets */
.project-assets {
    position: relative;
    padding-left: .5rem;
}

.project-assets-item {
    position: relative;
    margin-bottom: 1rem;
}

/* Media Upload Styles */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-delete-media {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-delete-media:hover {
    background: rgba(231, 76, 60, 0.9);
}

.media-list {
    margin-bottom: 1rem;
}

.media-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.media-filename {
    font-size: 0.9rem;
    color: var(--text-color);
}

.btn-delete-media-small {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-media-small:hover {
    background: var(--danger-color);
    color: white;
}

.upload-controls {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* Timeline */
.timeline {
    position: relative;
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-marker {
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

/* User avatars */
.user-avatar-sm,
.user-avatar-xs {
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
}

.user-avatar-xs {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

/* Request List */
.request-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.request-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.request-msg {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: auto;
}

/* Collaborator List */
.collaborator-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.role-badge {
    margin-left: auto;
    font-size: 0.8rem;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.add-collaborator {
    margin-top: 1rem;
}

.btn-dashed {
    border: 1px dashed var(--border-color);
    color: var(--text-light);
    background: transparent;
}

.btn-dashed:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Helper Groups */
.helper-group {
    margin-bottom: 1.5rem;
}

.helper-group h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.helper-list.empty {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
}

.helper-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Follower List */
.follower-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.follower-avatar,
.more-followers {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
}

.btn-icon:hover {
    color: var(--text-color);
}

.project-dashboard .btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0;
    font-weight: 500;
}

.project-dashboard .btn-text:hover {
    text-decoration: underline;
}

/* Dashboard Mentions Styles */
.mention-form-compact {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mention-form-compact h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.mention-form-compact .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mention-form-compact .form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.mention-form-compact textarea.form-input {
    margin-bottom: 0.5rem;
}

.mention-form-compact .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.logo-preview-small {
    max-width: 80px;
    max-height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.mentions-compact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mention-compact-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    background: white;
    transition: box-shadow 0.3s;
}

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

.mention-compact-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.mention-compact-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.mention-compact-info {
    flex: 1;
}

.mention-compact-source {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.mention-compact-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.mention-compact-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon-sm {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-icon-sm:hover {
    opacity: 1;
}

.mention-compact-headline {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.mention-compact-headline a {
    color: var(--primary-color);
    text-decoration: none;
}

.mention-compact-headline a:hover {
    text-decoration: underline;
}

.mention-compact-abstract {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Mention Type Badges */
.mention-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
}

.mention-type-badge.type-mention {
    background: #e3f2fd;
    color: #1976d2;
}

.mention-type-badge.type-press {
    background: #f3e5f5;
    color: #7b1fa2;
}

.mention-type-badge.type-award {
    background: #fff3e0;
    color: #f57c00;
}

/* Updates Section Styles */
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.update-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    background: white;
    transition: box-shadow 0.3s;
}

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

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.update-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-date {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.update-edited {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.update-actions {
    display: flex;
    gap: 0.25rem;
}

.update-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.update-content {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
    white-space: pre-wrap;
}

.update-author {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

.update-form-compact {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.update-form-compact h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-color);
}

.update-form-compact .form-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.update-form-compact textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Mention Status Badge */
.mention-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
    background: #fff9c4;
    color: #f57f17;
}

/* User Comments List */
.user-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-comment-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.3s;
}

.user-comment-card:hover {
    box-shadow: var(--shadow-lg);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comment-item-type {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--text-color);
}

.comment-item-type.type-project {
    background: #e3f2fd;
    color: #1976d2;
}

.comment-item-type.type-policy {
    background: #f3e5f5;
    color: #7b1fa2;
}

.comment-item-title {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
}

.comment-item-title:hover {
    text-decoration: underline;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.comment-content {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.comment-content p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
}

.comment-content.deleted {
    background: #fff3f3;
    border-left: 3px solid var(--danger-color);
}

.deleted-notice {
    color: var(--danger-color) !important;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.deleted-tag {
    color: var(--danger-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Responsive adjustments for comments */
@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-meta {
        width: 100%;
    }
}

/* Dashboard Comments Section */
.comments-dashboard-list {
    margin-top: 1rem;
}

.dashboard-comment-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s;
}

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

.comment-header-dash {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.comment-user:hover .username {
    color: var(--primary-color);
    text-decoration: underline;
}

.username {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.comment-date-dash {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

.comment-content-dash {
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.comment-content-dash p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.95rem;
}

.comment-actions-dash {
    display: flex;
    justify-content: flex-end;
}

.btn-danger-outline {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger-outline:hover {
    background: #fee2e2;
}

.loading-state-small {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.count-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===========================
   Admin Portal Styles
   =========================== */

.admin-portal {
    background: var(--bg-light);
    min-height: calc(100vh - 70px);
    padding: 2rem 0;
}

.container-fluid {
    max-width: 100%;
    padding: 0 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.admin-main-column {
    min-width: 0;
}

.admin-side-column {
    min-width: 0;
}

.admin-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.content-filter-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.content-filter-inline label {
    font-weight: 600;
    color: var(--text-color);
}

.content-filter-inline select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.content-subsection {
    margin-top: 1.5rem;
}

.content-subsection h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table-compact {
    font-size: 0.85rem;
}

.admin-table-compact th,
.admin-table-compact td {
    padding: 0.5rem;
}

/* Version nesting styles */
.admin-table-compact tr.version-child {
    background-color: rgba(0, 0, 0, 0.02);
}

.admin-table-compact .title-cell.indented {
    padding-left: 2rem;
}

.admin-table-compact .version-indicator {
    color: var(--text-light);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.admin-table-compact .expand-arrow {
    color: var(--text-light);
    margin-right: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
    user-select: none;
}

.admin-table-compact .expand-arrow:hover {
    color: var(--primary-color);
}

.admin-table-compact .expand-arrow.expanded {
    transform: rotate(90deg);
}

.admin-table-compact .version-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 500;
}

/* Quick Actions column */
.quick-actions-cell {
    min-width: 200px;
}

.quick-actions-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subsection-header h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

.subsection-filter {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.subsection-filter:hover {
    border-color: var(--primary-color);
}

.btn-diff {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-diff:hover {
    background: var(--primary-dark, #2563eb);
}

.btn-diff i {
    font-size: 0.9rem;
}

.btn-quick-approve {
    background: var(--success-color, #22c55e);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-quick-approve:hover {
    background: var(--success-dark, #16a34a);
}

.btn-quick-approve i {
    font-size: 0.9rem;
}

.btn-view-all {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-view-all:hover {
    background: var(--primary-dark, #2563eb);
}

.btn-view {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-view:hover {
    background: var(--primary-dark, #2563eb);
}

/* Diff Modal */
.diff-modal {
    background: white;
    border-radius: 8px;
    max-width: 1200px;
    width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.diff-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.diff-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.diff-modal-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.view-project-link:hover {
    background: var(--primary-color);
    color: white;
}

.diff-modal-header .close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.diff-modal-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.diff-modal-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.diff-section {
    margin-bottom: 1.5rem;
}

.diff-section h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.diff-maps-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.diff-map-side {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: white;
}

.diff-map-label {
    background: var(--bg-light);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

#diff-map-old,
#diff-map-new {
    z-index: 1;
}

.diff-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    background: var(--bg-light);
}

.diff-row.changed {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.diff-old, .diff-new {
    padding: 0.5rem;
    border-radius: 4px;
    background: white;
    min-height: 2rem;
    position: relative;
}

.diff-old::before {
    content: 'Old Version';
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.diff-new::before {
    content: 'New Version';
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.diff-row.changed .diff-new {
    background: #dbeafe;
    border-left: 3px solid #3b82f6;
}

.compact-select {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

.content-cell-compact {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

.verify-badge-compact,
.admin-badge-compact {
    font-size: 1rem;
}

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.admin-header .subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.admin-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
    white-space: nowrap;
}

.admin-tabs .tab-btn:hover {
    background: var(--bg-light);
    color: var(--text-color);
}

.admin-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: white;
}

.admin-tabs .tab-btn i {
    margin-right: 0.5rem;
}

.admin-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.content-filter {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-filter label {
    font-weight: 600;
    color: var(--text-color);
}

.content-filter select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.content-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table thead {
    background: var(--bg-light);
}

.admin-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: var(--bg-light);
}

.title-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions-cell select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-published {
    background: #d1fae5;
    color: #065f46;
}

.status-submitted {
    background: #dbeafe;
    color: #1e40af;
}

.status-review {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-completed {
    background: #bfdbfe;
    color: #1e3a8a;
}

.status-hidden,
.status-admin-hidden {
    background: #f3f4f6;
    color: #6b7280;
}

.status-removed {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-reviewing {
    background: #dbeafe;
    color: #1e40af;
}

.status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.status-dismissed {
    background: #f3f4f6;
    color: #6b7280;
}

.entity-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
}

.issue-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.verify-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.verify-badge.verified {
    background: #d1fae5;
    color: #065f46;
}

.verify-badge.unverified {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-badge.is-admin {
    background: #dbeafe;
    color: #1e40af;
}

.admin-badge.not-admin {
    background: #f3f4f6;
    color: #6b7280;
}

/* ===================================
   Topography Editor Styles
   =================================== */

.topography-editor {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.topo-map-container {
    width: 100%;
    height: 500px;
    border: 2px solid #e6e6e6;
    border-radius: 6px;
    background: #f9f9f9;
    position: relative;
}

/* Layers List */
.layers-list {
    padding: 1rem;
    background: white;
    border: 2px solid #9C27B0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.layers-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.layer-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.layer-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.layer-item.type-sloped {
    border: 2px dashed #FF9800;
    background: rgba(255, 152, 0, 0.1);
}

.layer-item.type-flat {
    border: 2px solid #2196F3;
    background: rgba(33, 150, 243, 0.1);
}

.layer-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.layer-item.selected {
    border-width: 3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.layer-item.type-sloped.selected {
    background: rgba(255, 152, 0, 0.2);
}

.layer-item.type-flat.selected {
    background: rgba(33, 150, 243, 0.2);
}

.layer-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.layer-name-display {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.layer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.layer-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.layer-name-input {
    min-width: 60px;
    max-width: 200px;
    width: auto;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: left;
}

.layer-name-input:focus {
    outline: none;
    border-color: #9C27B0;
}

.layer-edit-btn {
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.layer-edit-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.layer-delete-btn {
    padding: 0.25rem 0.5rem;
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.layer-delete-btn:hover {
    background: #c82333;
    border-color: #bd2130;
}

.add-layer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 60px;
    padding: 0.75rem;
    background: white;
    border: 2px dashed #9C27B0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #9C27B0;
    transition: all 0.2s;
}

.add-layer-btn:hover {
    background: rgba(156, 39, 176, 0.1);
    border-color: #7B1FA2;
    transform: scale(1.05);
}

.add-layer-menu {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: #f8f9fa;
    border: 2px solid #9C27B0;
    border-radius: 6px;
}

.add-layer-menu .tool-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.add-layer-menu .tool-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: translateY(-1px);
}

.add-layer-menu .tool-btn.active {
    background: #3B82F6;
    color: white;
    border-color: #2563EB;
}

/* Ground Cover Selector */
.ground-cover-selector {
    padding: 1rem;
    background: white;
    border: 2px solid #3B82F6;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ground-cover-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Relief Controls */
.relief-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 6px;
    min-width: 100px;
}

.relief-arrows {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.relief-arrow-btn {
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s;
}

.relief-arrow-btn:hover {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
    transform: scale(1.05);
}

.relief-arrow-btn:active {
    transform: scale(0.95);
}

.relief-input {
    width: 70px;
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.relief-input:focus {
    outline: none;
    border-color: #3B82F6;
}

.relief-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.ground-cover-options {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    flex: 1;
}

.ground-cover-options::-webkit-scrollbar {
    height: 8px;
}

.ground-cover-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ground-cover-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ground-cover-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.ground-cover-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    min-width: 120px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ground-cover-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ground-cover-btn.selected {
    border-width: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cover-icon {
    font-size: 2rem;
    line-height: 1;
}

.cover-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.cover-color {
    width: 60px;
    height: 8px;
    border-radius: 4px;
    margin-top: 0.2rem;
}

.ground-cover-placeholder {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 6px;
    color: #666;
}

.ground-cover-placeholder p {
    margin: 0;
    font-style: italic;
}

/* Editor Legend */
.editor-legend {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.legend-symbol {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Editor Tabs */
.editor-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e6e6e6;
}

.editor-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e6e6e6;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.editor-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.editor-tab.active {
    background: white;
    color: #3B82F6;
    border-color: #3B82F6;
    border-bottom-color: white;
    margin-bottom: -2px;
}

/* Objects Controls */
.objects-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Available Objects Section */
.available-objects-section {
    padding: 1rem;
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.available-objects-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

.available-objects-list::-webkit-scrollbar {
    height: 8px;
}

.available-objects-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.available-objects-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.available-objects-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.available-object-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    min-width: 100px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.available-object-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.object-icon-large {
    font-size: 2.5rem;
    line-height: 1;
}

.object-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Placed Objects Section */
.placed-objects-section {
    padding: 1rem;
    background: white;
    border: 2px solid #FF9800;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.placed-objects-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.placed-objects-list::-webkit-scrollbar {
    width: 8px;
}

.placed-objects-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.placed-objects-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.placed-objects-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.placed-object-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.placed-object-item:hover {
    background: #f8f9fa;
    border-color: #999;
}

.placed-object-item.selected {
    background: rgba(255, 152, 0, 0.1);
    border-color: #FF9800;
    border-width: 3px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.object-icon-small {
    font-size: 1.5rem;
    line-height: 1;
}

.object-name-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.object-delete-btn {
    padding: 0.25rem 0.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.object-delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.no-objects-placeholder {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 6px;
    color: #666;
}

.no-objects-placeholder p {
    margin: 0;
    font-style: italic;
}

/* Object Markers on Map */
.object-marker {
    background: transparent;
    border: none;
}

.object-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: white;
    border: 3px solid #4CAF50;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: move;
    transition: all 0.2s;
}

.object-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.object-icon.selected {
    border-color: #FF9800;
    border-width: 4px;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.5);
    transform: scale(1.2);
}

/* Objects Editor */
.objects-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.objects-map-container {
    width: 100%;
    height: 500px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Leaflet PM customization for topography editor */
.topography-editor .leaflet-pm-toolbar {
    display: none !important; /* We use our own toolbar */
}

/* Custom marker styles for topography */
.topography-editor .leaflet-interactive {
    cursor: pointer;
}

.topography-editor .leaflet-interactive:hover {
    filter: brightness(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-section {
        flex-direction: column;
        width: 100%;
    }
    
    .tool-btn {
        width: 100%;
        justify-content: center;
    }
    
    .toolbar-info {
        margin-left: 0;
        text-align: center;
    }
    
    .topo-map-container {
        height: 400px;
    }
    
    .ground-cover-btn {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .editor-legend {
        justify-content: center;
    }
}

/* Scene Editor Page Styles */
.scene-editor-container {
    max-width: 900px;
    padding: 2rem;
}
@media (max-width: 768px) {
	.scene-editor-container {
		padding: 1rem;
	}
	h1 {
		font-size: 1.5rem;
		line-height: 1.5rem;
	}
}

.scene-editor-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2rem;
}

.scene-back-btn {
    font-size: 1.5rem;
    text-decoration: none;
    color: #333;
    line-height: 1;
}

.scene-back-btn:hover {
    color: #3B82F6;
}

.scene-editor-header h1 {
    margin: 0;
}

.scene-save-btn {
    margin-left: auto;
    padding: 0.75rem 1.5rem;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.scene-save-btn:hover:not(:disabled) {
    background: #2563EB;
}

.scene-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scene-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
}

.scene-message.success {
    background: #d4edda;
    color: #155724;
}

.scene-message.error {
    background: #f8d7da;
    color: #721c24;
}

.scene-tabs {
    margin-top: 2rem;
}

.scene-tab-buttons {
    display: flex;
    gap: 0;
}

.scene-tab-btn {
    padding: 0.5rem 0.85rem;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

.scene-tab-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.scene-tab-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.scene-tab-btn:not(:last-child) {
    border-right: none;
}

.scene-tab-btn:hover {
    background: #f5f5f5;
}

.scene-tab-btn.active {
    background: #333;
    color: #fff;
}

.scene-tab-content {
    border: 1px solid #e6e6e6;
    padding: 1rem;
    border-radius: 4px;
}

.scene-tab-content h3 {
    margin-top: 0;
}

.scene-tab-content p {
    color: #666;
}

/* 3D Scene Viewer Styles */
.scene-viewer-3d {
    position: relative;
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.viewer-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.wireframe-toggle-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.wireframe-toggle-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.viewer-3d-container {
    width: 100%;
    height: 100%;
}

.scene-placeholder {
    padding: 0.5rem;
    border: 1px dashed #ddd;
    background: #fafafa;
    color: #444;
}

.viewer-3d-container {
    width: 100%;
    height: 420px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-container {
    text-align: center;
    padding: 3rem;
}

.error-container {
    padding: 2rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
}

.no-project-container {
    padding: 2rem;
    text-align: center;
}