/* ========================================================================
   EcoMap Main Stylesheet
   ========================================================================
      
   Table of Contents:
   -----------------
   1. CSS Variables & Design Tokens              [Line 25]
   2. Reset & Base Styles                        [Line 45]
   3. Loading States                             [Line 80]
   4. Layout Structures                          [Line 140]
      4.1 Page Layout
      4.2 Header & Navigation
      4.3 Footer
   5. Graph Visualization                        [Line 320]
      5.1 Graph Container
      5.2 Nodes & Links
      5.3 Tooltips
   6. UI Components                              [Line 420]
      6.1 Legend & Stats
      6.2 Controls & Buttons
      6.3 Modals & Dialogs
      6.4 Forms & Inputs
      6.5 User Menus
      6.6 Search Component
      6.7 Language Switcher
      6.8 View Switcher
   7. Panels & Info Boxes                        [Line 980]
      7.1 Organization Info
      7.2 Box Container
      7.3 Panel Toggles
   8. Pricing Page                               [Line 1280]
   9. Modern UI Components                       [Line 1380]
      9.1 Glassmorphism Panels
      9.2 Bottom Sheets (Mobile)
      9.3 Mobile Navigation
   10. Responsive Breakpoints                     [Line 1620]
      10.1 Tablet (≤768px)
      10.2 Mobile (≤480px)
      10.3 Desktop (≥769px)
   11. Print Styles                              [Line 2120]
   12. Animations                                [Line 2160]

   ======================================================================== */


/* ==========================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */

:root {
    /* Primary Colors */
    --primary-color: #4F46E5;
    --primary-hover: #4338ca;
    
    /* Semantic Colors */
    --color-success: #2ca02c;
    --color-success-hover: #1f7f1f;
    --color-danger: #d62728;
    --color-warning: #ff7f0e;
    --color-info: #1f77b4;
    --color-info-dark: #0d4b8c;
    
    /* Neutral Colors */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Layout */
    --bottom-sheet-height: 80vh;
    --header-height: 60px;
    --footer-height: 60px;
    
    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1100;
    --z-fixed: 1200;
    --z-modal-backdrop: 1300;
    --z-modal: 1400;
    --z-popover: 1500;
    --z-tooltip: 1600;
    --z-top: 2000;
    --z-mobile: 3000;
}


/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--bg-light);
    color: var(--text-main);
}

/* View States */
body.table-view-active {
    overflow: auto;
}

body.list-view-active {
    overflow: auto;
}

body.is-loading .top-bar,
body.is-loading .search-container,
body.is-loading .box-container,
body.is-loading .org-info-box,
body.is-loading #zoom-controls-container,
body.is-loading .legend,
body.is-loading .back-button,
body.is-loading .dev-bar {
    visibility: hidden;
    pointer-events: none;
}

body.is-loading .graph-container {
    opacity: 0 !important;
}


/* ==========================================================================
   3. LOADING STATES
   ========================================================================== */

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--z-mobile);
    opacity: 1;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.loading-bar {
    width: 300px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--color-info);
    transition: width 0.3s ease-out;
    border-radius: 10px;
}

.loading-percentage {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.loading-steps {
    margin-bottom: 30px;
    text-align: left;
    width: 300px;
}

.loading-step {
    display: flex;
    align-items: center;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.loading-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.loading-step .step-indicator {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-step .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-info);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-step .checkmark {
    color: var(--color-success);
    font-size: 16px;
    display: none;
}

.loading-step.complete .spinner {
    display: none;
}

.loading-step.complete .checkmark {
    display: block;
}


/* ==========================================================================
   4. LAYOUT STRUCTURES
   ========================================================================== */

/* 4.1 Page Layout */
#main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.container-fluid {
    padding: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 4.2 Header & Navigation */
.top-bar {
    flex-shrink: 0;
    height: var(--header-height);
    position: relative;
    z-index: 2100;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-lg);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.platform-title {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: var(--text-main);
}

/* 4.3 Footer */
.site-footer {
    flex-shrink: 0;
    height: var(--footer-height);
    background-color: var(--bg-light);
    padding: 10px 40px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: var(--z-base);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
}

.footer-center a {
    color: #555;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-center a:hover {
    color: #007bff;
}

.footer-left a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.footer-left a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   5. GRAPH VISUALIZATION
   ========================================================================== */

/* 5.1 Graph Container */
.graph-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 1s ease;
}

#graph {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#map {
    height: calc(100vh - 180px);
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.table-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: auto;
    display: none;
    margin-bottom: 0 !important;
}

