:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --meter-glow: rgba(16, 185, 129, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #020617 100%);
    overflow-x: hidden;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 40px;
}

header { text-align: center; margin-bottom: 20px; margin-top: 10px; }
h1 { font-weight: 900; font-size: 2.2rem; letter-spacing: 1px; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h3 { font-weight: 600; font-size: 1.2rem; margin-bottom: 1rem; color: #e2e8f0; }

/* Tabs */
.tabs {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 4px;
}
.tab-btn {
    flex: 1; background: transparent; border: none; color: var(--text-muted);
    padding: 12px; font-size: 1rem; font-weight: 700; border-radius: 8px; cursor: pointer;
    transition: all 0.3s ease;
}
.tab-btn.active { background: rgba(255, 255, 255, 0.1); color: var(--text-main); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* METER DISPLAY (CLIENT VIEW) */
.meter-display {
    background: linear-gradient(145deg, #0f172a, #020617);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 0 30px var(--meter-glow), inset 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.meter-status-dot {
    position: absolute;
    top: 20px; right: 20px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}
.meter-status-dot.active { background-color: var(--success); box-shadow: 0 0 15px var(--success); animation: pulse 1s infinite; }
.meter-status-dot.finished { background-color: #f59e0b; box-shadow: 0 0 15px #f59e0b; }

.meter-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.meter-price {
    font-size: 5rem;
    font-weight: 900;
    color: var(--success);
    text-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
    line-height: 1;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}
.meter-price .currency { font-size: 2.5rem; vertical-align: top; color: rgba(16, 185, 129, 0.8); }

.meter-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
}
.meter-info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.info-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 4px; }
.info-value { font-size: 1.5rem; font-weight: 700; color: white; }
.badge { background: rgba(59,130,246,0.2); color: #93c5fd; padding: 4px 12px; border-radius: 8px; font-size: 1rem; border: 1px solid rgba(59,130,246,0.3); }

/* Buttons */
.controls-card { margin-top: 20px; }
button { font-family: inherit; cursor: pointer; transition: all 0.2s ease; outline: none; border: none; }
.btn-massive {
    width: 100%;
    padding: 22px;
    font-size: 1.4rem;
    font-weight: 900;
    border-radius: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), #818cf8); color: white; box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4); }
.btn-primary:active { transform: scale(0.97); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #f43f5e); color: white; box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4); }
.btn-danger:active { transform: scale(0.97); }
.btn-secondary { background: rgba(255,255,255,0.1); color: white; border: 1px solid var(--glass-border); }

/* Glass Cards (Settings & History) */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 20px; margin-bottom: 1.5rem; box-shadow: var(--glass-shadow); }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }
label { display: block; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
input[type="text"], input[type="number"] { width: 100%; padding: 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: white; font-family: inherit; font-size: 1.05rem; }
input:focus { outline: none; border-color: var(--primary); background: rgba(0,0,0,0.5); }
.btn-small { padding: 12px; font-size: 0.95rem; border-radius: 8px; margin-top: 5px; width: 100%; font-weight: 700; }
.btn-outline { background: transparent; color: white; border: 1px solid var(--primary); padding: 14px; border-radius: 10px; width: 100%; font-weight: 700; }

/* Toggles */
.toggle-label { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; flex: 1; padding-right: 15px; }
.toggle-text strong { color: white; font-size: 1.05rem; margin-bottom: 4px; }
.toggle-text span { color: var(--text-muted); font-size: 0.85rem; line-height: 1.3; }
.toggle-switch { position: relative; width: 56px; height: 30px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border-radius: 30px; border: 1px solid rgba(255,255,255,0.1); }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); border-color: var(--primary); }
input:checked + .slider:before { transform: translateX(26px); }

/* History Tab */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card { text-align: center; padding: 15px 10px; margin-bottom: 0; }
.stat-title { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; font-weight: 700; }
.stat-value { display: block; font-size: 1.3rem; font-weight: 900; color: var(--success); }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.trip-card { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 15px; margin-bottom: 10px; }
.trip-card-header { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.trip-card-body { display: flex; justify-content: space-between; align-items: flex-end; }
.trip-route { display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.trip-price { font-size: 1.4rem; font-weight: 900; color: var(--success); }

/* Autocomplete & Utils */
.relative { position: relative; }
.suggestions-list { position: absolute; top: 100%; left: 0; right: 0; background: #1e293b; border: 1px solid var(--primary); border-radius: 10px; margin-top: 5px; max-height: 220px; overflow-y: auto; z-index: 100; list-style: none; box-shadow: 0 10px 30px rgba(0,0,0,0.7); }
.suggestions-list li { padding: 15px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; }
.suggestions-list li:hover { background: var(--primary); color: white; }
.hidden { display: none !important; }
.text-danger { color: var(--danger); font-size: 1.5rem; background: transparent; }
.update-info { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* Notification */
.notification { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; background: rgba(16, 185, 129, 0.95); backdrop-filter: blur(10px); padding: 15px 20px; border-radius: 12px; display: flex; gap: 15px; align-items: center; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.notification-icon { font-size: 1.5rem; }
.notification-text { flex: 1; }
.notification-text strong { display: block; font-size: 1rem; color: white; margin-bottom: 2px; }
.notification-text p { font-size: 0.85rem; color: rgba(255,255,255,0.9); }
.btn-icon { background: transparent; color: white; font-size: 1.2rem; cursor: pointer; }

/* Map */
.map-card { padding: 5px; margin-bottom: 20px; border: 2px solid rgba(255,255,255,0.05); }
.leaflet-container { background: #020617; }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
