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

:root {
    /* Color Palette - Premium Slate Light Mode */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-color-focus: rgba(99, 102, 241, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #10b981; /* Emerald/Money Green */
    --primary-hover: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.1);
    
    --accent: #6366f1; /* Indigo/AI Purple */
    --accent-hover: #818cf8;
    
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    /* Layout Constants */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Shadows & Glows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.2);
    --glow-indigo: 0 0 20px rgba(99, 102, 241, 0.2);
    
    /* Co-Pilot Variables */
    --hairline: #e2e8f0;
    --hairline-strong: #cbd5e1;
    --emerald: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

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

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-body {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 72px; /* ancho contraído por defecto */
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.sidebar:hover {
    width: 275px; /* ancho expandido de 275px para acomodar holgadamente x BANORTE sin cortes en el borde derecho */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* Brand styling */
.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    justify-content: flex-start;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.25rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.brand-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 24px; /* reduced to 24px to completely hide the letter 'P' of text */
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-logo-img {
    height: 32px;
    width: auto;
    max-width: none; /* prevent image shrinking when container is narrow */
    object-fit: contain;
}
.brand-divider {
    color: #cbd5e1;
    margin: 0 0.15rem;
    font-weight: 300;
    font-size: 0.95rem;
    display: inline-block;
    opacity: 1;
}
.brand-name-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Status Box */
.status-card {
    padding: 0.5rem 0.25rem;
    margin: 1rem 0.5rem;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    overflow: hidden;
}
.status-card-full {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    opacity: 0;
    width: 200px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.status-card-collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 1;
    transition: opacity 0.2s ease;
}
.status-active-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}
.status-green-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.status-green-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: #10b981;
    animation: status-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes status-ping {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70%, 100% {
        transform: scale(2.5);
        opacity: 0;
    }
}
.status-active-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.status-monitored-val {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
    white-space: nowrap;
}
.status-monitored-val-short {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 18px;
    margin-top: 0.25rem;
}
.chart-bar {
    width: 3px;
    background-color: #cbd5e1;
    border-radius: 1px;
    transition: background-color 0.2s ease;
}
.chart-bar.active {
    background-color: #10b981;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 0.75rem 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    transition: all 0.3s ease;
}
.sidebar-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 0.75rem 0.75rem 0.375rem;
    font-weight: 700;
    white-space: nowrap;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}
.menu-item-text {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.menu-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}
.menu-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.menu-item svg {
    stroke: #64748b;
    transition: stroke 0.2s ease;
}
.menu-item.active {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}
.menu-item.active svg {
    stroke: #0f172a;
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background-color: #000000;
    border-radius: 0 2px 2px 0;
}

/* Hover layouts - Transitions to expanded state */
.sidebar:hover .brand-logo-container {
    width: 140px; /* expanded width to show the entire logo image content including the '+' symbol */
}
.sidebar:hover .brand-name-text,
.sidebar:hover .sidebar-category,
.sidebar:hover .menu-item-text {
    display: inline-block;
    opacity: 1;
}
.sidebar:hover .sidebar-brand {
    padding: 0 1.25rem;
}
.sidebar:hover .status-card {
    margin: 1rem 0.75rem 0.5rem;
    padding: 1rem;
}
.sidebar:hover .status-card-collapsed {
    display: none;
    opacity: 0;
}
.sidebar:hover .status-card-full {
    display: flex;
    opacity: 1;
}
.sidebar:hover .sidebar-menu {
    align-items: stretch;
    padding: 0.75rem 0.5rem;
}
.sidebar:hover .menu-item {
    justify-content: flex-start;
    width: auto;
    height: auto;
    padding: 0.65rem 0.75rem;
    gap: 1.15rem; /* space out text from menu icons */
}

/* Constancia en layout principal para evitar brincos de pantalla */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 72px; /* Margen fijo y estable */
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}


/* Header Styling */
.header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    width: 300px;
    gap: 0.5rem;
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

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

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    padding-left: 1.25rem;
    border-left: 1px solid var(--border-color);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

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

/* Footer Styling */
.footer {
    padding: 1.5rem 2rem;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Form Styles - Login Page specific */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    padding: 1.5rem;
}

