/* File: assets/css/style.css 
   Project: Ostrin Bodyfit Dashboard
   Author: Dhimas
   Description: Clean & Responsive Dashboard Layout
*/

/* --- 1. ROOT & VARIABLES --- */
:root {
    --p-green: #285a48;
    --s-green: #408a71;
    --primary-gradient: linear-gradient(135deg, #285a48 0%, #3a7d65 100%);
    --bg-main: #f8fafb;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --transition-std: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: rgba(0,0,0,0.05);
}

/* Dark Mode Support */
[data-bs-theme="dark"] { 
    --bg-main: #121212; 
    --card-bg: #1e1e1e; 
    --text-main: #f8fafb; 
    --border-color: rgba(255,255,255,0.1);
}

/* --- 2. BASE STYLES --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    background: var(--bg-main);
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: var(--text-main);
    transition: background 0.3s;
    overflow-x: hidden;
}

/* --- 3. LAYOUT STRUCTURE --- */
.sidebar { 
    width: 280px;
    height: 100vh; 
    position: fixed;
    top: 0;
    left: 0;
    background: var(--card-bg); 
    border-right: 1px solid var(--border-color);
    border-radius: 0 40px 0 0;
    z-index: 1060;
    transition: var(--transition-std);
    padding: 2.5rem 1.5rem;
    overflow-y: auto;
}

.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    transition: var(--transition-std);
    position: relative;
}

.sidebar-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.3); 
    backdrop-filter: blur(2px); 
    z-index: 1050; 
}
.sidebar-overlay.active { display: block; }

/* --- 4. NAVIGATION --- */
.nav-link { 
    color: var(--text-muted); 
    padding: 14px 20px; 
    border-radius: 15px;
    margin-bottom: 8px; 
    font-weight: 600; 
    transition: 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.nav-link i { 
    width: 20px; 
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--p-green);
    background: rgba(40, 90, 72, 0.05);
}

.nav-link.active { 
    background: #f0f4f2; 
    color: var(--p-green) !important; 
}

/* --- 5. TOPBAR --- */
.top-bar {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 6. UI COMPONENTS --- */
.glass-card, .stat-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 25px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 20px;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card:hover { transform: translateY(-5px); }

.finance-box {
    background: var(--p-green);
    color: white;
}

.clickable-box {
    display: flex;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    border-radius: 15px;
}
.clickable-box:hover { background: rgba(40, 90, 72, 0.05); }

/* --- 7. BUTTONS (THE GRADIENT ENGINE) --- */

/* Tombol Global Ostrin */
.btn-ostrin, .btn-update, .btn-login {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: 15px;
    padding: 12px 25px;
    font-weight: 700;
    transition: var(--transition-std) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(40, 90, 72, 0.2);
}

.btn-ostrin:hover, .btn-update:hover, .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 90, 72, 0.3);
    opacity: 0.95;
    color: white !important;
}

/* Profile Circle Button */
.profile-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- 8. RESPONSIVE --- */
@media (max-width: 992px) {
    .main-content { 
        margin-left: 0; 
        width: 100%;
    }
    .sidebar { 
        left: -280px; 
    }
    .sidebar.active { 
        left: 0; 
        box-shadow: 15px 0 30px rgba(0,0,0,0.1); 
    }
    .top-bar { padding: 15px 20px; }
}

/* --- 9. UTILITIES --- */
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.rounded-4 { border-radius: 1.2rem; }
.text-p-green { color: var(--p-green); }