body.table-view-active .graph-container {
    display: none;
}

body.table-view-active .table-container {
    display: block;
}

/* 5.2 Nodes & Links */
.node {
    cursor: pointer;
}

.node circle {
    cursor: pointer;
}

.node text {
    font-size: 12px;
    pointer-events: none;
    fill: var(--text-main);
    text-shadow: none;
    text-anchor: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: var(--font-main);
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
    stroke-width: 3.5px;
}

.link.person-category {
    stroke: #ff6b6b;
    stroke-width: 2px;
    stroke-dasharray: 5, 5;
}

/* Color Indicators */
.segment {
    background: var(--color-info);
}

.subsegment {
    background: var(--color-warning);
}

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

.inactive {
    background: var(--color-danger);
}

.bounding-box {
    fill: none;
    stroke-width: 3px;
    stroke-dasharray: 5, 5;
    pointer-events: none;
}

.bounding-box-label {
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

/* 5.3 Tooltips */
.tooltip {
    position: absolute;
    background: var(--bg-white);
    padding: 10px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.tooltip p {
    margin: 0;
    color: #666;
}

.tooltip .metrics {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}


/* ==========================================================================
   6. UI COMPONENTS
   ========================================================================== */

/* 6.1 Legend & Stats */
.legend {
    position: fixed;
    top: 160px;
    left: 20px;
    background: var(--bg-white);
    padding: 0 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    max-height: 500px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    width: 250px;
    font-size: 16px;
}

.legend h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--text-main);
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.legend-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.legend-item .segment-info {
    display: flex;
    align-items: center;
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-item .org-count {
    color: #666;
    font-size: 0.9em;
}

.stats-box {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-white);
    padding: 0 15px 0 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
    font-size: 16px;
    z-index: var(--z-dropdown);
    width: 250px;
}

.stats-box h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--text-main);
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    color: #666;
}

.stats-item .count {
    font-weight: 600;
    color: var(--text-main);
}

/* 6.2 Controls & Buttons */
.controls {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.back-button {
    padding: 8px 16px;
    background: var(--color-info);
    color: var(--bg-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 20px;
}

.back-button:hover {
    background: var(--color-info-dark);
}

.toggle-boxes-button {
    padding: 8px 16px;
    background: #666;
    color: var(--bg-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 20px;
}

.toggle-boxes-button:hover {
    background: #444;
}

.toggle-boxes-button.hidden {
    background: var(--color-success);
}

.toggle-boxes-button.hidden:hover {
    background: var(--color-success-hover);
}

.segment-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
}

#zoom-controls-container {
    position: absolute;
    top: 135px;
    left: 380px;
    display: flex;
    align-items: center;
    z-index: 999;
    box-shadow: var(--shadow-sm);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.8);
}

#zoom-level-display {
    width: 50px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    transition: border-radius 0.2s ease-in-out;
}

#zoom-buttons {
    display: none;
    flex-direction: row;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    height: 30px;
}

#zoom-controls-container.open #zoom-level-display {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#zoom-controls-container:not(.open) #zoom-level-display {
    border-right: 1px solid #ccc;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

#zoom-buttons button {
    width: 35px;
    height: 100%;
    background-color: transparent;
    border: none;
    border-left: 1px solid #eee;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

#zoom-buttons button:first-child {
    border-left: none;
}

#zoom-buttons button:last-child {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

#zoom-buttons button:hover {
    background-color: #f0f0f0;
}

/* 6.3 Modals & Dialogs */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2500;
}

.modal-content {
    position: relative;
    background-color: var(--bg-white);
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-main);
}

.close-modal {
    background: black;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px 0;
}

/* 6.4 Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    text-align: right;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1976d2;
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #1565c0;
}

/* 6.5 User Menus */
.auth-buttons {
    margin-left: 20px;
}

.auth-btn {
    background: none;
    border: none;
    color: #000000;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-btn i {
    margin-right: 8px;
}

.user-menu {
    position: relative;
    display: inline-block;
    padding-left: 20px;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-trigger:hover {
    background: #e9ecef;
}

.user-menu-trigger i {
    font-size: 1.2em;
}

.user-menu-content {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 2200;
}

.user-menu-dropdown.active .user-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item i {
    width: 20px;
    color: #6c757d;
}

.menu-divider {
    height: 1px;
    background-color: #dee2e6;
    margin: 4px 0;
}

.role-item {
    color: #6c757d;
    font-size: 0.9em;
    padding: 8px 16px;
}

.user-username {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.created-by {
    display: flex;
    align-items: center;
    gap: 10px;
}

.created-by span {
    color: #666;
    font-size: 14px;
}

.created-by .logo {
    height: 50px;
    width: auto;
}

/* 6.6 Search Component */
.search-container {
    position: fixed;
    top: 80px;
    right: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-dropdown);
    width: 100%;
    max-width: 700px;
    padding: 0px 25px;
}

.search-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding-left: 15px;
    font-size: 20px;
}

