/* --- BRANDING & LOGO --- */
.logo-large {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(59, 130, 246, 0.3)); /* Glow effect */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-small {
    width: 30px;
    height: 30px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.2rem;
    color: #3b82f6; /* Secure Steps Blue */
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- THEME VARIABLES --- */
:root {
    --primary: #3b82f6; /* Updated to Logo Blue */
    --accent: #8b5cf6;  /* Updated to Logo Purple */
    --danger: #ef4444;
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-color: #1f2937;
    --border-color: #E5E7EB;
    --map-filter: none;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-color: #111827;
    --surface-color: #1f2937;
    --text-color: #f3f4f6;
    --border-color: #374151;
    --map-filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* --- EXISTING STYLES (Keep these) --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-color); height: 100vh; overflow: hidden; transition: background 0.3s; }
.hidden { display: none !important; }

/* Login */
.login-container {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%); /* Lighter gradient */
    position: absolute; width: 100%; z-index: 9999;
}
.login-box { background: white; padding: 40px; border-radius: 20px; text-align: center; width: 90%; max-width: 400px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.login-box h1 { margin-bottom: 5px; color: var(--text-color); }
.login-box p { color: #6b7280; margin-bottom: 20px; }
.login-box input { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ddd; border-radius: 8px; background: #f9fafb; }
.btn-primary { width: 100%; padding: 12px; background: linear-gradient(to right, var(--primary), var(--accent)); color: white; border: none; border-radius: 8px; margin-top: 10px; font-weight: bold; cursor: pointer; }

/* Header & Nav */
.app-header { background: var(--surface-color); padding: 15px; display: flex; justify-content: space-between; align-items: center; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.theme-toggle { background: none; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; }
.bottom-nav { background: var(--surface-color); height: 60px; display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--border-color); }
.nav-item { color: #9ca3af; font-size: 0.8rem; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav-item.active { color: var(--primary); }

/* Layout & Utils */
#app-container { height: 100vh; display: flex; flex-direction: column; }
#app-viewport { flex: 1; position: relative; }
.page { position: absolute; width: 100%; height: 100%; background: var(--bg-color); transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto;}
.page.active { transform: translateX(0); }

/* Map */
#map { width: 100%; height: 100%; filter: var(--map-filter); }
.map-overlay-tools { position: absolute; top: 20px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.tool-btn { width: 45px; height: 45px; border-radius: 50%; border: none; background: var(--surface-color); color: var(--text-color); box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-size: 1.2rem; cursor: pointer; }
.tool-btn.warning { color: var(--danger); }
.tool-btn.active-mode { background: var(--danger); color: white; animation: blink 1s infinite; }
.sos-container { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; justify-content: center; z-index: 500; }
.sos-pulse { width: 80px; height: 80px; border-radius: 50%; background: var(--danger); color: white; border: 4px solid white; font-weight: bold; font-size: 1.5rem; animation: pulse 2s infinite; cursor: pointer; box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.5); }
.instruction-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: white; padding: 10px 20px; border-radius: 20px; z-index: 600; display: flex; gap: 10px; align-items: center; font-size: 0.9rem; white-space: nowrap; }

/* Contacts & Inputs */
.content-wrapper { padding: 20px; }
.subtitle { color: #6b7280; margin-bottom: 20px; font-size: 0.9rem; }
.input-group { display: flex; gap: 10px; margin-bottom: 20px; }
input { flex: 1; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); color: var(--text-color); }
.btn-add { background: var(--primary); color: white; border: none; padding: 0 15px; border-radius: 8px; cursor: pointer; }
.styled-list { list-style: none; padding: 0; }
.styled-list li { background: var(--surface-color); padding: 15px; border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid var(--border-color); }

/* Settings */
.setting-card { background: var(--surface-color); border-radius: 10px; padding: 15px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.setting-row { display: flex; justify-content: space-between; align-items: center; }
.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: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }
.btn-logout { width: 100%; padding: 15px; background: var(--danger); color: white; border: none; border-radius: 10px; font-weight: bold; margin-top: 10px; cursor: pointer; }

@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes blink { 50% { opacity: 0.7; } }