:root {
    --admin-sidebar: #0f172a;
    --admin-sidebar-hover: #1e293b;
    --admin-accent: #6366f1;
    --admin-accent-dark: #4f46e5;
    --admin-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --public-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
}

.admin-body {
    margin: 0;
    background: var(--surface-muted);
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.admin-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--admin-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.admin-nav {
    padding: 1rem 0.75rem;
    flex: 1;
}

.admin-nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: var(--admin-sidebar-hover);
    color: #fff;
}

.admin-nav-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.admin-nav-link i { font-size: 1.1rem; }

.admin-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--admin-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.admin-page-title p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-gradient {
    background: var(--admin-gradient);
    border: none;
    color: #fff;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.btn-gradient:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-outline-soft {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.btn-outline-soft:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-card-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card-icon.green { background: #dcfce7; color: #16a34a; }

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.admin-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header h5 {
    margin: 0;
    font-weight: 600;
}

.admin-card-body { padding: 1.5rem; }

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

.admin-table thead th {
    background: var(--surface-muted);
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tbody tr:hover { background: #fafbff; }

.user-avatar-sm {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border);
}

.user-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name-cell {
    font-weight: 600;
    color: var(--text);
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.action-btn:hover { background: #f1f5f9; color: var(--admin-accent); }
.action-btn.danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    color: #6366f1;
}

.form-section { margin-bottom: 1.5rem; }

.form-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-floating-custom .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 0.65rem 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--surface-muted);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--admin-accent);
    background: #f5f3ff;
}

.upload-zone-icon {
    font-size: 2rem;
    color: var(--admin-accent);
    margin-bottom: 0.5rem;
}

.upload-preview { margin-top: 1rem; }

.upload-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
}

.admin-map-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.admin-map-container #map {
    height: 420px;
    width: 100%;
    z-index: 1;
}

.coords-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.coords-display input {
    background: var(--surface-muted);
    font-family: monospace;
    font-size: 0.85rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--admin-sidebar);
}

.login-visual {
    flex: 1;
    background: var(--admin-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-visual::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    bottom: -80px;
    left: -80px;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    max-width: 400px;
}

.login-visual-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.login-visual-content p {
    opacity: 0.9;
    font-size: 1.05rem;
    line-height: 1.6;
}

.login-visual-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
}

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
    max-width: 520px;
}

.login-form-inner { width: 100%; max-width: 380px; }

.login-form-inner h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-form-inner .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.input-icon-wrap { position: relative; }

.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon-wrap .form-control { padding-left: 2.5rem; }

.alert-modern {
    border-radius: var(--radius-sm);
    border: none;
    padding: 0.875rem 1rem;
}

.alert-modern.success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-modern.danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.public-body {
    margin: 0;
    overflow: hidden;
    height: 100vh;
}

.public-map-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
}

.public-map-wrapper #map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.public-map-wrapper.staff-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.staff-view .public-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    flex-shrink: 0;
    padding: 1rem 1.25rem 0.5rem;
    pointer-events: auto;
}

