* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d0d2b 0%, #1a1a4e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

header .subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 5px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 16px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    background: linear-gradient(135deg, #6a3de8, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(106, 61, 232, 0.3);
}

.tab-content {
    display: block;
    animation: fadeIn 0.4s ease;
}

.tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 5px;
}

.card .hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #f87171;
    margin-left: 4px;
}

.form-group .hint-text {
    display: block;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-toggle-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-wrapper input {
    width: 100%;
    padding: 12px 50px 12px 16px !important;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.password-toggle-wrapper input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: all 0.3s ease;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #8b5cf6, #6a3de8);
    border-radius: 3px;
    outline: none;
    margin: 10px 0;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6a3de8);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

#sinalValor {
    color: #fff;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #6a3de8);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(106, 61, 232, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(106, 61, 232, 0.4);
}

.btn-secondary {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-tertiary {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #6a3de8);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-tertiary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.resultado {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: none;
}

.resultado.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.resultado .success { color: #4ade80; font-weight: 600; }
.resultado .error { color: #f87171; font-weight: 600; }
.resultado .detail { color: rgba(255, 255, 255, 0.7); margin: 8px 0; font-size: 14px; }
.resultado .detail strong { color: #fff; }

.resultado .highlight {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(106, 61, 232, 0.1));
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 3px solid #8b5cf6;
}

.resultado .highlight-fire {
    background: rgba(251, 146, 60, 0.15);
    border-left: 3px solid #fb923c;
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
}

.resultado .highlight-cold {
    background: rgba(96, 165, 250, 0.15);
    border-left: 3px solid #60a5fa;
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
}

.status-perdido { color: #f87171; }

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: spin 0.6s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#mapaContainer {
    height: 400px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: #1a1a3e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 20px rgba(74, 222, 128, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 50px rgba(74, 222, 128, 0.7); transform: scale(1.1); }
    100% { box-shadow: 0 0 20px rgba(74, 222, 128, 0.3); transform: scale(1); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 50px rgba(239, 68, 68, 0.7); transform: scale(1.1); }
    100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); transform: scale(1); }
}

.leaflet-control-legend {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.legend-dot.user { background: #4ade80; box-shadow: 0 0 15px rgba(74, 222, 128, 0.5); }
.legend-dot.card { background: #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
.legend-line { width: 24px; height: 3px; background: #8b5cf6; border-radius: 2px; display: inline-block; flex-shrink: 0; }

#radarLoginArea {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#radarLoginStatus {
    margin-top: 8px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .container { padding: 16px; }
    header h1 { font-size: 22px; }
    .tab { font-size: 12px; padding: 8px 12px; }
    #mapaContainer { height: 300px; }
}

@media (max-width: 480px) {
    body { padding: 10px; }
    .container { padding: 12px; }
    header h1 { font-size: 18px; }
    .tab { font-size: 10px; padding: 6px 8px; flex: 1 1 calc(50% - 4px); }
    #mapaContainer { height: 250px; }
}