/* HUBITAT BY FRAME IA - DESIGN SYSTEM & MODERN STYLES */

:root {
    /* Color Palette - Premium Zinc & Deep Purple */
    --bg-dark: #09090b; /* Zinc 950 */
    --bg-card: #18181b; /* Zinc 900 */
    --bg-card-hover: #202024;
    --bg-sidebar: #0f0f11;
    --border-color: #27272a; /* Zinc 800 */
    --border-highlight: rgba(139, 92, 246, 0.35); /* Soft Violet */

    /* Accents - Premium Violet/Purple */
    --primary: #8b5cf6; /* Violet */
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.2);
    --secondary: #a855f7; /* Purple */
    --secondary-hover: #9333ea;
    --emerald-accent: #c084fc; /* Light Violet */
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #8b5cf6;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Text Colors */
    --text-main: #f4f4f5; /* Zinc 100 */
    --text-muted: #a1a1aa; /* Zinc 400 */
    --text-dim: #71717a; /* Zinc 500 */

    /* Layout & Shadows */
    --sidebar-width: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --glass-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

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

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

.shadow-sm { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
.shadow-lg { box-shadow: var(--glass-shadow); }

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #d8b4fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: #71717a; /* Zinc 500 */
    letter-spacing: 0.5px;
}

/* Condo Selector Card */
.condo-selector-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.condo-icon {
    width: 32px;
    height: 32px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.condo-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.condo-info label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.condo-info select {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    width: 100%;
}

.condo-info select option {
    background-color: var(--bg-sidebar);
    color: #fff;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.05));
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

/* Regional Badge */
.regional-badge-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.regional-icon {
    color: var(--secondary);
    font-size: 1.2rem;
}

.regional-text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.regional-text strong {
    color: #fff;
}

.regional-text span {
    color: var(--text-muted);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* MAIN CONTENT */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem 2.5rem;
    min-width: 0;
}

/* Top Header */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.header-title .subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 280px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
}

/* Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.action-btn.primary {
    background: #121214;
    border: 1px solid var(--primary);
    color: #c084fc;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.action-btn.primary:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.action-btn.emerald {
    background: #121214;
    border: 1px solid var(--emerald-accent);
    color: var(--emerald-accent);
    font-weight: 600;
}

.action-btn.emerald:hover {
    background: var(--emerald-accent);
    color: #121214;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.35);
}

.action-btn.emerald.wide {
    width: 100%;
    padding: 0.85rem;
}

.action-btn.success {
    background: #121214;
    border: 1px solid var(--success);
    color: var(--success);
    font-weight: 600;
}

.action-btn.success:hover {
    background: var(--success);
    color: #121214;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-secondary.sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
.btn-ghost.sm { background: transparent; border: none; color: var(--primary); cursor: pointer; font-size: 0.8rem; font-weight: 600; }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.notification-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
}

/* Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;

}

.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-pulse { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #fff; font-size: 0.65rem; }

/* TAB SYSTEM */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* METRICS GRID */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.metric-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.metric-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.metric-icon.primary { background: rgba(99, 102, 241, 0.15); color: var(--secondary); }
.metric-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--info); }

.metric-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.metric-footer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
}

.trend.positive { color: var(--success); font-weight: 600; }
.trend.negative { color: var(--warning); font-weight: 600; }
.trend.neutral { color: var(--text-main); font-weight: 600; }
.subtext { color: var(--text-dim); }

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-grid.bottom {
    grid-template-columns: 1fr 1fr;
}

.card {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

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

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* O.S. Mini List */
.os-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.os-mini-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.os-mini-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.os-mini-left {
    display: flex;
    flex-direction: column;
}

.os-mini-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.os-mini-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Space Status List */
.space-status-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.space-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.space-thumb {
    width: 60px;
    height: 48px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
}

.space-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.space-details strong {
    font-size: 0.88rem;
    color: #fff;
}

.space-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Timeline Activity */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.85rem;
    font-size: 0.82rem;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.activity-content strong {
    color: #fff;
}

.activity-content p {
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* AI Insight Card */
.ai-insight-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ai-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ai-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ai-body h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.ai-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.ai-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* TABLES */
.table-container {
    border-radius: var(--radius-xl);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* TAB OS ACTIONS */
.tab-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border-color: var(--primary-glow);
}

/* SPACES GRID */
.spaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.space-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.space-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.space-overlay-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.space-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.space-body h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
}

.space-body p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.space-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.space-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

/* VISITORS & PORTARIA */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.visitor-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.visitor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
}

.visitor-info strong {
    color: #fff;
    font-size: 0.88rem;
}

.visitor-info span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* COPILOT CHAT INTERFACE */
.copilot-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: calc(100vh - 170px);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.copilot-sidebar {
    background: rgba(14, 19, 31, 0.8);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.copilot-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--secondary);
}

.copilot-brand i { font-size: 1.5rem; }
.copilot-brand strong { font-family: var(--font-heading); color: #fff; font-size: 0.95rem; }
.copilot-brand span { font-size: 0.7rem; color: var(--text-muted); display: block; }

.prompt-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.prompt-suggestions label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.prompt-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
}

.copilot-chat-area {
    display: flex;
    flex-direction: column;
    background: rgba(10, 13, 20, 0.6);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.85rem;
    max-width: 80%;
}

.chat-message.bot { align-self: flex-start; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }

.bot-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.message-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-lg);
    font-size: 0.88rem;
    color: var(--text-main);
}

.chat-message.user .message-bubble {
    background: var(--primary);
    color: #000;
    font-weight: 500;
    border: none;
}

.chat-input-wrapper {
    padding: 1rem 1.5rem;
    background: rgba(14, 19, 31, 0.9);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.chat-input-wrapper input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    color: #fff;
    outline: none;
    font-size: 0.88rem;
}

.chat-input-wrapper input:focus {
    border-color: var(--secondary);
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    border-radius: var(--radius-xl);
    padding: 1.75rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #fff;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.readonly-input {
    background: rgba(255, 255, 255, 0.08) !important;
    font-weight: 700;
    color: var(--primary) !important;
}

/* TOAST */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    background: var(--bg-sidebar);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Helper Utilities */
.color-primary { color: var(--primary); }
.color-emerald { color: var(--emerald-accent); }
.color-info { color: var(--info); }
.margin-top-lg { margin-top: 2rem; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1.25rem; }
    .mobile-toggle-btn { display: block; }
    .dashboard-grid, .dashboard-grid.bottom, .copilot-container { grid-template-columns: 1fr; }
    .search-box { display: none; }
}

/* LOGIN OVERLAY STYLES */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #09090b;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.4s ease;
}

.login-overlay.active {
    display: flex;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: #18181b;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.login-brand-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 30px var(--primary-glow);
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-card .form-group {
    text-align: left;
}

.login-card .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.margin-top-sm {
    margin-top: 1rem;
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SOCIAL LOGIN STYLES */
.social-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1.25rem 0;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 500;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.social-login-divider:not(:empty)::before {
    margin-right: .5em;
}

.social-login-divider:not(:empty)::after {
    margin-left: .5em;
}

.social-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.social-btn {
    background: #121214;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.social-btn i {
    font-size: 1.1rem;
}

.social-btn:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    color: #fff;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}
