/* ============================================
   FEEDBACK MAPS PRO - UNIFIED STYLES
   Professional Modern Tech Design
   Simple • Elegant • Refined

   All styles consolidated in one file:
   - Design System Variables
   - Frontend Map Interface
   - Admin Dashboard
   - Image Overlays Management
   ============================================ */

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

/* ============================================
   DESIGN SYSTEM - CSS VARIABLES
   ============================================ */

:root {
    /* Neutral Palette */
    --fm-white: #ffffff;
    --fm-gray-25: #fcfcfd;
    --fm-gray-50: #f9fafb;
    --fm-gray-100: #f3f4f6;
    --fm-gray-200: #e5e7eb;
    --fm-gray-300: #d1d5db;
    --fm-gray-400: #9ca3af;
    --fm-gray-500: #6b7280;
    --fm-gray-600: #4b5563;
    --fm-gray-700: #374151;
    --fm-gray-800: #1f2937;
    --fm-gray-900: #111827;

    /* Primary Accent - Violet */
    --fm-primary: #7c3aed;
    --fm-primary-light: #8b5cf6;
    --fm-primary-dark: #6d28d9;
    --fm-primary-50: #f5f3ff;
    --fm-primary-100: #ede9fe;

    /* Semantic Colors */
    --fm-positive: #059669;
    --fm-positive-light: #10b981;
    --fm-positive-bg: #ecfdf5;
    --fm-negative: #dc2626;
    --fm-negative-light: #ef4444;
    --fm-negative-bg: #fef2f2;
    --fm-idea: #d97706;
    --fm-idea-light: #f59e0b;
    --fm-idea-bg: #fffbeb;
    --fm-info: #7c3aed;
    --fm-info-bg: #f5f3ff;

    /* Shadows */
    --fm-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --fm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --fm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --fm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --fm-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Borders */
    --fm-border: #e5e7eb;
    --fm-border-light: #f3f4f6;

    /* Transitions */
    --fm-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --fm-radius-sm: 6px;
    --fm-radius-md: 8px;
    --fm-radius-lg: 12px;
    --fm-radius-xl: 16px;
}

/* Base Font */
.feedback-map,
.feedback-map *:not(.dashicons):not([class*="dashicons-"]),
.fm-dashboard,
.fm-dashboard *:not(.dashicons):not([class*="dashicons-"]),
.fm-overlays-page,
.fm-overlays-page *:not(.dashicons):not([class*="dashicons-"]) {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

/* Ensure dashicons render correctly */
.feedback-map .dashicons,
.fm-dashboard .dashicons,
.fm-overlays-page .dashicons {
    font-family: dashicons !important;
}


/* ============================================
   ============================================
   PART 1: FRONTEND MAP INTERFACE
   ============================================
   ============================================ */

/* ============================================
   MAP CONTAINER
   ============================================ */

.feedback-map {
    width: 100%;
    height: 100vh;
    position: relative;
    isolation: isolate;
    background: var(--fm-gray-100);
}

/* ============================================
   SIDEBAR
   ============================================ */

.fm-sidebar {
    position: absolute;
    top: 80px; /* Below Leaflet zoom controls */
    left: 12px;
    width: 320px;
    max-height: calc(100vh - 100px);
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-lg);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--fm-transition-slow), box-shadow var(--fm-transition);
    border: 1px solid var(--fm-gray-200);
}

.fm-sidebar:hover {
    box-shadow: var(--fm-shadow-xl);
}

.fm-sidebar.minimized {
    width: 48px;
    border-radius: var(--fm-radius-lg);
}

.fm-sidebar.minimized .fm-sidebar-content {
    display: none;
}

.fm-sidebar.minimized .fm-sidebar-header-text {
    display: none;
}

/* Sidebar Header */
.fm-sidebar-header {
    padding: 16px 18px;
    background: var(--fm-primary);
    color: var(--fm-white);
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.fm-sidebar.minimized .fm-sidebar-header {
    padding: 0;
    background: var(--fm-white);
    justify-content: center;
}

.fm-sidebar-header-text {
    flex: 1;
    min-width: 0;
}

.fm-sidebar-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.fm-sidebar-header p {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.6;
    font-weight: 400;
    line-height: 1.35;
}

/* Sidebar Toggle Button - Minimal & Elegant */
.fm-sidebar-toggle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fm-transition);
    padding: 0;
    outline: none;
    flex-shrink: 0;
}

.fm-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--fm-white);
}

.fm-sidebar-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.fm-sidebar.minimized .fm-sidebar-toggle {
    width: 48px;
    height: 48px;
    background: transparent;
    color: var(--fm-gray-500);
    border-radius: var(--fm-radius-lg);
}

.fm-sidebar.minimized .fm-sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.fm-sidebar.minimized .fm-sidebar-toggle:hover {
    background: var(--fm-gray-100);
    color: var(--fm-gray-700);
}

/* Sidebar Content */
.fm-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

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

.fm-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.fm-sidebar-content::-webkit-scrollbar-thumb {
    background: var(--fm-gray-200);
    border-radius: 2px;
}

.fm-sidebar-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--fm-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px 0;
}

/* ============================================
   CATEGORY FILTERS
   ============================================ */

div[class$="-category-filters"] {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-category-filter {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--fm-white);
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    transition: all var(--fm-transition);
    position: relative;
}

.fm-category-filter:hover {
    border-color: var(--fm-gray-300);
    background: var(--fm-gray-50);
}

/* Active state - full opacity, subtle highlight */
.fm-category-filter.active {
    background: var(--fm-white);
    border-color: var(--fm-gray-300);
}

/* Inactive state - muted appearance */
.fm-category-filter:not(.active) {
    background: var(--fm-gray-50);
    border-color: transparent;
}

.fm-category-filter:not(.active) .fm-category-icon {
    opacity: 0.5;
}

.fm-category-filter:not(.active) .fm-category-name {
    color: var(--fm-gray-500);
}

.fm-category-filter:not(.active) .fm-category-count {
    color: var(--fm-gray-400);
}

.fm-category-filter:not(.active):hover {
    background: var(--fm-gray-100);
    border-color: var(--fm-gray-200);
}

.fm-category-filter:not(.active):hover .fm-category-icon {
    opacity: 0.7;
}

.fm-category-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--fm-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    transition: opacity var(--fm-transition);
}

.fm-category-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.fm-category-info {
    flex: 1;
    min-width: 0;
}

.fm-category-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-gray-800);
    transition: color var(--fm-transition);
}

.fm-category-count {
    font-size: 11px;
    color: var(--fm-gray-400);
    margin-top: 2px;
    transition: color var(--fm-transition);
}

