:root {
    /* Professional Corporate Light Theme */
    --bg-light: #F8FAFC;
    --surface-white: #FFFFFF;
    --primary: #0F172A;
    /* Deep Navy/Black */
    --primary-hover: #1E293B;
    --primary-accent: #2563EB;
    /* Corporate Blue */
    --primary-accent-hover: #1D4ED8;

    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --border-color: #E2E8F0;
    --border-focus: #93C5FD;

    --success: #16A34A;
    --warning: #F59E0B;
    /* Subtle amber for SSOMA connection/ratings */

    /* Variables */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow: hidden;
}

/* Base App Container */
#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Map takes full screen, no flex */
.map-container,
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}


/* Hide map attribution to make it look like a seamless app (optional, but typical for premium apps) */
.leaflet-control-attribution {
    display: none;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Premium Upload Component */
.upload-card {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.upload-card:hover {
    border-color: var(--primary-accent);
    background: rgba(37, 99, 235, 0.05);
}

.upload-card i {
    font-size: 1.5rem;
    color: #94A3B8;
    margin-bottom: 10px;
    display: block;
}

.upload-card p {
    font-size: 0.75rem;
    color: #64748B;
}

.upload-card input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-status {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Custom UI Panels styling */
.solid-panel {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.top-nav {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    gap: 16px;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    background: var(--surface-white);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-buttons a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-block;
}

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

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

.btn-register {
    color: var(--white);
    background: var(--primary-accent);
    box-shadow: var(--shadow-sm);
}

.btn-register:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-location {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-white);
    color: var(--primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-location:hover {
    background: var(--bg-light);
    color: var(--primary-accent);
}

.sidebar {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 480px;
    height: calc(100vh - 48px);
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workers-panel {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 500px;
    height: calc(100vh - 48px);
    background: #0F172A;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    z-index: 10;
}

.side-nav-icons {
    width: 72px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    gap: 20px;
}

/* Home Professional List & Cards */
.professionals-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #F8FAFC;
}

.prof-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prof-card:hover {
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.prof-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.prof-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.prof-info-main {
    flex: 1;
}

.name-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.name-status h4 {
    margin: 0;
    font-size: 1rem;
    color: #0F172A;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    /* Online */
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #EFF6FF;
    color: #2563EB;
    margin-bottom: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #F59E0B;
}

.price {
    text-align: right;
}

.price strong {
    display: block;
    font-size: 1.1rem;
    color: #0F172A;
}

.price span {
    font-size: 0.75rem;
    color: #64748B;
}

/* --- Dashboard v22 Style (Solid & Unified) --- */
.dashboard-container {
    display: flex;
    width: 100%;
    height: 100vh;
    background: #0F172A;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 460px;
    height: 100%;
    background: #0F172A;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-map-area {
    flex: 1;
    height: 100%;
    position: relative;
    background: #f1f5f9;
}

.v22-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
}

.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-icon.active {
    background: var(--primary-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-icon:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.main-dash-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* --- Switch iOS Style --- */
.switch-ios {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch-ios input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-ios {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-ios:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider-ios {
    background-color: #2563EB;
    border-color: #2563EB;
}

input:checked+.slider-ios:before {
    transform: translateX(24px);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.search-bar:focus-within {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar i.ph-magnifying-glass {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 4px 12px;
    flex: 1;
    font-size: 0.95rem;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

/* Horizontal scrollable filter container */
.filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--primary);
    background: var(--bg-light);
    border-color: #CBD5E1;
}

.filter-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.category-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.badge {
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--surface-white);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.badge:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-color: #CBD5E1;
}

.badge.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

/* --- Sidebar / Bottom Sheet --- */

.sidebar-header,
.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-header h1,
.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

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

.list-header h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.list-header span {
    font-size: 0.85rem;
    color: var(--primary-accent);
    font-weight: 500;
    background: #EFF6FF;
    padding: 4px 10px;
    border-radius: 12px;
}

.professionals-list,
.workers-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.professionals-list::-webkit-scrollbar,
/* Advanced Dashboard v27 */
.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

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

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

.nav-icon i {
    transition: all 0.3s ease;
}

.nav-icon:hover i {
    transform: scale(1.1);
    color: var(--primary-accent);
}

.nav-icon.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-accent);
    border-radius: 12px;
}

.nav-icon.active i {
    filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.8));
    transform: scale(1.1);
}

/* Scrollbar styling */
.main-dash-scroll::-webkit-scrollbar {
    width: 6px;
}

.main-dash-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.main-dash-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.main-dash-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.3);
}

/* Worker Card */
.prof-card,
.worker-card {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.prof-card:hover,
.worker-card:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.prof-header {
    display: flex;
    gap: 16px;
}

.prof-avatar,
.worker-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.prof-info-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.name-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
}

.prof-info-main h4,
.worker-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.cat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.worker-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.rating i {
    color: var(--warning);
}

.price {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-accent);
}

/* --- Modals Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    /* subtle dark overlay */
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    padding: 32px 32px;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: absolute;
    top: 24px;
    right: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

#closeRequestModal {
    width: auto;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    gap: 6px;
    left: 24px;
    right: auto;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 24px;
    margin-top: 40px;
    /* space for back btn */
}

/* Dark modal global heading fix */
.modal-content h2 {
    color: #FFFFFF;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.modal-header h2 {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.prof-full-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.prof-full-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.prof-full-profile h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.prof-full-profile p {
    color: #94A3B8;
    font-size: 0.95rem;
}

.certifications {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.certifications h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 12px;
}

.certifications ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.certifications li {
    font-size: 0.9rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.certifications li i {
    color: var(--success);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    margin-top: 20px;
}

.total-price span {
    display: block;
    font-size: 0.8rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.total-price strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
}

.action-bar .btn-primary {
    width: auto;
    padding: 12px 24px;
}

/* Profile View */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
    margin-top: 16px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    padding: 4px;
    margin-bottom: 16px;
    background: var(--surface-white);
}

.profile-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.category-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-accent);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.profile-title .rating {
    justify-content: center;
    font-size: 1rem;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-card i {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-bottom: 8px;
}

.detail-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-card .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

.pricing-card {
    background: #EFF6FF;
    /* Very light blue */
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.price-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
    letter-spacing: -0.02em;
}

.price-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: #CBD5E1;
}

