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

:root {
    --bg-dark: #0d0f12;
    --bg-card: #15181e;
    --bg-card-hover: #1c2028;
    --bg-input: #1a1d24;
    --border-color: #242832;
    --accent-lime: #d4ff00;
    --accent-lime-hover: #bce600;
    --accent-lime-glow: rgba(212, 255, 0, 0.18);
    --text-primary: #ffffff;
    --text-secondary: #949cae;
    --text-muted: #626a7a;
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

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

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: var(--accent-lime);
    color: #000;
    font-weight: 800;
    font-size: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--accent-lime-glow);
}

.sidebar-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.sidebar-brand span {
    color: var(--accent-lime);
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--accent-lime);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--accent-lime-glow);
}

.nav-item.active i {
    color: #000;
}

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

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

/* Top Header */
.top-header {
    height: var(--header-height);
    background-color: rgba(21, 24, 30, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-input);
    padding: 6px 14px 6px 8px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-lime);
}

.user-info .user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-info .user-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Page Content Area */
.content-area {
    padding: 32px;
    flex: 1;
}

/* Dashboard Specific Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

/* Custom Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-lime);
}

/* Stat Widget Cards */
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-lime);
    font-size: 20px;
}

.stat-val {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Accent Lime Banner Card */
.hero-card {
    background: linear-gradient(135deg, #1c222c 0%, #15181e 100%);
    border: 1px solid var(--border-color);
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, var(--accent-lime-glow), transparent 70%);
    pointer-events: none;
}

.badge-lime {
    background-color: var(--accent-lime);
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-block;
}

/* Chart Bars Simulation */
.calories-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    padding-top: 20px;
    gap: 12px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.bar-wrap {
    width: 100%;
    max-width: 32px;
    background-color: var(--bg-input);
    border-radius: 8px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar-fill {
    width: 100%;
    background-color: #2b303c;
    border-radius: 8px;
    transition: height 0.6s ease;
}

.bar-fill.highlight {
    background-color: var(--accent-lime);
    box-shadow: 0 0 15px var(--accent-lime-glow);
}

.bar-day {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Biological Age Module Styling */
.bio-result-card {
    background: linear-gradient(145deg, #181c24, #121418);
    border: 2px solid var(--border-color);
    text-align: center;
    padding: 36px 24px;
}

.age-display-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid var(--border-color);
    border-top-color: var(--accent-lime);
    border-right-color: var(--accent-lime);
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.age-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.age-unit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.diff-tag {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.diff-younger {
    background-color: rgba(46, 213, 115, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.diff-older {
    background-color: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-lime);
    box-shadow: 0 0 0 3px var(--accent-lime-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-lime {
    background-color: var(--accent-lime);
    color: #000;
    box-shadow: 0 4px 20px var(--accent-lime-glow);
}

.btn-lime:hover {
    background-color: var(--accent-lime-hover);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* Standalone Login Screen (Reference Screen 1) */
.login-body {
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.login-hero-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 24px;
    filter: brightness(0.9);
}

.login-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .col-8, .col-4 { grid-column: span 12; }
    .col-3 { grid-column: span 6; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }

    .top-header {
        padding: 0 16px;
    }

    .content-area {
        padding: 20px 16px;
    }

    .col-3 { grid-column: span 12; }
    
    .calories-chart {
        height: 140px;
    }
}