/* Toggle indicator - elegant pill switch */
.fm-category-toggle {
    width: 36px;
    height: 20px;
    background: var(--fm-gray-200);
    border-radius: 10px;
    position: relative;
    flex-shrink: 0;
    transition: background var(--fm-transition);
}

.fm-category-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--fm-white);
    border-radius: 50%;
    transition: transform var(--fm-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fm-category-filter.active .fm-category-toggle {
    background: var(--fm-primary);
}

.fm-category-filter.active .fm-category-toggle::after {
    transform: translateX(16px);
}

/* ============================================
   PIN ICONS
   ============================================ */

.custom-pin-marker {
    background: transparent;
    border: none;
}

.fm-pin-icon {
    width: 36px;
    height: 47px;
    position: relative;
    cursor: pointer;
    transition: transform var(--fm-transition), filter var(--fm-transition);
}

.fm-pin-icon:hover {
    transform: scale(1.15) translateY(-3px);
    filter: brightness(1.05);
}

.fm-pin-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ============================================
   ADD PIN BUTTON (FAB)
   ============================================ */

.fm-fab {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 18px;
    background: var(--fm-primary);
    border: none;
    border-radius: var(--fm-radius-md);
    color: var(--fm-white);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--fm-shadow-md);
    z-index: 1000;
    transition: all var(--fm-transition);
    font-family: inherit;
    letter-spacing: -0.01em;
}

.fm-fab:hover {
    background: var(--fm-primary-dark);
    box-shadow: var(--fm-shadow-lg);
    transform: translateY(-1px);
}

.fm-fab:active {
    transform: translateY(0);
}

/* Active/Cancel state - refined circular button */
.fm-fab.active {
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--fm-white);
    color: var(--fm-gray-500);
    border: 1px solid var(--fm-gray-200);
    box-shadow: var(--fm-shadow-md);
    gap: 0;
    justify-content: center;
}

.fm-fab.active:hover {
    background: var(--fm-gray-50);
    color: var(--fm-gray-700);
    border-color: var(--fm-gray-300);
}

.fm-fab.active svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.fm-fab .dashicons,
.fm-fab svg {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.fm-fab-label {
    font-weight: 500;
}

/* ============================================
   VIEW TOGGLE
   ============================================ */

.fm-view-toggle,
button.fm-view-toggle,
.feedback-map .fm-view-toggle {
    position: absolute !important;
    bottom: 20px !important;
    right: 20px !important;
    padding: 10px 18px !important;
    background: #7c3aed !important;
    background-image: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.fm-view-toggle:hover,
button.fm-view-toggle:hover,
.feedback-map .fm-view-toggle:hover {
    background: #6d28d9 !important;
    background-image: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4) !important;
    transform: translateY(-1px) !important;
}

.fm-view-toggle:active,
button.fm-view-toggle:active {
    transform: translateY(0) !important;
}

/* ============================================
   MODAL
   ============================================ */

.fm-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--fm-transition-slow);
}

.fm-modal.active {
    opacity: 1;
}

.fm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
}

.fm-modal-content {
    position: relative;
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--fm-shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fm-modal-header {
    padding: 20px 24px;
    background: var(--fm-primary);
    color: var(--fm-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fm-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Modal Close Button - Override WordPress */
.fm-modal .fm-modal-close,
.fm-modal-close,
button.fm-modal-close {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    background-image: none !important;
    border: none !important;
    border-radius: var(--fm-radius-sm) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background var(--fm-transition) !important;
    padding: 0 !important;
    color: var(--fm-white) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
}

.fm-modal .fm-modal-close:hover,
.fm-modal-close:hover,
button.fm-modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: var(--fm-white) !important;
}

.fm-modal .fm-modal-close:focus,
.fm-modal-close:focus,
button.fm-modal-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
    border: none !important;
}

.fm-modal-close svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
}

.fm-modal-body {
    padding: 24px;
    max-height: calc(90vh - 72px);
    overflow-y: auto;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.fm-pin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-gray-700);
}

.form-label .required {
    color: var(--fm-negative);
    margin-left: 2px;
}

.form-label .optional {
    color: var(--fm-gray-400);
    font-weight: 400;
    margin-left: 4px;
}

/* Form Inputs - Override WordPress */
.fm-modal .form-input,
.fm-modal .form-textarea,
.fm-pin-form .form-input,
.fm-pin-form .form-textarea,
.feedback-map .form-input,
.feedback-map .form-textarea,
input.form-input,
textarea.form-textarea {
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    border: 1px solid var(--fm-gray-200) !important;
    border-radius: var(--fm-radius-md) !important;
    outline: none !important;
    transition: border-color var(--fm-transition), box-shadow var(--fm-transition) !important;
    font-family: inherit !important;
    background: var(--fm-white) !important;
    background-image: none !important;
    color: var(--fm-gray-900) !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.fm-modal .form-input::placeholder,
.fm-modal .form-textarea::placeholder,
.fm-pin-form .form-input::placeholder,
.fm-pin-form .form-textarea::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--fm-gray-400) !important;
    opacity: 1 !important;
}

.fm-modal .form-input:hover,
.fm-modal .form-textarea:hover,
.fm-pin-form .form-input:hover,
.fm-pin-form .form-textarea:hover,
.form-input:hover,
.form-textarea:hover {
    border-color: var(--fm-gray-300) !important;
}

.fm-modal .form-input:focus,
.fm-modal .form-textarea:focus,
.fm-pin-form .form-input:focus,
.fm-pin-form .form-textarea:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: var(--fm-primary) !important;
    box-shadow: 0 0 0 3px var(--fm-primary-50) !important;
    outline: none !important;
}

.fm-modal .form-textarea,
.fm-pin-form .form-textarea,
textarea.form-textarea {
    resize: vertical !important;
    min-height: 80px !important;
    line-height: 1.5 !important;
}

/* ============================================
   CATEGORY GRID (Modal)
   ============================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.category-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Category Label - Override WordPress */
.fm-modal .category-label,
.fm-pin-form .category-label,
.category-option .category-label,
.category-label {
    padding: 16px 10px !important;
    background: var(--fm-gray-50) !important;
    background-image: none !important;
    border: 2px solid transparent !important;
    border-radius: var(--fm-radius-md) !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    transition: all var(--fm-transition) !important;
    box-shadow: none !important;
}

.fm-modal .category-label:hover,
.fm-pin-form .category-label:hover,
.category-option .category-label:hover,
.category-label:hover {
    background: var(--fm-gray-100) !important;
    border-color: var(--fm-gray-200) !important;
}

/* Selected Category - show ring around the card */
.fm-modal .category-radio:checked + .category-label,
.fm-pin-form .category-radio:checked + .category-label,
.category-radio:checked + .category-label {
    background: var(--fm-white) !important;
    border-color: var(--fm-primary) !important;
    box-shadow: var(--fm-shadow-sm) !important;
}

