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

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.search-section {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 20px;
}

.action-section {
    flex: 0 0 auto;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* User indicator styles */
.user-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.user-indicator span {
    color: #28a745;
    font-weight: 600;
}

.dashboard-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.sign-out-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sign-out-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.sign-in-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.sign-in-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    width: 100%;
    max-width: 800px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.search-stats {
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    border-left: 3px solid #4CAF50;
}

.search-stats p {
    margin: 0;
    font-weight: 500;
}

.add-company-btn {
    background: rgba(128, 128, 128, 0.2);
    color: #000000;
    border: 1px solid rgba(96, 96, 96, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 85px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    height: 36px;
    justify-content: center;
}

.add-company-btn:hover {
    background: rgba(128, 128, 128, 0.3);
    border-color: rgba(64, 64, 64, 0.7);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-text-main {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0px;
    line-height: 1.1;
}

.btn-text-sub {
    font-size: 9px;
    opacity: 0.8;
    font-weight: 400;
    line-height: 1;
}

.sign-out-btn {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sign-out-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.5);
    color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 50px);
    gap: 0;
    padding: 20px;
    justify-content: center;
    width: 100%;
    max-width: none;
}

.company-card {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}

.company-card img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    background: rgba(240, 240, 240, 0.8);
    border-radius: 4px;
}

