/* eGreenCity v2.0 - Main Stylesheet */

/* Advanced Polygon Editing Styles */
.vertex-marker {
    z-index: 1000;
}

.midpoint-marker {
    z-index: 999;
}

.vertex-icon {
    background: #dc2626;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.midpoint-icon {
    background: #3b82f6;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.vertex-icon:hover {
    transform: scale(1.2);
    background: #b91c1c;
}

.midpoint-icon:hover {
    transform: scale(1.2);
    background: #2563eb;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #1f2937;
    line-height: 1.6;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #F6F6F6;
    color: #1f2937;
    z-index: 100;
    transition: transform 0.3s ease;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

/* Sidebar Navigation with smooth scrolling */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    box-shadow: 
        inset 0 8px 8px -8px rgba(0, 0, 0, 0.1),
        inset 0 -8px 8px -8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 0.6rem;
    border-bottom: 1px solid #e5e7eb;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 40px;
}

.logo-small {
    display: none;
}

/* Search Section in sidebar - hidden for now */
.sidebar .search-section {
    display: none;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #1f2937;
    font-size: 14px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: #55B687;
    box-shadow: 0 0 0 3px rgba(85, 182, 135, 0.1);
}

/* Navigation */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 0.25rem 0;
}

/* Primary Action Menu Item (e.g., +Προσθήκη) */
.nav-item.primary-action {
    margin: 0.75rem 1rem;
}

.nav-item.primary-action .nav-link {
    background: linear-gradient(135deg, #00B48D 0%, #008f72 100%);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 1.5rem;
    border-left: none;
    box-shadow: 0 2px 8px rgba(0, 180, 141, 0.3);
    transition: all 0.3s ease;
}

.nav-item.primary-action .nav-link:hover {
    background: linear-gradient(135deg, #008f72 0%, #00B48D 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 141, 0.4);
    border-left: none;
}

.nav-item.primary-action .nav-link i {
    color: white;
    font-weight: bold;
}

.nav-item.primary-action.active .nav-link {
    background: linear-gradient(135deg, #006e5a 0%, #008f72 100%);
}

.nav-divider {
    margin: 1.5rem 0 0.75rem 0;
    padding: 0.5rem 1rem;
}

.divider-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 6px 1.5rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #e5e7eb;
    color: #1f2937;
    border-left-color: #00B48D;
}

.nav-link.active,
.nav-item.active .nav-link {
    background: #00B48D;
    color: white;
    border-left-color: #008f72;
    font-weight: 600;
}

.nav-item.active .nav-link i {
    color: white;
}

.nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-arrow {
    transition: transform 0.3s ease;
}

.nav-item.has-submenu.open .nav-arrow,
.nav-item.has-submenu.expanded .nav-arrow {
    transform: rotate(180deg);
}

/* Enhanced styling for expanded submenus */
.nav-item.has-submenu.open .nav-link,
.nav-item.has-submenu.expanded .nav-link {
    background: #f0fdf4;
    color: #15803d;
    border-left-color: #00B48D;
}

.nav-item.has-submenu.open .nav-link i,
.nav-item.has-submenu.expanded .nav-link i {
    color: #00B48D;
}

/* Submenu */
.submenu {
    list-style: none;
    background: #f3f4f6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-left: 3px solid #00B48D;
    margin-left: 1rem;
    border-radius: 0 8px 8px 0;
}

.nav-item.has-submenu.open .submenu,
.nav-item.has-submenu.expanded .submenu {
    max-height: 200px;
}

.submenu li {
    margin: 0;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 5px 1.5rem 5px 3rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-sublink i {
    display: none;
}

.nav-sublink:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.nav-sublink.active {
    background: #00B48D;
    color: white;
    font-weight: 600;
    border-left: 3px solid #008f72;
}

/* User Section */
.user-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
    flex-shrink: 0;
}

.user-info {
    margin-bottom: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.user-name-row,
.user-firm-row,
.user-email-row,
.user-assignment-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
}

.user-name-row {
    justify-content: space-between;
}

.user-name-row i,
.user-firm-row i,
.user-email-row i{
    color: #55B687;
    font-size: 11px;
    width: 11px;
    text-align: center;
    flex-shrink: 0;
}
.user-assignment-row i {
    color: #d4434c;
    font-size: 14px;
    width: 11px;
    text-align: center;
    flex-shrink: 0;
}

.user-email-row i {
    opacity: 0;
}

.user-name {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.user-firm {
    font-weight: 500;
    color: #6b7280;
    font-size: 11px;
}

.user-email {
    font-weight: 500;
    color: #6b7280;
}

.user-assignment {
    font-weight: 500;
    color: #000;
    font-size: 16px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-assignment-row {
    justify-content: space-between;
    margin-top:10px;
}

.change-assignment-icon {
    color: #55B687;
    text-decoration: none;
    font-size: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Assignment Modal Styling */
#assignment-modal .modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
}

#assignment-modal .modal-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

#assignment-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#assignment-modal .modal-header h3 i {
    font-size: 1rem;
}

#assignment-modal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#assignment-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#assignment-modal .modal-body {
    padding: 0;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
}

#assignment-modal .modal-content-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
}

#assignment-modal .modal-option {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#assignment-modal .modal-option:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

#assignment-modal .modal-option.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.15);
}