.fm-modal .category-radio:focus + .category-label,
.fm-pin-form .category-radio:focus + .category-label,
.category-radio:focus + .category-label {
    outline: 2px solid var(--fm-primary) !important;
    outline-offset: 2px !important;
}

.category-label .category-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--fm-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.category-label .category-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.category-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--fm-gray-600);
    text-align: center;
}

/* ============================================
   FORM ROW
   ============================================ */

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

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--fm-gray-100);
    margin-top: 4px;
}

/* Cancel / Secondary Button - Override WordPress */
.fm-modal .btn-secondary,
.fm-modal .btn-cancel,
.fm-pin-form .btn-secondary,
.fm-pin-form .btn-cancel,
.feedback-map .btn-secondary,
.feedback-map .btn-cancel,
button.btn-secondary,
button.btn-cancel {
    flex: 1 !important;
    padding: 12px 18px !important;
    background: var(--fm-white) !important;
    background-image: none !important;
    border: 1px solid var(--fm-gray-200) !important;
    border-radius: var(--fm-radius-md) !important;
    color: var(--fm-gray-600) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all var(--fm-transition) !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1.4 !important;
}

.fm-modal .btn-secondary:hover,
.fm-modal .btn-cancel:hover,
.fm-pin-form .btn-secondary:hover,
.fm-pin-form .btn-cancel:hover,
.feedback-map .btn-secondary:hover,
.feedback-map .btn-cancel:hover,
button.btn-secondary:hover,
button.btn-cancel:hover {
    background: var(--fm-gray-50) !important;
    border-color: var(--fm-gray-300) !important;
    color: var(--fm-gray-700) !important;
}

/* Submit / Primary Button - Override WordPress */
.fm-modal .btn-primary,
.fm-modal .btn-submit,
.fm-pin-form .btn-primary,
.fm-pin-form .btn-submit,
.feedback-map .btn-primary,
.feedback-map .btn-submit,
button.btn-primary,
button.btn-submit {
    flex: 1.2 !important;
    padding: 12px 18px !important;
    background: var(--fm-primary) !important;
    background-image: none !important;
    border: none !important;
    border-radius: var(--fm-radius-md) !important;
    color: var(--fm-white) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all var(--fm-transition) !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1.4 !important;
}

.fm-modal .btn-primary:hover,
.fm-modal .btn-submit:hover,
.fm-pin-form .btn-primary:hover,
.fm-pin-form .btn-submit:hover,
.feedback-map .btn-primary:hover,
.feedback-map .btn-submit:hover,
button.btn-primary:hover,
button.btn-submit:hover {
    background: var(--fm-primary-dark) !important;
}

.fm-modal .btn-primary:disabled,
.fm-modal .btn-submit:disabled,
.fm-pin-form .btn-primary:disabled,
.fm-pin-form .btn-submit:disabled,
button.btn-primary:disabled,
button.btn-submit:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Loading State */
.btn-primary.loading,
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-loader {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
    opacity: 0;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
}

.btn-primary.loading .btn-loader,
.btn-submit.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   PIN POPUP
   ============================================ */

.leaflet-popup-content-wrapper {
    border-radius: var(--fm-radius-lg) !important;
    padding: 0 !important;
    box-shadow: var(--fm-shadow-xl) !important;
    border: 1px solid var(--fm-border-light) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 260px;
    max-width: 300px;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

.pin-popup-content {
    padding: 0;
}

.pin-popup-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--fm-radius-lg) var(--fm-radius-lg) 0 0;
}

.pin-popup-body {
    padding: 16px 18px;
}

.pin-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.pin-popup-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-gray-900);
    margin: 0;
    flex: 1;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.pin-popup-category {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--fm-white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.pin-popup-content-text {
    font-size: 13px;
    color: var(--fm-gray-500);
    line-height: 1.55;
    margin-bottom: 14px;
}

/* ============================================
   VOTE BUTTON
   ============================================ */

.pin-popup-actions {
    margin-top: 14px;
}

.pin-popup-vote {
    width: 100%;
    padding: 12px 14px;
    background: var(--fm-gray-50);
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--fm-transition);
    font-family: inherit;
}

.pin-popup-vote:hover:not(.voted):not(:disabled) {
    background: var(--fm-gray-100);
    border-color: var(--fm-gray-300);
}

.pin-popup-vote.voted,
.pin-popup-vote:disabled {
    background: var(--fm-primary);
    border-color: var(--fm-primary);
    cursor: default;
}

.pin-popup-vote svg {
    width: 16px;
    height: 16px;
    fill: var(--fm-gray-500);
}

.pin-popup-vote.voted svg,
.pin-popup-vote:disabled svg {
    fill: var(--fm-white);
}

.vote-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-gray-800);
}

.pin-popup-vote.voted .vote-count,
.pin-popup-vote:disabled .vote-count {
    color: var(--fm-white);
}

.vote-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-gray-500);
}

.pin-popup-vote.voted .vote-label,
.pin-popup-vote:disabled .vote-label {
    color: rgba(255, 255, 255, 0.8);
}

.pin-popup-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--fm-gray-100);
    font-size: 11px;
    color: var(--fm-gray-400);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.fm-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 14px 18px;
    background: var(--fm-primary);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-white);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--fm-shadow-xl);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 420px;
}

.fm-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fm-notification-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--fm-radius-sm);
}

.fm-notification-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--fm-white);
}

/* Success notification - minimal elegant style */
.fm-notification-success {
    background: var(--fm-positive);
    color: var(--fm-white);
    border: none;
}

.fm-notification-success .fm-notification-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}

.fm-notification-success .fm-notification-icon svg {
    width: 12px;
    height: 12px;
    fill: var(--fm-white);
}

/* Error notification - minimal elegant style */
.fm-notification-error {
    background: var(--fm-negative);
    color: var(--fm-white);
    border: none;
}

.fm-notification-error .fm-notification-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}

.fm-notification-error .fm-notification-icon svg {
    width: 12px;
    height: 12px;
    fill: var(--fm-white);
}

/* Info notification - dark style (default) */
.fm-notification-info .fm-notification-icon {
    background: rgba(255, 255, 255, 0.15);
}

.fm-notification-info .fm-notification-icon svg {
    fill: var(--fm-white);
}

/* Instruction notification - with pulsing indicator */
.fm-notification-instruction {
    background: var(--fm-primary);
    color: var(--fm-white);
}

.fm-notification-instruction .fm-notification-icon {
    background: transparent;
    position: relative;
}

.fm-notification-instruction .fm-notification-icon::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--fm-primary);
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

