:root {
    --primary-color: #4f46e5; /* Indigo 600 */
    --primary-dark: #4338ca;
    --secondary-color: #10b981; /* Emerald 500 */
    --accent-color: #f59e0b; /* Amber 500 */
    --danger-color: #ef4444; /* Red 500 */
    
    --bg-color: #f3f4f6; /* Gray 100 */
    --card-bg: #ffffff;
    --text-main: #1f2937; /* Gray 800 */
    --text-muted: #6b7280; /* Gray 500 */
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    --header-height: 60px;
    --bottom-nav-height: 65px;
}

/* Dark Mode Support (Preferrence based or Toggle) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111827; /* Gray 900 */
        --card-bg: #1f2937; /* Gray 800 */
        --text-main: #f9fafb; /* Gray 50 */
        --text-muted: #9ca3af; /* Gray 400 */
        --glass-bg: rgba(31, 41, 55, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: calc(var(--bottom-nav-height) + 20px); /* Space for bottom nav */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Utilities */
.container {
    padding: 1rem;
    max-width: 600px; /* Mobile focused max-width */
    margin: 0 auto;
}

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--accent-color); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.mt-2 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* Components: Card */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:active {
    transform: scale(0.98);
}

/* Glassmorphism Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.app-title {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%; /* Mobile friendly */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #d1d5db; /* Gray 300 */
    background-color: var(--card-bg);
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-color); }
.badge-success { background-color: rgba(16, 185, 129, 0.1); color: var(--secondary-color); }
.badge-danger { background-color: rgba(239, 68, 68, 0.1); color: var(--danger-color); }

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 40;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.90);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}
