        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-blue: #1976D2;
            --secondary-blue: #64B5F6;
            --dark-blue: #0D47A1;
            --success-green: #2E7D32;
            --error-red: #C62828;
            --bg-light: #E3F2FD;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        /* NAVIGATION */
        .navbar {
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            padding: 16px 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            color: white;
            font-size: 24px;
            font-weight: bold;
        }

        .nav-logo {
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-blue);
            font-size: 24px;
            font-weight: bold;
        }

        .nav-menu {
            display: flex;
            gap: 8px;
        }

        .nav-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid transparent;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 600;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .nav-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .nav-btn.active {
            background: white;
            color: var(--primary-blue);
        }

        /* MAIN CONTAINER */
        .main-container {
            min-height: calc(100vh - 72px);
        }

        .section {
            display: none;
            animation: fadeIn 0.5s ease;
        }

        .section.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* REGISTRO SECTION */
        .registro-section {
            background: linear-gradient(180deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
            min-height: calc(100vh - 72px);
            padding: 20px;
        }

        .registro-section.active {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .container {
            width: 100%;
            max-width: 500px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .logo {
            width: 120px;
            height: 120px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .logo-text {
            font-size: 48px;
            font-weight: bold;
            color: var(--primary-blue);
        }

        .app-title {
            font-size: 32px;
            font-weight: bold;
            color: white;
            margin-bottom: 8px;
            text-align: center;
        }

        .app-subtitle {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 32px;
            text-align: center;
        }

        .card {
            background: white;
            border-radius: 16px;
            padding: 24px;
            width: 100%;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            margin-bottom: 16px;
        }

        .card-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--primary-blue);
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            font-size: 12px;
            color: #666;
            margin-bottom: 6px;
            margin-left: 12px;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            padding: 14px 16px;
            border: 2px solid #ddd;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            outline: none;
        }

        .form-input:focus {
            border-color: var(--primary-blue);
        }

        .location-info {
            background: var(--bg-light);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
        }

        .location-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--primary-blue);
            margin-bottom: 6px;
        }

        .location-detail {
            font-size: 12px;
            color: #424242;
            margin-bottom: 2px;
        }

        .alert {
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
            font-size: 14px;
        }

        .alert-error {
            background: #FFEBEE;
            color: var(--error-red);
        }

        .alert-success {
            background: #E8F5E9;
            color: var(--success-green);
            font-weight: 600;
        }

        .submit-btn {
            width: 100%;
            height: 56px;
            background: var(--primary-blue);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .submit-btn:hover:not(:disabled) {
            background: #1565C0;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
        }

        .submit-btn:disabled {
            background: #90CAF9;
            cursor: not-allowed;
        }

        .spinner {
            width: 24px;
            height: 24px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .footer-text {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.8);
            text-align: center;
            margin-top: 16px;
        }

        .hidden {
            display: none !important;
        }

        /* MAPA SECTION */
        .mapa-section {
            background: #f5f5f5;
            min-height: calc(100vh - 72px);
        }

        .map-controls {
            background: white;
            padding: 16px 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }

        .map-control-btn {
            background: var(--primary-blue);
            color: white;
            border: none;
            padding: 10px 18px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .map-control-btn:hover {
            background: #1565C0;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
        }

        .map-control-btn.secondary {
            background: var(--secondary-blue);
        }

        .map-control-btn.danger {
            background: var(--error-red);
        }

        .map-stats {
            margin-left: auto;
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .stat-value {
            font-size: 24px;
            font-weight: bold;
            color: var(--primary-blue);
        }

        .stat-label {
            font-size: 12px;
            color: #666;
            text-transform: uppercase;
        }

        #map {
            height: calc(100vh - 140px);
            width: 100%;
        }

        /* MODAL */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            animation: fadeIn 0.3s ease;
        }

        .modal.active {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal-content {
            background: white;
            border-radius: 16px;
            max-width: 600px;
            width: 100%;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-header {
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: white;
            padding: 20px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 20px;
            font-weight: bold;
        }

        .modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            font-size: 24px;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .modal-body {
            padding: 24px;
            max-height: 60vh;
            overflow-y: auto;
        }

        .registro-item {
            background: var(--bg-light);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 12px;
            border-left: 4px solid var(--primary-blue);
            transition: all 0.3s ease;
        }

        .registro-item:hover {
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .registro-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--dark-blue);
            margin-bottom: 8px;
        }

        .registro-detail {
            font-size: 14px;
            color: #555;
            margin-bottom: 4px;
        }

        .registro-coords {
            font-size: 12px;
            color: #777;
            margin-top: 8px;
            font-family: 'Courier New', monospace;
        }

        .zone-summary {
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: white;
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 20px;
            text-align: center;
        }

        .zone-count {
            font-size: 48px;
            font-weight: bold;
            margin-bottom: 8px;
        }

        .zone-label {
            font-size: 18px;
            opacity: 0.9;
        }

        /* CUSTOM POPUP */
        .custom-popup {
            min-width: 250px;
        }

        .popup-header {
            font-size: 16px;
            font-weight: bold;
            color: var(--primary-blue);
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--bg-light);
        }

        .popup-detail {
            font-size: 13px;
            margin-bottom: 6px;
            color: #333;
        }

        .popup-label {
            font-weight: 600;
            color: #666;
        }

        .popup-coords {
            font-size: 11px;
            color: #999;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #eee;
            font-family: 'Courier New', monospace;
        }

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .nav-menu {
                flex: 1;
                justify-content: flex-end;
            }

            .nav-btn {
                padding: 8px 16px;
                font-size: 14px;
            }

            .map-stats {
                width: 100%;
                margin-left: 0;
                margin-top: 12px;
            }

            .stat-item {
                flex: 1;
            }

            #map {
                height: calc(100vh - 200px);
            }

            .app-title {
                font-size: 28px;
            }

            .app-subtitle {
                font-size: 16px;
            }

            .card {
                padding: 20px;
            }
        }

        /* LOADING OVERLAY */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.95);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 3000;
        }

        .loading-overlay.active {
            display: flex;
        }

        .loading-content {
            text-align: center;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 6px solid var(--bg-light);
            border-top-color: var(--primary-blue);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        .loading-text {
            font-size: 18px;
            color: var(--primary-blue);
            font-weight: 600;
        }