.fm-notification-instruction .fm-notification-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--fm-primary-light);
    border-radius: 50%;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.fm-notification-message {
    flex: 1;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.fm-notification-close {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
    flex-shrink: 0;
    transition: all var(--fm-transition);
    margin-left: 4px;
}

.fm-notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--fm-white);
}

/* Colored notification close button */
.fm-notification-success .fm-notification-close,
.fm-notification-error .fm-notification-close {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.fm-notification-success .fm-notification-close:hover,
.fm-notification-error .fm-notification-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--fm-white);
}

/* ============================================
   WELCOME POPUP - Centered on map with blur
   ============================================ */

/* Blur overlay - contained within map */
.fm-welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fm-welcome-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Centered popup */
.fm-welcome-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.fm-welcome-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.fm-welcome-content {
    background: var(--fm-white);
    border-radius: var(--fm-radius-lg);
    padding: 24px 28px;
    width: 300px;
    max-width: calc(100vw - 48px);
    text-align: center;
    box-shadow: var(--fm-shadow-xl);
    border: 1px solid var(--fm-gray-100);
}

.fm-welcome-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--fm-primary) 0%, var(--fm-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.fm-welcome-icon svg {
    width: 24px;
    height: 24px;
    color: var(--fm-white);
    stroke: var(--fm-white);
}

.fm-welcome-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--fm-gray-900);
    line-height: 1.3;
}

.fm-welcome-text {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--fm-gray-500);
    line-height: 1.5;
}

.fm-welcome-steps {
    text-align: left;
    margin: 0 0 18px;
    padding: 0 0 0 22px;
    list-style: decimal;
}

.fm-welcome-steps li {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--fm-gray-600);
    line-height: 1.5;
}

.fm-welcome-steps li:last-child {
    margin-bottom: 0;
}

.fm-welcome-steps strong {
    color: var(--fm-primary);
    font-weight: 600;
}

.fm-welcome-btn,
button.fm-welcome-btn,
.fm-welcome-popup .fm-welcome-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 12px 24px !important;
    background: #7c3aed !important;
    background-image: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.fm-welcome-btn:hover,
button.fm-welcome-btn:hover,
.fm-welcome-popup .fm-welcome-btn:hover {
    background: #6d28d9 !important;
    background-image: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4) !important;
    color: #ffffff !important;
    border: none !important;
}

.fm-welcome-btn:active,
button.fm-welcome-btn:active {
    transform: translateY(0) !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .fm-welcome-content {
        padding: 20px 22px;
        width: 280px;
    }

    .fm-welcome-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 14px;
    }

    .fm-welcome-icon svg {
        width: 22px;
        height: 22px;
    }

    .fm-welcome-title {
        font-size: 16px;
    }

    .fm-welcome-text {
        font-size: 13px;
    }

    .fm-welcome-steps li {
        font-size: 13px;
    }

    .fm-welcome-btn,
    button.fm-welcome-btn,
    .fm-welcome-popup .fm-welcome-btn {
        padding: 11px 20px !important;
        font-size: 14px !important;
    }
}

/* ============================================
   DRAG CURSOR
   ============================================ */

.fm-dragging-cursor {
    cursor: crosshair !important;
}

.fm-dragging-cursor * {
    cursor: crosshair !important;
}

/* Dashicons Sizing */
.feedback-map .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.fm-fab .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}


/* ============================================
   ============================================
   PART 2: ADMIN DASHBOARD
   ============================================
   ============================================ */

/* ============================================
   BASE STYLES
   ============================================ */

.fm-dashboard {
    background: var(--fm-gray-50);
    margin: -20px -20px 0 -22px;
    padding: 40px;
    min-height: 100vh;
}

/* Dashboard Header */
.fm-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.fm-dashboard-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--fm-gray-900);
    letter-spacing: -0.025em;
}

.fm-dashboard-title .dashicons,
.fm-dashboard-title .fm-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--fm-gray-400);
}

.fm-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--fm-radius-md);
    text-decoration: none;
    transition: all var(--fm-transition);
    background: var(--fm-white);
    color: var(--fm-gray-600);
    border: 1px solid var(--fm-gray-200);
    cursor: pointer;
}

.fm-action-btn:hover {
    background: var(--fm-primary-50);
    border-color: var(--fm-primary);
    color: var(--fm-primary);
}

.fm-action-btn .fm-icon {
    width: 16px;
    height: 16px;
}

/* Legacy support for page-title-action class */
.fm-dashboard-title .page-title-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--fm-radius-md);
    text-decoration: none;
    transition: all var(--fm-transition);
    background: var(--fm-white);
    color: var(--fm-gray-600);
    border: 1px solid var(--fm-gray-200);
    margin-left: auto;
}

.fm-dashboard-title .page-title-action:hover {
    background: var(--fm-gray-50);
    border-color: var(--fm-gray-300);
    color: var(--fm-gray-800);
}

.fm-dashboard-title .page-title-action .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: inherit;
}

/* ============================================
   STATS GRID
   ============================================ */

.fm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fm-stat-card {
    background: var(--fm-white);
    padding: 20px 24px;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow var(--fm-transition);
    border: 1px solid var(--fm-gray-100);
}

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

.fm-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--fm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fm-stat-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: var(--fm-white);
}

.fm-stat-icon .fm-icon,
.fm-stat-icon .fm-icon svg {
    width: 22px;
    height: 22px;
    color: var(--fm-white);
    fill: currentColor;
}

.fm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.fm-stat-content {
    flex: 1;
    min-width: 0;
}

.fm-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--fm-gray-900);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.fm-stat-label {
    font-size: 12px;
    color: var(--fm-gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================
   FILTERS
   ============================================ */

.fm-dashboard-filters {
    background: var(--fm-white);
    padding: 16px 20px;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid var(--fm-gray-100);
}

.fm-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-filter-group label {
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-gray-500);
    white-space: nowrap;
}

.fm-filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    font-size: 13px;
    min-width: 140px;
    background: var(--fm-white);
    color: var(--fm-gray-800);
    font-weight: 500;
    transition: all var(--fm-transition);
    font-family: inherit;
    cursor: pointer;
}

.fm-filter-group select:hover {
    border-color: var(--fm-gray-300);
}

.fm-filter-group select:focus {
    outline: none;
    border-color: var(--fm-gray-400);
    box-shadow: 0 0 0 3px var(--fm-gray-100);
}

.fm-dashboard-filters .button-primary {
    padding: 8px 16px;
    background: var(--fm-primary);
    border: none;
    border-radius: var(--fm-radius-md);
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-white);
    transition: all var(--fm-transition);
    cursor: pointer;
}

.fm-dashboard-filters .button-primary:hover {
    background: var(--fm-primary-dark);
}

/* ============================================
   BULK ACTIONS
   ============================================ */

