@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 2rem;
}

/* App Container */
#app {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
}

/* Background Effects */
.bg-blob {
    position: fixed;
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(100px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 0;
    animation: float 10s ease-in-out infinite alternate;
}

.bg-blob.top { top: -50px; left: -50px; }
.bg-blob.bottom { bottom: -50px; right: -50px; background: #8b5cf6; }

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* Typography */
h1, h2, h3 { font-weight: 600; margin-bottom: 0.5rem; }
h1 { font-size: 1.75rem; background: linear-gradient(to right, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

/* Forms */
.input-group { margin-bottom: 1.25rem; position: relative; }
.input-group label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-top: 1rem;
}

.btn:active { transform: translateY(1px); }

/* Views */
.view { display: none; animation: fadeIn 0.4s ease forwards; }
.view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Specific */
.header-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.user-info h2 { font-size: 1.25rem; color: #fff; margin: 0; }
.user-info p { margin: 0; font-size: 0.85rem; color: var(--primary); }
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Clock */
.clock-container {
    text-align: center;
    margin: 2rem 0;
}
.time { font-size: 3rem; font-weight: 700; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.date { font-size: 1rem; color: var(--text-muted); }

/* Status Cards */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}
.status-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.status-card.active { border-color: var(--success); }
.status-card span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.status-card strong { font-size: 1.1rem; color: #fff; }

/* Location Indicator */
.location-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}
.loc-dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; }
.loc-dot.active { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* Action Buttons */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* Notification Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 30px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
    backdrop-filter: blur(10px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }
