/*-- -------------------------- -->
<---  LifeOS Component Styles  -->
<--- -------------------------- -*/

/* UI components: cards, buttons, navigation, dropdowns
 * Source: mockup lines 162-630
 */

/* ========== Sidebar Components ========== */

/* Sidebar Header */
.sidebar-header {
    height: 4rem;
    padding-inline: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid hsl(var(--border));
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: hsl(var(--foreground));
    border-radius: 0.5rem;
    color: hsl(var(--background));
}

.dark .logo-icon {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    letter-spacing: -0.01em;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid hsl(var(--border));
}

/* ========== Navigation Components ========== */

/* Navigation Sections */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-label {
    padding-inline: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Navigation Links */
.lifeos-nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--muted-foreground));
    transition: all 0.2s;
    text-decoration: none;
}

.lifeos-nav-link:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--foreground));
}

.lifeos-nav-link.active {
    background-color: hsl(var(--secondary));
    color: hsl(var(--foreground));
    font-weight: 500;
}

.lifeos-nav-link i {
    margin-right: 0.75rem;
    height: 1rem;
    width: 1rem;
}

/* ========== Button Components ========== */

/* Icon Buttons */
.lifeos-btn {
    padding: 0.5rem;
    border-radius: 9999px;
    background-color: transparent;
    color: hsl(var(--muted-foreground));
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lifeos-btn:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--foreground));
}

.lifeos-btn i {
    height: 1.25rem;
    width: 1.25rem;
}

/* ========== Theme Toggle ========== */

.theme-icon {
    height: 1.25rem;
    width: 1.25rem;
}

.theme-icon--light {
    display: block;
}

.theme-icon--dark {
    display: none;
}

.dark .theme-icon--light {
    display: none;
}

.dark .theme-icon--dark {
    display: block;
}

/* ========== Profile Components ========== */

.profile-dropdown-container {
    position: relative;
}

.profile-button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 2px solid hsl(var(--border));
    background-color: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* Dropdown Menu */
.lifeos-dropdown {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 18rem;
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 1rem;
    z-index: 50;
    display: none;
}

.lifeos-dropdown.show {
    display: block;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-avatar-large {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: 2px solid hsl(var(--muted));
    background-color: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    font-size: 1.25rem;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: rgb(16 185 129);
    border: 2px solid hsl(var(--background));
}

.profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.profile-role {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid hsl(var(--border));
    margin-block: 0.5rem;
}

.dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background-color: hsl(var(--accent));
}

.dropdown-item i {
    width: 1rem;
    height: 1rem;
}

.dropdown-badge {
    margin-left: auto;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* ========== Header Components ========== */

/* Header Layout */
.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .header-left,
    .header-right {
        gap: 0.5rem;
    }
}

/* Responsive Visibility */
.mobile-only {
    display: block;
}

@media (min-width: 1024px) {
    .mobile-only {
        display: none;
    }
}

.desktop-only {
    display: none;
}

@media (min-width: 640px) {
    .desktop-only {
        display: flex;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-item {
    color: hsl(var(--foreground));
}

.breadcrumb-item.current {
    color: hsl(var(--muted-foreground));
}

.breadcrumb-separator {
    height: 1rem;
    width: 1rem;
    color: hsl(var(--muted-foreground));
    margin-inline: 0.25rem;
}

/* ========== Card Components ========== */

/* Top Metric Cards */
.lifeos-metric-card {
    background-color: hsl(var(--card));
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 8rem;
    transition: border-color 0.2s;
}

.lifeos-metric-card:hover {
    border-color: hsl(var(--muted));
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-top: 0.25rem;
}

.metric-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon i {
    width: 1rem;
    height: 1rem;
}

/* Metric Icon Color Variants */
.metric-icon--emerald {
    background-color: rgb(236 253 245);
    color: rgb(5 150 105);
}

.dark .metric-icon--emerald {
    background-color: rgb(5 150 105 / 0.2);
    color: rgb(52 211 153);
}

.metric-icon--blue {
    background-color: rgb(239 246 255);
    color: rgb(37 99 235);
}

.dark .metric-icon--blue {
    background-color: rgb(37 99 235 / 0.2);
    color: rgb(96 165 250);
}

.metric-icon--amber {
    background-color: rgb(254 252 232);
    color: rgb(217 119 6);
}

.dark .metric-icon--amber {
    background-color: rgb(217 119 6 / 0.2);
    color: rgb(251 191 36);
}

.metric-icon--purple {
    background-color: rgb(250 245 255);
    color: rgb(147 51 234);
}

.dark .metric-icon--purple {
    background-color: rgb(147 51 234 / 0.2);
    color: rgb(192 132 252);
}

.metric-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.metric-change {
    font-weight: 500;
}

.metric-change--positive {
    color: rgb(5 150 105);
}

.dark .metric-change--positive {
    color: rgb(52 211 153);
}

.metric-change-label {
    color: hsl(var(--muted-foreground));
}

/* Dashboard Cards (larger cards in main grid) */
.lifeos-dashboard-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Section Titles */
.lifeos-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-inline: 0.25rem;
    margin-bottom: 1rem;
}

.lifeos-section-title i {
    width: 1rem;
    height: 1rem;
}