.fm-bulk-actions {
    background: var(--fm-white);
    padding: 14px 20px;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--fm-gray-100);
}

.fm-bulk-actions select {
    padding: 8px 12px;
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    font-size: 13px;
    font-weight: 500;
    background: var(--fm-white);
    color: var(--fm-gray-800);
    transition: all var(--fm-transition);
    font-family: inherit;
    cursor: pointer;
}

.fm-bulk-actions select:focus {
    outline: none;
    border-color: var(--fm-gray-400);
    box-shadow: 0 0 0 3px var(--fm-gray-100);
}

.fm-bulk-actions .button {
    padding: 8px 14px;
    border-radius: var(--fm-radius-md);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid var(--fm-gray-200);
    background: var(--fm-white);
    color: var(--fm-gray-600);
    cursor: pointer;
    transition: all var(--fm-transition);
}

.fm-bulk-actions .button:hover {
    background: var(--fm-gray-50);
    border-color: var(--fm-gray-300);
}

.fm-selected-count {
    font-size: 13px;
    color: var(--fm-gray-500);
    font-weight: 500;
    margin-left: auto;
}

/* ============================================
   TABLE STYLES
   ============================================ */

.fm-pins-table {
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    overflow: hidden;
    border: 1px solid var(--fm-gray-100);
    margin: 0 !important;
}

.fm-pins-table thead {
    background: var(--fm-gray-50);
}

.fm-pins-table th {
    padding: 14px 20px !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fm-gray-500) !important;
    border-bottom: 1px solid var(--fm-gray-200) !important;
    background: transparent !important;
}

.fm-pins-table td {
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--fm-gray-100) !important;
    color: var(--fm-gray-800);
    font-size: 14px;
    vertical-align: middle;
}

.fm-pins-table tbody tr {
    transition: background-color var(--fm-transition);
}

.fm-pins-table tbody tr:hover {
    background: var(--fm-gray-50);
}

.fm-pins-table tbody tr:last-child td {
    border-bottom: none !important;
}

.fm-pins-table .check-column {
    padding-left: 16px !important;
    width: 40px;
}

.fm-pins-table .check-column input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.fm-pins-table .row-actions {
    margin-top: 4px;
    opacity: 0;
    transition: opacity var(--fm-transition);
}

.fm-pins-table tbody tr:hover .row-actions {
    opacity: 1;
}

.fm-pins-table .row-actions a {
    color: var(--fm-gray-500);
    font-size: 12px;
    text-decoration: none;
    transition: color var(--fm-transition);
}

.fm-pins-table .row-actions a:hover {
    color: var(--fm-gray-900);
}

.fm-pins-table .fm-delete-pin {
    color: var(--fm-negative) !important;
}

.fm-pins-table .fm-delete-pin:hover {
    color: var(--fm-negative-light) !important;
}

/* Table Column Widths */
.fm-pins-table .column-title {
    min-width: 200px;
}

.fm-pins-table .column-category {
    width: 120px;
}

.fm-pins-table .column-status {
    width: 120px;
}

.fm-pins-table .column-votes {
    width: 80px;
    text-align: center;
}

.fm-pins-table .column-date {
    width: 140px;
}

.fm-pins-table .pin-title {
    font-weight: 500;
    color: var(--fm-gray-900);
}

.fm-pins-table .pin-author {
    font-size: 12px;
    color: var(--fm-gray-500);
    margin-top: 2px;
}

.fm-pins-table .dashicons-location {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--fm-gray-300);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.fm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fm-status-pending {
    background: var(--fm-idea-bg);
    color: var(--fm-idea);
}

.fm-status-approved {
    background: var(--fm-positive-bg);
    color: var(--fm-positive);
}

.fm-status-rejected {
    background: var(--fm-negative-bg);
    color: var(--fm-negative);
}

.fm-status-resolved {
    background: var(--fm-info-bg);
    color: var(--fm-info);
}

.fm-status-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Source Badges */
.fm-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
}

.fm-source-badge .fm-icon svg {
    width: 12px;
    height: 12px;
}

.fm-source-map {
    background: var(--fm-primary-100);
    color: var(--fm-primary);
}

.fm-source-form {
    background: #dbeafe;
    color: #2563eb;
}

.fm-status-change {
    padding: 6px 10px;
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    font-size: 12px;
    font-weight: 500;
    background: var(--fm-white);
    color: var(--fm-gray-800);
    transition: all var(--fm-transition);
    cursor: pointer;
    font-family: inherit;
}

.fm-status-change:focus {
    outline: none;
    border-color: var(--fm-gray-400);
    box-shadow: 0 0 0 3px var(--fm-gray-100);
}

/* ============================================
   SENTIMENT BADGES
   ============================================ */

.fm-sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.fm-sentiment-positive {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.fm-sentiment-negative {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.fm-sentiment-neutral {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
}

.fm-sentiment-none {
    color: var(--fm-gray-400);
}

/* Topic Tags */
.fm-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fm-topic-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--fm-gray-100);
    color: var(--fm-gray-600);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 500;
}

.fm-topic-large {
    padding: 6px 12px;
    margin: 4px;
    background: var(--fm-primary-50);
    color: var(--fm-primary);
}

.fm-topics-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 10px;
}

/* Category Badges */
.fm-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fm-category-positive {
    background: var(--fm-positive-bg);
    color: var(--fm-positive);
}

.fm-category-negative {
    background: var(--fm-negative-bg);
    color: var(--fm-negative);
}

.fm-category-idea {
    background: var(--fm-idea-bg);
    color: var(--fm-idea);
}

/* ============================================
   ANALYTICS PAGE
   ============================================ */

.fm-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.fm-analytics-card {
    background: var(--fm-white);
    padding: 24px;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    border: 1px solid var(--fm-gray-100);
}

.fm-analytics-card.fm-analytics-wide {
    grid-column: 1 / -1;
}

.fm-analytics-card h2 {
    margin: 0 0 20px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-gray-900);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-analytics-card h2 .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--fm-gray-400);
}

.fm-analytics-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fm-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--fm-gray-100);
}

.fm-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fm-stat-row:first-child {
    padding-top: 0;
}

.fm-stat-row .fm-stat-label {
    font-size: 13px;
    color: var(--fm-gray-600);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-stat-row .fm-stat-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--fm-gray-400);
}

.fm-stat-row .fm-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-gray-900);
}

/* ============================================
   AI INSIGHTS SECTION
   ============================================ */

.fm-ai-insights-section {
    margin-bottom: 32px;
}

.fm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--fm-gray-900);
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

.fm-section-title .fm-icon svg {
    width: 20px;
    height: 20px;
    color: var(--fm-idea);
}

