:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

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

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Login Container */
.login-container {
    max-width: 400px;
    width: 90%;
    margin: auto;
    padding: 2.5rem;
}

h1, h2 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 2rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: white;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

button {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

button:active {
    transform: scale(0.98);
}

button:hover {
    opacity: 0.9;
}

header {
    background: var(--bg);
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Floating Pill Bottom Navigation */
.bottom-nav {
    position: fixed !important;
    bottom: 15px !important;
    left: 10px !important;
    right: 10px !important;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 9999;
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    overflow-x: auto;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    gap: 4px;
    flex: 1;
    min-width: 50px;
    padding: 0.5rem 0;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 1.25rem;
}

/* Cards (Dashboard) */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.1;
    color: white;
}

.stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 8px;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.activity-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.cat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close-modal-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1.25rem;
    border: 1px solid var(--border);
    cursor: pointer;
}

.close-modal-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

select.glass {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.25rem !important;
    padding-right: 2.5rem !important;
}

/* Details Modal (Long-press) */
#details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#details-modal > .glass {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    position: relative;
    animation: scaleUp 0.3s ease-out;
}

@keyframes scaleUp {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.detail-row {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-header {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
    display: block;
}

.detail-value {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.detail-obs {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    word-break: break-word;
}
