/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Pluto Theme Palette */
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #ff5722;
    /* Orange Accent */
    --accent-color: #10b981;
    /* Green */

    --background-color: #f1f5f9;
    /* Light background for content */
    --card-bg: #ffffff;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    /* On Pluto, collapse usually hides or minifies. Let's stick to 0 for mobile-like toggle or mini icons? User image shows full sidebar. Let's keep 260px. Collapsed = 0 or 70px. Let's try 0 for "Toggle" effect like a drawer, or 80px for icons. */
    --sidebar-collapsed-width-desktop: 80px;

    --sidebar-bg: #151b26;
    /* Very Dark Navy */
    --header-bg: #151b26;
    /* Matching Header */

    --sidebar-text: #a0aec0;
    --sidebar-active-bg: #2d3748;
    /* Slightly lighter for active item */
    --sidebar-active-text: #ffffff;
    --orange-toggle: #ff5722;

    --header-height: 60px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
    /* On Desktop, always visible by default */
}

/* Mobile: Hidden by default */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .app-container.collapsed .sidebar {
        transform: translateX(0);
        /* On mobile, "collapsed" class toggles visibility */
    }
}

/* Sidebar User Panel */
.sidebar-user-panel {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4a5568;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    margin-right: 1rem;
    overflow: hidden;
}

.user-info-mini .username {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.status {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 0.35rem;
}

/* Section Header */
.sidebar-category {
    padding: 1.5rem 1.5rem 0.5rem;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.nav-menu {
    list-style: none;
    padding: 0.5rem 0;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    transition: all 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.02);
}

.nav-link.active {
    color: white;
    background: #1a202c;
    /* Slightly darker/lighter for contrast */
    border-left-color: var(--secondary-color);
    /* Orange Accent */
}

/* Top Bar */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
}

.top-bar {
    height: var(--header-height);
    background-color: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

.top-bar-left {
    display: flex;
    align-items: center;
    height: 100%;
}

.btn-toggle-orange {
    background: var(--orange-toggle);
    border: none;
    color: white;
    height: 100%;
    width: 60px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-toggle-orange:hover {
    background: #e64a19;
}

.brand-header {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.brand-logo-small {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-right: 0.75rem;
}

.brand-text-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    padding-right: 1.5rem;
    gap: 1.5rem;
}

.icon-btn {
    position: relative;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: white;
}

.badge-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.badge-dot.warning {
    background: #f59e0b;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: white;
}

.user-name-header {
    font-weight: 500;
}

/* User Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 200px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
    margin-top: 0.75rem;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-main);
    transition: background 0.1s;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    color: var(--text-muted);
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.25rem 0;
}


/* Content Area */
.content-area {
    padding: 2rem;
    background-color: var(--background-color);
    flex: 1;
}

/* Card Styles */
.card,
.stat-card-new,
.chart-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: none;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Utilities */
.d-none {
    display: none !important;
}

/* Responsive adjustments for collapsed Desktop state if needed */
.app-container.collapsed .sidebar {
    width: var(--sidebar-collapsed-width-desktop);
    overflow: visible;
}

.app-container.collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width-desktop);
}

.app-container.collapsed .link-text,
.app-container.collapsed .sidebar-user-panel,
.app-container.collapsed .sidebar-category {
    display: none;
}

.app-container.collapsed .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.app-container.collapsed .nav-link i {
    margin-right: 0;
}