/* Smart Suggestions Cards */
.fm-insights-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.fm-suggestion-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: var(--fm-white);
    border-radius: var(--fm-radius-lg);
    border: 1px solid var(--fm-gray-100);
    box-shadow: var(--fm-shadow-xs);
    transition: all var(--fm-transition);
}

.fm-suggestion-card:hover {
    box-shadow: var(--fm-shadow-sm);
}

.fm-suggestion-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--fm-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-suggestion-icon .fm-icon svg {
    width: 18px;
    height: 18px;
}

.fm-suggestion-content h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-gray-900);
}

.fm-suggestion-content p {
    margin: 0;
    font-size: 12px;
    color: var(--fm-gray-500);
    line-height: 1.5;
}

/* Suggestion Types */
.fm-suggestion-urgent .fm-suggestion-icon {
    background: var(--fm-negative-bg);
    color: var(--fm-negative);
}

.fm-suggestion-attention .fm-suggestion-icon {
    background: var(--fm-idea-bg);
    color: var(--fm-idea);
}

.fm-suggestion-success .fm-suggestion-icon {
    background: var(--fm-positive-bg);
    color: var(--fm-positive);
}

.fm-suggestion-info .fm-suggestion-icon {
    background: var(--fm-info-bg);
    color: var(--fm-info);
}

/* Insights Grid */
.fm-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.fm-insights-card {
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    border: 1px solid var(--fm-gray-100);
    box-shadow: var(--fm-shadow-xs);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.fm-insights-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-gray-900);
}

.fm-insights-card h3 .fm-icon svg {
    width: 16px;
    height: 16px;
}

.fm-insights-subtitle {
    margin: 0 0 16px 0;
    font-size: 12px;
    color: var(--fm-gray-400);
}

/* Priority Card */
.fm-insights-priority h3 .fm-icon svg {
    color: var(--fm-negative);
}

/* Highlights Card */
.fm-insights-highlights h3 .fm-icon svg {
    color: var(--fm-idea);
}

/* Topics Card */
.fm-insights-topics h3 .fm-icon svg {
    color: var(--fm-primary);
}

/* Insight Items List */
.fm-insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.fm-insight-item {
    padding: 12px 14px;
    border-radius: var(--fm-radius-md);
    border-left: 3px solid;
}

.fm-insight-negative {
    background: rgba(239, 68, 68, 0.04);
    border-left-color: var(--fm-negative);
}

.fm-insight-positive {
    background: rgba(16, 185, 129, 0.04);
    border-left-color: var(--fm-positive);
}

.fm-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.fm-insight-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-gray-800);
    text-decoration: none;
    line-height: 1.35;
    flex: 1;
}

.fm-insight-title:hover {
    color: var(--fm-primary);
}

.fm-insight-score {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}

.fm-insight-negative .fm-insight-score {
    background: var(--fm-negative-bg);
    color: var(--fm-negative);
}

.fm-insight-positive .fm-insight-score {
    background: var(--fm-positive-bg);
    color: var(--fm-positive);
}

.fm-insight-summary {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--fm-gray-500);
    line-height: 1.5;
}

.fm-insight-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--fm-gray-400);
}

.fm-insight-meta .fm-status-badge {
    padding: 2px 8px;
    font-size: 10px;
}

.fm-insight-meta .fm-icon svg {
    width: 12px;
    height: 12px;
}

/* Topic Sentiment Bars */
.fm-topic-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-topic-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-topic-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fm-topic-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--fm-gray-800);
}

.fm-topic-count {
    font-size: 11px;
    color: var(--fm-gray-400);
}

.fm-topic-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--fm-gray-100);
}

.fm-bar-segment {
    height: 100%;
    min-width: 0;
    transition: width var(--fm-transition);
}

.fm-bar-positive {
    background: var(--fm-positive-light);
}

.fm-bar-neutral {
    background: var(--fm-gray-300);
}

.fm-bar-negative {
    background: var(--fm-negative-light);
}

.fm-topic-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--fm-gray-100);
    font-size: 11px;
    color: var(--fm-gray-500);
}

.fm-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.fm-dot-positive {
    background: var(--fm-positive-light);
}

.fm-dot-neutral {
    background: var(--fm-gray-300);
}

.fm-dot-negative {
    background: var(--fm-negative-light);
}

/* Empty State for AI Insights */
.fm-ai-insights-empty {
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    border: 1px solid var(--fm-gray-100);
    box-shadow: var(--fm-shadow-xs);
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
}

.fm-ai-insights-empty .fm-empty-icon {
    margin-bottom: 12px;
}

.fm-ai-insights-empty .fm-empty-icon .fm-icon svg {
    width: 48px;
    height: 48px;
    color: var(--fm-gray-300);
}

.fm-ai-insights-empty h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--fm-gray-700);
}

.fm-ai-insights-empty p {
    margin: 0;
    font-size: 13px;
    color: var(--fm-gray-500);
    line-height: 1.6;
}

.fm-ai-insights-empty a {
    color: var(--fm-primary);
    text-decoration: none;
}

.fm-ai-insights-empty a:hover {
    text-decoration: underline;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.fm-dashboard .form-table {
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    overflow: hidden;
    box-shadow: var(--fm-shadow-xs);
    border: 1px solid var(--fm-gray-100);
    margin-top: 24px;
}

.fm-dashboard .form-table th {
    font-weight: 500;
    color: var(--fm-gray-700);
    background: var(--fm-gray-50);
    padding: 18px 24px !important;
    font-size: 13px;
    width: 220px;
    vertical-align: top;
    border-bottom: 1px solid var(--fm-gray-100);
}

.fm-dashboard .form-table td {
    padding: 18px 24px !important;
    border-bottom: 1px solid var(--fm-gray-100);
}

.fm-dashboard .form-table tr:last-child th,
.fm-dashboard .form-table tr:last-child td {
    border-bottom: none;
}

.fm-dashboard .form-table input[type="text"],
.fm-dashboard .form-table input[type="email"],
.fm-dashboard .form-table input[type="number"] {
    padding: 10px 14px;
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    font-size: 14px;
    background: var(--fm-white);
    color: var(--fm-gray-800);
    transition: all var(--fm-transition);
    font-family: inherit;
}

.fm-dashboard .form-table input:hover {
    border-color: var(--fm-gray-300);
}

.fm-dashboard .form-table input:focus {
    outline: none;
    border-color: var(--fm-gray-400);
    box-shadow: 0 0 0 3px var(--fm-gray-100);
}

.fm-dashboard .form-table .description {
    margin-top: 8px;
    color: var(--fm-gray-500);
    font-size: 12px;
    line-height: 1.5;
}

.fm-dashboard .form-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
}

.fm-dashboard .form-table fieldset label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--fm-gray-700);
    cursor: pointer;
}

/* ============================================
   DASHBOARD BUTTONS
   ============================================ */