.search-box:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

.search-icon {
    color: #666;
    pointer-events: none;
    margin-right: 10px;
}

.search-box .back-button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin-right: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 36px;
    white-space: nowrap;
    gap: 6px;
}

.search-box .back-button i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.search-box .back-button:hover {
    background-color: #e0e0e0;
    border-color: #c0c0c0;
}

.search-box .back-button:hover i {
    transform: translateX(-2px);
}

.search-input {
    flex-grow: 1;
    width: auto;
    padding: 12px 15px 12px 0;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-input.displaying-info {
    font-style: italic;
    color: #6a6a6a;
}

/* 6.7 Desktop Breadcrumb Navigation */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    min-height: 40px;
    overflow: hidden;
}

.breadcrumb-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.breadcrumb-back-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #111827;
}

.breadcrumb-back-btn:hover i {
    transform: translateX(-1px);
}

.breadcrumb-back-btn i {
    transition: transform 0.15s ease;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.breadcrumb-trail::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid transparent;
}

.breadcrumb-item:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.breadcrumb-item.active {
    background: #1a1a2e;
    color: #ffffff;
    font-weight: 600;
    cursor: default;
}

.breadcrumb-item.active:hover {
    background: #1a1a2e;
    border-color: transparent;
}

.breadcrumb-item .breadcrumb-icon {
    font-size: 11px;
    opacity: 0.7;
}

.breadcrumb-item.active .breadcrumb-icon {
    opacity: 1;
}

