﻿/* 
 * Brightcare - CSS Stylesheet
 * Premium Light/Dark Theme with Glassmorphism 
 * Dynamic Role Colors
 */

:root {
    /* Base Light Mode Colors */
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    
    --text: #0f172a;
    --text-muted: #64748b;
    
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    /* Default brand colors (Mentee) */
    --mentor: #0d9488;
    --mentee: #7c3aed;
    
    --primary: var(--mentee);
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
    
    --glass-bg: rgba(255,255,255,0.7);
    --glass-border: rgba(255,255,255,0.4);
    --box-highlight: rgba(0,0,0,0.03);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #0f111a;
        --bg-surface: #1e2132;
        --bg-card: rgba(30, 33, 50, 0.6);
        
        --text: #f8fafc;
        --text-muted: #94a3b8;
        
        --border: rgba(255,255,255,0.08);
        --border-hover: rgba(255,255,255,0.15);
        
        --mentor: #14b8a6;
        --mentee: #8b5cf6;
        
        --shadow-sm: 0 4px 6px rgba(0,0,0,0.2);
        --shadow-md: 0 10px 25px rgba(0,0,0,0.3);
        
        --glass-bg: rgba(15, 17, 26, 0.8);
        --glass-border: rgba(255,255,255,0.05);
        --box-highlight: rgba(255,255,255,0.03);
    }
}

/* Dynamic Role Switching */
body.role-mentor {
    --primary: var(--mentor);
    --primary-dark: #0f766e;
    --primary-light: #5eead4;
    --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.15);
}

body.role-mentee {
    --primary: var(--mentee);
    --primary-dark: #6d28d9;
    --primary-light: #c4b5fd;
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--primary-dark); }

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0, 0.1);
}

.brand-name {
    display: block;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
}

.brand-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

/* Custom Scrollbar */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-section { margin-bottom: 24px; }
.nav-section-title {
    display: block;
    padding: 0 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-item:hover:not(.disabled) {
    background: var(--box-highlight);
    color: var(--text);
}
.nav-item:hover:not(.disabled) svg { opacity: 1; }

.nav-item.active {
    background: var(--box-highlight);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}
.nav-item.active svg { fill: var(--primary); opacity: 1; }

.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.badge-soon {
    margin-left: auto;
    background: var(--border);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Submenu */
.nav-submenu-parent .chevron {
    margin-left: auto;
    transition: transform 0.3s;
}
.nav-submenu-parent.expanded .chevron { transform: rotate(180deg); }

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-left: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--border);
    padding-left: 12px;
}
.nav-submenu-parent.expanded .submenu {
    max-height: 300px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.nav-sub-item {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}
.nav-sub-item:hover { color: var(--text); background: var(--box-highlight); }
.nav-sub-item.active { color: var(--primary); font-weight: 600; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--box-highlight);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    background: var(--primary);
}

.user-info { flex: 1; overflow: hidden; }
.user-name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.user-role { display: block; font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

.logout-btn {
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    fill: currentColor;
    transition: all 0.2s;
}
.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    fill: currentColor;
    cursor: pointer;
    margin-right: 16px;
    padding: 4px;
}

.page-breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.breadcrumb-sep { margin: 0 8px; opacity: 0.5; }

.top-bar-right { margin-left: auto; }
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--box-highlight);
    border: 1px solid var(--border);
    color: var(--primary);
}

.page-content {
    padding: 32px;
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* --- Dashboard Specific --- */
.dashboard-welcome { animation: fadeUp 0.5s ease-out; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.welcome-gradient {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    background: radial-gradient(circle at right, var(--box-highlight) 0%, transparent 70%);
    z-index: 0;
}

.welcome-content { position: relative; z-index: 1; }
.welcome-content h1 { font-size: 32px; margin-bottom: 12px; font-weight: 800; color: var(--text); }
.welcome-content p { font-size: 16px; color: var(--text-muted); max-width: 600px; }
.welcome-content strong { color: var(--primary); }

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.quick-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s;
    display: block;
    box-shadow: var(--shadow-sm);
}
.quick-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    /* We keep distinct colors for quick cards for visual interest */
}

.quick-card h3 { color: var(--text); font-size: 16px; margin-bottom: 8px; }
.quick-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

/* --- Content Pages --- */
.content-page { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.content-header { margin-bottom: 40px; }
.content-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; color: var(--text); }
.content-subtitle { font-size: 18px; color: var(--text-muted); max-width: 800px; line-height: 1.6; }

.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.section-icon { font-size: 24px; }
.section-intro { font-size: 16px; margin-bottom: 24px; color: var(--text-muted); }

/* Role Cards */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.info-card {
    background: var(--box-highlight);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}
.info-card-header { margin-bottom: 16px; }
.card-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}
.card-badge.mentee { background: rgba(139, 92, 246, 0.15); color: var(--mentee); border: 1px solid rgba(139,92,246,0.3); }
.card-badge.mentor { background: rgba(20, 184, 166, 0.15); color: var(--mentor); border: 1px solid rgba(20,184,166,0.3); }
.info-card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* Lists & Boxes */
.highlight-box {
    background: var(--box-highlight);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    border-left: 4px solid var(--primary);
}
.highlight-box h3 { font-size: 16px; margin-bottom: 12px; color: var(--text); }

.styled-list { list-style: none; padding: 0; }
.styled-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--text);
}
.styled-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.note-text { font-size: 14px; color: var(--text-muted); font-style: italic; }
.example-text { font-size: 15px; color: var(--text); background: var(--box-highlight); padding: 12px; border-radius: 8px; border: 1px solid var(--border); }

/* LEAD Timeline */
.cycle-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cycle-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--box-highlight);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.cycle-marker {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cycle-content h4 { font-size: 16px; margin-bottom: 4px; color: var(--text); }
.cycle-content p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* LEAD Scale */
.lead-scale {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
.scale-item {
    background: var(--box-highlight);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: transform 0.2s;
    border-top: 3px solid var(--scale-color);
}
.scale-item:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.scale-stars { font-size: 24px; font-weight: 800; color: var(--scale-color); margin-bottom: 8px; }
.scale-label { font-size: 13px; font-weight: 500; color: var(--text); }

/* Accordion */
.accordion-list { display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s;
}
.accordion-trigger:hover { background: var(--box-highlight); }
.accordion-icon { margin-right: 12px; font-size: 20px; }
.accordion-chevron { margin-left: auto; fill: var(--text-muted); transition: transform 0.3s; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-surface);
}
.accordion-item.open .accordion-content {
    max-height: 800px;
}
.accordion-content > p { padding: 0 20px 20px; color: var(--text-muted); }

.action-box {
    margin: 0 20px 20px;
    padding: 16px;
    background: var(--box-highlight);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.action-box h4 { margin-bottom: 12px; color: var(--primary); font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.action-box ul { margin-left: 20px; color: var(--text); font-size: 14px; line-height: 1.6; }
.action-box li { margin-bottom: 8px; }

/* Responsive */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

@media (max-width: 1024px) {
    .role-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
    
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .top-bar { padding: 0 16px; }
    .page-content { padding: 20px 16px; }
    
    .content-header h1 { font-size: 28px; }
    .content-section { padding: 20px; }
}