.fm-dashboard .button {
    border-radius: var(--fm-radius-md);
    font-weight: 500;
    font-size: 13px;
    padding: 10px 18px;
    transition: all var(--fm-transition);
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}

.fm-dashboard .button-primary {
    background: var(--fm-primary);
    border-color: transparent;
    color: var(--fm-white);
}

.fm-dashboard .button-primary:hover {
    background: var(--fm-primary-dark);
}

.fm-dashboard .button-primary:focus {
    box-shadow: 0 0 0 3px var(--fm-primary-50);
}

.fm-dashboard .button-secondary {
    background: var(--fm-white);
    color: var(--fm-gray-600);
    border-color: var(--fm-gray-200);
}

.fm-dashboard .button-secondary:hover {
    background: var(--fm-gray-50);
    border-color: var(--fm-gray-300);
}

.fm-dashboard .button-large {
    padding: 12px 24px;
    font-size: 14px;
}

.fm-dashboard .submit {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--fm-gray-100);
}

/* ============================================
   NOTICES
   ============================================ */

.fm-dashboard .notice {
    border-radius: var(--fm-radius-lg);
    border-left-width: 3px;
    margin: 0 0 20px 0;
    padding: 14px 18px;
    font-size: 13px;
}

.fm-dashboard .notice-success {
    background: var(--fm-positive-bg);
    border-left-color: var(--fm-positive);
    color: var(--fm-positive);
}

.fm-dashboard .notice-error {
    background: var(--fm-negative-bg);
    border-left-color: var(--fm-negative);
    color: var(--fm-negative);
}

.fm-dashboard .notice p {
    margin: 0;
}


/* ============================================
   ============================================
   PART 3: IMAGE OVERLAYS MANAGEMENT
   ============================================
   ============================================ */

/* ============================================
   PAGE CONTAINER
   ============================================ */

.fm-overlays-page {
    margin: -20px -20px 0 -22px;
    background: var(--fm-gray-50);
    padding: 40px;
    min-height: 100vh;
}

.fm-overlays-page h1 {
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 600;
    color: var(--fm-gray-900);
    letter-spacing: -0.025em;
}

.fm-overlays-page > p {
    color: var(--fm-gray-500);
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.fm-overlays-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 180px);
    margin-top: 24px;
}

/* ============================================
   SIDEBAR
   ============================================ */

.fm-overlays-sidebar {
    width: 320px;
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--fm-gray-100);
    flex-shrink: 0;
}

.fm-overlay-controls {
    padding: 20px;
    border-bottom: 1px solid var(--fm-gray-100);
}

.fm-overlay-controls label {
    font-weight: 500;
    font-size: 12px;
    color: var(--fm-gray-500);
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fm-overlay-controls select {
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid var(--fm-gray-200);
    border-radius: var(--fm-radius-md);
    background: var(--fm-white);
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-gray-800);
    transition: all var(--fm-transition);
    font-family: inherit;
    cursor: pointer;
}

.fm-overlay-controls select:hover {
    border-color: var(--fm-gray-300);
}

.fm-overlay-controls select:focus {
    outline: none;
    border-color: var(--fm-gray-400);
    box-shadow: 0 0 0 3px var(--fm-gray-100);
}

.fm-overlay-controls .button-primary {
    width: 100%;
    background: var(--fm-primary);
    border: none;
    padding: 12px 18px;
    border-radius: var(--fm-radius-md);
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-white);
    transition: all var(--fm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.fm-overlay-controls .button-primary:hover {
    background: var(--fm-primary-dark);
}

.fm-overlay-controls .button-primary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ============================================
   OVERLAY LIST
   ============================================ */

.fm-overlay-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.fm-overlay-list::-webkit-scrollbar {
    width: 4px;
}

.fm-overlay-list::-webkit-scrollbar-track {
    background: transparent;
}

.fm-overlay-list::-webkit-scrollbar-thumb {
    background: var(--fm-gray-200);
    border-radius: 2px;
}

.fm-overlay-list::-webkit-scrollbar-thumb:hover {
    background: var(--fm-gray-300);
}

.fm-overlay-item {
    padding: 14px;
    background: var(--fm-gray-50);
    border-radius: var(--fm-radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--fm-transition);
    border: 1px solid transparent;
}

.fm-overlay-item:hover {
    background: var(--fm-white);
    border-color: var(--fm-gray-200);
}

.fm-overlay-item.active {
    background: var(--fm-white);
    border-color: var(--fm-primary);
    box-shadow: var(--fm-shadow-sm);
}

.fm-overlay-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fm-overlay-item-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--fm-gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-overlay-item-toggle {
    cursor: pointer;
    font-size: 18px;
    transition: transform var(--fm-transition);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fm-radius-sm);
    background: var(--fm-white);
    border: 1px solid var(--fm-gray-200);
}

.fm-overlay-item-toggle:hover {
    background: var(--fm-gray-100);
}

.fm-overlay-item-preview {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--fm-radius-md);
    border: 1px solid var(--fm-gray-200);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.fm-overlay-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--fm-gray-500);
}

.fm-overlay-empty-icon {
    margin-bottom: 12px;
    opacity: 0.4;
}

.fm-overlay-empty-icon svg {
    width: 48px;
    height: 48px;
    fill: var(--fm-gray-400);
}

.fm-overlay-empty p {
    margin: 6px 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
}

.fm-overlay-empty p:first-of-type {
    font-weight: 500;
    color: var(--fm-gray-600);
    font-size: 14px;
}

/* Loading State */
.fm-overlays-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--fm-gray-500);
    font-weight: 500;
    font-size: 13px;
}

.fm-overlays-loading::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin: 14px auto 0;
    border: 2px solid var(--fm-gray-200);
    border-top-color: var(--fm-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ============================================
   MAP CONTAINER
   ============================================ */

.fm-overlays-map-container {
    flex: 1;
    background: var(--fm-white);
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-xs);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--fm-gray-100);
}

#fm-overlay-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    user-select: none;
}

/* ============================================
   OVERLAY TOOLBAR
   ============================================ */

.fm-overlay-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--fm-white);
    padding: 14px 18px;
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow-md);
    z-index: 1000;
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--fm-gray-100);
}

.fm-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-toolbar-group label {
    font-weight: 500;
    font-size: 11px;
    color: var(--fm-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#fm-overlay-opacity {
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: var(--fm-gray-200);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#fm-overlay-opacity::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--fm-primary);
    cursor: pointer;
    box-shadow: var(--fm-shadow-sm);
    transition: transform var(--fm-transition);
}

#fm-overlay-opacity::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

#fm-overlay-opacity::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--fm-primary);
    cursor: pointer;
    box-shadow: var(--fm-shadow-sm);
    border: none;
}