.staff-map-dashboard {
    flex-shrink: 0;
    margin: 1rem 1.25rem 0.75rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.staff-dashboard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.staff-dashboard-head h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.staff-dashboard-head p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.staff-dashboard-add {
    background: var(--public-gradient);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: transform 0.2s;
}

.staff-dashboard-add:hover {
    color: #fff;
    transform: translateY(-1px);
}

.staff-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.staff-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.staff-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.staff-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.staff-stat-icon.blue { background: #dbeafe; color: #2563eb; }
.staff-stat-icon.indigo { background: #e0e7ff; color: #4f46e5; }
.staff-stat-icon.green { background: #dcfce7; color: #16a34a; }

.staff-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.staff-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.staff-view .map-area {
    position: relative;
    flex: 1;
    min-height: 0;
}

.staff-view .map-area #map {
    height: 100%;
}

.staff-view .public-sidebar {
    top: 0.75rem;
    bottom: 0.75rem;
}

.staff-view .staff-map-search {
    top: 0.75rem;
}

.staff-view .map-hover-preview {
    bottom: 0.75rem;
}

.map-area {
    position: relative;
    width: 100%;
    height: 100%;
}

.public-map-wrapper:not(.staff-view) .map-area {
    position: absolute;
    inset: 0;
}

.public-header {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.public-header > * { pointer-events: auto; }

.public-logo {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.8);
}

.public-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--public-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.public-logo-text { font-weight: 700; font-size: 1rem; }

.public-logo-text small {
    display: block;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.public-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.public-badge {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.8);
}

.public-badge i { color: #6366f1; }

.public-admin-btn {
    background: var(--public-gradient);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.public-admin-btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.staff-map-search {
    position: absolute;
    top: 5.5rem;
    right: 1.25rem;
    width: 340px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 1rem 1.15rem;
}

.staff-map-search h6 {
    margin: 0 0 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.staff-map-search h6 i {
    color: #6366f1;
}

.staff-search-types {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.staff-search-type-btn {
    flex: 1;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.staff-search-type-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
}

.staff-search-input-wrap {
    display: flex;
    gap: 0.5rem;
}

.staff-search-input-wrap input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
}

.staff-search-input-wrap input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.staff-search-btn,
.staff-search-clear {
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.staff-search-btn {
    background: var(--public-gradient);
    color: #fff;
}

.staff-search-clear {
    background: #f1f5f9;
    color: var(--text-muted);
    margin-top: 0.5rem;
    width: 100%;
}

.staff-search-results {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.staff-search-results strong {
    color: var(--text);
}

.public-user-item.hidden-by-search {
    display: none !important;
}

.public-sidebar {
    position: absolute;
    top: 5.5rem;
    left: 1.25rem;
    bottom: 1.25rem;
    width: 320px;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.public-sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.public-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.public-sidebar-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.sidebar-add-client {
    background: var(--public-gradient);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s;
}

.sidebar-add-client:hover {
    color: #fff;
    transform: translateY(-1px);
}

.public-sidebar-header p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.public-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.public-user-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.public-user-item:hover,
.public-user-item.active {
    background: #f5f3ff;
    border-color: #e0e7ff;
}

.public-user-item img,
.public-user-item .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.public-user-item .avatar-placeholder {
    background: var(--admin-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.public-user-item-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.public-user-item-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.public-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.public-empty i {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 1rem;
}

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

.pin-marker {
    width: 36px;
    height: 36px;
    position: relative;
}

.pin-marker::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background: var(--public-gradient);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    top: 0;
    left: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
    border: 3px solid #fff;
}

.pin-marker::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    top: 9px;
    left: 12px;
    transform: rotate(-45deg);
}

.pin-marker.has-image::before {
    background: linear-gradient(135deg, #10b981, #0ea5e9);
}

.location-image-tooltip {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(12px);
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2) !important;
    padding: 0 !important;
    overflow: hidden;
}

.location-image-tooltip::before {
    border-top-color: rgba(255,255,255,0.95) !important;
}

.map-hover-card { text-align: center; min-width: 160px; }

.map-hover-card img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
}

.map-hover-name {
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text);
}

.map-hover-preview {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    max-width: min(420px, calc(100vw - 2.5rem));
    pointer-events: none;
    animation: hoverPreviewIn 0.2s ease;
}

@keyframes hoverPreviewIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.map-hover-preview img {
    display: block;
    width: 100%;
    max-height: min(65vh, 520px);
    object-fit: contain;
    background: #f1f5f9;
}

.map-hover-preview-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.map-hover-preview-city {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.map-hover-preview-body {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: linear-gradient(to bottom, #fff, #f8fafc);
}

.map-location-city {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .map-hover-preview {
        bottom: calc(200px + 1.25rem);
        right: 1.25rem;
        left: 1.25rem;
        max-width: none;
    }

    .map-hover-preview img {
        max-height: min(40vh, 360px);
    }
}

.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 220px;
}

.map-popup-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.map-popup-body { padding: 1rem; }

.map-popup-body h6 {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.map-popup-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.map-popup-detail i {
    color: #6366f1;
    width: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

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

.form-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
}

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; padding: 1.25rem; }
    .login-visual { display: none; }
    .login-form-panel { max-width: 100%; }
    .staff-stat-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-map-search {
        top: 5rem;
        right: 1.25rem;
        left: 1.25rem;
        width: auto;
    }
    .public-sidebar {
        width: calc(100% - 2.5rem);
        max-height: 200px;
        top: auto;
        bottom: 1.25rem;
    }
    .public-user-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.75rem;
    }
    .public-user-item { flex-shrink: 0; min-width: 200px; }
}