/* Loading state for images */
.company-card img[style*="opacity: 0.5"] {
    background-image: linear-gradient(90deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(90deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(0deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(0deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 0, 10px 10px, 10px 10px;
    animation: loading-pattern 1s linear infinite;
}

@keyframes loading-pattern {
    0% { background-position: 0 0, 0 0, 10px 10px, 10px 10px; }
    100% { background-position: 20px 20px, 20px 20px, 30px 30px, 30px 30px; }
}

.company-title {
    display: none;
}

.company-popup {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 250px;
    max-width: 320px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.company-popup.show {
    display: block;
}

/* Share button in popup header */
/* Popup action buttons container */
.popup-action-buttons {
    position: absolute;
    top: 45px;
    left: 15px;
    z-index: 1002;
}

/* Specific positioning for Add/Edit Company modal only */
#companyFormStep .popup-action-buttons {
    position: absolute;
    top: 18px;
    left: 15px;
    z-index: 1002;
}

/* Specific positioning for company cards only (NOT Add/Edit Company popup) */
.company-popup .popup-action-buttons {
    position: absolute;
    top: 10.5px;
    right: 7px;
    left: auto;
    z-index: 1002;
    width: 52px;
    max-width: 52px;
}

/* Specific positioning for side panel only */
.news-card-popup .popup-action-buttons {
    position: absolute;
    top: 12.5px;
    right: -8px;
    left: auto;
    z-index: 1002;
    width: 52px;
    max-width: 52px;
}

/* Fix button container width for company cards and side panel */
.company-popup .action-button-container,
.news-card-popup .action-button-container {
    width: fit-content;
    min-width: fit-content;
    max-width: 52px;
    padding: 0;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.action-button-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: visible;
    display: flex;
    flex-direction: row;
}

.company-popup .share-btn-popup {
    width: 26px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.company-popup .share-btn-popup svg {
    width: 12px;
    height: 12px;
    fill: #007bff;
}

.company-popup .share-btn-popup:hover {
    background: rgba(0, 123, 255, 0.1);
}

.button-divider {
    width: 1px;
    height: 100%;
    background: #ddd;
}

/* Popup header actions container */
.company-popup .popup-header-actions {
    position: static;
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Popup menu button */
.company-popup .popup-menu-btn {
    width: 16px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.company-popup .popup-menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.company-popup .popup-menu-btn svg {
    width: 8px;
    height: 8px;
    fill: #333;
}

/* Popup menu container */
.popup-menu-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup menu dropdown */
.popup-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    max-width: 120px;
    display: none;
    z-index: 1003;
    overflow: hidden;
}

.popup-menu-dropdown.show {
    display: block;
}

/* Popup menu option */
.popup-menu-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 11px;
    color: #dc3545;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.popup-menu-option:last-child {
    border-bottom: none;
}

.popup-menu-option:hover {
    background: #f8d7da;
}

.popup-menu-option svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.company-popup h3 {
    margin: 0 77px 8px -1px;
    color: #333;
    font-size: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
    max-height: 2.4em; /* ~2 lines with tighter line height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.company-tags {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.company-category,
.company-city {
    margin-bottom: 0;
}

.category-tag {
    display: inline-block;
    background: #6c757d;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.city-tag {
    display: inline-block;
    background: #17a2b8;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Branch-specific styling */
.branches-tag {
    background: linear-gradient(135deg, #007bff, #6610f2) !important;
    cursor: help;
    position: relative;
}

/* Modern tooltip container */
.branches-tooltip {
    position: absolute;
    top: calc(100% + 0px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    padding: 12px;
    min-width: 160px;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

/* Tooltip arrow */
.branches-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #ccc;
}

/* Show tooltip on hover */
.branches-tag:hover .branches-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Branch capsule styling inside tooltip */
.branch-capsule {
    display: inline-block;
    background: #17a2b8;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    margin: 2px 0;
    text-align: center;
}

/* Multi-maps dropdown */
.company-maps-multi {
    position: relative;
    display: inline-block;
}

.maps-multi-trigger {
    color: #4CAF50;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid #4CAF50;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    display: inline-block;
    background: transparent;
}

.maps-multi-trigger:hover {
    background: #4CAF50;
    color: white;
}

.maps-multi-trigger:after {
    content: '▼';
    font-size: 8px;
    margin-left: 4px;
}

.maps-multi-dropdown {
    position: absolute;
    bottom: calc(100% + 0px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    padding: 6px 6px;
    min-width: auto;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

/* Maps dropdown arrow */
.maps-multi-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ccc;
}

/* Show dropdown on hover */
.company-maps-multi:hover .maps-multi-dropdown {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.maps-multi-dropdown a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid #4CAF50;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    background: transparent;
    margin: 2px 0;
}

.maps-multi-dropdown a:hover {
    background: #4CAF50;
    color: white;
}

.company-popup p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.company-popup .company-description {
    max-height: 3.6em; /* ~2.5 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.company-news {
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.company-news .news-content {
    color: #495057;
    font-size: 13px;
    line-height: 1.3;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: max-height 0.3s ease;
}

.company-news .news-content.collapsed {
    max-height: 3.9em; /* ~3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.company-news .news-content.expanded {
    max-height: none;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.company-news .news-toggle {
    margin-top: 5px;
    text-align: right;
}

.company-news .news-more-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.company-news .news-more-btn:hover {
    background: rgba(0, 123, 255, 0.1);
    text-decoration: none;
}

.news-updated-date {
    font-size: 10px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 4px;
}

/* News Timestamp in Company Card */
.news-timestamp {
    display: inline-block;
    font-size: 10px;
    color: #6c757d;
    background: rgba(255,255,255,0.8);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: normal;
}

/* News Controls in Admin Form */
.news-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3px;
}

/* Add subtle line above News/Updates section */
.form-group:has(.news-header) {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 15px;
}

/* News Panel Button */
.news-panel-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.news-panel-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.news-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* News Side Panel */
.news-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.news-panel.active {
    right: 0;
}

.news-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    transition: opacity 0.3s ease;
}

.news-panel-overlay.active {
    display: block;
}

.news-panel-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.news-panel-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-panel-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.news-panel-content {
    padding: 15px 15px 0 15px;
}

/* News Panel Company Cards - Exact Match to Main Popup */
.news-card-popup {
    position: relative !important;
    display: block !important;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    background: white;
    min-width: auto;
    max-width: none;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Action buttons container for news cards - same as main popup */
.news-card-popup .popup-action-buttons {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 1002;
    width: fit-content;
    max-width: 52px;
}

.news-card-popup .action-button-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: visible;
    display: flex;
    flex-direction: row;
    width: fit-content;
    max-width: 52px;
    padding: 0;
    box-sizing: border-box;
}

.news-card-popup .share-btn-popup {
    width: 26px !important;
    height: 28px !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    box-shadow: none !important;
}

.news-card-popup .share-btn-popup svg {
    width: 12px !important;
    height: 12px !important;
    fill: #007bff !important;
}

.news-card-popup .share-btn-popup:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #333 !important;
    transform: none !important;
}

.news-card-popup .button-divider {
    width: 1px;
    height: 100%;
    background: #ddd;
}

.news-card-popup .popup-menu-container {
    position: relative;
    display: flex;
}

.news-card-popup .popup-menu-btn {
    width: 16px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.news-card-popup .popup-menu-btn svg {
    width: 8px;
    height: 8px;
    fill: #333;
}

.news-card-popup .popup-menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.news-card-popup .company-name {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
    max-height: 2.4em; /* ~2 lines with tighter line height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card-popup .company-tags {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.news-card-popup .company-category,
.news-card-popup .company-city {
    margin-bottom: 0;
}

.news-card-popup .category-tag {
    display: inline-block;
    background: #6c757d;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-popup .city-tag {
    display: inline-block;
    background: #17a2b8;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.news-card-popup .company-description {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    max-height: 3.6em; /* ~2.5 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card-popup .company-news {
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-card-popup .company-news .news-content {
    color: #495057;
    font-size: 13px;
    line-height: 1.3;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: max-height 0.3s ease;
}

.news-card-popup .company-news .news-content.collapsed {
    max-height: 3.9em; /* ~3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-card-popup .company-news .news-content.expanded {
    max-height: none;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.news-card-popup .company-news .news-toggle {
    margin-top: 5px;
    text-align: right;
}

.news-card-popup .company-news .news-more-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.news-card-popup .company-news .news-more-btn:hover {
    background: rgba(0, 123, 255, 0.1);
    text-decoration: none;
}

.news-card-popup .news-updated-date {
    font-size: 10px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 4px;
}

.news-card-popup .company-links {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.news-card-popup .company-links a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid #4CAF50;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.news-card-popup .company-links a:hover {
    background: #4CAF50;
    color: white;
}

.news-card-popup .social-icons {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.news-card-popup .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-card-popup .social-icon:hover {
    transform: scale(1.1);
}

.news-card-popup .social-icon.linkedin {
    color: #0077B5;
    background: rgba(0, 119, 181, 0.1);
}

.news-card-popup .social-icon.instagram {
    color: #E4405F;
    background: rgba(228, 64, 95, 0.1);
}

.news-card-popup .social-icon.tiktok {
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
}

.news-card-popup .social-icon.snapchat {
    color: #FFFC00;
    background: rgba(255, 252, 0, 0.1);
}

.news-card-popup .social-icon.whatsapp {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

/* Share Section */
/* Share Modal */
.share-modal {
    max-width: 400px;
    width: 90%;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-option.whatsapp {
    background: #25D366;
    color: white;
}

.share-option.telegram {
    background: #0088cc;
    color: white;
}

.share-option.twitter {
    background: #1DA1F2;
    color: white;
}

.share-option.copy {
    background: #6c757d;
    color: white;
}

.share-option.preview {
    background: #17a2b8;
    color: white;
}

.share-option.native {
    background: #28a745;
    color: white;
}

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

/* WhatsApp Preview Modal */
.whatsapp-preview-modal {
    max-width: 500px;
    width: 90%;
}

.whatsapp-preview {
    background: #ece5dd;
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.whatsapp-header {
    background: #128c7e;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.whatsapp-info {
    flex: 1;
}

.whatsapp-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 2px;
}

.whatsapp-status {
    font-size: 13px;
    opacity: 0.8;
}

.whatsapp-message {
    padding: 20px 16px;
    min-height: 100px;
}

.message-bubble {
    background: #dcf8c6;
    border-radius: 18px 18px 4px 18px;
    padding: 8px 12px;
    max-width: 280px;
    margin-left: auto;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-family: inherit;
    color: #303030;
}

.message-time {
    font-size: 11px;
    color: #667781;
    margin-top: 4px;
    text-align: right;
}

.preview-note {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 13px;
    color: #495057;
}

.preview-note p {
    margin: 0 0 8px 0;
}

.preview-note p:last-child {
    margin-bottom: 0;
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.preview-actions .btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-actions .btn-primary {
    background: #25d366;
    color: white;
}

.preview-actions .btn-primary:hover {
    background: #128c7e;
}

.preview-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.preview-actions .btn-secondary:hover {
    background: #545b62;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .news-panel {
        width: 100%;
        right: -100%;
    }
}

/* Empty state */
.news-panel-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.news-panel-empty h4 {
    margin: 0 0 10px 0;
    color: #888;
}

.news-panel-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.news-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1px;
    width: fit-content;
}

/* Toggle Button */
.news-toggle-btn {
    background-color: #dc2626;
    color: white;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 35px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.news-toggle-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.news-toggle-btn.active {
    background-color: #16a34a;
}

.news-toggle-btn.active:hover {
    background-color: #15803d;
}

.toggle-text {
    font-size: 9px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Timer Display */
.news-timer {
    font-size: 10px;
    color: #007bff;
    font-weight: 600;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    display: flex;
    align-items: center;
    line-height: 1;
}

/* Reset Button */
.news-reset-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.news-reset-btn:hover {
    background-color: #f8f9fa;
}

.company-links {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.company-links a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid #4CAF50;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.company-links a:hover {
    background: #4CAF50;
    color: white;
}

.social-icons {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon.linkedin {
    color: #0077B5;
    background: rgba(0, 119, 181, 0.1);
}

.social-icon.linkedin:hover {
    background: #0077B5;
    color: white;
}

.social-icon.instagram {
    color: #E4405F;
    background: rgba(228, 64, 95, 0.1);
}

.social-icon.instagram:hover {
    background: #E4405F;
    color: white;
}

.social-icon.tiktok {
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
}

.social-icon.tiktok:hover {
    background: #000000;
    color: white;
}

.social-icon.snapchat {
    color: #FFFC00;
    background: rgba(255, 252, 0, 0.2);
    border: 1px solid #FFFC00;
}

.social-icon.snapchat:hover {
    background: #FFFC00;
    color: #000000;
}

.social-icon.whatsapp {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.social-icon.whatsapp:hover {
    background: #25D366;
    color: white;
}

.social-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 3px;
}

.social-inputs input {
    font-size: 11px;
    padding: 6px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 10px;
    border-radius: 12px;
    width: 85%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Custom scrollbar for modal to preserve border-radius */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 0 12px 12px 0;
    margin: 12px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
    margin: 2px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.modal-content::-webkit-scrollbar-corner {
    background: transparent;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 8px;
}

.close:hover {
    color: black;
}

/* Modal header actions */
.modal-header-actions {
    position: relative;
    height: 40px;
    margin-bottom: 10px;
}

/* Title with menu wrapper */
.title-with-menu {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
}

/* Specific styling for Add/Edit Company modal only */
#companyFormStep .title-with-menu {
    margin-bottom: 5px !important;
}

.title-with-menu h2 {
    margin: 0 !important;
    flex-grow: 1 !important;
}

/* Modal header buttons container */
.modal-header-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Modal share button */
.modal-share-btn {
    width: 26px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    border-radius: 0;
}

.modal-share-btn:hover {
    background: rgba(0, 123, 255, 0.1);
}

.modal-share-btn:active {
    background: rgba(0, 123, 255, 0.15);
    transform: none;
}

.modal-share-btn svg {
    width: 12px;
    height: 12px;
    fill: #007bff;
}

/* Three dots menu container - matches popup exactly */
.modal-menu-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-menu-btn {
    width: 16px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    border-radius: 0;
}

.modal-menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.modal-menu-btn svg {
    width: 8px;
    height: 8px;
    fill: #333;
}

.modal-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.modal-menu-dropdown.show {
    display: block;
}

.modal-menu-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.modal-menu-option:last-child {
    border-bottom: none;
}

.modal-menu-option:hover {
    background: #f8f9fa;
}

.modal-menu-option.modal-menu-delete {
    color: #dc3545;
}

.modal-menu-option.modal-menu-delete:hover {
    background: #f8d7da;
}

.modal-menu-option svg {
    flex-shrink: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    color: #333;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.category-input-container {
    position: relative;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.category-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.category-option:hover,
.category-option.highlighted {
    background-color: #f8f9fa;
}

.category-option:last-child {
    border-bottom: none;
}

.category-match {
    font-weight: bold;
    color: #4CAF50;
}

.category-keywords {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Address autocomplete styles */
.address-input-container {
    position: relative;
}

.address-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.address-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-option:hover,
.address-option.highlighted {
    background-color: #f8f9fa;
}

.address-option:last-child {
    border-bottom: none;
}

.address-name {
    flex: 1;
}

.address-match {
    font-weight: bold;
    color: #4CAF50;
}

.address-type {
    font-size: 11px;
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.form-group textarea {
    height: 60px;
    resize: vertical;
}

.submit-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-top: 5px;
}

.submit-btn:hover {
    background: #45a049;
}

/* Logo Dropdown Styles */
.logo-dropdown-container {
    position: relative;
}

.logo-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 2000;
    display: none;
    margin-top: 5px;
}

.logo-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease-out;
}

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

.logo-dropdown-content {
    padding: 8px 0;
}

.dropdown-item {
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

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

.dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 6px 0;
}

.dropdown-info {
    padding: 0 16px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.dropdown-info > div {
    margin-bottom: 4px;
}

.dropdown-info > div:last-child {
    margin-bottom: 8px;
}

.dropdown-info a {
    color: #007bff;
    text-decoration: none;
}

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

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 85%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    margin-left: 120px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

#companyFormTitle {
    margin: 0;
    margin-left: 60px !important;
    margin-top: 8.5px !important;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

#companyFormSubtitle {
    margin: 20px 0 2px 0 !important;
    color: #666;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.content-text {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.content-text h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.content-text p {
    margin-bottom: 15px;
}

.content-text ul, .content-text ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.content-text li {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .search-section {
        order: 2;
        margin: 0;
        max-width: none;
    }
    
    .action-section {
        order: 3;
    }
    
    .logo-section {
        order: 1;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
        max-width: 700px;
    }
    
    .companies-grid {
        grid-template-columns: repeat(auto-fill, 45px);
        gap: 0;
        padding: 10px;
    }
    
    .company-card {
        width: 45px;
        height: 45px;
    }
    
    .company-popup {
        min-width: 200px;
        max-width: 280px;
        padding: 12px;
    }
    
    .company-popup h3 {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .company-popup .company-description {
        font-size: 13px;
    }
    
    .company-popup .news-content {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .companies-grid {
        grid-template-columns: repeat(auto-fill, 40px);
    }
    
    .company-card {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 15px;
    }
    
    .company-popup {
        min-width: 180px;
        max-width: 250px;
        padding: 10px;
    }
    
    .company-popup h3 {
        font-size: 15px;
    }
    
    .company-popup .company-description {
        font-size: 12px;
    }
    
    .company-popup .news-content {
        font-size: 11px;
    }
    
    .action-section {
        gap: 10px;
    }
    
    .add-company-btn {
        padding: 6px 12px;
        min-width: 75px;
        height: 32px;
    }
    
    .btn-text-main {
        font-size: 11px;
    }
    
    .btn-text-sub {
        font-size: 8px;
    }
    
    .sign-out-btn {
        padding: 6px 12px;
        font-size: 11px;
        height: 32px;
    }
    
    .site-logo {
        height: 40px;
        max-width: 180px;
    }
}

/* Authentication Styles */
.auth-step {
    text-align: center;
}

.auth-step h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.auth-step p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

.phone-input-container {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    padding-right: 8px;
}

.country-code {
    background: #f8f9fa;
    padding: 12px 15px;
    border-right: 1px solid #ddd;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.phone-input-container input[type="tel"] {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
}

.phone-input-container input[type="tel"]:focus {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Inline OTP Input */
.phone-otp-inline {
    border: none !important;
    border-left: 1px solid #ddd !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    outline: none !important;
    width: 120px !important;
    text-align: center !important;
    background: #f8f9fa !important;
    height: 24px !important;
    box-sizing: border-box !important;
    margin-right: 4px !important;
}

.phone-otp-inline:focus {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
}

/* Inline Verify Button */
.verify-otp-btn-inline {
    background: #4CAF50 !important;
    color: white !important;
    border: none !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background-color 0.3s ease !important;
    height: 24px !important;
    box-sizing: border-box !important;
    margin-right: 4px !important;
}

.verify-otp-btn-inline:hover {
    background: #45a049 !important;
}

.verify-otp-btn-inline:active {
    transform: translateY(1px) !important;
}

/* Phone Change Button Styles */
.change-phone-btn, .send-otp-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    height: 24px;
    box-sizing: border-box;
    margin-right: 4px;
}

.change-phone-btn:hover, .send-otp-btn:hover {
    background: #0056b3;
}

.change-phone-btn:active, .send-otp-btn:active {
    transform: translateY(1px);
}

.cancel-phone-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.cancel-phone-btn:hover {
    background: #c82333;
}

.cancel-phone-btn:active {
    transform: translateY(1px);
}

.phone-otp-container {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
}

.phone-otp-container input {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    margin-right: 10px;
}

.verify-otp-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.verify-otp-btn:hover {
    background: #45a049;
}

#otpCode {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    padding: 15px;
    width: 200px;
    margin: 0 auto;
}

.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.otp-actions .submit-btn {
    background: #4CAF50;
    margin-bottom: 10px;
}

.resend-btn, .back-btn {
    background: transparent;
    color: #2196F3;
    border: 1px solid #2196F3;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.resend-btn:hover, .back-btn:hover {
    background: #2196F3;
    color: white;
}

.resend-btn:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.countdown {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.input-help {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
}

#displayPhone {
    color: #2196F3;
    font-weight: bold;
}

/* User Dashboard Preview */
.user-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.user-info p {
    color: #666;
    font-size: 14px;
}

.logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    float: right;
}

.logout-btn:hover {
    background: #d32f2f;
}

/* Add Company Authentication Styles */
.auth-step {
    text-align: center;
    padding: 20px 0;
}

.auth-step h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.auth-step p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

#companyFormStep h2 {
    color: #2c5530;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

#companyFormStep p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Step transitions */
.auth-step, #companyFormStep {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.auth-step.hidden, #companyFormStep.hidden {
    display: none;
    opacity: 0;
}

/* Enhanced phone input for auth */
#authPhoneForm .phone-input-container {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    background: white;
    transition: border-color 0.3s ease;
}

#authPhoneForm .phone-input-container:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#authPhoneForm .country-code {
    background: #f8f9fa;
    padding: 15px 12px;
    border-right: 1px solid #ddd;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#authPhoneForm input[type="tel"] {
    border: none;
    padding: 15px 12px;
    font-size: 16px;
    flex: 1;
    outline: none;
    background: transparent;
}

/* OTP input styling for auth */
.otp-input {
    width: 200px !important;
    text-align: center;
    font-size: 24px !important;
    font-weight: 600;
    letter-spacing: 8px;
    padding: 15px !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.otp-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Button enhancements */
.primary-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
    min-width: 180px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-btn {
    background: none;
    border: 2px solid #ddd;
    color: #666;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.back-btn:hover {
    border-color: #999;
    color: #333;
}

/* OTP actions container */
.otp-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Countdown styling */
#authResendCountdown {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

#authResendCountdown small {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #eee;
}

/* Success state styling */
.auth-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.auth-success h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.auth-success p {
    margin: 0;
    opacity: 0.9;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .auth-step h2 {
        font-size: 20px;
    }
    
    .otp-input {
        width: 150px !important;
        font-size: 20px !important;
        letter-spacing: 4px;
    }
    
    .primary-btn {
        min-width: 140px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .otp-actions {
        gap: 8px;
    }
}

/* User Dashboard Styles */
.user-dashboard {
    padding: 20px;
}

.user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.user-info h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.user-info p {
    margin: 5px 0;
    opacity: 0.9;
}

.company-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.company-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.company-details {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.company-logo {
    flex-shrink: 0;
}

.no-logo {
    width: 80px;
    height: 80px;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    color: #6c757d;
}

.company-text {
    flex: 1;
}

.company-text h5 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2c5530;
}

.company-text p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

.company-category {
    display: inline-block;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.edit-company-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-company-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.delete-company-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-company-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.no-company {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.no-company h4 {
    color: #666;
    margin: 0 0 10px 0;
}

.no-company p {
    color: #999;
    margin: 0 0 20px 0;
}

.add-first-company-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.add-first-company-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.dashboard-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    text-align: center;
}

/* User Dashboard Enhanced Styles */
.user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
}

.user-info h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

.user-info p {
    margin: 8px 0;
    font-size: 16px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    float: right;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
}

/* Features list styling */
.user-info + div ul {
    list-style: none;
    padding: 0;
}

.user-info + div ul li {
    padding: 8px 0;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.user-info + div ul li:last-child {
    border-bottom: none;
}

/* Enhanced button animations */
.primary-btn, .secondary-btn, .resend-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.primary-btn:active, .secondary-btn:active {
    transform: translateY(0);
}

/* Loading animation for OTP sending */
.sending-otp {
    opacity: 0.7;
    pointer-events: none;
}

.sending-otp::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin: 15px 0;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced responsive improvements */
@media (max-width: 480px) {
    .modal-content {
        margin: 5% auto;
        padding: 20px 15px;
        width: 95%;
        max-width: none;
    }
    
    .phone-input-container {
        flex-wrap: wrap;
        padding-right: 6px;
    }
    
    .phone-input-container input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .phone-otp-inline {
        width: 100px !important;
        font-size: 13px !important;
        padding: 6px 10px !important;
        height: 24px !important;
        margin-right: 3px !important;
    }
    
    .verify-otp-btn-inline, .change-phone-btn, .send-otp-btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
        border-radius: 4px !important;
        height: 24px !important;
        margin-right: 3px !important;
    }
    
    .cancel-phone-btn {
        min-width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
        border-radius: 4px !important;
    }
    
    .otp-input {
        font-size: 24px !important;
    }
    
    .user-info {
        padding: 15px;
    }
    
    .user-info h3 {
        font-size: 20px;
    }
    
    .logout-btn {
        float: none !important;
        display: block;
        text-align: center;
        margin-top: 15px;
        width: 100%;
    }
}

/* Elegant Logo Upload Styles */
.logo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-upload-area {
    background: #f8f9fa;
    border: 2px dotted #dee2e6;
    border-radius: 12px;
    padding: 15px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.logo-upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.logo-upload-area::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px dotted rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    pointer-events: none;
}

.logo-preview-square {
    width: 100px;
    height: 100px;
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo-preview-square:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.upload-text {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.logo-preview-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-upload-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 24px;
    box-sizing: border-box;
}

.logo-upload-btn:hover {
    background: #0056b3;
}

.logo-upload-btn:active {
    transform: translateY(1px);
}

.logo-helper-text {
    text-align: center;
    color: #6c757d;
    font-size: 11px;
    line-height: 1.4;
}

.file-requirements {
    font-weight: 500;
    color: #495057;
}

.dimension-suggestion {
    margin-top: 2px;
    color: #6c757d;
}

/* Company form phone input styling to match other fields */
#addCompanyForm .phone-input-container {
    border: 1px solid #ddd;
    border-radius: 4px;
}

#addCompanyForm .phone-input-container .country-code {
    padding: 8px 12px;
    font-size: 13px;
}

#addCompanyForm .phone-input-container input[type="tel"] {
    padding: 8px;
    font-size: 13px;
}

/* Branch System Styles */
.branch-section {
    margin: 15px 0;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.branch-title {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.branch-group {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* Reduce spacing within branch form groups */
.branch-group .form-group {
    margin-bottom: 8px;
}

.add-branch-container {
    text-align: center;
    margin: 10px 0;
}

.add-branch-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 24px;
    box-sizing: border-box;
}

.add-branch-btn:hover {
    background: #0056b3;
}

.add-branch-btn:active {
    transform: translateY(1px);
}

.remove-branch-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    float: right;
    margin-top: -10px;
    margin-right: -10px;
}

.remove-branch-btn:hover {
    background: #c82333;
}

/* Company card branch indicator */
.branch-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
}

/* Enhanced Search System Styles */

/* Search Container */
.search-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 10px 80px 10px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.clear-search-btn {
    position: absolute;
    right: 45px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.clear-search-btn:hover {
    background-color: #f8f9fa;
}

.clear-search-btn span {
    font-size: 16px;
    color: #666;
}

/* Inline Filter Button */
.filter-toggle-btn-inline {
    position: absolute;
    right: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.filter-toggle-btn-inline:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.filter-toggle-btn-inline.active {
    background-color: #007bff;
    border-color: #007bff;
}

.filter-toggle-btn-inline.active span {
    color: white;
}

.filter-toggle-btn-inline span {
    font-size: 14px;
    color: #666;
}

.filter-toggle-btn-inline .filter-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 5px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover, .suggestion-item.selected {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    color: #666;
    font-size: 14px;
}

.suggestion-text {
    flex: 1;
    font-size: 14px;
}

.suggestion-type {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Search History */
.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
}

.search-history-header {
    padding: 10px 16px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.search-history-item {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

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

.search-history-item .icon {
    color: #999;
    font-size: 12px;
}

.clear-history-btn {
    width: 100%;
    padding: 8px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.clear-history-btn:hover {
    background-color: #e9ecef;
}

/* Advanced Filters */
.advanced-filters {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 300px;
    min-width: 280px;
}

.filters-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    animation: none;
    margin-right: auto;
}

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

.filters-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.filter-group {
    position: relative;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
}

.services-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px;
}

.services-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    font-size: 12px;
}

.services-filter label:hover {
    background-color: #f8f9fa;
}

.services-filter input[type="checkbox"] {
    margin: 0;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.location-suggestion-item {
    padding: 6px 8px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-main {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
}

.location-icon {
    font-size: 12px;
    margin-right: 4px;
}

.location-names {
    flex: 1;
}

.location-name-en {
    font-weight: 600;
    color: #333;
    font-size: 11px;
    margin-bottom: 0px;
    line-height: 1.2;
}

.location-type {
    font-weight: 400;
    color: #666;
    font-size: 9px;
}

.location-name-ar {
    font-size: 9px;
    color: #666;
    direction: rtl;
    text-align: right;
    line-height: 1.1;
}

.location-full {
    font-size: 8px;
    color: #888;
    margin-top: 1px;
    font-style: italic;
    line-height: 1.1;
}

/* Multi-select location dropdown */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-dropdown {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.multi-select-search {
    padding: 4px;
    border-bottom: 1px solid #eee;
}

.multi-select-search input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 4px 6px;
    font-size: 11px;
    outline: none;
}

.multi-select-search input:focus {
    border-color: #2196F3;
}

.selected-locations-display {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    min-height: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-height: 40px;
    overflow-y: auto;
}

.selected-locations-display:empty {
    display: none;
}

.selected-location {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 9px;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}

.selected-location .remove {
    cursor: pointer;
    color: #666;
    font-weight: bold;
    font-size: 10px;
    line-height: 1;
}

.selected-location .remove:hover {
    color: #f44336;
}

.multi-select-options {
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    max-height: 120px;
    overflow-y: auto;
    display: none;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.multi-select-options.show {
    display: block;
}

.multi-select-option {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    line-height: 1.2;
}

.multi-select-option:hover {
    background-color: #f5f5f5;
}

.multi-select-option.selected {
    background-color: #e3f2fd;
    color: #2196F3;
}

.multi-select-option .option-icon {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.multi-select-option .option-text {
    flex: 1;
}

.multi-select-option .option-name {
    font-weight: 500;
}

.multi-select-option .option-arabic {
    font-size: 9px;
    color: #666;
    direction: rtl;
}

.filters-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.apply-filters-btn, .clear-filters-btn, .save-search-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    width: 100%;
}

.apply-filters-btn {
    background: #007bff;
    color: white;
}

.apply-filters-btn:hover {
    background: #0056b3;
}

.clear-filters-btn {
    background: #6c757d;
    color: white;
}

.clear-filters-btn:hover {
    background: #545b62;
}

.save-search-btn {
    background: #28a745;
    color: white;
}

.save-search-btn:hover {
    background: #1e7e34;
}

/* Saved Searches Bar */
.saved-searches-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.saved-searches-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.saved-searches-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.saved-search-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.saved-search-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.saved-search-item .delete-saved {
    color: #dc3545;
    font-weight: bold;
    margin-left: 5px;
    cursor: pointer;
}

/* Search Results Header */
.search-results-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    border-left: 3px solid #4CAF50;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-results-info {
    font-size: 14px;
    color: #495057;
}

.search-results-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-btn, .export-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.sort-btn:hover, .export-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-results-actions {
        justify-content: center;
    }
    
    .filters-actions {
        justify-content: center;
    }
    
    .saved-searches-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Report Modal Styles */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 85%;
    max-height: 80vh;
    overflow-y: auto;
}

.report-company-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

.report-company-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

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

.report-disclaimer {
    color: #6c757d;
    font-size: 13px !important;
    font-style: italic;
}

.report-terms {
    margin: 20px 0;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
}

.report-submit-btn {
    background: #dc3545 !important;
    color: white !important;
}

.report-submit-btn:hover {
    background: #c82333 !important;
}

/* Report form validation styles */
.form-group select:invalid,
.form-group input:invalid {
    border-color: #dc3545;
}

.form-group select:valid,
.form-group input:valid {
    border-color: #28a745;
}

@media (max-width: 768px) {
    .report-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header-actions {
        flex-direction: column;
        gap: 2px;
    }
}