#fm-opacity-value {
    min-width: 40px;
    font-weight: 600;
    color: var(--fm-gray-800);
    font-size: 13px;
}

.fm-toolbar-group .button {
    padding: 8px 14px;
    border-radius: var(--fm-radius-md);
    font-weight: 500;
    font-size: 12px;
    transition: all var(--fm-transition);
    border: 1px solid var(--fm-gray-200);
    background: var(--fm-white);
    color: var(--fm-gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fm-toolbar-group .button:hover {
    background: var(--fm-gray-50);
    border-color: var(--fm-gray-300);
    color: var(--fm-gray-800);
}

.fm-toolbar-group .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.fm-toolbar-group .button-link-delete {
    color: var(--fm-negative);
    border-color: var(--fm-gray-200);
}

.fm-toolbar-group .button-link-delete:hover {
    background: var(--fm-negative-bg);
    border-color: var(--fm-negative);
}

/* ============================================
   RESIZE HANDLES
   ============================================ */

.fm-draggable-overlay {
    cursor: move !important;
}

.resize-handle-container {
    background: transparent !important;
    border: none !important;
    z-index: 2000 !important;
    pointer-events: auto !important;
}

.resize-handle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
}

.resize-handle-nw, .resize-handle-se {
    cursor: nwse-resize !important;
}

.resize-handle-ne, .resize-handle-sw {
    cursor: nesw-resize !important;
}

.resize-handle-inner {
    width: 14px;
    height: 14px;
    background: var(--fm-primary);
    border: 2px solid var(--fm-white);
    border-radius: 50%;
    box-shadow: var(--fm-shadow-sm);
    cursor: inherit;
    transition: all var(--fm-transition);
    pointer-events: auto !important;
}

.resize-handle-inner:hover {
    background: var(--fm-primary);
    transform: scale(1.2);
}

.resize-handle-inner:active {
    transform: scale(1.1);
}

/* Prevent text selection during drag */
.leaflet-container {
    user-select: none !important;
}


/* ============================================
   ============================================
   PART 4: RESPONSIVE DESIGN
   ============================================
   ============================================ */

/* Frontend Responsive */
@media (max-width: 768px) {
    .fm-sidebar {
        left: 10px;
        right: 10px;
        top: 70px;
        width: auto;
        max-height: 40vh;
    }

    .fm-sidebar.minimized {
        width: 48px;
        right: auto;
        max-height: none;
    }

    .fm-sidebar-header {
        padding: 14px 16px;
    }

    .fm-fab {
        top: auto;
        bottom: 80px;
        right: 10px;
    }

    .fm-modal-content {
        width: 94%;
        margin: 12px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .category-label {
        flex-direction: row;
        padding: 12px 14px;
        gap: 12px;
    }

    .category-label .category-icon {
        width: 32px;
        height: 32px;
    }

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

    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .btn-secondary,
    .btn-cancel,
    .btn-primary,
    .btn-submit {
        flex: none;
    }

    .fm-notification {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(20px);
        max-width: calc(100% - 24px);
        border-radius: 100px;
    }

    .fm-notification.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Admin Dashboard Responsive */
@media (max-width: 1200px) {
    .fm-analytics-grid {
        grid-template-columns: 1fr;
    }

    .fm-overlays-container {
        flex-direction: column;
        height: auto;
    }

    .fm-overlays-sidebar {
        width: 100%;
        max-height: 350px;
    }

    .fm-overlays-map-container {
        height: 550px;
    }
}

@media (max-width: 782px) {
    .fm-dashboard {
        margin: -10px;
        padding: 24px;
    }

    .fm-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .fm-dashboard-title {
        font-size: 20px;
        gap: 10px;
    }

    .fm-dashboard-actions {
        flex-direction: column;
    }

    .fm-action-btn {
        width: 100%;
        justify-content: center;
    }

    .fm-dashboard-title .page-title-action {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }

    .fm-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fm-stat-card {
        padding: 16px 20px;
    }

    .fm-stat-value {
        font-size: 24px;
    }

    .fm-dashboard-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .fm-filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 6px;
    }

    .fm-filter-group select {
        width: 100%;
    }

    .fm-bulk-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .fm-bulk-actions .button,
    .fm-bulk-actions select {
        width: 100%;
    }

    .fm-selected-count {
        margin-left: 0;
        text-align: center;
    }

    .fm-pins-table th,
    .fm-pins-table td {
        padding: 12px 16px !important;
        font-size: 13px;
    }

    .fm-analytics-grid {
        gap: 16px;
    }

    .fm-analytics-card {
        padding: 20px;
    }

    .fm-dashboard .form-table th {
        display: block;
        width: 100%;
        padding-bottom: 6px !important;
        border-bottom: none;
    }

    .fm-dashboard .form-table td {
        display: block;
        width: 100%;
        padding-top: 0 !important;
    }

    /* Overlays Responsive */
    .fm-overlays-page {
        margin: -10px;
        padding: 24px;
    }

    .fm-overlays-page h1 {
        font-size: 20px;
    }

    .fm-overlays-container {
        gap: 16px;
    }

    .fm-overlay-toolbar {
        flex-direction: column;
        gap: 12px;
        top: 12px;
        right: 12px;
        padding: 14px;
    }

    .fm-toolbar-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #fm-overlay-opacity {
        width: 100%;
    }

    .fm-toolbar-group .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .fm-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .fm-stat-icon {
        width: 44px;
        height: 44px;
    }
}


/* ============================================
   ============================================
   PART 5: ACCESSIBILITY
   ============================================
   ============================================ */

/* Focus States */
.fm-sidebar-toggle:focus-visible,
.fm-fab:focus-visible,
.fm-view-toggle:focus-visible,
.fm-modal-close:focus-visible,
.form-input:focus-visible,
.form-textarea:focus-visible,
.btn-secondary:focus-visible,
.btn-cancel:focus-visible,
.btn-primary:focus-visible,
.btn-submit:focus-visible,
.pin-popup-vote:focus-visible,
.fm-category-filter:focus-visible {
    outline: 2px solid var(--fm-primary);
    outline-offset: 2px;
}

.fm-dashboard *:focus-visible,
.fm-overlays-page *:focus-visible {
    outline: 2px solid var(--fm-primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .fm-stat-card,
    .fm-dashboard-filters,
    .fm-bulk-actions,
    .fm-pins-table,
    .fm-analytics-card,
    .fm-dashboard .form-table,
    .fm-overlays-sidebar,
    .fm-overlays-map-container,
    .fm-overlay-toolbar,
    .fm-overlay-item,
    .fm-sidebar,
    .fm-modal-content {
        border-width: 2px;
        border-color: var(--fm-gray-900);
    }
}