#assignment-modal .modal-option.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981;
    border-radius: 0 2px 2px 0;
}

#assignment-modal .option-content {
    flex: 1;
    min-width: 0;
}

#assignment-modal .option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

#assignment-modal .option-header i {
    color: #6b7280;
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

#assignment-modal .option-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignment-modal .status-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    flex-shrink: 0;
}

#assignment-modal .status-badge.status-pending {
    background: #fef3c7;
    color: #d97706;
}

#assignment-modal .status-badge.status-in_progress {
    background: #dbeafe;
    color: #2563eb;
}

#assignment-modal .status-badge.status-reopened {
    background: #fce7f3;
    color: #be185d;
}

#assignment-modal .option-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

#assignment-modal .option-type {
    background: #f1f5f9;
    color: #475569;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

#assignment-modal .option-assignee {
    color: #64748b;
    font-style: italic;
}

#assignment-modal .active-indicator {
    color: #10b981;
    font-size: 1.2rem;
    flex-shrink: 0;
}

#assignment-modal .no-options {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

#assignment-modal .modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    gap: 0.5rem;
}

#assignment-modal .modal-loading i {
    color: #10b981;
}

/* Scrollbar styling for assignment modal */
#assignment-modal .modal-content-list::-webkit-scrollbar {
    width: 6px;
}

#assignment-modal .modal-content-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#assignment-modal .modal-content-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#assignment-modal .modal-content-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.active-role-badge {
    font-size: 9px !important;
    padding: 2px 5px !important;
    margin-left: auto;
    flex-shrink: 0;
}

/* Active City/Firm Display - Simplified */
.active-city-firm-info {
    margin-bottom: 0.4rem;
}

.active-city-firm-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    justify-content: space-between;
}

.active-city-firm-label i.fa-map-marker-alt {
    color: #55B687;
    font-size: 11px;
    margin-left:1px;
}

#active-city-firm-text {
    flex: 1;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.change-city-firm-icon {
    color: #55B687;
    text-decoration: none;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 11px;
}

.change-city-firm-icon:hover {
    background: rgba(85, 182, 135, 0.1);
    color: #4a9d75;
}

/* City/Firm Modal */
.city-firm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: #55B687;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    gap: 1rem;
}

.modal-loading i {
    font-size: 24px;
    color: #55B687;
}

.modal-no-access {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: #4b5563;
}

.modal-no-access i {
    font-size: 48px;
    color: #17a2b8;
    margin-bottom: 1rem;
}

.modal-no-access h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1rem 0;
}