.login-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-container {
    position: relative;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: var(--glow-indigo);
    background-color: rgba(255, 255, 255, 0.04);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--glow-emerald);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Spinner loading */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn.loading .btn-text {
    opacity: 0.7;
}

.btn.loading .spinner {
    display: inline-block;
}

/* Feedback messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Dashboard & Cards UI */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
}

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

.kpi-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.kpi-icon.indigo {
    color: var(--accent);
}

.kpi-icon.warning {
    color: var(--warning);
}

.kpi-icon.info {
    color: var(--info);
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-up {
    color: var(--primary);
}

.trend-down {
    color: var(--danger);
}

.trend-label {
    color: var(--text-muted);
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* SVG Chart Mock */
.chart-placeholder {
    width: 100%;
    height: 280px;
    background-color: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Tablas Premium */
.table-container {
    width: 100%;
    overflow-x: auto;
}

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

th {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* IA Copilot and modules styling */
.copilot-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 130px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    overflow: hidden;
}

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

.chat-bubble {
    max-width: 75%;
    padding: 1rem;
    border-radius: var(--radius-md);
    line-height: 1.4;
    font-size: 0.9rem;
}

.bubble-user {
    background-color: var(--primary-glow);
    color: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.bubble-assistant {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.copilot-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 0.75rem;
}

/* Responsive queries */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-body {
        padding: 1rem;
    }
}

/* Co-Pilot Global Styles */
.app-container {
    transition: filter 0.3s ease;
}
.app-container.copilot-active {
    filter: blur(8px);
    pointer-events: none;
}

/* Co-Pilot Backdrop Overlay */
.copilot-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(10, 10, 10, 0.25) !important;
    backdrop-filter: blur(4px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 99990 !important;
    transition: opacity 0.3s ease !important;
}
.copilot-backdrop.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Co-Pilot Drawer Styles */
.copilot-drawer {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-left: 1px solid var(--hairline) !important;
    background-color: #ffffff !important;
    box-shadow: 0 24px 60px -20px rgba(10,10,10,0.35) !important;
    transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1) !important;
    width: min(760px, 96vw) !important;
}
.copilot-drawer.translate-x-full {
    transform: translateX(100%) !important;
}
.copilot-drawer.translate-x-0 {
    transform: translateX(0) !important;
}

.h-11 { height: 2.75rem !important; }
.w-11 { width: 2.75rem !important; }
.h-9 { height: 2.25rem !important; }
.w-9 { width: 2.25rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.blur-\[10px\] { filter: blur(10px) !important; }
.inset-y-0 { top: 0 !important; bottom: 0 !important; }
.inset-x-0 { left: 0 !important; right: 0 !important; }
.top-0 { top: 0 !important; }
.h-full { height: 100% !important; }
.bg-\[color\:var\(--emerald-soft\)\] { background-color: var(--emerald-soft) !important; }
.bg-\[color\:var\(--emerald\)\] { background-color: var(--emerald) !important; }
.text-\[color\:var\(--emerald\)\] { color: var(--emerald) !important; }
.relative { position: relative !important; }
.bg-\[\#FEF2F2\] { background-color: #FEF2F2 !important; }
.text-\[\#EB0029\] { color: #EB0029 !important; }
.text-\[15px\] { font-size: 15px !important; }
.text-\[13\.5px\] { font-size: 13.5px !important; }
.text-\[11\.5px\] { font-size: 11.5px !important; }
.text-\[11px\] { font-size: 11px !important; }
.text-\[10px\] { font-size: 10px !important; }
.text-\[9\.5px\] { font-size: 9.5px !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.flex-1 { flex: 1 1 0% !important; }
.overflow-y-auto { overflow-y: auto !important; }

.space-y-6 > * + * { margin-top: 1.5rem !important; }
.space-y-3 > * + * { margin-top: 0.75rem !important; }

.gap-px { gap: 1px !important; }
.h-px { height: 1px !important; }
.bg-\[\#F4F4F5\] { background-color: #F4F4F5 !important; }

.min-h-\[36px\] { min-height: 36px !important; }
.max-h-\[120px\] { max-height: 120px !important; }
.resize-none { resize: none !important; }
.outline-none { outline: none !important; }
.shrink-0 { flex-shrink: 0 !important; }

.copilot-input-container:focus-within {
    border-color: rgba(10, 10, 10, 0.3) !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px -18px rgba(10,10,10,0.35) !important;
}

/* Co-Pilot Utility classes declarations */
.inline-flex {
    display: inline-flex !important;
}
.rounded-full {
    border-radius: 9999px !important;
}
.bg-white {
    background-color: #ffffff !important;
}
.p-0\.5 {
    padding: 0.125rem !important;
}
.px-2\.5 {
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
}
.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}
.bg-\[\#0A0A0A\] {
    background-color: #0A0A0A !important;
}
.text-white {
    color: #ffffff !important;
}
.border {
    border: 1px solid var(--hairline) !important;
}
.border-b {
    border-bottom: 1px solid var(--hairline) !important;
}
.border-t {
    border-top: 1px solid var(--hairline) !important;
}
.bg-\[\#FEF2F2\] {
    background-color: #FEF2F2 !important;
}
.bg-\[\#F4F4F5\] {
    background-color: #F4F4F5 !important;
}
.bg-\[\#FAFAFA\] {
    background-color: #FAFAFA !important;
}
.text-\[\#EB0029\] {
    color: #EB0029 !important;
}
.text-\[\#0A0A0A\] {
    color: #0A0A0A !important;
}
.text-white\/60 {
    color: rgba(255, 255, 255, 0.6) !important;
}
.text-white\/70 {
    color: rgba(255, 255, 255, 0.7) !important;
}
.rounded-xl {
    border-radius: 0.75rem !important;
}
.rounded-lg {
    border-radius: 0.5rem !important;
}
.rounded-md {
    border-radius: 0.375rem !important;
}
.shadow-\[0_10px_24px_-10px_rgba\(10\,10\,10\,0\.7\)\] {
    box-shadow: 0 10px 24px -10px rgba(10,10,10,0.7) !important;
}
.text-\[22px\] {
    font-size: 22px !important;
}
.leading-relaxed {
    line-height: 1.625 !important;
}
.leading-none {
    line-height: 1 !important;
}
.font-semibold {
    font-weight: 600 !important;
}
.font-medium {
    font-weight: 500 !important;
}
.shrink-0 {
    flex-shrink: 0 !important;
}
.gap-2 {
    gap: 0.5rem !important;
}
.gap-3 {
    gap: 0.75rem !important;
}
.gap-1 {
    gap: 0.25rem !important;
}
.gap-px {
    gap: 1px !important;
}
.h-px {
    height: 1px !important;
}
.inset-x-0 {
    left: 0 !important;
    right: 0 !important;
}
.top-0 {
    top: 0 !important;
}
.h-full {
    height: 100% !important;
}
.h-5 {
    height: 1.25rem !important;
}
.w-5 {
    width: 1.25rem !important;
}
.h-8 {
    height: 2rem !important;
}
.w-8 {
    width: 2rem !important;
}
.h-3 {
    height: 0.75rem !important;
}
.w-3 {
    width: 0.75rem !important;
}
.h-2 {
    height: 0.5rem !important;
}
.w-2 {
    width: 0.5rem !important;
}
.px-3 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}
.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}
.px-5 {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}
.py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}
.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
.py-6 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
.pb-4 {
    padding-bottom: 1rem !important;
}
.mb-2 {
    margin-bottom: 0.5rem !important;
}
.mt-0\.5 {
    margin-top: 0.125rem !important;
}
.mt-1\.5 {
    margin-top: 0.375rem !important;
}
.mt-2 {
    margin-top: 0.5rem !important;
}
.ml-1 {
    margin-left: 0.25rem !important;
}
.duration-300 {
    transition-duration: 300ms !important;
}
.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
}
.border-l {
    border-left-width: 1px !important;
}
.z-\[70\] {
    z-index: 99999 !important;
}
.absolute {
    position: absolute !important;
}
.pointer-events-none {
    pointer-events: none !important;
}
.opacity-80 {
    opacity: 0.8 !important;
}

/* Co-Pilot Toggle Button Styles */
#copilot-toggle {
    position: fixed !important;
    bottom: 16px !important;
    right: 24px !important;
    z-index: 99999 !important;
    overflow: visible !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
    color: #ffffff !important;
    box-shadow: 0 18px 40px -14px rgba(10,10,10,0.55) !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#copilot-toggle:hover {
    box-shadow: 0 22px 50px -16px rgba(10,10,10,0.65) !important;
    transform: scale(1.02) !important;
}
#copilot-toggle .blur-\[8px\] {
    filter: blur(8px) !important;
}
#copilot-toggle .opacity-60 {
    opacity: 0.6 !important;
}
#copilot-toggle .transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
#copilot-toggle:hover .group-hover\:opacity-90 {
    opacity: 0.9 !important;
}
#copilot-toggle .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
#copilot-toggle .-right-0\.5 {
    right: -0.125rem !important;
}
#copilot-toggle .-top-0\.5 {
    top: -0.125rem !important;
}
#copilot-toggle .animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
#copilot-toggle .bg-\[conic-gradient\(from_140deg\,rgba\(235\,0\,41\,0\.45\)\,rgba\(59\,130\,246\,0\.3\)\,rgba\(16\,185\,129\,0\.35\)\,rgba\(235\,0\,41\,0\.45\)\)\] {
    background: conic-gradient(from 140deg,rgba(235,0,41,0.45),rgba(59,130,246,0.3),rgba(16,185,129,0.35),rgba(235,0,41,0.45)) !important;
}
#copilot-toggle .-inset-0\.5 {
    top: -0.125rem !important;
    bottom: -0.125rem !important;
    left: -0.125rem !important;
    right: -0.125rem !important;
}