.breadcrumb-item.type-overview { color: #374151; }
.breadcrumb-item.type-segment { color: #b45309; background: #fef3c7; }
.breadcrumb-item.type-segment:hover { background: #fde68a; }
.breadcrumb-item.type-subsegment_focus { color: #7e22ce; background: #f3e8ff; }
.breadcrumb-item.type-subsegment_focus:hover { background: #e9d5ff; }
.breadcrumb-item.type-category { color: #dc2626; background: #fee2e2; }
.breadcrumb-item.type-category:hover { background: #fecaca; }
.breadcrumb-item.type-organisation { color: #16a34a; background: #dcfce7; }
.breadcrumb-item.type-organisation:hover { background: #bbf7d0; }
.breadcrumb-item.type-person { color: #2563eb; background: #dbeafe; }
.breadcrumb-item.type-person:hover { background: #bfdbfe; }

.breadcrumb-item.active.type-segment,
.breadcrumb-item.active.type-subsegment_focus,
.breadcrumb-item.active.type-category,
.breadcrumb-item.active.type-organisation,
.breadcrumb-item.active.type-person {
    background: #1a1a2e;
    color: #ffffff;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-size: 10px;
    user-select: none;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .breadcrumb-bar {
        display: none !important;
    }
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-top: 10px;
    padding: 15px;
    display: none;
    z-index: var(--z-dropdown);
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.search-results.active {
    display: block;
}

.search-section {
    margin-bottom: 20px;
    display: block;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-content {
    margin-bottom: 15px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
    margin: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: var(--text-main);
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-photo,
.search-result-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}

.search-result-photo.pro-avatar,
.search-result-logo.pro-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
}

.pro-badge {
    color: var(--accent-color);
    font-size: 12px;
    margin-left: 4px;
}

.search-result-item.pro-result .search-result-name,
.org-search-result-item strong {
    font-weight: 700;
}

.search-result-item.keyboard-focused {
    background-color: var(--accent-color, #3273dc);
    color: #fff;
}
.search-result-item.keyboard-focused .search-result-name,
.search-result-item.keyboard-focused i {
    color: #fff;
}

.search-empty-msg {
    padding: 12px 16px;
    color: var(--text-muted, #888);
    font-size: 13px;
    text-align: center;
}


.mobile-search-results {
    position: fixed !important;
    top: 58px !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-height: 50vh !important;
    margin: 12px !important;
    margin-top: 8px !important;
    border-radius: 8px !important;
    background: var(--bg-white) !important;
    padding: 15px !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--border-color) !important;
    overflow-y: auto !important;
    z-index: 2200 !important;
}

.result-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 14px;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: var(--text-main);
}

.result-meta {
    font-size: 12px;
    color: #999;
}

/* 6.7 Language Switcher */
.footer-lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
}

.footer-lang-switcher .lang-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-lang-switcher .lang-btn:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

.footer-lang-switcher .lang-btn.active {
    color: #007bff;
    font-weight: 600;
}

.footer-lang-switcher .lang-flag {
    font-size: 16px;
}

.footer-lang-switcher .lang-divider {
    color: #ccc;
    font-size: 14px;
}

.footer-version {
    font-size: 13px;
    color: #999;
}

#header-lang-btn {
    font-size: 18px;
}

.mobile-lang-menu {
    position: fixed;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 10000;
    min-width: 160px;
}

.mobile-lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 15px;
    color: var(--text-main);
}

.mobile-lang-option:hover {
    background: rgba(0, 123, 255, 0.08);
}

.mobile-lang-option.active {
    background: rgba(0, 123, 255, 0.12);
    color: #007bff;
    font-weight: 500;
}

.mobile-lang-option .lang-flag {
    font-size: 20px;
}

.mobile-lang-option .lang-name {
    flex: 1;
    text-align: left;
}

.mobile-lang-option .lang-check {
    color: #007bff;
    font-size: 14px;
}

/* 6.8 View Switcher */
.view-switcher {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #e0e0e0;
}

.view-btn.active {
    background-color: #007bff;
    color: var(--bg-white);
}

.view-btn i {
    font-size: 16px;
}


/* ==========================================================================
   7. PANELS & INFO BOXES
   ========================================================================== */

/* 7.1 Organization Info */
.org-info-box {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    background: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    z-index: 1300;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    display: none;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.org-info-box.minimized {
    max-height: 52px;
    overflow: hidden;
    padding-bottom: 0;
}

.org-info-box h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-main);
    border-bottom: 2px solid var(--color-info);
    padding-bottom: 8px;
    flex-grow: 1;
}

.org-info-minimize-btn {
    background: none;
    border: none;
    color: var(--color-info);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-left: 10px;
}

.org-info-minimize-btn:hover {
    background-color: #f3f4f6;
}

.org-info-item {
    margin-bottom: 8px;
    line-height: 1.4;
}

.org-info-label {
    font-weight: 600;
    color: var(--text-main);
    margin-right: 4px;
}

.org-info-value {
    color: #666;
}

.org-info-value a {
    color: #0066cc;
    text-decoration: none;
}

.org-info-value a:hover {
    text-decoration: underline;
}

.org-info-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.org-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.org-info-category {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.org-info-category.main {
    background: var(--color-info);
    color: var(--bg-white);
}

.org-info-relationships {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.org-info-rel-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.org-info-rel-type {
    display: inline-block;
    white-space: nowrap;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    background: #78909c;
}

.org-info-rel-type[data-type="subsidiary"]  { background: #5c6bc0; }
.org-info-rel-type[data-type="investment"]  { background: #26a69a; }
.org-info-rel-type[data-type="partner"]     { background: #ff8f00; }
.org-info-rel-type[data-type="customer"]    { background: #1e88e5; }
.org-info-rel-type[data-type="supplier"]    { background: #43a047; }
.org-info-rel-type[data-type="competitor"]  { background: #8e24aa; }
.org-info-rel-type[data-type="acquisition"] { background: #e53935; }
.org-info-rel-type[data-type="merger"]      { background: #d81b60; }

.org-info-rel-arrow {
    color: #999;
    font-size: 13px;
}

.org-info-rel-name {
    font-weight: 500;
    color: #3273dc;
    text-decoration: none;
}

.org-info-rel-name:hover {
    text-decoration: underline;
}

.org-info-rel-self {
    font-weight: 500;
    color: #555;
}

.org-info-category.clickable-category {
    padding: 3px 8px;
    margin: 2px;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.org-info-category.clickable-category:hover {
    background-color: #d9d9d9;
}

.org-info-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.org-info-status.active {
    background: var(--color-success);
    color: var(--bg-white);
}

.org-info-status.inactive {
    background: var(--color-danger);
    color: var(--bg-white);
}

.org-info-status.merged {
    background: var(--color-warning);
    color: var(--bg-white);
}

.org-info-status.acquired {
    background: #9467bd;
    color: var(--bg-white);
}

.org-info-logo {
    max-width: 100%;
    height: auto;
    margin: 0 0 10px 0;
    border-radius: 4px;
}

.social-media-icons-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 5px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.social-icon i {
    line-height: 1;
}

.social-icon.active {
    color: var(--bg-white);
    cursor: pointer;
}

.social-icon.active:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.social-icon.twitter.active {
    background-color: #1DA1F2;
}

.social-icon.instagram.active {
    background-color: #E1306C;
}

.social-icon.linkedin.active {
    background-color: #0A66C2;
}

.social-icon.youtube.active {
    background-color: #FF0000;
}

.social-icon.inactive {
    background-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

.social-icon.startupswatch.active {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.sw-icon-img {
    width: 28px;
    height: 28px;
    display: block;
}

.sw-icon-inactive {
    filter: grayscale(1);
    opacity: 0.45;
}

.org-info-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.org-info-box-header h3 {
    margin: 0;
}

/* Request Buttons (People Focus Mode) */
.request-buttons-container {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    padding: 12px !important;
}

.request-buttons-container .org-info-label {
    color: #2c3e50;
    font-size: 0.9em;
}

.request-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-buttons .button {
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.85em;
    padding: 8px 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.request-buttons .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.request-buttons .button.is-primary {
    background-color: #3273dc;
    color: var(--bg-white);
}

.request-buttons .button.is-primary:hover {
    background-color: #2366d1;
}

.request-buttons .button.is-info {
    background-color: #209cee;
    color: var(--bg-white);
}

.request-buttons .button.is-info:hover {
    background-color: #1190db;
}

.request-buttons-container .help-text {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #3273dc;
}

/* 7.2 Box Container */
.box-container {
    position: fixed;
    top: 80px;
    left: 0;
    width: 350px;
    background: var(--bg-white);
    padding: 10px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateX(0);
    transition: transform 0.35s ease-in-out;
    z-index: 1999;
}

.box-container--offscreen-left {
    transform: translateX(calc(-100% - 5px));
}

.box-container .stats-box,
.box-container .legend {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    box-shadow: none;
    margin-bottom: 0;
}

/* 7.3 Panel Toggles */
.box-container-toggle-button {
    position: absolute;
    width: 20px;
    height: 45px;
    background-color: var(--bg-white);
    color: var(--text-main);
    border: 0px solid #ddd;
    box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 1999;
}

.box-container-toggle-button:hover {
    background-color: #f8f8f8;
    color: #000;
}

.box-container-open-button {
    top: 80px;
    left: -1px;
    border-right: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.box-container-close-button {
    top: 0px;
    left: 98%;
    border-left: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.box-container-close-button:hover {
    background-color: #f8f8f8;
    color: #000;
}

.panel-toggle-bookmark {
    position: absolute;
    width: 20px;
    height: 45px;
    background-color: var(--bg-white);
    color: var(--text-main);
    border: 0px solid #ddd;
    box-shadow: -5px 5px 5px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.35s ease-in-out;
    z-index: 1999;
}

.panel-toggle-bookmark:hover {
    background-color: #f8f8f8;
    color: #000;
}

.org-info-open-button {
    display: none;
    position: fixed;
    top: 72px;
    right: -1px;
    border-left: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.org-info-close-button {
    display: none;
    top: 10px;
    right: 0;
    margin-right: 0px;
    border-right: none;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.open-org-info-button-mobile {
    display: none;
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 1005;
    padding: 10px;
    background-color: var(--color-info);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.open-org-info-button-mobile:hover {
    background-color: var(--color-info-dark);
}

.org-info-box-toggle-mobile {
    display: none;
}

.dev-bar {
    position: fixed;
    bottom: 0px;
    width: 340px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
}


/* ==========================================================================
   8. PRICING PAGE
   ========================================================================== */

.pricing-page {
    background-color: var(--bg-light);
    font-family: 'Roboto', sans-serif;
    overflow: auto !important;
}

.section {
    padding: 1rem 3rem;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: var(--bg-white);
    padding: 2rem;
    transition: transform 0.2s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.highlight {
    border: 2px solid #3273dc;
    transform: scale(1.02);
}

.pricing-card.highlight:hover {
    transform: scale(1.02) translateY(-5px);
}

.plan-price {
    font-size: 3rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.plan-period {
    font-size: 1rem;
    color: #7a7a7a;
    font-weight: normal;
}

.features-list {
    flex-grow: 1;
    margin-top: 0px;
    text-align: left;
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.features-list li i {
    color: #48c774;
    margin-right: 12px;
}

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    width: 350px;
}

.iyzico-redirect-notice {
    text-align: center;
    padding: 3rem;
}

/* Comparison Table */
.cmp-table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    padding: 0 1rem 1rem;
}

.comparison-section {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: auto;
    max-width: 1004px;
    overflow: hidden;
}

.comparison-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--bg-white);
    padding: 2rem;
    text-align: center;
}

.comparison-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.comparison-subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 2px solid #e9ecef;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

.feature-name {
    font-weight: 500;
    color: var(--text-main);
}

.pro-feature {
    color: #48c774;
    font-weight: 600;
}

.standard-feature {
    color: #6c757d;
}

.check-icon {
    color: #48c774;
    margin-right: 0.5rem;
}

.cross-icon {
    color: #dc3545;
    margin-right: 0.5rem;
}

.comparison-category {
    background: #f1f3f4;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}


/* ==========================================================================
   9. MODERN UI COMPONENTS
   ========================================================================== */

/* 9.1 Glassmorphism Panels */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

/* 9.2 Bottom Sheets (Mobile) */
#bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 3000;
    max-height: var(--bottom-sheet-height);
    display: flex;
    flex-direction: column;
}

#bottom-sheet.active {
    transform: translateY(-95px);
    /*margin-bottom: 60px;*/
}

#bottom-sheet.peek {
    transform: translateY(calc(100% - 95px));
}

.sheet-handle-bar {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    flex-shrink: 0;
    padding-top: 12px;
    padding-bottom: 8px;
    background: var(--bg-white);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.sheet-handle {
    width: 32px;
    height: 32px;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 rgba(13, 110, 253, 0);
    animation: handle-glow 3s infinite;
}

.sheet-handle:active {
    background-color: #e5e7eb;
    transform: scale(0.95);
}

.sheet-handle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #6b7280;
    transition: transform 0.3s ease;
}

#bottom-sheet.peek .sheet-handle::after {
    transform: rotate(180deg);
}

#bottom-sheet.active .sheet-handle::after {
    transform: rotate(0deg);
}

.sheet-content {
    padding: 0 20px 0px 20px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    max-height: 65vh;
    touch-action: pan-y;
    position: relative;
}

.sheet-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}

.sheet-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.sheet-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 9.3 Mobile Navigation (Deprecated: Moved to header) */
.bottom-nav {
    display: none !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: none;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 18px;
}

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px; /* Increased height for better search bar fit */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 2100;
    width: 100%;
}

.mobile-logo {
    height: 32px;
    width: auto;
    vertical-align: middle;
}

.mobile-user-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    border: none;
    cursor: pointer;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease-in-out;
}

.header-left {
    flex: 0 0 auto;
    overflow: hidden;
    max-width: 150px;
}

.header-center {
    flex: 1 1 auto;
    justify-content: center;
    overflow: visible; /* Changed from hidden to allow dropdown */
    padding: 0 8px;
}

#header-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Expansion states for search */
.mobile-header.search-expanded .header-left,
.mobile-header.search-expanded .header-center,
.mobile-header.search-expanded .header-right > *:not(#mobile-search-container) {
    opacity: 0;
    max-width: 0;
    gap: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
}

.mobile-header.search-expanded .header-right {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    overflow: visible;
}

.mobile-header.search-expanded #mobile-search-container {
    width: 100%;
    max-width: 100%;
}

/* New Mobile Header Search Styles */
.mobile-header-search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.3s ease-in-out;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    animation: fadeInExpand 0.3s forwards;
}

@keyframes fadeInExpand {
    from { opacity: 0; width: 0; }
    to { opacity: 1; width: 100%; }
}

.mobile-header-search-input {
    width: 100%;
    height: 38px;
    border-radius: 19px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    padding: 0 36px 0 36px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-header-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}

.search-input-wrapper .search-clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    padding: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav Icons in Header */
.mobile-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-nav-btn.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* List View Search hiding on mobile */
@media (max-width: 768px) {
    .listview-search {
        display: none !important;
    }
}

.table-search-popup {
    position: absolute;
    top: 58px;
    left: 12px;
    right: 12px;
    width: auto;
    z-index: 2200;
    max-height: 50vh;
    overflow-y: auto;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: none;
}
.org-search-results .org-search-result-item,
.table-search-popup .org-search-result-item {
    padding: 10px 14px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.org-search-results .org-search-result-item:last-child,
.table-search-popup .org-search-result-item:last-child {
    border-bottom: none;
}
.org-search-results .org-search-result-item:hover,
.table-search-popup .org-search-result-item:hover {
    background-color: #f5f5f5;
}
.org-search-results .org-search-result-item:active,
.table-search-popup .org-search-result-item:active {
    background-color: #f3f4f6;
}

.header-right {
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: 150px;
    overflow: hidden;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    flex-shrink: 0;
}

.header-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-avatar {
    object-fit: cover;
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 0 1px var(--border-color);
}

.mobile-user-menu {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.mobile-user-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    transition: background-color 0.2s;
    border-radius: 12px;
    margin-bottom: 4px;
}

.mobile-user-menu .menu-item:active {
    background-color: #f3f4f6;
}

.mobile-user-menu .menu-item i {
    font-size: 20px;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
}

.mobile-user-menu .menu-item span {
    font-size: 16px;
    font-weight: 500;
}

.mobile-user-menu .menu-divider {
    height: 1px;
    background-color: #f3f4f6;
    margin: 12px 0;
    border: none;
}

.mobile-user-menu .legal-link {
    padding: 5px 20px;
}

.mobile-user-menu .legal-link span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.mobile-user-menu .legal-link i {
    font-size: 16px;
    color: #9ca3af;
}

.mobile-menu-footer {
    margin-top: 10px;
    padding: 10px 5px 5px 5px;
    text-align: center;
    border-top: 1px solid #f3f4f6;
}

.mobile-menu-footer .copyright {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mobile-menu-footer .copyright a {
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-menu-footer .version {
    font-size: 11px;
    color: #9ca3af;
}

/* Map Controls */
.map-controls {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2900;
}

.modal.is-active~.map-controls,
body:has(.modal.is-active) .map-controls {
    display: none !important;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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



/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 10.1 Tablet (≤768px) */
@media (max-width: 768px) {
    /* Layout */
    .top-bar {
        height: 50px;
    }
    
    .platform-title {
        display: none;
    }
    
    .view-btn {
        padding: 8px;
    }
    
    .view-btn span {
        display: none;
    }
    
    .view-btn i {
        margin: 0;
        font-size: 18px;
    }
    
    .created-by span {
        font-size: 12px;
    }
    
    .created-by .logo {
        height: 40px;
    }
    
    .graph-container {
        flex: 1 1 auto;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
        height: auto;
        max-height: none;
    }
    
    .search-container,
    .box-container,
    .org-info-box {
        top: 70px;
    }
    
    .site-footer {
        padding: 12px 8px;
        font-size: 13px;
        height: auto;
        min-height: 60px;
        flex-shrink: 0;
    }
    
    .footer-right {
        display: none !important;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .footer-center {
        flex-wrap: wrap;
        order: 3;
        margin-bottom: 0;
    }
    
    .footer-center a {
        margin: 5px 10px;
    }
    
    .footer-right {
        order: 2;
        margin-bottom: 15px;
    }
    
    .footer-left {
        order: 1;
    }
    
    body,
    #main-content,
    .graph-container,
    .table-container {
        min-height: 0;
    }
    
    /* Footer Language Switcher */
    .footer-lang-switcher {
        justify-content: center;
        margin-bottom: 12px;
    }
    
    .footer-version {
        text-align: center;
    }
    
    .footer-right {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Org Info */
    .org-info-logo {
        max-width: 50%;
        height: auto;
        margin: 0 25% 0 25%;
        border-radius: 4px;
    }
    
    .box-container-open-button {
        top: 72px !important;
    }
    
    .dev-bar {
        display: none !important;
    }
    
    .org-info-box {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: none;
        padding: 15px;
        transform: translateX(0);
        transition: transform 0.35s ease-in-out;
    }
    
    .org-info-box.org-info-box--offscreen {
        transform: translateX(100vw);
    }
    
    .org-info-close-button {
        display: flex !important;
        margin-left: auto;
        top: 0px !important;
    }
    
    /* Zoom Controls */
    #zoom-controls-container {
        top: 10px;
        left: auto;
        right: 10px;
        width: auto;
    }
    
    #zoom-controls-container {
        top: 125px;
        left: 10px;
        right: auto;
        width: auto;
    }
    
    #zoom-level-display {
        width: 45px;
        height: 35px;
    }
    
    #zoom-buttons {
        height: 35px;
    }
    
    #zoom-buttons button {
        width: 30px;
        font-size: 14px;
    }
    
    /* Table Content */
    .table-content {
        margin-top: 50px;
    }
    
    /* Control Buttons */
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Modern UI - Hide Desktop Elements */
    .top-bar,
    .org-info-box,
    .open-org-info-button-mobile,
    .site-footer,
    .toggle-boxes-button,
    .back-button,
    #zoom-controls-container {
        display: none !important;
    }
    
    #suggest-org-modal,
    #suggest-person-modal,
    #people-modal,
    #profile-modal {
        padding-bottom: 60px;
    }
    
    .graph-container {
        padding-bottom: 60px;
    }
    
    .mobile-hide-search {
        display: none !important;
    }
    
    .search-container:not(.mobile-hide-search) {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw;
        background: var(--bg-white);
        z-index: 10005;
        display: flex;
        flex-direction: column;
        padding: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .search-container:not(.mobile-hide-search) .search-box {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #eee;
        padding: 16px;
        height: 50px;
        box-shadow: none;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .search-container:not(.mobile-hide-search) .search-results {
        top: 50px;
        margin-top: 0;
        width: 100%;
        max-height: none;
        flex-grow: 1;
        box-shadow: none;
        border-radius: 0;
        overflow-y: auto;
        padding: 16px;
    }
    
    .search-container:not(.mobile-hide-search) .search-input {
        padding: 12px 0;
    }
    
    .search-back-btn.mobile-only {
        background: none;
        border: none;
        font-size: 18px;
        color: #666;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    .search-clear-btn {
        background: none;
        border: none;
        color: #999;
        font-size: 18px;
        padding: 8px;
    }
    
    .mobile-user-btn,
    .nav-item {
        position: relative;
    }
    
    /* Mobile Optimized Modals */
    .mobile-optimized-modal .modal-card {
        margin: 0;
        width: 100%;
        max-height: 85vh;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        position: fixed;
        bottom: 0;
        margin-bottom: 55px;
    }
    
    .mobile-optimized-modal .modal-card-head {
        background: var(--bg-white);
        border-bottom: 1px solid #f3f4f6;
        padding: 16px 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    
    .mobile-optimized-modal .modal-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-main);
    }
    
    .mobile-optimized-modal .modal-card-body {
        padding: 20px;
    }
    
    .mobile-optimized-modal .modal-card-foot {
        background: var(--bg-white);
        border-top: 1px solid #f3f4f6;
        padding: 16px 20px;
    }
    
    .mobile-optimized-modal .box {
        padding: 12px;
        border-radius: 16px;
        border: 1px solid #f3f4f6;
        box-shadow: none;
        margin-bottom: 15px;
    }
    
    .mobile-optimized-modal .notification {
        padding: 12px;
        border-radius: 12px;
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .mobile-optimized-modal .field .label {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    .mobile-optimized-modal .textarea,
    .mobile-optimized-modal .select select {
        border-radius: 12px;
        border-color: var(--border-color);
    }
    
    .mobile-optimized-modal .textarea:focus,
    .mobile-optimized-modal .select select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    }
    
    .mobile-optimized-modal .field.is-grouped {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .mobile-optimized-modal .field.is-grouped .control,
    .mobile-optimized-modal .field.is-grouped .button {
        width: 100%;
        margin-right: 0 !important;
    }
    
    .mobile-optimized-modal .button {
        height: 44px;
        border-radius: 12px;
        font-weight: 600;
    }
}

/* 10.2 Mobile (≤480px) */
@media (max-width: 480px) {
    .top-bar-content {
        padding: 0 10px;
    }
    
    .platform-title {
        font-size: 18px;
    }
    
    .created-by span {
        display: none;
    }
}

/* 10.3 Desktop (≥769px) */
@media (min-width: 769px) {
    .org-info-open-button,
    .org-info-close-button {
        display: none !important;
    }
    
    #header-lang-btn {
        display: none !important;
    }
    
    .mobile-lang-menu {
        display: none !important;
    }
    
    #bottom-sheet,
    .bottom-nav,
    .mobile-header,
    .mobile-only {
        display: none !important;
    }
}


/* ==========================================================================
   11. PRINT STYLES
   ========================================================================== */

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }
    
    body {
        margin: 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .table-view {
        max-width: 100%;
        margin-top: 70px !important;
    }
    
    .filter-container,
    .view-switcher,
    .dev-bar,
    .org-info-box,
    .loader,
    #openOrgInfoBoxMobile,
    #openBoxContainerButton,
    #closeBoxContainerButton,
    .box-container,
    #zoom-controls-container,
    .tooltip,
    .search-container {
        display: none !important;
    }
}


/* ==========================================================================
   12. ANIMATIONS
   ========================================================================== */

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

@keyframes handle-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.2);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}