.modal-no-access p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0.5rem 0;
    max-width: 400px;
}

.modal-content-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* City Search Input */
.city-search-container {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.city-search-input {
    width: 100%;
    padding: 10px 40px 10px 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.city-search-input:focus {
    outline: none;
    border-color: #00B48D;
    box-shadow: 0 0 0 3px rgba(0, 180, 141, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.clear-search-btn:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.no-search-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #6b7280;
    text-align: center;
}

.no-search-results i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.no-search-results p {
    font-size: 14px;
    margin: 0;
}

.no-search-results strong {
    color: #4b5563;
    font-weight: 600;
}
  
.city-firm-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.city-firm-option:hover {
    background: #f8fafc;
    border-color: #55B687;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(85, 182, 135, 0.1);
}

.city-firm-option.active {
    background: #f0fdf4;
    border-color: #00B48D;
    color: #15803d;
}

.city-firm-option-info {
    flex: 1;
}

.city-firm-option-city {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.city-firm-option-firm {
    font-size: 13px;
    color: #6b7280;
}

.city-firm-option-firm .context-hint {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    margin-left: 4px;
}

.city-firm-option.active .city-firm-option-firm {
    color: #15803d;
}

.city-firm-option-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.city-firm-option-roles .role-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.city-firm-option-status {
    font-size: 12px;
    color: #00B48D;
    font-weight: 500;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #ef4444;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.logout-link:hover {
    background: #dc2626;
    color: white;
}

.logout-link i {
    margin-right: 8px;
}

/* Logout Section */
.logout-section {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    flex-shrink: 0;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
}

/* Hide backdrop on desktop */
@media (min-width: 769px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1001
}

.top-bar-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    margin-right: 1rem;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-sidebar-toggle:hover {
    background-color: rgba(107, 114, 128, 0.1);
}

.mobile-sidebar-toggle:active {
    background-color: rgba(107, 114, 128, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
    flex: 1;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}


.breadcrumb-link {
    display: flex;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb-link:hover {
    color: #1f2937;
}

.breadcrumb-link i {
    margin-right: 6px;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #d1d5db;
    font-size: 12px;
}

.breadcrumb-current {
    color: #1f2937;
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    margin-top: 60px;
    padding: 2rem;
    min-height: calc(100vh - 60px);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.dashboard-card h3 {
    font-size: 18px;
    margin-bottom: 1rem;
    color: #1f2937;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #55B687;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
}

/* User Management Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title h1 {
    font-size: 24px;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.page-title p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

.page-actions .btn {
    padding: 10px 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.page-actions .btn i {
    margin-right: 0.25rem;
}

.page-actions .btn-primary {
    background: #55B687;
    border: 1px solid #55B687;
    color: white;
}

.page-actions .btn-primary:hover {
    background: #4a9d75;
    border-color: #4a9d75;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(85, 182, 135, 0.3);
}

.page-actions .btn-secondary {
    background: #6b7280;
    border: 1px solid #6b7280;
    color: white;
}

.page-actions .btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.page-actions .btn-help {
    background: #f59e0b;
    border: 1px solid #f59e0b;
    color: white;
    min-width: auto;
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.page-actions .btn-help:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.page-actions .btn-help i {
    margin: 0;
    font-size: 20px;
}

/* Search Section */
.search-section {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Collapsible Search */
.search-section.collapsible-search {
    padding: 0;
    background: #f8fafc;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    background: #f0f4f8;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.collapsible-search.expanded .search-header {
    border-radius: 8px 8px 0 0;
}

.search-header:hover {
    background: #e5eaf0;
}

.search-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-header h3 i {
    color: #55B687;
}

.search-toggle-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.search-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1f2937;
}

.search-toggle-btn i {
    transition: transform 0.3s ease;
}

.collapsible-search.expanded .search-toggle-btn i {
    transform: rotate(180deg);
}

.collapsible-search .search-form {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.search-field input,
.search-field select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-field select {
    max-width: 250px;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #55B687;
    box-shadow: 0 0 0 3px rgba(85, 182, 135, 0.1);
}

.search-actions {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.search-actions .btn {
    padding: 10px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.search-actions .btn-primary {
    background: #55B687;
    border: 1px solid #55B687;
    color: white;
}

.search-actions .btn-primary:hover {
    background: #4a9d75;
    border-color: #4a9d75;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(85, 182, 135, 0.3);
}

.search-actions .btn-secondary {
    background: #6b7280;
    border: 1px solid #6b7280;
    color: white;
}

.search-actions .btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

/* Results Section */
.results-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.results-container {
    min-height: 200px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
}

.list-results {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border-radius: 8px;
    overflow: hidden;
}

.list-table th,
.list-table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.list-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    white-space: nowrap;
}

.list-table td {
    font-size: 14px;
    color: #1f2937;
    word-wrap: break-word;
}

.list-table tr:hover {
    background: #f9fafb;
}

/* Column widths for better layout */
/* 
.list-table th:nth-child(1),
.list-table td:nth-child(1) { width: 25%; } Email
.list-table th:nth-child(2),
.list-table td:nth-child(2) { width: 15%; } Name
.list-table th:nth-child(3),
.list-table td:nth-child(3) { width: 15%; } Lastname
.list-table th:nth-child(4),
.list-table td:nth-child(4) { width: 20%; } Firms
.list-table th:nth-child(5),
.list-table td:nth-child(5) { width: 15%; } Cities
.list-table th:nth-child(6),
.list-table td:nth-child(6) { width: 10%; } Role */

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin: 2px;
    white-space: nowrap;
}

.role-superadmin {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.role-firmadmin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde047;
}

.role-cityadmin {
    background: #ddd6fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.role-firmuser {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.role-cityuser {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.role-user {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Action Buttons */
.actions-column {
    width: 60px;
    min-width: 60px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.action-buttons .btn {
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
}

.action-buttons .btn i {
    margin-right: 0;
}

.action-buttons .btn-outline {
    background: #55B687;
    border: 1px solid #55B687;
    color: white;
}

.action-buttons .btn-outline:hover {
    background: #4a9d75;
    border-color: #4a9d75;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(85, 182, 135, 0.3);
}

.action-buttons .btn-danger {
    background: #ef4444;
    border: 1px solid #ef4444;
    color: white;
}

.action-buttons .btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.action-buttons .btn-success {
    background: #10b981;
    border: 1px solid #10b981;
    color: white;
}

.action-buttons .btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Form Submit Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-actions .btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    border: none;
    cursor: pointer;
}

.form-actions .btn-primary {
    background: #55B687;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #4a9d75;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(85, 182, 135, 0.3);
}

.form-actions .btn-secondary {
    background: #6b7280;
    color: white;
}

.form-actions .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

.form-actions .btn-danger {
    background: #ef4444;
    color: white;
}

.form-actions .btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Side-by-side form sections for medium+ screens */
@media (min-width: 768px) {
    .form-sections-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .form-sections-row .form-section {
        margin-bottom: 0;
        border-bottom: none;
    }
}

/* Disabled checkbox styling for admin cities */
.checkbox-label input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-label input[disabled] + .checkmark {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.checkbox-label input[disabled]:checked + .checkmark {
    background-color: #55B687;
    border-color: #55B687;
}

.checkbox-label input[disabled]:checked + .checkmark:after {
    opacity: 0.8;
}

/* Email validation alert */
/* Alert styles */
.alert {
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert.alert-info i {
    color: #17a2b8;
}

/* Welcome Email Section */
.welcome-email-info {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

.welcome-email-info .info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.welcome-email-info .info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.welcome-email-info .info-item i {
    color: #55B687;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.welcome-email-info .info-item span {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.welcome-email-info .info-item strong {
    color: #2c3e50;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.email-validation-alert {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 8px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.email-validation-alert.show {
    display: block;
}

.email-validation-alert .alert-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-validation-alert .alert-icon {
    color: #17a2b8;
    font-size: 16px;
}

.email-validation-alert .alert-text {
    color: #0c5460;
    font-size: 14px;
    flex: 1;
}

.email-validation-alert .alert-link {
    color: #55B687;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(85, 182, 135, 0.1);
    transition: all 0.2s ease;
}

.email-validation-alert .alert-link:hover {
    background: rgba(85, 182, 135, 0.2);
    color: #4a9d75;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-number:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.page-number.active {
    background: #55B687;
    color: white;
    border-color: #55B687;
    box-shadow: 0 2px 4px rgba(85, 182, 135, 0.3);
}

.page-info {
    font-size: 14px;
    color: #6b7280;
    margin-right: auto;
}

/* Loading and Error States */
.loading-state,
.error-state,
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-state i,
.error-state i,
.no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-state i {
    color: #ef4444;
}

/* Form Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* City Staff Management */
.city-staff-list {
    margin-bottom: 1.5rem;
}

.city-staff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.city-staff-item .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.city-staff-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.city-name {
    font-weight: 600;
    color: #2c3e50;
}

.city-role {
    font-size: 0.875rem;
    color: #6c757d;
}

.no-city-staff {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.add-city-staff-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Firms-Cities Management - Block Layout */
.firms-cities-list {
    margin-bottom: 1.5rem;
}

.firm-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.firm-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.firm-block-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.firm-block-title i {
    color: #55B687;
}

.firm-name {
    font-weight: 600;
    color: #2c3e50;
}

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.firm-cities-list {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.add-all-cities-btn {
    margin-left: auto;
}

.city-toggle-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.city-toggle-item:hover:not(.disabled) {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.city-toggle-item.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.city-toggle-item.active i {
    color: #16a34a;
}

.city-toggle-item.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.city-toggle-item i {
    font-size: 12px;
    color: #9ca3af;
}

.no-firm-city {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.add-firm-city-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.user-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section p {
    margin-bottom: 1rem
}
.form-section h3 {
    font-size: 18px;
    margin: 0 0 1rem 0;
    color: #55B687;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Responsive: Single column on small screens */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-field label.required::after {
    content: ' *';
    color: #ef4444;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-field select {
    max-width: 250px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #55B687;
    box-shadow: 0 0 0 3px rgba(85, 182, 135, 0.1);
}

.field-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.firm-options {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 0px solid #e5e7eb;
}

/* Responsive Table Columns */
.col-visible {
    display: table-cell !important;
}

/* Hide columns on small screens (mobile) */
@media (max-width: 576px) {
    .col-hidden-sm {
        display: none !important;
    }
}

/* Hide columns on medium screens (tablet) */
@media (max-width: 768px) {
    .col-hidden-md {
        display: none !important;
    }
}

/* Hide columns on large screens (small desktop) */
@media (max-width: 992px) {
    .col-hidden-lg {
        display: none !important;
    }
}

/* Ensure actions column is always visible but compact on mobile */
@media (max-width: 768px) {
    .actions-column {
        width: 80px;
        min-width: 80px;
    }
    
    .action-buttons {
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 12px;
        padding: 4px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding:1rem;
    }
    
    .top-bar {
        left: 0;
        padding: 0 1rem;
    }
    .breadcrumb-item:first-child a span {
        display: none;
    }
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* Mobile Sidebar Override - Force mobile behavior */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .search-actions .btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .action-buttons {
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
        padding: 6px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 600px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .page-numbers {
        order: 2;
    }
    
    .page-info {
        order: 3;
    }
}

@media (max-width: 480px) {
    .top-bar {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .logo-full {
        display: none;
    }
    
    .logo-small {
        display: block;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #55B687;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 85px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    top:2px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-label {
    background-color: #10b981;
}

.toggle-switch input:checked + .toggle-label:before {
    transform: translateX(52px);
}
.toggle-switch input:checked+.toggle-label {
    justify-content: flex-start;
}


.toggle-text {
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 1;
}

.toggle-switch input:checked+.toggle-label .toggle-text {
    color: white;
}

/* List table specific padding */
.list-table td:first-child,
.list-table th:first-child {
    padding-left: 10px;
}

.list-table td:last-child,
.list-table th:last-child {
    padding-right: 10px;
}

/* Alternating row colors for odd/even users */
.list-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.list-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Maintain hover effect */
.list-table tbody tr:hover {
    background: #f3f4f6 !important;
}

/* Clickable row styling */
.list-table tbody tr.clickable-row {
    transition: background-color 0.2s ease;
}

.list-table tbody tr.clickable-row:hover {
    background: #e5e7eb !important;
    cursor: pointer;
}

.list-table tbody tr.clickable-row:active {
    background: #d1d5db !important;
}

/* List pagination container */
.list-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

/* Per-page Selector */
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.per-page-selector label {
    font-weight: 500;
    white-space: nowrap;
}

.per-page-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #374151;
    min-width: 60px;
}

.per-page-select:focus {
    outline: none;
    border-color: #00B48D;
    box-shadow: 0 0 0 2px rgba(0, 180, 141, 0.1);
}

/* Enhanced pagination - single row layout with first/last/closest */
.pagination.pagination-enhanced {
    display: flex !important;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-direction: row !important;
    padding: 0.5rem !important;
    background: transparent !important;
    border-top: none !important;
}

.pagination.pagination-enhanced .pagination-btn {
    min-width: 32px !important;
    height: 32px !important;
    padding: 4px 8px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #d1d5db !important;
    background: white !important;
    color: #374151 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.pagination.pagination-enhanced .pagination-btn:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    transform: translateY(-1px) !important;
}

.pagination.pagination-enhanced .pagination-btn:active {
    transform: translateY(0) !important;
}

.pagination.pagination-enhanced .page-number {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 4px !important;
    font-size: 14px !important;
}

.pagination.pagination-enhanced .page-number.active {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.pagination.pagination-enhanced .page-number.active:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-1px) !important;
}

/* Page info line - separate row above pagination buttons */
.page-info-line {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
    width: 100%;
}

.page-info-line .page-info {
    font-size: 14px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
    text-align: center !important;
    margin: 0 !important;
}

.pagination.pagination-enhanced .page-info {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-right: auto !important;
    white-space: nowrap !important;
    font-weight: normal !important;
}

/* First/Last page button styling */
.pagination.pagination-enhanced .first-page,
.pagination.pagination-enhanced .last-page {
    min-width: 36px !important;
    width: 36px !important;
    padding: 4px !important;
}

.pagination.pagination-enhanced .first-page i,
.pagination.pagination-enhanced .last-page i {
    font-size: 12px !important;
}

/* Previous/Next page button styling */
.pagination.pagination-enhanced .prev-page,
.pagination.pagination-enhanced .next-page {
    min-width: 36px !important;
    width: 36px !important;
    padding: 4px !important;
}

.pagination.pagination-enhanced .prev-page i,
.pagination.pagination-enhanced .next-page i {
    font-size: 12px !important;
}

/* Ellipsis styling */
.pagination.pagination-enhanced .pagination-ellipsis {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    padding: 0 4px !important;
}

/* Compact pagination - single row layout (legacy support) */
.pagination.pagination-compact {
    display: flex !important;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-direction: row !important;
    padding: 0.5rem !important;
    background: transparent !important;
    border-top: none !important;
}

.pagination.pagination-compact .pagination-btn {
    min-width: 32px !important;
    height: 32px !important;
    padding: 4px 8px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pagination.pagination-compact .page-number {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 4px !important;
    font-size: 14px !important;
}

.pagination.pagination-compact .page-info {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-right: auto !important;
    white-space: nowrap !important;
    font-weight: normal !important;
}

.pagination.pagination-compact .page-number.active {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

/* Mobile responsive styles for pagination */
@media (max-width: 768px) {
    .pagination.pagination-enhanced,
    .pagination.pagination-compact {
        flex-direction: row !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .pagination.pagination-enhanced .page-numbers,
    .pagination.pagination-compact .page-numbers {
        order: unset !important;
    }
    
    .page-info-line {
        margin-bottom: 0.5rem !important;
    }
    
    .page-info-line .page-info {
        font-size: 12px !important;
    }
    
    .pagination.pagination-enhanced .page-info,
    .pagination.pagination-compact .page-info {
        order: unset !important;
        font-size: 11px !important;
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Hide some pagination elements on very small screens */
    .pagination.pagination-enhanced .first-page,
    .pagination.pagination-enhanced .last-page {
        display: none !important;
    }
    
    .pagination.pagination-enhanced .pagination-ellipsis {
        display: none !important;
    }
    
    /* Ensure per-page selector is visible on mobile */
    .per-page-selector {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        margin-bottom: 0.75rem;
    }
    
    .per-page-selector label {
        font-size: 12px;
    }
    
    .per-page-select {
        min-width: 70px;
        padding: 6px 8px;
    }
}

/* Extra small screens - hide more elements */
@media (max-width: 480px) {
    .pagination.pagination-enhanced .page-number {
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    .pagination.pagination-enhanced .prev-page,
    .pagination.pagination-enhanced .next-page {
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .pagination.pagination-enhanced .page-info {
        font-size: 10px !important;
    }
}

/* Info display styles for city edit view */
.info-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.info-display .info-value {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.info-display .info-description {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Page Meta Information */
.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.meta-item i {
    font-size: 11px;
    color: #d1d5db;
}

@media (max-width: 768px) {
    .page-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Polygon Editor */
.polygon-editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.polygon-textarea-section {
    min-height: 400px;
}

.polygon-map-section {
    min-height: 400px;
}

.map-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

.polygon-map {
    width: 100%;
    height: 350px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    justify-content: center;
}

.map-controls .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Responsive polygon editor */
@media (max-width: 1024px) {
    .polygon-editor-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .polygon-map {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .polygon-map {
        height: 250px;
    }
    
    .map-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .map-controls .btn {
        width: 100%;
    }
}

/* ===============================================
   MODAL STYLES (Generic - used for services, forms, etc.)
   =============================================== */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.service-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.service-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.service-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.service-modal .modal-close:hover {
    color: #1f2937;
}

.service-modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.service-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
}

.service-modal .form-group {
    margin-bottom: 1.25rem;
}

.service-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.service-modal .form-group input[type="text"],
.service-modal .form-group select,
.service-modal .form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.service-modal .form-group input:focus,
.service-modal .form-group select:focus,
.service-modal .form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.service-modal .required {
    color: #dc2626;
}

@media (max-width: 768px) {
    .service-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .service-modal .modal-header,
    .service-modal .modal-body,
    .service-modal .modal-footer {
        padding: 1rem;
    }
}

/* Fullscreen control for maps */
.leaflet-control-fullscreen {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    border: 2px solid rgba(0,0,0,0.2);
}

.fullscreen-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: white;
    color: #333;
    font-size: 16px; /* icon size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: #f4f4f4;
    color: #000;
}

.fullscreen-btn:active {
    background: #e6e6e6;
}

/* Fullscreen styles */
#map:fullscreen {
    width: 100vw;
    height: 100vh;
}

#map:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

#map:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}

#map:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
}

/* Leaflet CSS Overrides */
.leaflet-touch .leaflet-control-layers-toggle {
    width: 38px !important;
    left: 38px !important;
}
.leaflet-right .leaflet-control {
    margin-right:5px !important;
}
.leaflet-top .leaflet-control {
    margin-top: 5px !important;
}
.leaflet-top .leaflet-control:first-child {
    margin-top: 10px !important;
}