/* Chat Header Gradients */
.bg-\[radial-gradient\(ellipse_at_top_right\,rgba\(235\,0\,41\,0\.07\)\,transparent_55\%\)\] {
    background: radial-gradient(ellipse at top right, rgba(235,0,41,0.07), transparent 55%) !important;
}
.bg-gradient-to-br.from-\[\#EB0029\].via-\[\#0A0A0A\].to-\[\#3B82F6\] {
    background: linear-gradient(to bottom right, #EB0029, #0A0A0A, #3B82F6) !important;
}
.opacity-80 {
    opacity: 0.8 !important;
}

/* Global Flex and Grid Layout Utilities */
.flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-baseline { align-items: baseline !important; }
.justify-between { justify-content: space-between !important; }
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.hidden { display: none !important; }

/* Negative positioning utility classes */
.-bottom-0\.5 { bottom: -0.125rem !important; }
.-right-0\.5 { right: -0.125rem !important; }
.-top-0\.5 { top: -0.125rem !important; }

/* Mobile utilities */
@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
}

.bg-gradient-to-b.from-white.via-white.to-\[\#FAFAFA\] {
    background: linear-gradient(to bottom, #ffffff, #ffffff, #FAFAFA) !important;
}
.bg-\[radial-gradient\(ellipse_at_top\,rgba\(235\,0\,41\,0\.06\)\,transparent_60\%\)\] {
    background: radial-gradient(ellipse at top, rgba(235,0,41,0.06), transparent 60%) !important;
}
.text-\[\#3B82F6\] {
    color: #3B82F6 !important;
}

/* Co-Pilot Metrics Grid and Cells styling */
.copilot-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background-color: var(--hairline) !important;
    gap: 1px !important;
}

.copilot-metrics-cell {
    background-color: #ffffff !important;
    padding: 1.25rem 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

@media (min-width: 768px) {
    .copilot-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .copilot-metrics-cell:not(:last-child) {
        border-right: 1px solid var(--hairline) !important;
    }
    .md\:px-7 { padding-left: 1.75rem !important; padding-right: 1.75rem !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .md\:inline-flex { display: inline-flex !important; }
}

#copilot-textarea,
#copilot-textarea:focus,
#copilot-textarea:active,
#copilot-textarea:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}










