/*
 * PārthaOS Design System - v2.1 (Mobile & Security Fixes)
 */

:root {
    --bg-body: #0f172a;         
    --bg-sidebar: #0b1120;
    --bg-content: #1e293b;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;    
    --text-secondary: #94a3b8;  
    --neon-accent: #38bdf8;     
    --danger: #ef4444;          
    --sidebar-width: 280px;
}

body {
    margin: 0; padding: 0; font-family: 'Inter', sans-serif;
    background: var(--bg-body); color: var(--text-primary); overflow: hidden;
}

#partha-fs-wrapper { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* SIDEBAR (Desktop) */
.p-sidebar {
    width: var(--sidebar-width); background: var(--bg-sidebar);
    border-right: var(--glass-border); display: flex; flex-direction: column;
    padding: 30px; flex-shrink: 0; overflow-y: auto; z-index: 50;
}

.p-brand {
    margin-bottom: 50px; display: flex; align-items: center;
    font-weight: 700; font-size: 20px; color: #fff;
}

.p-nav-item {
    display: flex; align-items: center; gap: 15px; padding: 14px 18px;
    color: var(--text-muted); text-decoration: none; border-radius: 12px;
    margin-bottom: 8px; transition: all 0.2s ease; font-weight: 500; cursor: pointer;
}
.p-nav-item:hover, .p-nav-item.active { background: rgba(56, 189, 248, 0.1); color: var(--neon-accent); }
.p-nav-item.active { font-weight: 600; }
.p-nav-item .dashicons { font-size: 22px; width: 22px; height: 22px; display: flex; justify-content: center; align-items: center; }

/* MAIN CONTENT */
.p-main {
    flex-grow: 1; background: var(--bg-content);
    background-image: radial-gradient(circle at top right, rgba(56, 189, 248, 0.05), transparent 40%);
    overflow-y: auto; padding: 40px; position: relative;
}

.p-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.p-title h1 { font-size: 32px; margin: 0; font-weight: 700; color: #fff; }
.p-title p { color: var(--text-muted); margin-top: 8px; }

.p-user-badge {
    background: rgba(255,255,255,0.03); border: var(--glass-border);
    padding: 8px 16px; border-radius: 30px; display: flex; align-items: center; gap: 10px;
}
.p-avatar { width: 36px; height: 36px; border-radius: 50%; }

/* COMPONENTS */
.partha-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; margin-bottom: 30px; }
.partha-card { background: rgba(255,255,255,0.02); border: var(--glass-border); border-radius: 16px; padding: 30px; backdrop-filter: blur(10px); }
.partha-card-title { margin-top:0; margin-bottom: 25px; font-size: 18px; font-weight: 600; }

.partha-metric-card { display: flex; align-items: center; gap: 25px; }
.partha-metric-icon { width: 64px; height: 64px; background: rgba(56, 189, 248, 0.1); color: var(--neon-accent); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.partha-metric-icon .dashicons { font-size: 32px; width: 32px; height: 32px; }
.partha-metric-data h3 { font-size: 36px; margin: 0; font-weight: 700; color: #fff; }

.partha-btn { background: var(--neon-accent); color: #0f172a; padding: 14px 28px; border-radius: 10px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; border: none; cursor: pointer; }
.partha-alert-banner { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); color: #fca5a5; padding: 20px; border-radius: 12px; margin-bottom: 30px; display: flex; align-items: center; gap: 15px; }

.partha-table { width: 100%; border-collapse: collapse; }
.partha-table th { text-align: left; color: var(--text-muted); padding: 15px; border-bottom: var(--glass-border); font-size: 13px; text-transform: uppercase; }
.partha-table td { padding: 20px 15px; border-bottom: var(--glass-border); }
.partha-link-btn { background: rgba(56, 189, 248, 0.1); color: var(--neon-accent); padding: 8px 16px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 13px; }

.partha-service-list li, .partha-file-list li { border-bottom: var(--glass-border) !important; padding: 20px 0 !important; }

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 900px) {
    #partha-fs-wrapper { flex-direction: column; }
    
    /* Bottom App Bar */
    .p-sidebar {
        position: fixed; bottom: 0; left: 0; width: 100%; height: 80px;
        flex-direction: row; justify-content: space-around; align-items: center;
        padding: 0; background: #0f172a; border-top: 1px solid rgba(255,255,255,0.1);
        border-right: none; z-index: 1000;
    }
    
    .p-brand { display: none; }
    
    /* Nav Items Stacked Vertically */
    .p-nav-item {
        flex-direction: column; gap: 6px; padding: 8px; 
        font-size: 11px; background: transparent !important; margin: 0;
        width: 60px; justify-content: center;
    }
    
    .p-nav-item .dashicons { font-size: 24px; width: 24px; height: 24px; margin-bottom: 0; }
    .p-nav-item.active { color: var(--neon-accent); }
    
    /* Fix Logout Button */
    .p-sidebar div:last-child { margin-top: 0; } 
    .p-sidebar a[href*="logout"] { color: var(--danger); }

    /* Content Padding for Mobile */
    .p-main { padding: 20px 20px 100px 20px; } 
    .p-header { flex-direction: column; gap: 20px; }
    .partha-grid-2 { grid-template-columns: 1fr; }
}