/* Fonts */
:root {
    --font-primary: 'Nunito', sans-serif;
    --font-secondary: 'Quicksand', sans-serif;
    
    /* Global Base Variables (Will be overridden by theme/phase) */
    --primary: #9B59B6;
    --secondary: #E8A0BF;
    --accent: #DDA0DD;
    --text-main: #2D1B36;
    --text-muted: #6c757d;
    --bg-base: #f8f6fb;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(20px);
    
    /* Shadows */
    --shadow-sm: 0 4px 15px rgba(155, 89, 182, 0.08);
    --shadow-md: 0 8px 30px rgba(155, 89, 182, 0.12);
    --shadow-lg: 0 16px 40px rgba(155, 89, 182, 0.2);
    
    /* Radius */
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

h1, h2, h3, h4, h5, h6, .font-primary {
    font-family: var(--font-primary);
    font-weight: 800;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Gradients text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout App */
.app-body {
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(155, 89, 182, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 64, 122, 0.08), transparent 25%);
    background-attachment: fixed;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-right: 1px solid rgba(255,255,255,0.8);
}

.app-main-content {
    flex-grow: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* Sidebar Elements */
.brand-text {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.version-badge {
    font-size: 0.7rem;
    background: rgba(155,89,182,0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

.user-info-brief {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
    font-family: var(--font-primary);
}
.avatar-circle-sm {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-family: var(--font-primary);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
}

.mode-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar-nav .nav-link i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link:hover, 
.sidebar-nav .nav-link.active {
    background: rgba(155, 89, 182, 0.1);
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    font-weight: 700;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

.nav-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 1rem 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-weight: 700;
    font-family: var(--font-primary);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.btn-glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    font-weight: 600;
}
.btn-glass.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary) !important;
}

.btn-logout {
    background: rgba(255,255,255,0.6);
    color: #e74c3c;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-logout:hover {
    background: #e74c3c;
    color: white;
}

/* Language Switcher */
.language-switch-sidebar .btn-lang {
    background: rgba(255,255,255,0.5);
    color: var(--text-muted);
    border: 1px solid rgba(0,0,0,0.08);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    transition: all 0.3s ease;
}
.language-switch-sidebar .btn-lang:hover {
    background: rgba(155, 89, 182, 0.1);
    color: var(--primary);
}
.language-switch-sidebar .btn-lang.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom); /* For iOS */
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary);
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-3px);
}

.nav-action-btn .action-btn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    transform: translateY(-15px);
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 12px 15px;
    background: rgba(255,255,255,0.9);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(155, 89, 182, 0.25);
}

/* Alerts */
.glass-alert {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    font-weight: 600;
}
.glass-alert.alert-success {
    border-left: 5px solid #2ecc71;
    color: #27ae60;
}
.glass-alert.alert-danger {
    border-left: 5px solid #e74c3c;
    color: #c0392b;
}

/* Media Queries */
@media (max-width: 768px) {
    .app-sidebar {
        display: none !important;
    }
    .app-main-content {
        margin-left: 0;
        padding-bottom: 80px; /* Space for bottom nav */
    }
}