/* Form Styles */
.request-form {
    margin-top: 16px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-with-icon input,
.standard-input {
    width: 100%;
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 14px 14px 44px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.standard-input {
    padding-left: 16px;
}

.input-with-icon input:focus,
.standard-input:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-with-icon input[readonly] {
    background: var(--bg-light);
    color: var(--text-muted);
}

.duration-options {
    display: flex;
    gap: 12px;
}

.duration-card {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.duration-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-content {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    text-align: center;
    transition: var(--transition);
}

.duration-card input:checked~.card-content {
    background: #EFF6FF;
    border-color: var(--primary-accent);
}

.dur-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.duration-card input:checked~.card-content .dur-title {
    color: var(--primary-accent);
}

.dur-price {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
}

.summary-box {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.summary-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0;
}

.success-card {
    background: var(--surface-white);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-float);
    position: relative;
}

.success-icon {
    font-size: 4.5rem;
    color: var(--success);
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.success-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .workers-panel {
        width: 100%;
        height: 50vh;
        bottom: 0;
        left: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
    }

    .top-nav {
        max-width: none;
        left: 16px;
        right: 16px;
        top: 16px;
        padding: 12px 16px;
    }

    .modal-content {
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 32px 20px;
        transform: translateY(100%);
    }

    .modal-overlay {
        align-items: flex-end;
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
}

/* Loader */
.loader {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Auth Container Styles --- */
.auth-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F172A;
    /* Solid dark background to ensure cleanup */
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
}

.auth-card {
    background: var(--surface-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-float);
    position: relative;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-link {
    position: absolute;
    top: 24px;
    left: 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
    margin-top: 24px;
}

.auth-header i {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
}

.user-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius-md);
}

.type-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.type-btn.active {
    background: var(--surface-white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-accent);
    font-weight: 600;
    text-decoration: none;
}

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

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

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

/* --- Dashboard Specific Styles --- */
.dashboard-panel {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 420px;
    height: calc(100vh - 48px);
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    z-index: 1000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.dashboard-panel .btn-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: #CBD5E1;
}

.dashboard-panel .btn-outline:hover {
    border-color: var(--primary-accent);
    color: #FFFFFF;
    background: rgba(37, 99, 235, 0.1);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.dash-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--primary-accent);
    display: block;
}

.avatar-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #475569;
    border: 2px solid rgba(13, 17, 23, 0.95);
    position: absolute;
    bottom: 2px;
    right: 2px;
    transition: background-color 0.4s ease;
}

.avatar-status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.dash-greeting h2 {
    font-size: 1.1rem;
    color: #FFFFFF;
    margin-bottom: 2px;
    font-weight: 700;
}

.dash-greeting p {
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 4px;
}

.dash-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    color: #F59E0B;
}

.dash-rating span {
    color: #94A3B8;
    margin-left: 4px;
    font-size: 0.75rem;
}

.dash-status-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.02em;
}

.offline-badge {
    background: rgba(71, 85, 105, 0.3);
    color: #94A3B8;
}

.online-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3);
}

/* Earnings Progress Bar */
.dash-earnings-progress {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.earnings-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748B;
    margin-bottom: 10px;
}

.earnings-bar-track {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
}

.earnings-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-accent), #60A5FA);
    border-radius: 8px;
    transition: width 0.8s ease;
}

/* Logout button in dark panel */
.btn-logout-dash {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748B;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-logout-dash:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
}

/* Reject button inside dark modal */
.btn-reject-outline {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CBD5E1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reject-outline:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.08);
}

/* iOS Style Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #30363d;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 26px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Stats */
.dash-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary-accent);
}

.stat-card p {
    font-size: 0.70rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.stat-card h3 {
    font-size: 1.05rem;
    color: #FFFFFF;
}

.dash-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.offline-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    animation: fadeIn 0.4s ease;
}

.offline-state i {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.offline-state.online-state i {
    color: var(--primary-accent);
    opacity: 1;
    animation: pulseGlow 2s infinite;
}

.offline-state h3 {
    color: #FFFFFF;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

@keyframes pulseGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(47, 129, 247, 0.5));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(47, 129, 247, 0.8));
        transform: scale(1.05);
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(47, 129, 247, 0.5));
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Incoming Request Modal Customization */
.alert-icon {
    font-size: 3rem;
    color: var(--warning);
    margin-bottom: 16px;
    animation: bellShake 0.6s infinite;
}

.request-alert {
    text-align: center;
    border-top: 4px solid var(--warning);
    color: #FFFFFF;
}

.request-alert h2 {
    color: #FFFFFF;
}

.req-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    color: #CBD5E1;
}

.req-row .label {
    color: #94A3B8;
}

.req-row .value {
    color: #F8FAFC;
    font-weight: 500;
}

.req-row.total {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary-accent);
    padding-top: 16px;
}

.req-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.req-actions button {
    flex: 1;
}

@keyframes bellShake {
    0% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(10deg);
    }

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

/* Auth Screens (Login / Register) */
.auth-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    /* Deep Dark Blue Background */
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(29, 78, 216, 0.15) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.auth-card {
    background: var(--surface-white);
    width: 100%;
    max-width: 450px;
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUpFade 0.5s ease;
}

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

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

.back-link {
    position: absolute;
    top: 24px;
    left: 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header i {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 16px;
    display: inline-block;
    padding: 16px;
    background: #EFF6FF;
    border-radius: 50%;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-card .input-with-icon input {
    background: #F8FAFC;
}

.auth-card .input-with-icon input:focus {
    background: var(--surface-white);
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para inputs de archivos */
.auth-card input[type="file"] {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    background: #F1F5F9;
}

.auth-card input[type="file"]::-webkit-file-upload-button {
    background: var(--primary-accent);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-card input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-hover);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

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

/* User Type Selector */
.user-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.type-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-btn i {
    font-size: 1.25rem;
}

.type-btn.active {
    border-color: var(--primary-accent);
    background: #EFF6FF;
    color: var(--primary-accent);
    box-shadow: 0 0 0 1px var(--primary-accent);
}


@media (max-width: 768px) {
    .dashboard-panel {
        width: 100%;
        height: 60vh;
        bottom: 0;
        top: auto;
        left: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

/* Base Desktop Grids (to be overridden by media query) */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Fix for specific dashboard components rendered via JS */
.responsive-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   MOBILE RESPONSIVITY LAYER (v32)
   ========================================================================== */

@media (max-width: 768px) {

    /* 1. Global Layout */
    body {
        overflow-y: auto !important;
    }

    #app {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    /* 2. Map Behavior on Mobile */
    .map-container,
    #map {
        height: 50vh !important;
        /* Half screen map for context */
        position: relative !important;
        width: 100% !important;
    }

    /* 3. Sidebar Transformation (Home) */
    .sidebar,
    .workers-panel {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-left: none !important;
        border-right: none !important;
        z-index: 100 !important;
    }

    .sidebar-header {
        padding: 16px !important;
    }

    /* 4. Dashboard & Professional Panels */
    .dashboard-container {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    .dashboard-sidebar {
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-bottom: 20px !important;
    }

    .main-dash-scroll {
        overflow: visible !important;
        padding: 16px !important;
    }

    /* 5. Statistic Cards Stack */
    .stats-grid {
        grid-template-columns: 1fr !important;
        /* Stack stats cards */
        gap: 12px !important;
    }

    /* 6. Document Upload Grid */
    .upload-grid {
        grid-template-columns: 1fr !important;
        /* Stack upload cards */
    }

    .upload-card {
        padding: 16px !important;
    }

    /* 7. Navigation UI */
    .top-nav {
        top: 10px !important;
        right: 10px !important;
        gap: 8px !important;
    }

    .btn-location {
        width: 40px !important;
        height: 40px !important;
    }

    .auth-buttons {
        padding: 4px !important;
    }

    .auth-buttons a {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    /* 8. Modal & Profile UI */
    .modal-content {
        width: 95% !important;
        margin: 20px auto !important;
        max-height: 90vh !important;
    }
}